diff --git a/go.mod b/go.mod index 723a7b1e5..3a67c8506 100644 --- a/go.mod +++ b/go.mod @@ -17,7 +17,7 @@ require ( github.com/armon/circbuf v0.0.0-20150827004946-bbbad097214e github.com/armon/go-metrics v0.0.0-20180917152333-f0300d1749da // indirect github.com/armon/go-radix v0.0.0-20160115234725-4239b77079c7 // indirect - github.com/aws/aws-sdk-go v1.14.31 + github.com/aws/aws-sdk-go v1.15.48 github.com/beevik/etree v0.0.0-20171015221209-af219c0c7ea1 // indirect github.com/bgentry/go-netrc v0.0.0-20140422174119-9fd32a8b3d3d // indirect github.com/bgentry/speakeasy v0.0.0-20161015143505-675b82c74c0e // indirect @@ -26,8 +26,8 @@ require ( github.com/chzyer/logex v1.1.10 // indirect github.com/chzyer/readline v0.0.0-20161106042343-c914be64f07d github.com/chzyer/test v0.0.0-20180213035817-a1ea475d72b1 // indirect - github.com/cockroachdb/cmux v0.0.0-20170110192607-30d10be49292 // indirect - github.com/coreos/etcd v3.2.7+incompatible + github.com/coreos/bbolt v1.3.0 // indirect + github.com/coreos/etcd v3.3.10+incompatible github.com/coreos/go-semver v0.2.0 // indirect github.com/coreos/go-systemd v0.0.0-20181012123002-c6f51f82210d // indirect github.com/coreos/pkg v0.0.0-20180928190104-399ea9e2e55f // indirect @@ -48,6 +48,8 @@ require ( github.com/googleapis/gax-go v0.0.0-20161107002406-da06d194a00e // indirect github.com/gophercloud/gophercloud v0.0.0-20170524130959-3027adb1ce72 github.com/gopherjs/gopherjs v0.0.0-20181004151105-1babbf986f6f // indirect + github.com/gorilla/websocket v1.4.0 // indirect + github.com/grpc-ecosystem/go-grpc-middleware v1.0.0 // indirect github.com/grpc-ecosystem/go-grpc-prometheus v1.2.0 // indirect github.com/grpc-ecosystem/grpc-gateway v1.5.1 // indirect github.com/hashicorp/consul v0.0.0-20171026175957-610f3c86a089 @@ -111,13 +113,16 @@ require ( github.com/satori/go.uuid v0.0.0-20160927100844-b061729afc07 // indirect github.com/satori/uuid v0.0.0-20160927100844-b061729afc07 // indirect github.com/sean-/seed v0.0.0-20170313163322-e2103e2c3529 // indirect + github.com/sirupsen/logrus v1.1.1 // indirect github.com/smartystreets/assertions v0.0.0-20180927180507-b2de0cb4f26d // indirect github.com/smartystreets/goconvey v0.0.0-20180222194500-ef6db91d284a // indirect + github.com/soheilhy/cmux v0.1.4 // indirect github.com/spf13/afero v1.0.2 github.com/terraform-providers/terraform-provider-aws v1.40.0 github.com/terraform-providers/terraform-provider-openstack v0.0.0-20170616075611-4080a521c6ea github.com/terraform-providers/terraform-provider-template v1.0.0 // indirect github.com/terraform-providers/terraform-provider-tls v1.2.0 // indirect + github.com/tmc/grpc-websocket-proxy v0.0.0-20171017195756-830351dc03c6 // indirect github.com/ugorji/go v0.0.0-20180813092308-00b869d2f4a5 // indirect github.com/ulikunitz/xz v0.5.4 // indirect github.com/vmihailenco/msgpack v4.0.0+incompatible // indirect @@ -126,6 +131,9 @@ require ( github.com/xlab/treeprint v0.0.0-20161029104018-1d6e34225557 github.com/zclconf/go-cty v0.0.0-20180925180032-d9b87d891d0b go.opencensus.io v0.17.0 // indirect + go.uber.org/atomic v1.3.2 // indirect + go.uber.org/multierr v1.1.0 // indirect + go.uber.org/zap v1.9.1 // indirect golang.org/x/crypto v0.0.0-20180910181607-0e37d006457b golang.org/x/net v0.0.0-20180925072008-f04abc6bdfa7 golang.org/x/oauth2 v0.0.0-20181003184128-c57b0facaced diff --git a/go.sum b/go.sum index 4db1e3a23..862668bbc 100644 --- a/go.sum +++ b/go.sum @@ -35,8 +35,8 @@ github.com/armon/go-metrics v0.0.0-20180917152333-f0300d1749da h1:8GUt8eRujhVEGZ github.com/armon/go-metrics v0.0.0-20180917152333-f0300d1749da/go.mod h1:Q73ZrmVTwzkszR9V5SSuryQ31EELlFMUz1kKyl939pY= github.com/armon/go-radix v0.0.0-20160115234725-4239b77079c7 h1:MBXhrxjNkjdqJysfNbKMMPFNXlz6EzpOnPcsoYBeD3E= github.com/armon/go-radix v0.0.0-20160115234725-4239b77079c7/go.mod h1:ufUuZ+zHj4x4TnLV4JWEpy2hxWSpsRywHrMgIH9cCH8= -github.com/aws/aws-sdk-go v1.14.31 h1:amhorvKh1zNxo9YCntvA5uDmgw+pCYXOp4xO8WS1oDg= -github.com/aws/aws-sdk-go v1.14.31/go.mod h1:mFuSZ37Z9YOHbQEwBWztmVzqXrEkub65tZoCYDt7FT0= +github.com/aws/aws-sdk-go v1.15.48 h1:b4uYtqfWWATa/WaKyMM/s0bOiXC1yls+ogxPqAY2Bgs= +github.com/aws/aws-sdk-go v1.15.48/go.mod h1:mFuSZ37Z9YOHbQEwBWztmVzqXrEkub65tZoCYDt7FT0= github.com/beevik/etree v0.0.0-20171015221209-af219c0c7ea1 h1:6fqkBkx5cRbd8Pq0UEMxyteIAPoE1KiPptnx1yEzJLU= github.com/beevik/etree v0.0.0-20171015221209-af219c0c7ea1/go.mod h1:r8Aw8JqVegEf0w2fDnATrX9VpkMcyFeM0FhwO62wh+A= github.com/beorn7/perks v0.0.0-20180321164747-3a771d992973 h1:xJ4a3vCFaGF/jqvzLMYoU8P317H5OQ+Via4RmuPwCS0= @@ -55,10 +55,10 @@ github.com/chzyer/readline v0.0.0-20161106042343-c914be64f07d h1:aG5FcWiZTOhPQzY github.com/chzyer/readline v0.0.0-20161106042343-c914be64f07d/go.mod h1:nSuG5e5PlCu98SY8svDHJxuZscDgtXS6KTTbou5AhLI= github.com/chzyer/test v0.0.0-20180213035817-a1ea475d72b1 h1:q763qf9huN11kDQavWsoZXJNW3xEE4JJyHa5Q25/sd8= github.com/chzyer/test v0.0.0-20180213035817-a1ea475d72b1/go.mod h1:Q3SI9o4m/ZMnBNeIyt5eFwwo7qiLfzFZmjNmxjkiQlU= -github.com/cockroachdb/cmux v0.0.0-20170110192607-30d10be49292 h1:dzj1/xcivGjNPwwifh/dWTczkwcuqsXXFHY1X/TZMtw= -github.com/cockroachdb/cmux v0.0.0-20170110192607-30d10be49292/go.mod h1:qRiX68mZX1lGBkTWyp3CLcenw9I94W2dLeRvMzcn9N4= -github.com/coreos/etcd v3.2.7+incompatible h1:cVHxLUA04329hMmxYEBPWrZftvipxYbGln0FF8mk1l0= -github.com/coreos/etcd v3.2.7+incompatible/go.mod h1:uF7uidLiAD3TWHmW31ZFd/JWoc32PjwdhPthX9715RE= +github.com/coreos/bbolt v1.3.0 h1:HIgH5xUWXT914HCI671AxuTTqjj64UOFr7pHn48LUTI= +github.com/coreos/bbolt v1.3.0/go.mod h1:iRUV2dpdMOn7Bo10OQBFzIJO9kkE559Wcmn+qkEiiKk= +github.com/coreos/etcd v3.3.10+incompatible h1:KjVWqrZ5U0wa3CxY2AxlH6/UcB+PK2td1DcsYhA+HRs= +github.com/coreos/etcd v3.3.10+incompatible/go.mod h1:uF7uidLiAD3TWHmW31ZFd/JWoc32PjwdhPthX9715RE= github.com/coreos/go-semver v0.2.0 h1:3Jm3tLmsgAYcjC+4Up7hJrFBPr+n7rAqYeSw/SZazuY= github.com/coreos/go-semver v0.2.0/go.mod h1:nnelYz7RCh+5ahJtPPxZlU+153eP4D4r3EedlOD2RNk= github.com/coreos/go-systemd v0.0.0-20181012123002-c6f51f82210d h1:t5Wuyh53qYyg9eqn4BbnlIT+vmhyww0TatL+zT3uWgI= @@ -103,6 +103,10 @@ github.com/gophercloud/gophercloud v0.0.0-20170524130959-3027adb1ce72 h1:I0ssFkB github.com/gophercloud/gophercloud v0.0.0-20170524130959-3027adb1ce72/go.mod h1:3WdhXV3rUYy9p6AUW8d94kr+HS62Y4VL9mBnFxsD8q4= github.com/gopherjs/gopherjs v0.0.0-20181004151105-1babbf986f6f h1:JJ2EP5vV3LAD2U1CxQtD7PTOO15Y96kXmKDz7TjxGHs= github.com/gopherjs/gopherjs v0.0.0-20181004151105-1babbf986f6f/go.mod h1:wJfORRmW1u3UXTncJ5qlYoELFm8eSnnEO6hX4iZ3EWY= +github.com/gorilla/websocket v1.4.0 h1:WDFjx/TMzVgy9VdMMQi2K2Emtwi2QcUQsztZ/zLaH/Q= +github.com/gorilla/websocket v1.4.0/go.mod h1:E7qHFY5m1UJ88s3WnNqhKjPHQ0heANvMoAMk2YaljkQ= +github.com/grpc-ecosystem/go-grpc-middleware v1.0.0 h1:BWIsLfhgKhV5g/oF34aRjniBHLTZe5DNekSjbAjIS6c= +github.com/grpc-ecosystem/go-grpc-middleware v1.0.0/go.mod h1:FiyG127CGDf3tlThmgyCl78X/SZQqEOJBCDaAfeWzPs= github.com/grpc-ecosystem/go-grpc-prometheus v1.2.0 h1:Ovs26xHkKqVztRpIrF/92BcuyuQ/YW4NSIpoGtfXNho= github.com/grpc-ecosystem/go-grpc-prometheus v1.2.0/go.mod h1:8NvIoxWQoOIhqOTXgfV/d3M/q6VIi02HzZEHgUlZvzk= github.com/grpc-ecosystem/grpc-gateway v1.5.1 h1:3scN4iuXkNOyP98jF55Lv8a9j1o/IwvnDIZ0LHJK1nk= @@ -176,6 +180,8 @@ github.com/kardianos/osext v0.0.0-20160811001526-c2c54e542fb7 h1:pKv4oHt3kat9yf1 github.com/kardianos/osext v0.0.0-20160811001526-c2c54e542fb7/go.mod h1:1NbS8ALrpOvjt0rHPNLyCIeMtbizbir8U//inJ+zuB8= github.com/keybase/go-crypto v0.0.0-20161004153544-93f5b35093ba h1:NARVGAAgEXvoMeNPHhPFt1SBt1VMznA3Gnz9d0qj+co= github.com/keybase/go-crypto v0.0.0-20161004153544-93f5b35093ba/go.mod h1:ghbZscTyKdM07+Fw3KSi0hcJm+AlEUWj8QLlPtijN/M= +github.com/konsorten/go-windows-terminal-sequences v0.0.0-20180402223658-b729f2633dfe h1:CHRGQ8V7OlCYtwaKPJi3iA7J+YdNKdo8j7nG5IgDhjs= +github.com/konsorten/go-windows-terminal-sequences v0.0.0-20180402223658-b729f2633dfe/go.mod h1:T0+1ngSBFLxvqU3pZ+m/2kptfBszLMUkC4ZK/EgS/cQ= github.com/kr/pretty v0.1.0 h1:L/CwN0zerZDmRFUapSPitk6f+Q3+0za1rQkzVuMiMFI= github.com/kr/pretty v0.1.0/go.mod h1:dAy3ld7l9f0ibDNOQOHHMYYIIbhfbHSm3C4ZsoJORNo= github.com/kr/pty v1.1.1/go.mod h1:pFQYn66WHrOpPYNljwOMqo10TkYh1fy3cYio2l3bCsQ= @@ -258,10 +264,14 @@ github.com/sean-/seed v0.0.0-20170313163322-e2103e2c3529 h1:nn5Wsu0esKSJiIVhscUt github.com/sean-/seed v0.0.0-20170313163322-e2103e2c3529/go.mod h1:DxrIzT+xaE7yg65j358z/aeFdxmN0P9QXhEzd20vsDc= github.com/sergi/go-diff v1.0.0 h1:Kpca3qRNrduNnOQeazBd0ysaKrUJiIuISHxogkT9RPQ= github.com/sergi/go-diff v1.0.0/go.mod h1:0CfEIISq7TuYL3j771MWULgwwjU+GofnZX9QAmXWZgo= +github.com/sirupsen/logrus v1.1.1 h1:VzGj7lhU7KEB9e9gMpAV/v5XT2NVSvLJhJLCWbnkgXg= +github.com/sirupsen/logrus v1.1.1/go.mod h1:zrgwTnHtNr00buQ1vSptGe8m1f/BbgsPukg8qsT7A+A= github.com/smartystreets/assertions v0.0.0-20180927180507-b2de0cb4f26d h1:zE9ykElWQ6/NYmHa3jpm/yHnI4xSofP+UP6SpjHcSeM= github.com/smartystreets/assertions v0.0.0-20180927180507-b2de0cb4f26d/go.mod h1:OnSkiWE9lh6wB0YB77sQom3nweQdgAjqCqsofrRNTgc= github.com/smartystreets/goconvey v0.0.0-20180222194500-ef6db91d284a h1:JSvGDIbmil4Ui/dDdFBExb7/cmkNjyX5F97oglmvCDo= github.com/smartystreets/goconvey v0.0.0-20180222194500-ef6db91d284a/go.mod h1:XDJAKZRPZ1CvBcN2aX5YOUTYGHki24fSF0Iv48Ibg0s= +github.com/soheilhy/cmux v0.1.4 h1:0HKaf1o97UwFjHH9o5XsHUOF+tqmdA7KEzXLpiyaw0E= +github.com/soheilhy/cmux v0.1.4/go.mod h1:IM3LyeVVIOuxMH7sFAkER9+bJ4dT7Ms6E4xg4kGIyLM= github.com/spf13/afero v1.0.2 h1:5bRmqmInNmNFkI9NG9O0Xc/Lgl9wOWWUUA/O8XZqTCo= github.com/spf13/afero v1.0.2/go.mod h1:j4pytiNVoe2o6bmDsKpLACNPDBIoEAkihy7loJ1B0CQ= github.com/spf13/pflag v1.0.2/go.mod h1:DYY7MBk1bdzusC3SYhjObp+wFpr4gzcvqqNjLnInEg4= @@ -275,6 +285,8 @@ github.com/terraform-providers/terraform-provider-template v1.0.0 h1:g2pyFaAJu36 github.com/terraform-providers/terraform-provider-template v1.0.0/go.mod h1:/J+B8me5DCMa0rEBH5ic2aKPjhtpWNeScmxFJWxB1EU= github.com/terraform-providers/terraform-provider-tls v1.2.0 h1:wcD0InKzNh8fanUYQwim62WCd4toeD9WJnPw/RjBI4o= github.com/terraform-providers/terraform-provider-tls v1.2.0/go.mod h1:Mxe/v5u31LDW4m32O1z6Ursdh95dpc9Puq6otkYg7tU= +github.com/tmc/grpc-websocket-proxy v0.0.0-20171017195756-830351dc03c6 h1:lYIiVDtZnyTWlNwiAxLj0bbpTcx1BWCFhXjfsvmPdNc= +github.com/tmc/grpc-websocket-proxy v0.0.0-20171017195756-830351dc03c6/go.mod h1:ncp9v5uamzpCO7NfCPTXjqaC+bZgJeR0sMTm6dMHP7U= github.com/ugorji/go v0.0.0-20180813092308-00b869d2f4a5 h1:cMjKdf4PxEBN9K5HaD9UMW8gkTbM0kMzkTa9SJe0WNQ= github.com/ugorji/go v0.0.0-20180813092308-00b869d2f4a5/go.mod h1:hnLbHMwcvSihnDhEfx2/BzKp2xb0Y+ErdfYcrs9tkJQ= github.com/ulikunitz/xz v0.5.4 h1:zATC2OoZ8H1TZll3FpbX+ikwmadbO699PE06cIkm9oU= @@ -294,8 +306,15 @@ github.com/zclconf/go-cty v0.0.0-20180925180032-d9b87d891d0b h1:9rQAtgrPBuyPjmPE github.com/zclconf/go-cty v0.0.0-20180925180032-d9b87d891d0b/go.mod h1:xnAOWiHeOqg2nWS62VtQ7pbOu17FtxJNW8RLEih+O3s= go.opencensus.io v0.17.0 h1:2Cu88MYg+1LU+WVD+NWwYhyP0kKgRlN9QjWGaX0jKTE= go.opencensus.io v0.17.0/go.mod h1:mp1VrMQxhlqqDpKvH4UcQUa4YwlzNmymAjPrDdfxNpI= +go.uber.org/atomic v1.3.2 h1:2Oa65PReHzfn29GpvgsYwloV9AVFHPDk8tYxt2c2tr4= +go.uber.org/atomic v1.3.2/go.mod h1:gD2HeocX3+yG+ygLZcrzQJaqmWj9AIm7n08wl/qW/PE= +go.uber.org/multierr v1.1.0 h1:HoEmRHQPVSqub6w2z2d2EOVs2fjyFRGyofhKuyDq0QI= +go.uber.org/multierr v1.1.0/go.mod h1:wR5kodmAFQ0UK8QlbwjlSNy0Z68gJhDJUG5sjR94q/0= +go.uber.org/zap v1.9.1 h1:XCJQEf3W6eZaVwhRBof6ImoYGJSITeKWsyeh3HFu/5o= +go.uber.org/zap v1.9.1/go.mod h1:vwi/ZaCAaUcBkycHslxD9B2zi4UTXhF60s6SWpuDF0Q= golang.org/x/crypto v0.0.0-20180816225734-aabede6cba87 h1:gCHhzI+1R9peHIMyiWVxoVaWlk1cYK7VThX5ptLtbXY= golang.org/x/crypto v0.0.0-20180816225734-aabede6cba87/go.mod h1:6SG95UA2DQfeDnfUPMdvaQW0Q7yPrPDi9nlGo2tz2b4= +golang.org/x/crypto v0.0.0-20180904163835-0709b304e793/go.mod h1:6SG95UA2DQfeDnfUPMdvaQW0Q7yPrPDi9nlGo2tz2b4= golang.org/x/crypto v0.0.0-20180910181607-0e37d006457b h1:2b9XGzhjiYsYPnKXoEfL7klWZQIt8IfyRCz62gCqqlQ= golang.org/x/crypto v0.0.0-20180910181607-0e37d006457b/go.mod h1:6SG95UA2DQfeDnfUPMdvaQW0Q7yPrPDi9nlGo2tz2b4= golang.org/x/net v0.0.0-20180724234803-3673e40ba225/go.mod h1:mL1N/T3taQHkDXs73rZJwtUhF3w3ftmwwsq0BUmARs4= @@ -310,6 +329,7 @@ golang.org/x/sync v0.0.0-20180314180146-1d60e4601c6f h1:wMNYb4v58l5UBM7MYRLPG6Zh golang.org/x/sync v0.0.0-20180314180146-1d60e4601c6f/go.mod h1:RxMgew5VJxzue5/jJTE5uejpjVlOe/izrB70Jof72aM= golang.org/x/sys v0.0.0-20180816055513-1c9583448a9c h1:uHnKXcvx6SNkuwC+nrzxkJ+TpPwZOtumbhWrrOYN5YA= golang.org/x/sys v0.0.0-20180816055513-1c9583448a9c/go.mod h1:STP8DvDyc/dI5b8T5hshtkjS+E42TnysNCUPdjciGhY= +golang.org/x/sys v0.0.0-20180905080454-ebe1bf3edb33/go.mod h1:STP8DvDyc/dI5b8T5hshtkjS+E42TnysNCUPdjciGhY= golang.org/x/sys v0.0.0-20180909124046-d0be0721c37e/go.mod h1:STP8DvDyc/dI5b8T5hshtkjS+E42TnysNCUPdjciGhY= golang.org/x/sys v0.0.0-20180925112736-b09afc3d579e h1:LSlw/Dbj0MkNvPYAAkGinYmGliq+aqS7eKPYlE4oWC4= golang.org/x/sys v0.0.0-20180925112736-b09afc3d579e/go.mod h1:STP8DvDyc/dI5b8T5hshtkjS+E42TnysNCUPdjciGhY= diff --git a/vendor/github.com/aws/aws-sdk-go/aws/config.go b/vendor/github.com/aws/aws-sdk-go/aws/config.go index 5421b5d4e..58c89fa0d 100644 --- a/vendor/github.com/aws/aws-sdk-go/aws/config.go +++ b/vendor/github.com/aws/aws-sdk-go/aws/config.go @@ -18,7 +18,7 @@ const UseServiceDefaultRetries = -1 type RequestRetryer interface{} // A Config provides service configuration for service clients. By default, -// all clients will use the defaults.DefaultConfig tructure. +// all clients will use the defaults.DefaultConfig structure. // // // Create Session with MaxRetry configuration to be shared by multiple // // service clients. diff --git a/vendor/github.com/aws/aws-sdk-go/aws/credentials/credentials.go b/vendor/github.com/aws/aws-sdk-go/aws/credentials/credentials.go index ed086992f..a270844df 100644 --- a/vendor/github.com/aws/aws-sdk-go/aws/credentials/credentials.go +++ b/vendor/github.com/aws/aws-sdk-go/aws/credentials/credentials.go @@ -158,13 +158,14 @@ func (e *Expiry) SetExpiration(expiration time.Time, window time.Duration) { // IsExpired returns if the credentials are expired. func (e *Expiry) IsExpired() bool { - if e.CurrentTime == nil { - e.CurrentTime = time.Now + curTime := e.CurrentTime + if curTime == nil { + curTime = time.Now } - return e.expiration.Before(e.CurrentTime()) + return e.expiration.Before(curTime()) } -// A Credentials provides synchronous safe retrieval of AWS credentials Value. +// A Credentials provides concurrency safe retrieval of AWS credentials Value. // Credentials will cache the credentials value until they expire. Once the value // expires the next Get will attempt to retrieve valid credentials. // diff --git a/vendor/github.com/aws/aws-sdk-go/aws/credentials/endpointcreds/provider.go b/vendor/github.com/aws/aws-sdk-go/aws/credentials/endpointcreds/provider.go index a4cec5c55..ace513138 100644 --- a/vendor/github.com/aws/aws-sdk-go/aws/credentials/endpointcreds/provider.go +++ b/vendor/github.com/aws/aws-sdk-go/aws/credentials/endpointcreds/provider.go @@ -65,6 +65,10 @@ type Provider struct { // // If ExpiryWindow is 0 or less it will be ignored. ExpiryWindow time.Duration + + // Optional authorization token value if set will be used as the value of + // the Authorization header of the endpoint credential request. + AuthorizationToken string } // NewProviderClient returns a credentials Provider for retrieving AWS credentials @@ -152,6 +156,9 @@ func (p *Provider) getCredentials() (*getCredentialsOutput, error) { out := &getCredentialsOutput{} req := p.Client.NewRequest(op, nil, out) req.HTTPRequest.Header.Set("Accept", "application/json") + if authToken := p.AuthorizationToken; len(authToken) != 0 { + req.HTTPRequest.Header.Set("Authorization", authToken) + } return out, req.Send() } diff --git a/vendor/github.com/aws/aws-sdk-go/aws/csm/reporter.go b/vendor/github.com/aws/aws-sdk-go/aws/csm/reporter.go index 11082e5ed..691f8513a 100644 --- a/vendor/github.com/aws/aws-sdk-go/aws/csm/reporter.go +++ b/vendor/github.com/aws/aws-sdk-go/aws/csm/reporter.go @@ -118,6 +118,7 @@ func (rep *Reporter) sendAPICallMetric(r *request.Request) { Timestamp: (*metricTime)(&now), Type: aws.String("ApiCall"), AttemptCount: aws.Int(r.RetryCount + 1), + Region: r.Config.Region, Latency: aws.Int(int(time.Now().Sub(r.Time) / time.Millisecond)), XAmzRequestID: aws.String(r.RequestID), } diff --git a/vendor/github.com/aws/aws-sdk-go/aws/defaults/defaults.go b/vendor/github.com/aws/aws-sdk-go/aws/defaults/defaults.go index 5040a2f64..6cd84cd96 100644 --- a/vendor/github.com/aws/aws-sdk-go/aws/defaults/defaults.go +++ b/vendor/github.com/aws/aws-sdk-go/aws/defaults/defaults.go @@ -112,8 +112,9 @@ func CredProviders(cfg *aws.Config, handlers request.Handlers) []credentials.Pro } const ( - httpProviderEnvVar = "AWS_CONTAINER_CREDENTIALS_FULL_URI" - ecsCredsProviderEnvVar = "AWS_CONTAINER_CREDENTIALS_RELATIVE_URI" + httpProviderAuthorizationEnvVar = "AWS_CONTAINER_AUTHORIZATION_TOKEN" + httpProviderEnvVar = "AWS_CONTAINER_CREDENTIALS_FULL_URI" + ecsCredsProviderEnvVar = "AWS_CONTAINER_CREDENTIALS_RELATIVE_URI" ) // RemoteCredProvider returns a credentials provider for the default remote @@ -187,6 +188,7 @@ func httpCredProvider(cfg aws.Config, handlers request.Handlers, u string) crede return endpointcreds.NewProviderClient(cfg, handlers, u, func(p *endpointcreds.Provider) { p.ExpiryWindow = 5 * time.Minute + p.AuthorizationToken = os.Getenv(httpProviderAuthorizationEnvVar) }, ) } diff --git a/vendor/github.com/aws/aws-sdk-go/aws/ec2metadata/service.go b/vendor/github.com/aws/aws-sdk-go/aws/ec2metadata/service.go index ef5f73292..53457cac3 100644 --- a/vendor/github.com/aws/aws-sdk-go/aws/ec2metadata/service.go +++ b/vendor/github.com/aws/aws-sdk-go/aws/ec2metadata/service.go @@ -72,6 +72,7 @@ func NewClient(cfg aws.Config, handlers request.Handlers, endpoint, signingRegio cfg, metadata.ClientInfo{ ServiceName: ServiceName, + ServiceID: ServiceName, Endpoint: endpoint, APIVersion: "latest", }, diff --git a/vendor/github.com/aws/aws-sdk-go/aws/endpoints/decode.go b/vendor/github.com/aws/aws-sdk-go/aws/endpoints/decode.go index 74f72de07..c04ba06c5 100644 --- a/vendor/github.com/aws/aws-sdk-go/aws/endpoints/decode.go +++ b/vendor/github.com/aws/aws-sdk-go/aws/endpoints/decode.go @@ -84,6 +84,7 @@ func decodeV3Endpoints(modelDef modelDefinition, opts DecodeModelOptions) (Resol custAddEC2Metadata(p) custAddS3DualStack(p) custRmIotDataService(p) + custFixAppAutoscalingChina(p) } return ps, nil @@ -122,6 +123,27 @@ func custRmIotDataService(p *partition) { delete(p.Services, "data.iot") } +func custFixAppAutoscalingChina(p *partition) { + if p.ID != "aws-cn" { + return + } + + const serviceName = "application-autoscaling" + s, ok := p.Services[serviceName] + if !ok { + return + } + + const expectHostname = `autoscaling.{region}.amazonaws.com` + if e, a := s.Defaults.Hostname, expectHostname; e != a { + fmt.Printf("custFixAppAutoscalingChina: ignoring customization, expected %s, got %s\n", e, a) + return + } + + s.Defaults.Hostname = expectHostname + ".cn" + p.Services[serviceName] = s +} + type decodeModelError struct { awsError } diff --git a/vendor/github.com/aws/aws-sdk-go/aws/endpoints/defaults.go b/vendor/github.com/aws/aws-sdk-go/aws/endpoints/defaults.go index 8e823bec0..4bd182ab2 100644 --- a/vendor/github.com/aws/aws-sdk-go/aws/endpoints/defaults.go +++ b/vendor/github.com/aws/aws-sdk-go/aws/endpoints/defaults.go @@ -50,6 +50,7 @@ const ( AcmPcaServiceID = "acm-pca" // AcmPca. ApiMediatailorServiceID = "api.mediatailor" // ApiMediatailor. ApiPricingServiceID = "api.pricing" // ApiPricing. + ApiSagemakerServiceID = "api.sagemaker" // ApiSagemaker. ApigatewayServiceID = "apigateway" // Apigateway. ApplicationAutoscalingServiceID = "application-autoscaling" // ApplicationAutoscaling. Appstream2ServiceID = "appstream2" // Appstream2. @@ -112,6 +113,7 @@ const ( ImportexportServiceID = "importexport" // Importexport. InspectorServiceID = "inspector" // Inspector. IotServiceID = "iot" // Iot. + IotanalyticsServiceID = "iotanalytics" // Iotanalytics. KinesisServiceID = "kinesis" // Kinesis. KinesisanalyticsServiceID = "kinesisanalytics" // Kinesisanalytics. KinesisvideoServiceID = "kinesisvideo" // Kinesisvideo. @@ -146,7 +148,6 @@ const ( RuntimeLexServiceID = "runtime.lex" // RuntimeLex. RuntimeSagemakerServiceID = "runtime.sagemaker" // RuntimeSagemaker. S3ServiceID = "s3" // S3. - SagemakerServiceID = "sagemaker" // Sagemaker. SdbServiceID = "sdb" // Sdb. SecretsmanagerServiceID = "secretsmanager" // Secretsmanager. ServerlessrepoServiceID = "serverlessrepo" // Serverlessrepo. @@ -304,6 +305,7 @@ var awsPartition = partition{ "ca-central-1": endpoint{}, "eu-central-1": endpoint{}, "eu-west-1": endpoint{}, + "eu-west-2": endpoint{}, "us-east-1": endpoint{}, "us-east-2": endpoint{}, "us-west-2": endpoint{}, @@ -330,6 +332,19 @@ var awsPartition = partition{ "us-east-1": endpoint{}, }, }, + "api.sagemaker": service{ + + Endpoints: endpoints{ + "ap-northeast-1": endpoint{}, + "ap-northeast-2": endpoint{}, + "ap-southeast-2": endpoint{}, + "eu-central-1": endpoint{}, + "eu-west-1": endpoint{}, + "us-east-1": endpoint{}, + "us-east-2": endpoint{}, + "us-west-2": endpoint{}, + }, + }, "apigateway": service{ Endpoints: endpoints{ @@ -394,10 +409,13 @@ var awsPartition = partition{ Endpoints: endpoints{ "ap-northeast-1": endpoint{}, + "ap-northeast-2": endpoint{}, + "ap-south-1": endpoint{}, "ap-southeast-1": endpoint{}, "ap-southeast-2": endpoint{}, "eu-central-1": endpoint{}, "eu-west-1": endpoint{}, + "eu-west-2": endpoint{}, "us-east-1": endpoint{}, "us-east-2": endpoint{}, "us-west-2": endpoint{}, @@ -453,6 +471,7 @@ var awsPartition = partition{ "eu-central-1": endpoint{}, "eu-west-1": endpoint{}, "eu-west-2": endpoint{}, + "sa-east-1": endpoint{}, "us-east-1": endpoint{}, "us-east-2": endpoint{}, "us-west-1": endpoint{}, @@ -787,10 +806,11 @@ var awsPartition = partition{ Protocols: []string{"https"}, }, Endpoints: endpoints{ - "eu-west-1": endpoint{}, - "us-east-1": endpoint{}, - "us-east-2": endpoint{}, - "us-west-2": endpoint{}, + "ap-southeast-2": endpoint{}, + "eu-west-1": endpoint{}, + "us-east-1": endpoint{}, + "us-east-2": endpoint{}, + "us-west-2": endpoint{}, }, }, "config": service{ @@ -1030,11 +1050,17 @@ var awsPartition = partition{ "eu-west-1": endpoint{}, "eu-west-2": endpoint{}, "eu-west-3": endpoint{}, - "sa-east-1": endpoint{}, - "us-east-1": endpoint{}, - "us-east-2": endpoint{}, - "us-west-1": endpoint{}, - "us-west-2": endpoint{}, + "fips": endpoint{ + Hostname: "elasticache-fips.us-west-1.amazonaws.com", + CredentialScope: credentialScope{ + Region: "us-west-1", + }, + }, + "sa-east-1": endpoint{}, + "us-east-1": endpoint{}, + "us-east-2": endpoint{}, + "us-west-1": endpoint{}, + "us-west-2": endpoint{}, }, }, "elasticbeanstalk": service{ @@ -1060,7 +1086,9 @@ var awsPartition = partition{ "elasticfilesystem": service{ Endpoints: endpoints{ + "ap-northeast-1": endpoint{}, "ap-northeast-2": endpoint{}, + "ap-southeast-1": endpoint{}, "ap-southeast-2": endpoint{}, "eu-central-1": endpoint{}, "eu-west-1": endpoint{}, @@ -1095,7 +1123,7 @@ var awsPartition = partition{ "elasticmapreduce": service{ Defaults: endpoint{ SSLCommonName: "{region}.{service}.{dnsSuffix}", - Protocols: []string{"http", "https"}, + Protocols: []string{"https"}, }, Endpoints: endpoints{ "ap-northeast-1": endpoint{}, @@ -1195,11 +1223,15 @@ var awsPartition = partition{ Endpoints: endpoints{ "ap-northeast-1": endpoint{}, "ap-northeast-2": endpoint{}, + "ap-south-1": endpoint{}, "ap-southeast-1": endpoint{}, "ap-southeast-2": endpoint{}, "ca-central-1": endpoint{}, "eu-central-1": endpoint{}, "eu-west-1": endpoint{}, + "eu-west-2": endpoint{}, + "eu-west-3": endpoint{}, + "sa-east-1": endpoint{}, "us-east-1": endpoint{}, "us-east-2": endpoint{}, "us-west-1": endpoint{}, @@ -1250,6 +1282,7 @@ var awsPartition = partition{ "eu-west-1": endpoint{}, "eu-west-2": endpoint{}, "eu-west-3": endpoint{}, + "sa-east-1": endpoint{}, "us-east-1": endpoint{}, "us-east-2": endpoint{}, "us-west-1": endpoint{}, @@ -1264,6 +1297,7 @@ var awsPartition = partition{ "ap-south-1": endpoint{}, "ap-southeast-1": endpoint{}, "ap-southeast-2": endpoint{}, + "ca-central-1": endpoint{}, "eu-central-1": endpoint{}, "eu-west-1": endpoint{}, "eu-west-2": endpoint{}, @@ -1281,6 +1315,7 @@ var awsPartition = partition{ "ap-northeast-1": endpoint{}, "ap-southeast-2": endpoint{}, "eu-central-1": endpoint{}, + "eu-west-1": endpoint{}, "us-east-1": endpoint{}, "us-west-2": endpoint{}, }, @@ -1377,6 +1412,16 @@ var awsPartition = partition{ "us-west-2": endpoint{}, }, }, + "iotanalytics": service{ + + Endpoints: endpoints{ + "ap-northeast-1": endpoint{}, + "eu-west-1": endpoint{}, + "us-east-1": endpoint{}, + "us-east-2": endpoint{}, + "us-west-2": endpoint{}, + }, + }, "kinesis": service{ Endpoints: endpoints{ @@ -1400,9 +1445,10 @@ var awsPartition = partition{ "kinesisanalytics": service{ Endpoints: endpoints{ - "eu-west-1": endpoint{}, - "us-east-1": endpoint{}, - "us-west-2": endpoint{}, + "eu-central-1": endpoint{}, + "eu-west-1": endpoint{}, + "us-east-1": endpoint{}, + "us-west-2": endpoint{}, }, }, "kinesisvideo": service{ @@ -1530,6 +1576,7 @@ var awsPartition = partition{ Endpoints: endpoints{ "ap-northeast-1": endpoint{}, "ap-northeast-2": endpoint{}, + "ap-south-1": endpoint{}, "ap-southeast-1": endpoint{}, "ap-southeast-2": endpoint{}, "eu-central-1": endpoint{}, @@ -1558,6 +1605,7 @@ var awsPartition = partition{ Endpoints: endpoints{ "ap-northeast-1": endpoint{}, + "ap-northeast-2": endpoint{}, "ap-southeast-2": endpoint{}, "eu-central-1": endpoint{}, "eu-west-1": endpoint{}, @@ -1816,6 +1864,7 @@ var awsPartition = partition{ "eu-central-1": endpoint{}, "eu-west-1": endpoint{}, "eu-west-2": endpoint{}, + "eu-west-3": endpoint{}, "sa-east-1": endpoint{}, "us-east-1": endpoint{}, "us-east-2": endpoint{}, @@ -1858,6 +1907,9 @@ var awsPartition = partition{ Endpoints: endpoints{ "ap-northeast-1": endpoint{}, + "ap-northeast-2": endpoint{}, + "ap-southeast-2": endpoint{}, + "eu-central-1": endpoint{}, "eu-west-1": endpoint{}, "us-east-1": endpoint{}, "us-east-2": endpoint{}, @@ -1923,17 +1975,6 @@ var awsPartition = partition{ }, }, }, - "sagemaker": service{ - - Endpoints: endpoints{ - "ap-northeast-1": endpoint{}, - "ap-northeast-2": endpoint{}, - "eu-west-1": endpoint{}, - "us-east-1": endpoint{}, - "us-east-2": endpoint{}, - "us-west-2": endpoint{}, - }, - }, "sdb": service{ Defaults: endpoint{ Protocols: []string{"http", "https"}, @@ -1964,11 +2005,36 @@ var awsPartition = partition{ "eu-central-1": endpoint{}, "eu-west-1": endpoint{}, "eu-west-2": endpoint{}, + "eu-west-3": endpoint{}, "sa-east-1": endpoint{}, "us-east-1": endpoint{}, - "us-east-2": endpoint{}, - "us-west-1": endpoint{}, - "us-west-2": endpoint{}, + "us-east-1-fips": endpoint{ + Hostname: "secretsmanager-fips.us-east-1.amazonaws.com", + CredentialScope: credentialScope{ + Region: "us-east-1", + }, + }, + "us-east-2": endpoint{}, + "us-east-2-fips": endpoint{ + Hostname: "secretsmanager-fips.us-east-2.amazonaws.com", + CredentialScope: credentialScope{ + Region: "us-east-2", + }, + }, + "us-west-1": endpoint{}, + "us-west-1-fips": endpoint{ + Hostname: "secretsmanager-fips.us-west-1.amazonaws.com", + CredentialScope: credentialScope{ + Region: "us-west-1", + }, + }, + "us-west-2": endpoint{}, + "us-west-2-fips": endpoint{ + Hostname: "secretsmanager-fips.us-west-2.amazonaws.com", + CredentialScope: credentialScope{ + Region: "us-west-2", + }, + }, }, }, "serverlessrepo": service{ @@ -2043,11 +2109,21 @@ var awsPartition = partition{ "servicediscovery": service{ Endpoints: endpoints{ - "eu-west-1": endpoint{}, - "us-east-1": endpoint{}, - "us-east-2": endpoint{}, - "us-west-1": endpoint{}, - "us-west-2": endpoint{}, + "ap-northeast-1": endpoint{}, + "ap-northeast-2": endpoint{}, + "ap-south-1": endpoint{}, + "ap-southeast-1": endpoint{}, + "ap-southeast-2": endpoint{}, + "ca-central-1": endpoint{}, + "eu-central-1": endpoint{}, + "eu-west-1": endpoint{}, + "eu-west-2": endpoint{}, + "eu-west-3": endpoint{}, + "sa-east-1": endpoint{}, + "us-east-1": endpoint{}, + "us-east-2": endpoint{}, + "us-west-1": endpoint{}, + "us-west-2": endpoint{}, }, }, "shield": service{ @@ -2195,6 +2271,7 @@ var awsPartition = partition{ Endpoints: endpoints{ "ap-northeast-1": endpoint{}, "ap-northeast-2": endpoint{}, + "ap-south-1": endpoint{}, "ap-southeast-1": endpoint{}, "ap-southeast-2": endpoint{}, "ca-central-1": endpoint{}, @@ -2368,8 +2445,26 @@ var awsPartition = partition{ Endpoints: endpoints{ "eu-west-1": endpoint{}, "us-east-1": endpoint{}, + "us-east-1-fips": endpoint{ + Hostname: "translate-fips.us-east-1.amazonaws.com", + CredentialScope: credentialScope{ + Region: "us-east-1", + }, + }, "us-east-2": endpoint{}, + "us-east-2-fips": endpoint{ + Hostname: "translate-fips.us-east-2.amazonaws.com", + CredentialScope: credentialScope{ + Region: "us-east-2", + }, + }, "us-west-2": endpoint{}, + "us-west-2-fips": endpoint{ + Hostname: "translate-fips.us-west-2.amazonaws.com", + CredentialScope: credentialScope{ + Region: "us-west-2", + }, + }, }, }, "waf": service{ @@ -2495,7 +2590,7 @@ var awscnPartition = partition{ }, "application-autoscaling": service{ Defaults: endpoint{ - Hostname: "autoscaling.{region}.amazonaws.com", + Hostname: "autoscaling.{region}.amazonaws.com.cn", Protocols: []string{"http", "https"}, CredentialScope: credentialScope{ Service: "application-autoscaling", @@ -2529,6 +2624,13 @@ var awscnPartition = partition{ "cn-northwest-1": endpoint{}, }, }, + "codebuild": service{ + + Endpoints: endpoints{ + "cn-north-1": endpoint{}, + "cn-northwest-1": endpoint{}, + }, + }, "codedeploy": service{ Endpoints: endpoints{ @@ -2631,7 +2733,7 @@ var awscnPartition = partition{ }, "elasticmapreduce": service{ Defaults: endpoint{ - Protocols: []string{"http", "https"}, + Protocols: []string{"https"}, }, Endpoints: endpoints{ "cn-north-1": endpoint{}, @@ -2856,6 +2958,12 @@ var awsusgovPartition = partition{ "us-gov-west-1": endpoint{}, }, }, + "application-autoscaling": service{ + + Endpoints: endpoints{ + "us-gov-west-1": endpoint{}, + }, + }, "autoscaling": service{ Endpoints: endpoints{ @@ -2960,6 +3068,12 @@ var awsusgovPartition = partition{ "elasticache": service{ Endpoints: endpoints{ + "fips": endpoint{ + Hostname: "elasticache-fips.us-gov-west-1.amazonaws.com", + CredentialScope: credentialScope{ + Region: "us-gov-west-1", + }, + }, "us-gov-west-1": endpoint{}, }, }, @@ -2981,7 +3095,7 @@ var awsusgovPartition = partition{ Endpoints: endpoints{ "us-gov-west-1": endpoint{ - Protocols: []string{"http", "https"}, + Protocols: []string{"https"}, }, }, }, @@ -3024,6 +3138,16 @@ var awsusgovPartition = partition{ "us-gov-west-1": endpoint{}, }, }, + "iot": service{ + Defaults: endpoint{ + CredentialScope: credentialScope{ + Service: "execute-api", + }, + }, + Endpoints: endpoints{ + "us-gov-west-1": endpoint{}, + }, + }, "kinesis": service{ Endpoints: endpoints{ @@ -3140,6 +3264,12 @@ var awsusgovPartition = partition{ "us-gov-west-1": endpoint{}, }, }, + "states": service{ + + Endpoints: endpoints{ + "us-gov-west-1": endpoint{}, + }, + }, "storagegateway": service{ Endpoints: endpoints{ @@ -3186,6 +3316,12 @@ var awsusgovPartition = partition{ }, Endpoints: endpoints{ "us-gov-west-1": endpoint{}, + "us-gov-west-1-fips": endpoint{ + Hostname: "translate-fips.us-gov-west-1.amazonaws.com", + CredentialScope: credentialScope{ + Region: "us-gov-west-1", + }, + }, }, }, }, diff --git a/vendor/github.com/aws/aws-sdk-go/aws/request/validation.go b/vendor/github.com/aws/aws-sdk-go/aws/request/validation.go index 401246228..bcfd947a3 100644 --- a/vendor/github.com/aws/aws-sdk-go/aws/request/validation.go +++ b/vendor/github.com/aws/aws-sdk-go/aws/request/validation.go @@ -17,6 +17,10 @@ const ( ParamMinValueErrCode = "ParamMinValueError" // ParamMinLenErrCode is the error code for fields without enough elements. ParamMinLenErrCode = "ParamMinLenError" + + // ParamFormatErrCode is the error code for a field with invalid + // format or characters. + ParamFormatErrCode = "ParamFormatInvalidError" ) // Validator provides a way for types to perform validation logic on their @@ -232,3 +236,26 @@ func NewErrParamMinLen(field string, min int) *ErrParamMinLen { func (e *ErrParamMinLen) MinLen() int { return e.min } + +// An ErrParamFormat represents a invalid format parameter error. +type ErrParamFormat struct { + errInvalidParam + format string +} + +// NewErrParamFormat creates a new invalid format parameter error. +func NewErrParamFormat(field string, format, value string) *ErrParamFormat { + return &ErrParamFormat{ + errInvalidParam: errInvalidParam{ + code: ParamFormatErrCode, + field: field, + msg: fmt.Sprintf("format %v, %v", format, value), + }, + format: format, + } +} + +// Format returns the field's required format. +func (e *ErrParamFormat) Format() string { + return e.format +} diff --git a/vendor/github.com/aws/aws-sdk-go/aws/signer/v4/v4.go b/vendor/github.com/aws/aws-sdk-go/aws/signer/v4/v4.go index 8aa0681d3..5b52ab221 100644 --- a/vendor/github.com/aws/aws-sdk-go/aws/signer/v4/v4.go +++ b/vendor/github.com/aws/aws-sdk-go/aws/signer/v4/v4.go @@ -98,25 +98,25 @@ var ignoredHeaders = rules{ var requiredSignedHeaders = rules{ whitelist{ mapRule{ - "Cache-Control": struct{}{}, - "Content-Disposition": struct{}{}, - "Content-Encoding": struct{}{}, - "Content-Language": struct{}{}, - "Content-Md5": struct{}{}, - "Content-Type": struct{}{}, - "Expires": struct{}{}, - "If-Match": struct{}{}, - "If-Modified-Since": struct{}{}, - "If-None-Match": struct{}{}, - "If-Unmodified-Since": struct{}{}, - "Range": struct{}{}, - "X-Amz-Acl": struct{}{}, - "X-Amz-Copy-Source": struct{}{}, - "X-Amz-Copy-Source-If-Match": struct{}{}, - "X-Amz-Copy-Source-If-Modified-Since": struct{}{}, - "X-Amz-Copy-Source-If-None-Match": struct{}{}, - "X-Amz-Copy-Source-If-Unmodified-Since": struct{}{}, - "X-Amz-Copy-Source-Range": struct{}{}, + "Cache-Control": struct{}{}, + "Content-Disposition": struct{}{}, + "Content-Encoding": struct{}{}, + "Content-Language": struct{}{}, + "Content-Md5": struct{}{}, + "Content-Type": struct{}{}, + "Expires": struct{}{}, + "If-Match": struct{}{}, + "If-Modified-Since": struct{}{}, + "If-None-Match": struct{}{}, + "If-Unmodified-Since": struct{}{}, + "Range": struct{}{}, + "X-Amz-Acl": struct{}{}, + "X-Amz-Copy-Source": struct{}{}, + "X-Amz-Copy-Source-If-Match": struct{}{}, + "X-Amz-Copy-Source-If-Modified-Since": struct{}{}, + "X-Amz-Copy-Source-If-None-Match": struct{}{}, + "X-Amz-Copy-Source-If-Unmodified-Since": struct{}{}, + "X-Amz-Copy-Source-Range": struct{}{}, "X-Amz-Copy-Source-Server-Side-Encryption-Customer-Algorithm": struct{}{}, "X-Amz-Copy-Source-Server-Side-Encryption-Customer-Key": struct{}{}, "X-Amz-Copy-Source-Server-Side-Encryption-Customer-Key-Md5": struct{}{}, @@ -739,7 +739,15 @@ func makeSha256Reader(reader io.ReadSeeker) []byte { start, _ := reader.Seek(0, sdkio.SeekCurrent) defer reader.Seek(start, sdkio.SeekStart) - io.Copy(hash, reader) + // Use CopyN to avoid allocating the 32KB buffer in io.Copy for bodies + // smaller than 32KB. Fall back to io.Copy if we fail to determine the size. + size, err := aws.SeekerLen(reader) + if err != nil { + io.Copy(hash, reader) + } else { + io.CopyN(hash, reader, size) + } + return hash.Sum(nil) } diff --git a/vendor/github.com/aws/aws-sdk-go/aws/version.go b/vendor/github.com/aws/aws-sdk-go/aws/version.go index c4d155c8e..8347df073 100644 --- a/vendor/github.com/aws/aws-sdk-go/aws/version.go +++ b/vendor/github.com/aws/aws-sdk-go/aws/version.go @@ -5,4 +5,4 @@ package aws const SDKName = "aws-sdk-go" // SDKVersion is the version of this SDK -const SDKVersion = "1.14.31" +const SDKVersion = "1.15.48" diff --git a/vendor/github.com/aws/aws-sdk-go/internal/s3err/error.go b/vendor/github.com/aws/aws-sdk-go/internal/s3err/error.go new file mode 100644 index 000000000..0b9b0dfce --- /dev/null +++ b/vendor/github.com/aws/aws-sdk-go/internal/s3err/error.go @@ -0,0 +1,57 @@ +package s3err + +import ( + "fmt" + + "github.com/aws/aws-sdk-go/aws/awserr" + "github.com/aws/aws-sdk-go/aws/request" +) + +// RequestFailure provides additional S3 specific metadata for the request +// failure. +type RequestFailure struct { + awserr.RequestFailure + + hostID string +} + +// NewRequestFailure returns a request failure error decordated with S3 +// specific metadata. +func NewRequestFailure(err awserr.RequestFailure, hostID string) *RequestFailure { + return &RequestFailure{RequestFailure: err, hostID: hostID} +} + +func (r RequestFailure) Error() string { + extra := fmt.Sprintf("status code: %d, request id: %s, host id: %s", + r.StatusCode(), r.RequestID(), r.hostID) + return awserr.SprintError(r.Code(), r.Message(), extra, r.OrigErr()) +} +func (r RequestFailure) String() string { + return r.Error() +} + +// HostID returns the HostID request response value. +func (r RequestFailure) HostID() string { + return r.hostID +} + +// RequestFailureWrapperHandler returns a handler to rap an +// awserr.RequestFailure with the S3 request ID 2 from the response. +func RequestFailureWrapperHandler() request.NamedHandler { + return request.NamedHandler{ + Name: "awssdk.s3.errorHandler", + Fn: func(req *request.Request) { + reqErr, ok := req.Error.(awserr.RequestFailure) + if !ok || reqErr == nil { + return + } + + hostID := req.HTTPResponse.Header.Get("X-Amz-Id-2") + if req.Error == nil { + return + } + + req.Error = NewRequestFailure(reqErr, hostID) + }, + } +} diff --git a/vendor/github.com/aws/aws-sdk-go/private/protocol/ec2query/unmarshal.go b/vendor/github.com/aws/aws-sdk-go/private/protocol/ec2query/unmarshal.go index 095e97ccf..5793c0473 100644 --- a/vendor/github.com/aws/aws-sdk-go/private/protocol/ec2query/unmarshal.go +++ b/vendor/github.com/aws/aws-sdk-go/private/protocol/ec2query/unmarshal.go @@ -27,7 +27,11 @@ func Unmarshal(r *request.Request) { decoder := xml.NewDecoder(r.HTTPResponse.Body) err := xmlutil.UnmarshalXML(r.Data, decoder, "") if err != nil { - r.Error = awserr.New("SerializationError", "failed decoding EC2 Query response", err) + r.Error = awserr.NewRequestFailure( + awserr.New("SerializationError", "failed decoding EC2 Query response", err), + r.HTTPResponse.StatusCode, + r.RequestID, + ) return } } @@ -52,7 +56,11 @@ func UnmarshalError(r *request.Request) { resp := &xmlErrorResponse{} err := xml.NewDecoder(r.HTTPResponse.Body).Decode(resp) if err != nil && err != io.EOF { - r.Error = awserr.New("SerializationError", "failed decoding EC2 Query error response", err) + r.Error = awserr.NewRequestFailure( + awserr.New("SerializationError", "failed decoding EC2 Query error response", err), + r.HTTPResponse.StatusCode, + r.RequestID, + ) } else { r.Error = awserr.NewRequestFailure( awserr.New(resp.Code, resp.Message, nil), diff --git a/vendor/github.com/aws/aws-sdk-go/private/protocol/host.go b/vendor/github.com/aws/aws-sdk-go/private/protocol/host.go new file mode 100644 index 000000000..f06f44ee1 --- /dev/null +++ b/vendor/github.com/aws/aws-sdk-go/private/protocol/host.go @@ -0,0 +1,21 @@ +package protocol + +// ValidHostLabel returns if the label is a valid RFC 1123 Section 2.1 domain +// host label name. +func ValidHostLabel(label string) bool { + if l := len(label); l == 0 || l > 63 { + return false + } + for _, r := range label { + switch { + case r >= '0' && r <= '9': + case r >= 'A' && r <= 'Z': + case r >= 'a' && r <= 'z': + case r == '-': + default: + return false + } + } + + return true +} diff --git a/vendor/github.com/aws/aws-sdk-go/private/protocol/json/jsonutil/unmarshal.go b/vendor/github.com/aws/aws-sdk-go/private/protocol/json/jsonutil/unmarshal.go index 2f6628d43..b11f3ee45 100644 --- a/vendor/github.com/aws/aws-sdk-go/private/protocol/json/jsonutil/unmarshal.go +++ b/vendor/github.com/aws/aws-sdk-go/private/protocol/json/jsonutil/unmarshal.go @@ -5,7 +5,6 @@ import ( "encoding/json" "fmt" "io" - "io/ioutil" "reflect" "time" @@ -17,16 +16,10 @@ import ( func UnmarshalJSON(v interface{}, stream io.Reader) error { var out interface{} - b, err := ioutil.ReadAll(stream) - if err != nil { - return err - } - - if len(b) == 0 { + err := json.NewDecoder(stream).Decode(&out) + if err == io.EOF { return nil - } - - if err := json.Unmarshal(b, &out); err != nil { + } else if err != nil { return err } diff --git a/vendor/github.com/aws/aws-sdk-go/private/protocol/jsonrpc/jsonrpc.go b/vendor/github.com/aws/aws-sdk-go/private/protocol/jsonrpc/jsonrpc.go index 56af4dc44..9a7ba27ad 100644 --- a/vendor/github.com/aws/aws-sdk-go/private/protocol/jsonrpc/jsonrpc.go +++ b/vendor/github.com/aws/aws-sdk-go/private/protocol/jsonrpc/jsonrpc.go @@ -7,7 +7,7 @@ package jsonrpc import ( "encoding/json" - "io/ioutil" + "io" "strings" "github.com/aws/aws-sdk-go/aws/awserr" @@ -64,7 +64,11 @@ func Unmarshal(req *request.Request) { if req.DataFilled() { err := jsonutil.UnmarshalJSON(req.Data, req.HTTPResponse.Body) if err != nil { - req.Error = awserr.New("SerializationError", "failed decoding JSON RPC response", err) + req.Error = awserr.NewRequestFailure( + awserr.New("SerializationError", "failed decoding JSON RPC response", err), + req.HTTPResponse.StatusCode, + req.RequestID, + ) } } return @@ -78,22 +82,22 @@ func UnmarshalMeta(req *request.Request) { // UnmarshalError unmarshals an error response for a JSON RPC service. func UnmarshalError(req *request.Request) { defer req.HTTPResponse.Body.Close() - bodyBytes, err := ioutil.ReadAll(req.HTTPResponse.Body) - if err != nil { - req.Error = awserr.New("SerializationError", "failed reading JSON RPC error response", err) - return - } - if len(bodyBytes) == 0 { + + var jsonErr jsonErrorResponse + err := json.NewDecoder(req.HTTPResponse.Body).Decode(&jsonErr) + if err == io.EOF { req.Error = awserr.NewRequestFailure( awserr.New("SerializationError", req.HTTPResponse.Status, nil), req.HTTPResponse.StatusCode, - "", + req.RequestID, ) return - } - var jsonErr jsonErrorResponse - if err := json.Unmarshal(bodyBytes, &jsonErr); err != nil { - req.Error = awserr.New("SerializationError", "failed decoding JSON RPC error response", err) + } else if err != nil { + req.Error = awserr.NewRequestFailure( + awserr.New("SerializationError", "failed decoding JSON RPC error response", err), + req.HTTPResponse.StatusCode, + req.RequestID, + ) return } diff --git a/vendor/github.com/aws/aws-sdk-go/private/protocol/query/unmarshal.go b/vendor/github.com/aws/aws-sdk-go/private/protocol/query/unmarshal.go index e0f4d5a54..3495c7307 100644 --- a/vendor/github.com/aws/aws-sdk-go/private/protocol/query/unmarshal.go +++ b/vendor/github.com/aws/aws-sdk-go/private/protocol/query/unmarshal.go @@ -23,7 +23,11 @@ func Unmarshal(r *request.Request) { decoder := xml.NewDecoder(r.HTTPResponse.Body) err := xmlutil.UnmarshalXML(r.Data, decoder, r.Operation.Name+"Result") if err != nil { - r.Error = awserr.New("SerializationError", "failed decoding Query response", err) + r.Error = awserr.NewRequestFailure( + awserr.New("SerializationError", "failed decoding Query response", err), + r.HTTPResponse.StatusCode, + r.RequestID, + ) return } } diff --git a/vendor/github.com/aws/aws-sdk-go/private/protocol/query/unmarshal_error.go b/vendor/github.com/aws/aws-sdk-go/private/protocol/query/unmarshal_error.go index f21429617..46d354e82 100644 --- a/vendor/github.com/aws/aws-sdk-go/private/protocol/query/unmarshal_error.go +++ b/vendor/github.com/aws/aws-sdk-go/private/protocol/query/unmarshal_error.go @@ -28,7 +28,11 @@ func UnmarshalError(r *request.Request) { bodyBytes, err := ioutil.ReadAll(r.HTTPResponse.Body) if err != nil { - r.Error = awserr.New("SerializationError", "failed to read from query HTTP response body", err) + r.Error = awserr.NewRequestFailure( + awserr.New("SerializationError", "failed to read from query HTTP response body", err), + r.HTTPResponse.StatusCode, + r.RequestID, + ) return } @@ -61,6 +65,10 @@ func UnmarshalError(r *request.Request) { } // Failed to retrieve any error message from the response body - r.Error = awserr.New("SerializationError", - "failed to decode query XML error response", decodeErr) + r.Error = awserr.NewRequestFailure( + awserr.New("SerializationError", + "failed to decode query XML error response", decodeErr), + r.HTTPResponse.StatusCode, + r.RequestID, + ) } diff --git a/vendor/github.com/aws/aws-sdk-go/private/protocol/restjson/restjson.go b/vendor/github.com/aws/aws-sdk-go/private/protocol/restjson/restjson.go index b1d5294ad..de8adce63 100644 --- a/vendor/github.com/aws/aws-sdk-go/private/protocol/restjson/restjson.go +++ b/vendor/github.com/aws/aws-sdk-go/private/protocol/restjson/restjson.go @@ -7,7 +7,7 @@ package restjson import ( "encoding/json" - "io/ioutil" + "io" "strings" "github.com/aws/aws-sdk-go/aws/awserr" @@ -54,26 +54,26 @@ func UnmarshalMeta(r *request.Request) { // UnmarshalError unmarshals a response error for the REST JSON protocol. func UnmarshalError(r *request.Request) { defer r.HTTPResponse.Body.Close() - code := r.HTTPResponse.Header.Get("X-Amzn-Errortype") - bodyBytes, err := ioutil.ReadAll(r.HTTPResponse.Body) - if err != nil { - r.Error = awserr.New("SerializationError", "failed reading REST JSON error response", err) - return - } - if len(bodyBytes) == 0 { + + var jsonErr jsonErrorResponse + err := json.NewDecoder(r.HTTPResponse.Body).Decode(&jsonErr) + if err == io.EOF { r.Error = awserr.NewRequestFailure( awserr.New("SerializationError", r.HTTPResponse.Status, nil), r.HTTPResponse.StatusCode, - "", + r.RequestID, + ) + return + } else if err != nil { + r.Error = awserr.NewRequestFailure( + awserr.New("SerializationError", "failed decoding REST JSON error response", err), + r.HTTPResponse.StatusCode, + r.RequestID, ) return } - var jsonErr jsonErrorResponse - if err := json.Unmarshal(bodyBytes, &jsonErr); err != nil { - r.Error = awserr.New("SerializationError", "failed decoding REST JSON error response", err) - return - } + code := r.HTTPResponse.Header.Get("X-Amzn-Errortype") if code == "" { code = jsonErr.Code } diff --git a/vendor/github.com/aws/aws-sdk-go/private/protocol/restxml/restxml.go b/vendor/github.com/aws/aws-sdk-go/private/protocol/restxml/restxml.go index 7bdf4c853..b0f4e2456 100644 --- a/vendor/github.com/aws/aws-sdk-go/private/protocol/restxml/restxml.go +++ b/vendor/github.com/aws/aws-sdk-go/private/protocol/restxml/restxml.go @@ -36,7 +36,11 @@ func Build(r *request.Request) { var buf bytes.Buffer err := xmlutil.BuildXML(r.Params, xml.NewEncoder(&buf)) if err != nil { - r.Error = awserr.New("SerializationError", "failed to encode rest XML request", err) + r.Error = awserr.NewRequestFailure( + awserr.New("SerializationError", "failed to encode rest XML request", err), + r.HTTPResponse.StatusCode, + r.RequestID, + ) return } r.SetBufferBody(buf.Bytes()) @@ -50,7 +54,11 @@ func Unmarshal(r *request.Request) { decoder := xml.NewDecoder(r.HTTPResponse.Body) err := xmlutil.UnmarshalXML(r.Data, decoder, "") if err != nil { - r.Error = awserr.New("SerializationError", "failed to decode REST XML response", err) + r.Error = awserr.NewRequestFailure( + awserr.New("SerializationError", "failed to decode REST XML response", err), + r.HTTPResponse.StatusCode, + r.RequestID, + ) return } } else { diff --git a/vendor/github.com/aws/aws-sdk-go/private/protocol/xml/xmlutil/build.go b/vendor/github.com/aws/aws-sdk-go/private/protocol/xml/xmlutil/build.go index 07764c862..1bfe45f65 100644 --- a/vendor/github.com/aws/aws-sdk-go/private/protocol/xml/xmlutil/build.go +++ b/vendor/github.com/aws/aws-sdk-go/private/protocol/xml/xmlutil/build.go @@ -94,8 +94,6 @@ func (b *xmlBuilder) buildStruct(value reflect.Value, current *XMLNode, tag refl return nil } - fieldAdded := false - // unwrap payloads if payload := tag.Get("payload"); payload != "" { field, _ := value.Type().FieldByName(payload) @@ -123,6 +121,8 @@ func (b *xmlBuilder) buildStruct(value reflect.Value, current *XMLNode, tag refl child.Attr = append(child.Attr, ns) } + var payloadFields, nonPayloadFields int + t := value.Type() for i := 0; i < value.NumField(); i++ { member := elemOf(value.Field(i)) @@ -137,8 +137,10 @@ func (b *xmlBuilder) buildStruct(value reflect.Value, current *XMLNode, tag refl mTag := field.Tag if mTag.Get("location") != "" { // skip non-body members + nonPayloadFields++ continue } + payloadFields++ if protocol.CanSetIdempotencyToken(value.Field(i), field) { token := protocol.GetIdempotencyToken() @@ -153,11 +155,11 @@ func (b *xmlBuilder) buildStruct(value reflect.Value, current *XMLNode, tag refl if err := b.buildValue(member, child, mTag); err != nil { return err } - - fieldAdded = true } - if fieldAdded { // only append this child if we have one ore more valid members + // Only case where the child shape is not added is if the shape only contains + // non-payload fields, e.g headers/query. + if !(payloadFields == 0 && nonPayloadFields > 0) { current.AddChild(child) } diff --git a/vendor/github.com/aws/aws-sdk-go/service/apigateway/api.go b/vendor/github.com/aws/aws-sdk-go/service/apigateway/api.go index 4d6ae02d3..877c1e930 100644 --- a/vendor/github.com/aws/aws-sdk-go/service/apigateway/api.go +++ b/vendor/github.com/aws/aws-sdk-go/service/apigateway/api.go @@ -56,7 +56,7 @@ func (c *APIGateway) CreateApiKeyRequest(input *CreateApiKeyInput) (req *request // // Create an ApiKey resource. // -// AWS CLI (http://docs.aws.amazon.com/cli/latest/reference/apigateway/create-api-key.html) +// AWS CLI ([[AwsDocsUrlPrefix]]/cli/latest/reference/apigateway/create-api-key.html) // // Returns awserr.Error for service API and SDK errors. Use runtime type assertions // with awserr.Error's Code and Message methods to get detailed information about @@ -152,7 +152,7 @@ func (c *APIGateway) CreateAuthorizerRequest(input *CreateAuthorizerInput) (req // // Adds a new Authorizer resource to an existing RestApi resource. // -// AWS CLI (http://docs.aws.amazon.com/cli/latest/reference/apigateway/create-authorizer.html) +// AWS CLI ([[AwsDocsUrlPrefix]]/cli/latest/reference/apigateway/create-authorizer.html) // // Returns awserr.Error for service API and SDK errors. Use runtime type assertions // with awserr.Error's Code and Message methods to get detailed information about @@ -1526,7 +1526,7 @@ func (c *APIGateway) DeleteAuthorizerRequest(input *DeleteAuthorizerInput) (req // // Deletes an existing Authorizer resource. // -// AWS CLI (http://docs.aws.amazon.com/cli/latest/reference/apigateway/delete-authorizer.html) +// AWS CLI ([[AwsDocsUrlPrefix]]/cli/latest/reference/apigateway/delete-authorizer.html) // // Returns awserr.Error for service API and SDK errors. Use runtime type assertions // with awserr.Error's Code and Message methods to get detailed information about @@ -3912,7 +3912,7 @@ func (c *APIGateway) GetAuthorizerRequest(input *GetAuthorizerInput) (req *reque // // Describe an existing Authorizer resource. // -// AWS CLI (http://docs.aws.amazon.com/cli/latest/reference/apigateway/get-authorizer.html) +// AWS CLI ([[AwsDocsUrlPrefix]]/cli/latest/reference/apigateway/get-authorizer.html) // // Returns awserr.Error for service API and SDK errors. Use runtime type assertions // with awserr.Error's Code and Message methods to get detailed information about @@ -3997,7 +3997,7 @@ func (c *APIGateway) GetAuthorizersRequest(input *GetAuthorizersInput) (req *req // // Describe an existing Authorizers resource. // -// AWS CLI (http://docs.aws.amazon.com/cli/latest/reference/apigateway/get-authorizers.html) +// AWS CLI ([[AwsDocsUrlPrefix]]/cli/latest/reference/apigateway/get-authorizers.html) // // Returns awserr.Error for service API and SDK errors. Use runtime type assertions // with awserr.Error's Code and Message methods to get detailed information about @@ -9120,7 +9120,7 @@ func (c *APIGateway) TestInvokeAuthorizerRequest(input *TestInvokeAuthorizerInpu // Simulate the execution of an Authorizer in your RestApi with headers, parameters, // and an incoming request body. // -// Enable custom authorizers (http://docs.aws.amazon.com/apigateway/latest/developerguide/use-custom-authorizer.html) +// Enable custom authorizers ([[AwsDocsUrlPrefix]]/apigateway/latest/developerguide/use-custom-authorizer.html) // // Returns awserr.Error for service API and SDK errors. Use runtime type assertions // with awserr.Error's Code and Message methods to get detailed information about @@ -9568,7 +9568,7 @@ func (c *APIGateway) UpdateAuthorizerRequest(input *UpdateAuthorizerInput) (req // // Updates an existing Authorizer resource. // -// AWS CLI (http://docs.aws.amazon.com/cli/latest/reference/apigateway/update-authorizer.html) +// AWS CLI ([[AwsDocsUrlPrefix]]/cli/latest/reference/apigateway/update-authorizer.html) // // Returns awserr.Error for service API and SDK errors. Use runtime type assertions // with awserr.Error's Code and Message methods to get detailed information about @@ -11338,7 +11338,7 @@ type AccessLogSettings struct { DestinationArn *string `locationName:"destinationArn" type:"string"` // A single line format of the access logs of data, as specified by selected - // $context variables (http://docs.aws.amazon.com/apigateway/latest/developerguide/api-gateway-mapping-template-reference.html#context-variable-reference). + // $context variables ([[AwsDocsUrlPrefix]]/apigateway/latest/developerguide/api-gateway-mapping-template-reference.html#context-variable-reference). // The format must include at least $context.requestId. Format *string `locationName:"format" type:"string"` } @@ -11377,7 +11377,7 @@ func (s *AccessLogSettings) SetFormat(v string) *AccessLogSettings { // NotFoundException // TooManyRequestsException // For detailed error code information, including the corresponding HTTP Status -// Codes, see API Gateway Error Codes (http://docs.aws.amazon.com/apigateway/api-reference/handling-errors/#api-error-codes) +// Codes, see API Gateway Error Codes ([[AwsDocsUrlPrefix]]/apigateway/api-reference/handling-errors/#api-error-codes) // // Example: Get the information about an account. // @@ -11391,16 +11391,16 @@ func (s *AccessLogSettings) SetFormat(v string) *AccessLogSettings { // The successful response returns a 200 OK status code and a payload similar // to the following: // -// { "_links": { "curies": { "href": "http://docs.aws.amazon.com/apigateway/latest/developerguide/account-apigateway-{rel}.html", +// { "_links": { "curies": { "href": "[[AwsDocsUrlPrefix]]/apigateway/latest/developerguide/account-apigateway-{rel}.html", // "name": "account", "templated": true }, "self": { "href": "/account" }, "account:update": // { "href": "/account" } }, "cloudwatchRoleArn": "arn:aws:iam::123456789012:role/apigAwsProxyRole", // "throttleSettings": { "rateLimit": 500, "burstLimit": 1000 } } // In addition to making the REST API call directly, you can use the AWS CLI // and an AWS SDK to access this resource. // -// API Gateway Limits (http://docs.aws.amazon.com/apigateway/latest/developerguide/api-gateway-limits.html)Developer -// Guide (http://docs.aws.amazon.com/apigateway/latest/developerguide/welcome.html), -// AWS CLI (http://docs.aws.amazon.com/cli/latest/reference/apigateway/get-account.html) +// API Gateway Limits ([[AwsDocsUrlPrefix]]/apigateway/latest/developerguide/api-gateway-limits.html)Developer +// Guide ([[AwsDocsUrlPrefix]]/apigateway/latest/developerguide/welcome.html), +// AWS CLI ([[AwsDocsUrlPrefix]]/cli/latest/reference/apigateway/get-account.html) type Account struct { _ struct{} `type:"structure"` @@ -11457,7 +11457,7 @@ func (s *Account) SetThrottleSettings(v *ThrottleSettings) *Account { // which indicates that the callers with the API key can make requests to that // stage. // -// Use API Keys (http://docs.aws.amazon.com/apigateway/latest/developerguide/how-to-api-keys.html) +// Use API Keys ([[AwsDocsUrlPrefix]]/apigateway/latest/developerguide/how-to-api-keys.html) type ApiKey struct { _ struct{} `type:"structure"` @@ -11600,7 +11600,7 @@ func (s *ApiStage) SetThrottle(v map[string]*ThrottleSettings) *ApiStage { // Represents an authorization layer for methods. If enabled on a method, API // Gateway will activate the authorizer when a client calls the method. // -// Enable custom authorization (http://docs.aws.amazon.com/apigateway/latest/developerguide/use-custom-authorizer.html) +// Enable custom authorization ([[AwsDocsUrlPrefix]]/apigateway/latest/developerguide/use-custom-authorizer.html) type Authorizer struct { _ struct{} `type:"structure"` @@ -11750,7 +11750,7 @@ func (s *Authorizer) SetType(v string) *Authorizer { // // A custom domain name plus a BasePathMapping specification identifies a deployed // RestApi in a given stage of the owner Account. -// Use Custom Domain Names (http://docs.aws.amazon.com/apigateway/latest/developerguide/how-to-custom-domains.html) +// Use Custom Domain Names ([[AwsDocsUrlPrefix]]/apigateway/latest/developerguide/how-to-custom-domains.html) type BasePathMapping struct { _ struct{} `type:"structure"` @@ -11853,7 +11853,7 @@ func (s *CanarySettings) SetUseStageCache(v bool) *CanarySettings { // Client certificates are used to authenticate an API by the backend server. // To authenticate an API client (or user), use IAM roles and policies, a custom // Authorizer or an Amazon Cognito user pool. -// Use Client-Side Certificate (http://docs.aws.amazon.com/apigateway/latest/developerguide/getting-started-client-side-ssl-authentication.html) +// Use Client-Side Certificate ([[AwsDocsUrlPrefix]]/apigateway/latest/developerguide/getting-started-client-side-ssl-authentication.html) type ClientCertificate struct { _ struct{} `type:"structure"` @@ -12269,6 +12269,9 @@ type CreateDeploymentInput struct { // The name of the Stage resource for the Deployment resource to create. StageName *string `locationName:"stageName" type:"string"` + // Specifies whether active tracing with X-ray is enabled for the Stage. + TracingEnabled *bool `locationName:"tracingEnabled" type:"boolean"` + // A map that defines the stage variables for the Stage resource that is associated // with the new deployment. Variable names can have alphanumeric and underscore // characters, and the values must match [A-Za-z0-9-._~:/?#&=,]+. @@ -12340,6 +12343,12 @@ func (s *CreateDeploymentInput) SetStageName(v string) *CreateDeploymentInput { return s } +// SetTracingEnabled sets the TracingEnabled field's value. +func (s *CreateDeploymentInput) SetTracingEnabled(v bool) *CreateDeploymentInput { + s.TracingEnabled = &v + return s +} + // SetVariables sets the Variables field's value. func (s *CreateDeploymentInput) SetVariables(v map[string]*string) *CreateDeploymentInput { s.Variables = v @@ -12641,7 +12650,7 @@ type CreateModelInput struct { RestApiId *string `location:"uri" locationName:"restapi_id" type:"string" required:"true"` // The schema for the model. For application/json models, this should be JSON - // schema draft 4 (https://tools.ietf.org/html/draft-zyp-json-schema-04) model. + // schema draft 4 ([[JsonSchemaUrl]]) model. Schema *string `locationName:"schema" type:"string"` } @@ -13000,6 +13009,9 @@ type CreateStageInput struct { // tag value can be up to 256 characters. Tags map[string]*string `locationName:"tags" type:"map"` + // Specifies whether active tracing with X-ray is enabled for the Stage. + TracingEnabled *bool `locationName:"tracingEnabled" type:"boolean"` + // A map that defines the stage variables for the new Stage resource. Variable // names can have alphanumeric and underscore characters, and the values must // match [A-Za-z0-9-._~:/?#&=,]+. @@ -13089,6 +13101,12 @@ func (s *CreateStageInput) SetTags(v map[string]*string) *CreateStageInput { return s } +// SetTracingEnabled sets the TracingEnabled field's value. +func (s *CreateStageInput) SetTracingEnabled(v bool) *CreateStageInput { + s.TracingEnabled = &v + return s +} + // SetVariables sets the Variables field's value. func (s *CreateStageInput) SetVariables(v map[string]*string) *CreateStageInput { s.Variables = v @@ -14747,8 +14765,8 @@ func (s DeleteVpcLinkOutput) GoString() string { // To view, update, or delete a deployment, call GET, PATCH, or DELETE on the // specified deployment resource (/restapis/{restapi_id}/deployments/{deployment_id}). // -// RestApi, Deployments, Stage, AWS CLI (http://docs.aws.amazon.com/cli/latest/reference/apigateway/get-deployment.html), -// AWS SDKs (https://aws.amazon.com/tools/) +// RestApi, Deployments, Stage, AWS CLI ([[AwsDocsUrlPrefix]]/cli/latest/reference/apigateway/get-deployment.html), +// AWS SDKs ([[AwsAmazonUrlPrefix]]/tools/) type Deployment struct { _ struct{} `type:"structure"` @@ -14860,7 +14878,7 @@ func (s *DeploymentCanarySettings) SetUseStageCache(v bool) *DeploymentCanarySet // documentation fields will be injected into the associated API entity definition // in the exported Swagger definition file. // -// Documenting an API (http://docs.aws.amazon.com/apigateway/latest/developerguide/api-gateway-documenting-api.html), +// Documenting an API ([[AwsDocsUrlPrefix]]/apigateway/latest/developerguide/api-gateway-documenting-api.html), // DocumentationParts type DocumentationPart struct { _ struct{} `type:"structure"` @@ -15018,7 +15036,7 @@ func (s *DocumentationPartLocation) SetType(v string) *DocumentationPartLocation // with an API stage and exporting the versioned documentation to an external // (e.g., Swagger) file. // -// Documenting an API (http://docs.aws.amazon.com/apigateway/latest/developerguide/api-gateway-documenting-api.html), +// Documenting an API ([[AwsDocsUrlPrefix]]/apigateway/latest/developerguide/api-gateway-documenting-api.html), // DocumentationPart, DocumentationVersions type DocumentationVersion struct { _ struct{} `type:"structure"` @@ -15072,7 +15090,7 @@ func (s *DocumentationVersion) SetVersion(v string) *DocumentationVersion { // where myApi is the base path mapping (BasePathMapping) of your API under // the custom domain name. // -// Set a Custom Host Name for an API (http://docs.aws.amazon.com/apigateway/latest/developerguide/how-to-custom-domains.html) +// Set a Custom Host Name for an API ([[AwsDocsUrlPrefix]]/apigateway/latest/developerguide/how-to-custom-domains.html) type DomainName struct { _ struct{} `type:"structure"` @@ -15093,13 +15111,13 @@ type DomainName struct { // custom domain name for an edge-optimized endpoint. You set up this association // when adding a DNS record pointing the custom domain name to this distribution // name. For more information about CloudFront distributions, see the Amazon - // CloudFront documentation (http://aws.amazon.com/documentation/cloudfront/). + // CloudFront documentation ([[AwsAmazonUrlPrefix]]/documentation/cloudfront/). DistributionDomainName *string `locationName:"distributionDomainName" type:"string"` // The region-agnostic Amazon Route 53 Hosted Zone ID of the edge-optimized // endpoint. The valid value is Z2FDTNDATAQYW2 for all the regions. For more - // information, see Set up a Regional Custom Domain Name (https://docs.aws.amazon.com/apigateway/latest/developerguide/apigateway-regional-api-custom-domain-create.html) - // and AWS Regions and Endpoints for API Gateway (http://docs.aws.amazon.com/general/latest/gr/rande.html#apigateway_region). + // information, see Set up a Regional Custom Domain Name ([[AwsDocsUrlPrefix]]/apigateway/latest/developerguide/apigateway-regional-api-custom-domain-create.html) + // and AWS Regions and Endpoints for API Gateway ([[AwsDocsUrlPrefix]]/general/latest/gr/rande.html#apigateway_region). DistributionHostedZoneId *string `locationName:"distributionHostedZoneId" type:"string"` // The custom domain name as an API host name, for example, my-api.example.com. @@ -15124,8 +15142,8 @@ type DomainName struct { RegionalDomainName *string `locationName:"regionalDomainName" type:"string"` // The region-specific Amazon Route 53 Hosted Zone ID of the regional endpoint. - // For more information, see Set up a Regional Custom Domain Name (https://docs.aws.amazon.com/apigateway/latest/developerguide/apigateway-regional-api-custom-domain-create.html) - // and AWS Regions and Endpoints for API Gateway (http://docs.aws.amazon.com/general/latest/gr/rande.html#apigateway_region). + // For more information, see Set up a Regional Custom Domain Name ([[AwsDocsUrlPrefix]]/apigateway/latest/developerguide/apigateway-regional-api-custom-domain-create.html) + // and AWS Regions and Endpoints for API Gateway ([[AwsDocsUrlPrefix]]/general/latest/gr/rande.html#apigateway_region). RegionalHostedZoneId *string `locationName:"regionalHostedZoneId" type:"string"` } @@ -15520,7 +15538,7 @@ func (s *GetApiKeysInput) SetPosition(v string) *GetApiKeysInput { // Represents a collection of API keys as represented by an ApiKeys resource. // -// Use API Keys (http://docs.aws.amazon.com/apigateway/latest/developerguide/how-to-api-keys.html) +// Use API Keys ([[AwsDocsUrlPrefix]]/apigateway/latest/developerguide/how-to-api-keys.html) type GetApiKeysOutput struct { _ struct{} `type:"structure"` @@ -15675,7 +15693,7 @@ func (s *GetAuthorizersInput) SetRestApiId(v string) *GetAuthorizersInput { // Represents a collection of Authorizer resources. // -// Enable custom authorization (http://docs.aws.amazon.com/apigateway/latest/developerguide/use-custom-authorizer.html) +// Enable custom authorization ([[AwsDocsUrlPrefix]]/apigateway/latest/developerguide/use-custom-authorizer.html) type GetAuthorizersOutput struct { _ struct{} `type:"structure"` @@ -15823,7 +15841,7 @@ func (s *GetBasePathMappingsInput) SetPosition(v string) *GetBasePathMappingsInp // Represents a collection of BasePathMapping resources. // -// Use Custom Domain Names (http://docs.aws.amazon.com/apigateway/latest/developerguide/how-to-custom-domains.html) +// Use Custom Domain Names ([[AwsDocsUrlPrefix]]/apigateway/latest/developerguide/how-to-custom-domains.html) type GetBasePathMappingsOutput struct { _ struct{} `type:"structure"` @@ -15930,7 +15948,7 @@ func (s *GetClientCertificatesInput) SetPosition(v string) *GetClientCertificate // Represents a collection of ClientCertificate resources. // -// Use Client-Side Certificate (http://docs.aws.amazon.com/apigateway/latest/developerguide/getting-started-client-side-ssl-authentication.html) +// Use Client-Side Certificate ([[AwsDocsUrlPrefix]]/apigateway/latest/developerguide/getting-started-client-side-ssl-authentication.html) type GetClientCertificatesOutput struct { _ struct{} `type:"structure"` @@ -16097,9 +16115,9 @@ func (s *GetDeploymentsInput) SetRestApiId(v string) *GetDeploymentsInput { // resource. To view, update, or delete an existing deployment, make a GET, // PATCH, or DELETE request, respectively, on a specified Deployment resource. // -// Deploying an API (http://docs.aws.amazon.com/apigateway/latest/developerguide/how-to-deploy-api.html), -// AWS CLI (http://docs.aws.amazon.com/cli/latest/reference/apigateway/get-deployment.html), -// AWS SDKs (https://aws.amazon.com/tools/) +// Deploying an API ([[AwsDocsUrlPrefix]]/apigateway/latest/developerguide/how-to-deploy-api.html), +// AWS CLI ([[AwsDocsUrlPrefix]]/cli/latest/reference/apigateway/get-deployment.html), +// AWS SDKs ([[AwsAmazonUrlPrefix]]/tools/) type GetDeploymentsOutput struct { _ struct{} `type:"structure"` @@ -16283,7 +16301,7 @@ func (s *GetDocumentationPartsInput) SetType(v string) *GetDocumentationPartsInp // The collection of documentation parts of an API. // -// Documenting an API (http://docs.aws.amazon.com/apigateway/latest/developerguide/api-gateway-documenting-api.html), DocumentationPart +// Documenting an API ([[AwsDocsUrlPrefix]]/apigateway/latest/developerguide/api-gateway-documenting-api.html), DocumentationPart type GetDocumentationPartsOutput struct { _ struct{} `type:"structure"` @@ -16431,7 +16449,7 @@ func (s *GetDocumentationVersionsInput) SetRestApiId(v string) *GetDocumentation // Use the DocumentationVersions to manage documentation snapshots associated // with various API stages. // -// Documenting an API (http://docs.aws.amazon.com/apigateway/latest/developerguide/api-gateway-documenting-api.html), +// Documenting an API ([[AwsDocsUrlPrefix]]/apigateway/latest/developerguide/api-gateway-documenting-api.html), // DocumentationPart, DocumentationVersion type GetDocumentationVersionsOutput struct { _ struct{} `type:"structure"` @@ -16539,7 +16557,7 @@ func (s *GetDomainNamesInput) SetPosition(v string) *GetDomainNamesInput { // Represents a collection of DomainName resources. // -// Use Client-Side Certificate (http://docs.aws.amazon.com/apigateway/latest/developerguide/how-to-custom-domains.html) +// Use Client-Side Certificate ([[AwsDocsUrlPrefix]]/apigateway/latest/developerguide/how-to-custom-domains.html) type GetDomainNamesOutput struct { _ struct{} `type:"structure"` @@ -16848,7 +16866,7 @@ func (s *GetGatewayResponsesInput) SetRestApiId(v string) *GetGatewayResponsesIn // this collection. // // For more information about valid gateway response types, see Gateway Response -// Types Supported by API Gateway (http://docs.aws.amazon.com/apigateway/latest/developerguide/supported-gateway-response-types.html)Example: +// Types Supported by API Gateway ([[AwsDocsUrlPrefix]]/apigateway/latest/developerguide/supported-gateway-response-types.html)Example: // Get the collection of gateway responses of an API // // Request @@ -17002,7 +17020,7 @@ func (s *GetGatewayResponsesInput) SetRestApiId(v string) *GetGatewayResponsesIn // { "application/json": "{\"message\":$context.error.messageString}" }, "responseType": // "AUTHORIZER_FAILURE", "statusCode": "500" } ] } } // -// Customize Gateway Responses (http://docs.aws.amazon.com/apigateway/latest/developerguide/customize-gateway-responses.html) +// Customize Gateway Responses ([[AwsDocsUrlPrefix]]/apigateway/latest/developerguide/customize-gateway-responses.html) type GetGatewayResponsesOutput struct { _ struct{} `type:"structure"` @@ -17449,12 +17467,12 @@ func (s *GetModelTemplateInput) SetRestApiId(v string) *GetModelTemplateInput { // Represents a mapping template used to transform a payload. // -// Mapping Templates (http://docs.aws.amazon.com/apigateway/latest/developerguide/models-mappings.html#models-mappings-mappings) +// Mapping Templates ([[AwsDocsUrlPrefix]]/apigateway/latest/developerguide/models-mappings.html#models-mappings-mappings) type GetModelTemplateOutput struct { _ struct{} `type:"structure"` - // The Apache Velocity Template Language (VTL) (http://velocity.apache.org/engine/devel/vtl-reference-guide.html) - // template content used for the template resource. + // The Apache Velocity Template Language (VTL) ([[ApacheVtlUrl]]) template content + // used for the template resource. Value *string `locationName:"value" type:"string"` } @@ -17534,7 +17552,7 @@ func (s *GetModelsInput) SetRestApiId(v string) *GetModelsInput { // Represents a collection of Model resources. // -// Method, MethodResponse, Models and Mappings (http://docs.aws.amazon.com/apigateway/latest/developerguide/models-mappings.html) +// Method, MethodResponse, Models and Mappings ([[AwsDocsUrlPrefix]]/apigateway/latest/developerguide/models-mappings.html) type GetModelsOutput struct { _ struct{} `type:"structure"` @@ -17680,10 +17698,10 @@ func (s *GetRequestValidatorsInput) SetRestApiId(v string) *GetRequestValidators // A collection of RequestValidator resources of a given RestApi. // // In Swagger, the RequestValidators of an API is defined by the x-amazon-apigateway-request-validators -// (http://docs.aws.amazon.com/apigateway/latest/developerguide/api-gateway-swagger-extensions.html#api-gateway-swagger-extensions-request-validators.html) +// ([[AwsDocsUrlPrefix]]/apigateway/latest/developerguide/api-gateway-swagger-extensions.html#api-gateway-swagger-extensions-request-validators.html) // extension. // -// Enable Basic Request Validation in API Gateway (http://docs.aws.amazon.com/apigateway/latest/developerguide/api-gateway-method-request-validation.html) +// Enable Basic Request Validation in API Gateway ([[AwsDocsUrlPrefix]]/apigateway/latest/developerguide/api-gateway-method-request-validation.html) type GetRequestValidatorsOutput struct { _ struct{} `type:"structure"` @@ -17856,7 +17874,7 @@ func (s *GetResourcesInput) SetRestApiId(v string) *GetResourcesInput { // Represents a collection of Resource resources. // -// Create an API (http://docs.aws.amazon.com/apigateway/latest/developerguide/how-to-create-api.html) +// Create an API ([[AwsDocsUrlPrefix]]/apigateway/latest/developerguide/how-to-create-api.html) type GetResourcesOutput struct { _ struct{} `type:"structure"` @@ -17964,7 +17982,7 @@ func (s *GetRestApisInput) SetPosition(v string) *GetRestApisInput { // Contains references to your APIs and links that guide you in how to interact // with your collection. A collection offers a paginated view of your APIs. // -// Create an API (http://docs.aws.amazon.com/apigateway/latest/developerguide/how-to-create-api.html) +// Create an API ([[AwsDocsUrlPrefix]]/apigateway/latest/developerguide/how-to-create-api.html) type GetRestApisOutput struct { _ struct{} `type:"structure"` @@ -18327,7 +18345,7 @@ func (s *GetStagesInput) SetRestApiId(v string) *GetStagesInput { // A list of Stage resources that are associated with the ApiKey resource. // -// Deploying API in Stages (http://docs.aws.amazon.com/apigateway/latest/developerguide/stages.html) +// Deploying API in Stages ([[AwsDocsUrlPrefix]]/apigateway/latest/developerguide/stages.html) type GetStagesOutput struct { _ struct{} `type:"structure"` @@ -18697,7 +18715,7 @@ func (s *GetUsagePlanKeysInput) SetUsagePlanId(v string) *GetUsagePlanKeysInput // Represents the collection of usage plan keys added to usage plans for the // associated API keys and, possibly, other types of keys. // -// Create and Use Usage Plans (http://docs.aws.amazon.com/apigateway/latest/developerguide/api-gateway-api-usage-plans.html) +// Create and Use Usage Plans ([[AwsDocsUrlPrefix]]/apigateway/latest/developerguide/api-gateway-api-usage-plans.html) type GetUsagePlanKeysOutput struct { _ struct{} `type:"structure"` @@ -18774,7 +18792,7 @@ func (s *GetUsagePlansInput) SetPosition(v string) *GetUsagePlansInput { // Represents a collection of usage plans for an AWS account. // -// Create and Use Usage Plans (http://docs.aws.amazon.com/apigateway/latest/developerguide/api-gateway-api-usage-plans.html) +// Create and Use Usage Plans ([[AwsDocsUrlPrefix]]/apigateway/latest/developerguide/api-gateway-api-usage-plans.html) type GetUsagePlansOutput struct { _ struct{} `type:"structure"` @@ -18882,8 +18900,8 @@ func (s *GetVpcLinksInput) SetPosition(v string) *GetVpcLinksInput { // The collection of VPC links under the caller's account in a region. // -// Getting Started with Private Integrations (http://docs.aws.amazon.com/apigateway/latest/developerguide/getting-started-with-private-integration.html), -// Set up Private Integrations (http://docs.aws.amazon.com/apigateway/latest/developerguide/set-up-private-integration.html) +// Getting Started with Private Integrations ([[AwsDocsUrlPrefix]]/apigateway/latest/developerguide/getting-started-with-private-integration.html), +// Set up Private Integrations ([[AwsDocsUrlPrefix]]/apigateway/latest/developerguide/set-up-private-integration.html) type GetVpcLinksOutput struct { _ struct{} `type:"structure"` @@ -18921,7 +18939,7 @@ type ImportApiKeysInput struct { _ struct{} `type:"structure" payload:"Body"` // The payload of the POST request to import API keys. For the payload format, - // see API Key File Format (http://docs.aws.amazon.com/apigateway/latest/developerguide/api-key-file-format.html). + // see API Key File Format ([[AwsDocsUrlPrefix]]/apigateway/latest/developerguide/api-key-file-format.html). // // Body is a required field Body []byte `locationName:"body" type:"blob" required:"true"` @@ -19094,8 +19112,8 @@ func (s *ImportDocumentationPartsInput) SetRestApiId(v string) *ImportDocumentat // // This is used to return the result when documentation parts in an external // (e.g., Swagger) file are imported into API Gateway -// Documenting an API (http://docs.aws.amazon.com/apigateway/latest/developerguide/api-gateway-documenting-api.html), -// documentationpart:import (http://docs.aws.amazon.com/apigateway/api-reference/link-relation/documentationpart-import/), +// Documenting an API ([[AwsDocsUrlPrefix]]/apigateway/latest/developerguide/api-gateway-documenting-api.html), +// documentationpart:import ([[AwsDocsUrlPrefix]]/apigateway/api-reference/link-relation/documentationpart-import/), // DocumentationPart type ImportDocumentationPartsOutput struct { _ struct{} `type:"structure"` @@ -19215,7 +19233,7 @@ func (s *ImportRestApiInput) SetParameters(v map[string]*string) *ImportRestApiI // // In the API Gateway console, the built-in Lambda integration is an AWS integration. // -// Creating an API (http://docs.aws.amazon.com/apigateway/latest/developerguide/how-to-create-api.html) +// Creating an API ([[AwsDocsUrlPrefix]]/apigateway/latest/developerguide/how-to-create-api.html) type Integration struct { _ struct{} `type:"structure"` @@ -19225,7 +19243,7 @@ type Integration struct { // Specifies the integration's cache namespace. CacheNamespace *string `locationName:"cacheNamespace" type:"string"` - // The (id (http://docs.aws.amazon.com/apigateway/api-reference/resource/vpc-link/#id)) + // The (id ([[AwsDocsUrlPrefix]]/apigateway/api-reference/resource/vpc-link/#id)) // of the VpcLink used for the integration when connectionType=VPC_LINK and // undefined, otherwise. ConnectionId *string `locationName:"connectionId" type:"string"` @@ -19274,7 +19292,7 @@ type Integration struct { // // The successful response returns 200 OKstatus and a payload as follows: // - // { "_links": { "curies": { "href": "http://docs.aws.amazon.com/apigateway/latest/developerguide/restapi-integration-response-{rel}.html", + // { "_links": { "curies": { "href": "[[AwsDocsUrlPrefix]]/apigateway/latest/developerguide/restapi-integration-response-{rel}.html", // "name": "integrationresponse", "templated": true }, "self": { "href": "/restapis/fugvjdxtri/resources/3kzxbg5sa2/methods/GET/integration/responses/200", // "title": "200" }, "integrationresponse:delete": { "href": "/restapis/fugvjdxtri/resources/3kzxbg5sa2/methods/GET/integration/responses/200" // }, "integrationresponse:update": { "href": "/restapis/fugvjdxtri/resources/3kzxbg5sa2/methods/GET/integration/responses/200" @@ -19367,7 +19385,7 @@ type Integration struct { // Alternatively, path can be used for an AWS service path-based API. The // ensuing service_api refers to the path to an AWS service resource, including // the region of the integrated AWS service, if applicable. For example, - // for integration with the S3 API of GetObject (http://docs.aws.amazon.com/AmazonS3/latest/API/RESTObjectGET.html), + // for integration with the S3 API of GetObject ([[AwsDocsUrlPrefix]]/AmazonS3/latest/API/RESTObjectGET.html), // the uri can be either arn:aws:apigateway:us-west-2:s3:action/GetObject&Bucket={bucket}&Key={key} // or arn:aws:apigateway:us-west-2:s3:path/{bucket}/{key} Uri *string `locationName:"uri" type:"string"` @@ -19471,7 +19489,7 @@ func (s *Integration) SetUri(v string) *Integration { // MethodResponse, and parameters and templates can be used to transform the // back-end response. // -// Creating an API (http://docs.aws.amazon.com/apigateway/latest/developerguide/how-to-create-api.html) +// Creating an API ([[AwsDocsUrlPrefix]]/apigateway/latest/developerguide/how-to-create-api.html) type IntegrationResponse struct { _ struct{} `type:"structure"` @@ -19587,10 +19605,10 @@ func (s *IntegrationResponse) SetStatusCode(v string) *IntegrationResponse { // The successful response returns a 200 OK status code and a payload similar // to the following: // -// { "_links": { "curies": [ { "href": "http://docs.aws.amazon.com/apigateway/latest/developerguide/restapi-integration-{rel}.html", -// "name": "integration", "templated": true }, { "href": "http://docs.aws.amazon.com/apigateway/latest/developerguide/restapi-integration-response-{rel}.html", -// "name": "integrationresponse", "templated": true }, { "href": "http://docs.aws.amazon.com/apigateway/latest/developerguide/restapi-method-{rel}.html", -// "name": "method", "templated": true }, { "href": "http://docs.aws.amazon.com/apigateway/latest/developerguide/restapi-method-response-{rel}.html", +// { "_links": { "curies": [ { "href": "[[AwsDocsUrlPrefix]]/apigateway/latest/developerguide/restapi-integration-{rel}.html", +// "name": "integration", "templated": true }, { "href": "[[AwsDocsUrlPrefix]]/apigateway/latest/developerguide/restapi-integration-response-{rel}.html", +// "name": "integrationresponse", "templated": true }, { "href": "[[AwsDocsUrlPrefix]]/apigateway/latest/developerguide/restapi-method-{rel}.html", +// "name": "method", "templated": true }, { "href": "[[AwsDocsUrlPrefix]]/apigateway/latest/developerguide/restapi-method-response-{rel}.html", // "name": "methodresponse", "templated": true } ], "self": { "href": "/restapis/fugvjdxtri/resources/3kzxbg5sa2/methods/GET", // "name": "GET", "title": "GET" }, "integration:put": { "href": "/restapis/fugvjdxtri/resources/3kzxbg5sa2/methods/GET/integration" // }, "method:delete": { "href": "/restapis/fugvjdxtri/resources/3kzxbg5sa2/methods/GET" @@ -19627,10 +19645,10 @@ func (s *IntegrationResponse) SetStatusCode(v string) *IntegrationResponse { // In the example above, the response template for the 200 OK response maps // the JSON output from the ListStreams action in the back end to an XML output. // The mapping template is URL-encoded as %3CkinesisStreams%3E%23foreach(%24stream%20in%20%24input.path(%27%24.StreamNames%27))%3Cstream%3E%3Cname%3E%24stream%3C%2Fname%3E%3C%2Fstream%3E%23end%3C%2FkinesisStreams%3E -// and the output is decoded using the $util.urlDecode() (http://docs.aws.amazon.com/apigateway/latest/developerguide/api-gateway-mapping-template-reference.html#util-templat-reference) +// and the output is decoded using the $util.urlDecode() ([[AwsDocsUrlPrefix]]/apigateway/latest/developerguide/api-gateway-mapping-template-reference.html#util-templat-reference) // helper function. // -// MethodResponse, Integration, IntegrationResponse, Resource, Set up an API's method (http://docs.aws.amazon.com/apigateway/latest/developerguide/how-to-method-settings.html) +// MethodResponse, Integration, IntegrationResponse, Resource, Set up an API's method ([[AwsDocsUrlPrefix]]/apigateway/latest/developerguide/how-to-method-settings.html) type Method struct { _ struct{} `type:"structure"` @@ -19676,8 +19694,8 @@ type Method struct { // // The successful response returns a 200 OKstatus code and a payload similar to the following: // - // { "_links": { "curies": [ { "href": "http://docs.aws.amazon.com/apigateway/latest/developerguide/restapi-integration-{rel}.html", - // "name": "integration", "templated": true }, { "href": "http://docs.aws.amazon.com/apigateway/latest/developerguide/restapi-integration-response-{rel}.html", + // { "_links": { "curies": [ { "href": "[[AwsDocsUrlPrefix]]/apigateway/latest/developerguide/restapi-integration-{rel}.html", + // "name": "integration", "templated": true }, { "href": "[[AwsDocsUrlPrefix]]/apigateway/latest/developerguide/restapi-integration-response-{rel}.html", // "name": "integrationresponse", "templated": true } ], "self": { "href": "/restapis/uojnr9hd57/resources/0cjtch/methods/GET/integration" // }, "integration:delete": { "href": "/restapis/uojnr9hd57/resources/0cjtch/methods/GET/integration" // }, "integration:responses": { "href": "/restapis/uojnr9hd57/resources/0cjtch/methods/GET/integration/responses/200", @@ -19722,7 +19740,7 @@ type Method struct { // The successful response returns a 200 OK status code and a payload similar // to the following: // - // { "_links": { "curies": { "href": "http://docs.aws.amazon.com/apigateway/latest/developerguide/restapi-method-response-{rel}.html", + // { "_links": { "curies": { "href": "[[AwsDocsUrlPrefix]]/apigateway/latest/developerguide/restapi-method-response-{rel}.html", // "name": "methodresponse", "templated": true }, "self": { "href": "/restapis/uojnr9hd57/resources/0cjtch/methods/GET/responses/200", // "title": "200" }, "methodresponse:delete": { "href": "/restapis/uojnr9hd57/resources/0cjtch/methods/GET/responses/200" // }, "methodresponse:update": { "href": "/restapis/uojnr9hd57/resources/0cjtch/methods/GET/responses/200" @@ -19734,7 +19752,7 @@ type Method struct { // A human-friendly operation identifier for the method. For example, you can // assign the operationName of ListPets for the GET /pets method in PetStore - // (http://petstore-demo-endpoint.execute-api.com/petstore/pets) example. + // ([[PetstoreDemoUrl]]) example. OperationName *string `locationName:"operationName" type:"string"` // A key-value map specifying data schemas, represented by Model resources, @@ -19850,7 +19868,7 @@ func (s *Method) SetRequestValidatorId(v string) *Method { // // The successful response returns 200 OK status and a payload as follows: // -// { "_links": { "curies": { "href": "http://docs.aws.amazon.com/apigateway/latest/developerguide/restapi-method-response-{rel}.html", +// { "_links": { "curies": { "href": "[[AwsDocsUrlPrefix]]/apigateway/latest/developerguide/restapi-method-response-{rel}.html", // "name": "methodresponse", "templated": true }, "self": { "href": "/restapis/fugvjdxtri/resources/3kzxbg5sa2/methods/GET/responses/200", // "title": "200" }, "methodresponse:delete": { "href": "/restapis/fugvjdxtri/resources/3kzxbg5sa2/methods/GET/responses/200" // }, "methodresponse:update": { "href": "/restapis/fugvjdxtri/resources/3kzxbg5sa2/methods/GET/responses/200" @@ -19932,12 +19950,12 @@ type MethodSetting struct { // the value is a Boolean. CachingEnabled *bool `locationName:"cachingEnabled" type:"boolean"` - // Specifies whether data trace logging is enabled for this method, which effects + // Specifies whether data trace logging is enabled for this method, which affects // the log entries pushed to Amazon CloudWatch Logs. The PATCH path for this // setting is /{method_setting_key}/logging/dataTrace, and the value is a Boolean. DataTraceEnabled *bool `locationName:"dataTraceEnabled" type:"boolean"` - // Specifies the logging level for this method, which effects the log entries + // Specifies the logging level for this method, which affects the log entries // pushed to Amazon CloudWatch Logs. The PATCH path for this setting is /{method_setting_key}/logging/loglevel, // and the available levels are OFF, ERROR, and INFO. LoggingLevel *string `locationName:"loggingLevel" type:"string"` @@ -20082,7 +20100,7 @@ func (s *MethodSnapshot) SetAuthorizationType(v string) *MethodSnapshot { // A model is used for generating an API's SDK, validating the input request // body, and creating a skeletal mapping template. // -// Method, MethodResponse, Models and Mappings (http://docs.aws.amazon.com/apigateway/latest/developerguide/models-mappings.html) +// Method, MethodResponse, Models and Mappings ([[AwsDocsUrlPrefix]]/apigateway/latest/developerguide/models-mappings.html) type Model struct { _ struct{} `type:"structure"` @@ -20099,11 +20117,11 @@ type Model struct { Name *string `locationName:"name" type:"string"` // The schema for the model. For application/json models, this should be JSON - // schema draft 4 (https://tools.ietf.org/html/draft-zyp-json-schema-04) model. - // Do not include "\*/" characters in the description of any properties because - // such "\*/" characters may be interpreted as the closing marker for comments - // in some languages, such as Java or JavaScript, causing the installation of - // your API's SDK generated by API Gateway to fail. + // schema draft 4 ([[JsonSchemaUrl]]) model. Do not include "\*/" characters + // in the description of any properties because such "\*/" characters may be + // interpreted as the closing marker for comments in some languages, such as + // Java or JavaScript, causing the installation of your API's SDK generated + // by API Gateway to fail. Schema *string `locationName:"schema" type:"string"` } @@ -20167,7 +20185,7 @@ type PatchOperation struct { // an error message. Op *string `locationName:"op" type:"string" enum:"Op"` - // The op operation's target, as identified by a JSON Pointer (https://tools.ietf.org/html/draft-ietf-appsawg-json-pointer-08) + // The op operation's target, as identified by a JSON Pointer ([[JsonPointerRefUrl]]) // value that references a location within the targeted resource. For example, // if the target resource has an updateable property of {"name":"value"}, the // path for this property is /name. If the name property value is a JSON object @@ -20180,7 +20198,7 @@ type PatchOperation struct { // The new target value of the update operation. It is applicable for the add // or replace operation. When using AWS CLI to update a property of a JSON value, // enclose the JSON object with a pair of single quotes in a Linux shell, e.g., - // '{"a": ...}'. In a Windows shell, see Using JSON for Parameters (http://docs.aws.amazon.com/cli/latest/userguide/cli-using-param.html#cli-using-param-json). + // '{"a": ...}'. In a Windows shell, see Using JSON for Parameters ([[AwsDocsUrlPrefix]]/cli/latest/userguide/cli-using-param.html#cli-using-param-json). Value *string `locationName:"value" type:"string"` } @@ -20331,7 +20349,7 @@ type PutIntegrationInput struct { // Specifies a put integration input's cache namespace. CacheNamespace *string `locationName:"cacheNamespace" type:"string"` - // The (id (http://docs.aws.amazon.com/apigateway/api-reference/resource/vpc-link/#id)) + // The (id ([[AwsDocsUrlPrefix]]/apigateway/api-reference/resource/vpc-link/#id)) // of the VpcLink used for the integration when connectionType=VPC_LINK and // undefined, otherwise. ConnectionId *string `locationName:"connectionId" type:"string"` @@ -20436,7 +20454,7 @@ type PutIntegrationInput struct { // Alternatively, path can be used for an AWS service path-based API. The // ensuing service_api refers to the path to an AWS service resource, including // the region of the integrated AWS service, if applicable. For example, - // for integration with the S3 API of GetObject (http://docs.aws.amazon.com/AmazonS3/latest/API/RESTObjectGET.html), + // for integration with the S3 API of GetObject ([[AwsDocsUrlPrefix]]/AmazonS3/latest/API/RESTObjectGET.html), // the uri can be either arn:aws:apigateway:us-west-2:s3:action/GetObject&Bucket={bucket}&Key={key} // or arn:aws:apigateway:us-west-2:s3:path/{bucket}/{key} Uri *string `locationName:"uri" type:"string"` @@ -20743,7 +20761,7 @@ type PutMethodInput struct { // A human-friendly operation identifier for the method. For example, you can // assign the operationName of ListPets for the GET /pets method in PetStore - // (http://petstore-demo-endpoint.execute-api.com/petstore/pets) example. + // ([[PetstoreDemoUrl]]) example. OperationName *string `locationName:"operationName" type:"string"` // Specifies the Model resources used for the request's content type. Request @@ -21118,7 +21136,7 @@ func (s *QuotaSettings) SetPeriod(v string) *QuotaSettings { // Represents an API resource. // -// Create an API (http://docs.aws.amazon.com/apigateway/latest/developerguide/how-to-create-api.html) +// Create an API ([[AwsDocsUrlPrefix]]/apigateway/latest/developerguide/how-to-create-api.html) type Resource struct { _ struct{} `type:"structure"` @@ -21151,10 +21169,10 @@ type Resource struct { // SignedHeaders=content-type;host;x-amz-date, Signature={sig4_hash} // Response // - // { "_links": { "curies": [ { "href": "http://docs.aws.amazon.com/apigateway/latest/developerguide/restapi-integration-{rel}.html", - // "name": "integration", "templated": true }, { "href": "http://docs.aws.amazon.com/apigateway/latest/developerguide/restapi-integration-response-{rel}.html", - // "name": "integrationresponse", "templated": true }, { "href": "http://docs.aws.amazon.com/apigateway/latest/developerguide/restapi-method-{rel}.html", - // "name": "method", "templated": true }, { "href": "http://docs.aws.amazon.com/apigateway/latest/developerguide/restapi-method-response-{rel}.html", + // { "_links": { "curies": [ { "href": "[[AwsDocsUrlPrefix]]/apigateway/latest/developerguide/restapi-integration-{rel}.html", + // "name": "integration", "templated": true }, { "href": "[[AwsDocsUrlPrefix]]/apigateway/latest/developerguide/restapi-integration-response-{rel}.html", + // "name": "integrationresponse", "templated": true }, { "href": "[[AwsDocsUrlPrefix]]/apigateway/latest/developerguide/restapi-method-{rel}.html", + // "name": "method", "templated": true }, { "href": "[[AwsDocsUrlPrefix]]/apigateway/latest/developerguide/restapi-method-response-{rel}.html", // "name": "methodresponse", "templated": true } ], "self": { "href": "/restapis/fugvjdxtri/resources/3kzxbg5sa2/methods/GET", // "name": "GET", "title": "GET" }, "integration:put": { "href": "/restapis/fugvjdxtri/resources/3kzxbg5sa2/methods/GET/integration" // }, "method:delete": { "href": "/restapis/fugvjdxtri/resources/3kzxbg5sa2/methods/GET" @@ -21236,7 +21254,7 @@ func (s *Resource) SetResourceMethods(v map[string]*Method) *Resource { // Represents a REST API. // -// Create an API (http://docs.aws.amazon.com/apigateway/latest/developerguide/how-to-create-api.html) +// Create an API ([[AwsDocsUrlPrefix]]/apigateway/latest/developerguide/how-to-create-api.html) type RestApi struct { _ struct{} `type:"structure"` @@ -21478,7 +21496,7 @@ func (s *SdkType) SetId(v string) *SdkType { // Represents a unique identifier for a version of a deployed RestApi that is // callable by users. // -// Deploy an API (http://docs.aws.amazon.com/apigateway/latest/developerguide/how-to-deploy-api.html) +// Deploy an API ([[AwsDocsUrlPrefix]]/apigateway/latest/developerguide/how-to-deploy-api.html) type Stage struct { _ struct{} `type:"structure"` @@ -21528,6 +21546,9 @@ type Stage struct { // The collection of tags. Each tag element is associated with a given resource. Tags map[string]*string `locationName:"tags" type:"map"` + // Specifies whether active tracing with X-ray is enabled for the Stage. + TracingEnabled *bool `locationName:"tracingEnabled" type:"boolean"` + // A map that defines the stage variables for a Stage resource. Variable names // can have alphanumeric and underscore characters, and the values must match // [A-Za-z0-9-._~:/?#&=,]+. @@ -21628,6 +21649,12 @@ func (s *Stage) SetTags(v map[string]*string) *Stage { return s } +// SetTracingEnabled sets the TracingEnabled field's value. +func (s *Stage) SetTracingEnabled(v bool) *Stage { + s.TracingEnabled = &v + return s +} + // SetVariables sets the Variables field's value. func (s *Stage) SetVariables(v map[string]*string) *Stage { s.Variables = v @@ -21757,6 +21784,11 @@ type TestInvokeAuthorizerInput struct { // should be specified. Headers map[string]*string `locationName:"headers" type:"map"` + // [Optional] The headers as a map from string to list of values to simulate + // an incoming invocation request. This is where the incoming authorization + // token, or identity source, may be specified. + MultiValueHeaders map[string][]*string `locationName:"multiValueHeaders" type:"map"` + // [Optional] The URI path, including query string, of the simulated invocation // request. Use this to specify path parameters and query string parameters. PathWithQueryString *string `locationName:"pathWithQueryString" type:"string"` @@ -21821,6 +21853,12 @@ func (s *TestInvokeAuthorizerInput) SetHeaders(v map[string]*string) *TestInvoke return s } +// SetMultiValueHeaders sets the MultiValueHeaders field's value. +func (s *TestInvokeAuthorizerInput) SetMultiValueHeaders(v map[string][]*string) *TestInvokeAuthorizerInput { + s.MultiValueHeaders = v + return s +} + // SetPathWithQueryString sets the PathWithQueryString field's value. func (s *TestInvokeAuthorizerInput) SetPathWithQueryString(v string) *TestInvokeAuthorizerInput { s.PathWithQueryString = &v @@ -21845,9 +21883,8 @@ type TestInvokeAuthorizerOutput struct { Authorization map[string][]*string `locationName:"authorization" type:"map"` - // The open identity claims (http://openid.net/specs/openid-connect-core-1_0.html#StandardClaims), - // with any supported custom attributes, returned from the Cognito Your User - // Pool configured for the API. + // The open identity claims ([[OpenIdClaimsUrl]]), with any supported custom + // attributes, returned from the Cognito Your User Pool configured for the API. Claims map[string]*string `locationName:"claims" type:"map"` // The HTTP status code that the client would have received. Value is 0 if the @@ -21939,6 +21976,10 @@ type TestInvokeMethodInput struct { // HttpMethod is a required field HttpMethod *string `location:"uri" locationName:"http_method" type:"string" required:"true"` + // The headers as a map from string to list of values to simulate an incoming + // invocation request. + MultiValueHeaders map[string][]*string `locationName:"multiValueHeaders" type:"map"` + // The URI path, including query string, of the simulated invocation request. // Use this to specify path parameters and query string parameters. PathWithQueryString *string `locationName:"pathWithQueryString" type:"string"` @@ -22011,6 +22052,12 @@ func (s *TestInvokeMethodInput) SetHttpMethod(v string) *TestInvokeMethodInput { return s } +// SetMultiValueHeaders sets the MultiValueHeaders field's value. +func (s *TestInvokeMethodInput) SetMultiValueHeaders(v map[string][]*string) *TestInvokeMethodInput { + s.MultiValueHeaders = v + return s +} + // SetPathWithQueryString sets the PathWithQueryString field's value. func (s *TestInvokeMethodInput) SetPathWithQueryString(v string) *TestInvokeMethodInput { s.PathWithQueryString = &v @@ -22037,7 +22084,7 @@ func (s *TestInvokeMethodInput) SetStageVariables(v map[string]*string) *TestInv // Represents the response of the test invoke request in the HTTP method. // -// Test API using the API Gateway console (http://docs.aws.amazon.com/apigateway/latest/developerguide/how-to-test-method.html#how-to-test-method-console) +// Test API using the API Gateway console ([[AwsDocsUrlPrefix]]/apigateway/latest/developerguide/how-to-test-method.html#how-to-test-method-console) type TestInvokeMethodOutput struct { _ struct{} `type:"structure"` @@ -22053,6 +22100,9 @@ type TestInvokeMethodOutput struct { // The API Gateway execution log for the test invoke request. Log *string `locationName:"log" type:"string"` + // The headers of the HTTP response as a map from string to list of values. + MultiValueHeaders map[string][]*string `locationName:"multiValueHeaders" type:"map"` + // The HTTP status code. Status *int64 `locationName:"status" type:"integer"` } @@ -22091,6 +22141,12 @@ func (s *TestInvokeMethodOutput) SetLog(v string) *TestInvokeMethodOutput { return s } +// SetMultiValueHeaders sets the MultiValueHeaders field's value. +func (s *TestInvokeMethodOutput) SetMultiValueHeaders(v map[string][]*string) *TestInvokeMethodOutput { + s.MultiValueHeaders = v + return s +} + // SetStatus sets the Status field's value. func (s *TestInvokeMethodOutput) SetStatus(v int64) *TestInvokeMethodOutput { s.Status = &v @@ -22775,7 +22831,7 @@ func (s *UpdateGatewayResponseInput) SetRestApiId(v string) *UpdateGatewayRespon // response parameters and mapping templates. // // For more information about valid gateway response types, see Gateway Response -// Types Supported by API Gateway (http://docs.aws.amazon.com/apigateway/latest/developerguide/supported-gateway-response-types.html)Example: +// Types Supported by API Gateway ([[AwsDocsUrlPrefix]]/apigateway/latest/developerguide/supported-gateway-response-types.html)Example: // Get a Gateway Response of a given response type // // Request @@ -22811,7 +22867,7 @@ func (s *UpdateGatewayResponseInput) SetRestApiId(v string) *UpdateGatewayRespon // \"statusCode\": \"'404'\"\n}" }, "responseType": "MISSING_AUTHENTICATION_TOKEN", // "statusCode": "404" } // -// Customize Gateway Responses (http://docs.aws.amazon.com/apigateway/latest/developerguide/customize-gateway-responses.html) +// Customize Gateway Responses ([[AwsDocsUrlPrefix]]/apigateway/latest/developerguide/customize-gateway-responses.html) type UpdateGatewayResponseOutput struct { _ struct{} `type:"structure"` @@ -23360,12 +23416,12 @@ func (s *UpdateRequestValidatorInput) SetRestApiId(v string) *UpdateRequestValid // A set of validation rules for incoming Method requests. // // In Swagger, a RequestValidator of an API is defined by the x-amazon-apigateway-request-validators.requestValidator -// (http://docs.aws.amazon.com/apigateway/latest/developerguide/api-gateway-swagger-extensions.html#api-gateway-swagger-extensions-request-validators.requestValidator.html) +// ([[AwsDocsUrlPrefix]]/apigateway/latest/developerguide/api-gateway-swagger-extensions.html#api-gateway-swagger-extensions-request-validators.requestValidator.html) // object. It the referenced using the x-amazon-apigateway-request-validator -// (http://docs.aws.amazon.com/apigateway/latest/developerguide/api-gateway-swagger-extensions.html#api-gateway-swagger-extensions-request-validator) +// ([[AwsDocsUrlPrefix]]/apigateway/latest/developerguide/api-gateway-swagger-extensions.html#api-gateway-swagger-extensions-request-validator) // property. // -// Enable Basic Request Validation in API Gateway (http://docs.aws.amazon.com/apigateway/latest/developerguide/api-gateway-method-request-validation.html) +// Enable Basic Request Validation in API Gateway ([[AwsDocsUrlPrefix]]/apigateway/latest/developerguide/api-gateway-method-request-validation.html) type UpdateRequestValidatorOutput struct { _ struct{} `type:"structure"` @@ -23841,7 +23897,7 @@ func (s *UpdateVpcLinkOutput) SetTargetArns(v []*string) *UpdateVpcLinkOutput { // Represents the usage data of a usage plan. // -// Create and Use Usage Plans (http://docs.aws.amazon.com/apigateway/latest/developerguide/api-gateway-api-usage-plans.html), Manage Usage in a Usage Plan (http://docs.aws.amazon.com/apigateway/latest/developerguide/api-gateway-create-usage-plans-with-console.html#api-gateway-usage-plan-manage-usage) +// Create and Use Usage Plans ([[AwsDocsUrlPrefix]]/apigateway/latest/developerguide/api-gateway-api-usage-plans.html), Manage Usage in a Usage Plan ([[AwsDocsUrlPrefix]]/apigateway/latest/developerguide/api-gateway-create-usage-plans-with-console.html#api-gateway-usage-plan-manage-usage) type Usage struct { _ struct{} `type:"structure"` @@ -23911,7 +23967,7 @@ func (s *Usage) SetUsagePlanId(v string) *Usage { // name of the specified API. You add plan customers by adding API keys to the // plan. // -// Create and Use Usage Plans (http://docs.aws.amazon.com/apigateway/latest/developerguide/api-gateway-api-usage-plans.html) +// Create and Use Usage Plans ([[AwsDocsUrlPrefix]]/apigateway/latest/developerguide/api-gateway-api-usage-plans.html) type UsagePlan struct { _ struct{} `type:"structure"` @@ -23995,7 +24051,7 @@ func (s *UsagePlan) SetThrottle(v *ThrottleSettings) *UsagePlan { // To associate an API stage with a selected API key in a usage plan, you must // create a UsagePlanKey resource to represent the selected ApiKey. // -// " Create and Use Usage Plans (http://docs.aws.amazon.com/apigateway/latest/developerguide/api-gateway-api-usage-plans.html) +// " Create and Use Usage Plans ([[AwsDocsUrlPrefix]]/apigateway/latest/developerguide/api-gateway-api-usage-plans.html) type UsagePlanKey struct { _ struct{} `type:"structure"` diff --git a/vendor/github.com/aws/aws-sdk-go/service/autoscaling/api.go b/vendor/github.com/aws/aws-sdk-go/service/autoscaling/api.go index 4a973fa4d..b883a3318 100644 --- a/vendor/github.com/aws/aws-sdk-go/service/autoscaling/api.go +++ b/vendor/github.com/aws/aws-sdk-go/service/autoscaling/api.go @@ -61,10 +61,10 @@ func (c *AutoScaling) AttachInstancesRequest(input *AttachInstancesInput) (req * // // Attaches one or more EC2 instances to the specified Auto Scaling group. // -// When you attach instances, Auto Scaling increases the desired capacity of -// the group by the number of instances being attached. If the number of instances -// being attached plus the desired capacity of the group exceeds the maximum -// size of the group, the operation fails. +// When you attach instances, Amazon EC2 Auto Scaling increases the desired +// capacity of the group by the number of instances being attached. If the number +// of instances being attached plus the desired capacity of the group exceeds +// the maximum size of the group, the operation fails. // // If there is a Classic Load Balancer attached to your Auto Scaling group, // the instances are also registered with the load balancer. If there are target @@ -72,8 +72,8 @@ func (c *AutoScaling) AttachInstancesRequest(input *AttachInstancesInput) (req * // with the target groups. // // For more information, see Attach EC2 Instances to Your Auto Scaling Group -// (http://docs.aws.amazon.com/autoscaling/latest/userguide/attach-instance-asg.html) -// in the Auto Scaling User Guide. +// (http://docs.aws.amazon.com/autoscaling/ec2/userguide/attach-instance-asg.html) +// in the Amazon EC2 Auto Scaling User Guide. // // Returns awserr.Error for service API and SDK errors. Use runtime type assertions // with awserr.Error's Code and Message methods to get detailed information about @@ -162,8 +162,8 @@ func (c *AutoScaling) AttachLoadBalancerTargetGroupsRequest(input *AttachLoadBal // To detach the target group from the Auto Scaling group, use DetachLoadBalancerTargetGroups. // // For more information, see Attach a Load Balancer to Your Auto Scaling Group -// (http://docs.aws.amazon.com/autoscaling/latest/userguide/attach-load-balancer-asg.html) -// in the Auto Scaling User Guide. +// (http://docs.aws.amazon.com/autoscaling/ec2/userguide/attach-load-balancer-asg.html) +// in the Amazon EC2 Auto Scaling User Guide. // // Returns awserr.Error for service API and SDK errors. Use runtime type assertions // with awserr.Error's Code and Message methods to get detailed information about @@ -255,8 +255,8 @@ func (c *AutoScaling) AttachLoadBalancersRequest(input *AttachLoadBalancersInput // To detach the load balancer from the Auto Scaling group, use DetachLoadBalancers. // // For more information, see Attach a Load Balancer to Your Auto Scaling Group -// (http://docs.aws.amazon.com/autoscaling/latest/userguide/attach-load-balancer-asg.html) -// in the Auto Scaling User Guide. +// (http://docs.aws.amazon.com/autoscaling/ec2/userguide/attach-load-balancer-asg.html) +// in the Amazon EC2 Auto Scaling User Guide. // // Returns awserr.Error for service API and SDK errors. Use runtime type assertions // with awserr.Error's Code and Message methods to get detailed information about @@ -295,6 +295,177 @@ func (c *AutoScaling) AttachLoadBalancersWithContext(ctx aws.Context, input *Att return out, req.Send() } +const opBatchDeleteScheduledAction = "BatchDeleteScheduledAction" + +// BatchDeleteScheduledActionRequest generates a "aws/request.Request" representing the +// client's request for the BatchDeleteScheduledAction operation. The "output" return +// value will be populated with the request's response once the request completes +// successfuly. +// +// Use "Send" method on the returned Request to send the API call to the service. +// the "output" return value is not valid until after Send returns without error. +// +// See BatchDeleteScheduledAction for more information on using the BatchDeleteScheduledAction +// API call, and error handling. +// +// This method is useful when you want to inject custom logic or configuration +// into the SDK's request lifecycle. Such as custom headers, or retry logic. +// +// +// // Example sending a request using the BatchDeleteScheduledActionRequest method. +// req, resp := client.BatchDeleteScheduledActionRequest(params) +// +// err := req.Send() +// if err == nil { // resp is now filled +// fmt.Println(resp) +// } +// +// See also, https://docs.aws.amazon.com/goto/WebAPI/autoscaling-2011-01-01/BatchDeleteScheduledAction +func (c *AutoScaling) BatchDeleteScheduledActionRequest(input *BatchDeleteScheduledActionInput) (req *request.Request, output *BatchDeleteScheduledActionOutput) { + op := &request.Operation{ + Name: opBatchDeleteScheduledAction, + HTTPMethod: "POST", + HTTPPath: "/", + } + + if input == nil { + input = &BatchDeleteScheduledActionInput{} + } + + output = &BatchDeleteScheduledActionOutput{} + req = c.newRequest(op, input, output) + return +} + +// BatchDeleteScheduledAction API operation for Auto Scaling. +// +// Deletes one or more scheduled actions for the specified Auto Scaling group. +// +// Returns awserr.Error for service API and SDK errors. Use runtime type assertions +// with awserr.Error's Code and Message methods to get detailed information about +// the error. +// +// See the AWS API reference guide for Auto Scaling's +// API operation BatchDeleteScheduledAction for usage and error information. +// +// Returned Error Codes: +// * ErrCodeResourceContentionFault "ResourceContention" +// You already have a pending update to an Auto Scaling resource (for example, +// a group, instance, or load balancer). +// +// See also, https://docs.aws.amazon.com/goto/WebAPI/autoscaling-2011-01-01/BatchDeleteScheduledAction +func (c *AutoScaling) BatchDeleteScheduledAction(input *BatchDeleteScheduledActionInput) (*BatchDeleteScheduledActionOutput, error) { + req, out := c.BatchDeleteScheduledActionRequest(input) + return out, req.Send() +} + +// BatchDeleteScheduledActionWithContext is the same as BatchDeleteScheduledAction with the addition of +// the ability to pass a context and additional request options. +// +// See BatchDeleteScheduledAction for details on how to use this API operation. +// +// The context must be non-nil and will be used for request cancellation. If +// the context is nil a panic will occur. In the future the SDK may create +// sub-contexts for http.Requests. See https://golang.org/pkg/context/ +// for more information on using Contexts. +func (c *AutoScaling) BatchDeleteScheduledActionWithContext(ctx aws.Context, input *BatchDeleteScheduledActionInput, opts ...request.Option) (*BatchDeleteScheduledActionOutput, error) { + req, out := c.BatchDeleteScheduledActionRequest(input) + req.SetContext(ctx) + req.ApplyOptions(opts...) + return out, req.Send() +} + +const opBatchPutScheduledUpdateGroupAction = "BatchPutScheduledUpdateGroupAction" + +// BatchPutScheduledUpdateGroupActionRequest generates a "aws/request.Request" representing the +// client's request for the BatchPutScheduledUpdateGroupAction operation. The "output" return +// value will be populated with the request's response once the request completes +// successfuly. +// +// Use "Send" method on the returned Request to send the API call to the service. +// the "output" return value is not valid until after Send returns without error. +// +// See BatchPutScheduledUpdateGroupAction for more information on using the BatchPutScheduledUpdateGroupAction +// API call, and error handling. +// +// This method is useful when you want to inject custom logic or configuration +// into the SDK's request lifecycle. Such as custom headers, or retry logic. +// +// +// // Example sending a request using the BatchPutScheduledUpdateGroupActionRequest method. +// req, resp := client.BatchPutScheduledUpdateGroupActionRequest(params) +// +// err := req.Send() +// if err == nil { // resp is now filled +// fmt.Println(resp) +// } +// +// See also, https://docs.aws.amazon.com/goto/WebAPI/autoscaling-2011-01-01/BatchPutScheduledUpdateGroupAction +func (c *AutoScaling) BatchPutScheduledUpdateGroupActionRequest(input *BatchPutScheduledUpdateGroupActionInput) (req *request.Request, output *BatchPutScheduledUpdateGroupActionOutput) { + op := &request.Operation{ + Name: opBatchPutScheduledUpdateGroupAction, + HTTPMethod: "POST", + HTTPPath: "/", + } + + if input == nil { + input = &BatchPutScheduledUpdateGroupActionInput{} + } + + output = &BatchPutScheduledUpdateGroupActionOutput{} + req = c.newRequest(op, input, output) + return +} + +// BatchPutScheduledUpdateGroupAction API operation for Auto Scaling. +// +// Creates or updates one or more scheduled scaling actions for an Auto Scaling +// group. When updating a scheduled scaling action, if you leave a parameter +// unspecified, the corresponding value remains unchanged. +// +// Returns awserr.Error for service API and SDK errors. Use runtime type assertions +// with awserr.Error's Code and Message methods to get detailed information about +// the error. +// +// See the AWS API reference guide for Auto Scaling's +// API operation BatchPutScheduledUpdateGroupAction for usage and error information. +// +// Returned Error Codes: +// * ErrCodeAlreadyExistsFault "AlreadyExists" +// You already have an Auto Scaling group or launch configuration with this +// name. +// +// * ErrCodeLimitExceededFault "LimitExceeded" +// You have already reached a limit for your Auto Scaling resources (for example, +// groups, launch configurations, or lifecycle hooks). For more information, +// see DescribeAccountLimits. +// +// * ErrCodeResourceContentionFault "ResourceContention" +// You already have a pending update to an Auto Scaling resource (for example, +// a group, instance, or load balancer). +// +// See also, https://docs.aws.amazon.com/goto/WebAPI/autoscaling-2011-01-01/BatchPutScheduledUpdateGroupAction +func (c *AutoScaling) BatchPutScheduledUpdateGroupAction(input *BatchPutScheduledUpdateGroupActionInput) (*BatchPutScheduledUpdateGroupActionOutput, error) { + req, out := c.BatchPutScheduledUpdateGroupActionRequest(input) + return out, req.Send() +} + +// BatchPutScheduledUpdateGroupActionWithContext is the same as BatchPutScheduledUpdateGroupAction with the addition of +// the ability to pass a context and additional request options. +// +// See BatchPutScheduledUpdateGroupAction for details on how to use this API operation. +// +// The context must be non-nil and will be used for request cancellation. If +// the context is nil a panic will occur. In the future the SDK may create +// sub-contexts for http.Requests. See https://golang.org/pkg/context/ +// for more information on using Contexts. +func (c *AutoScaling) BatchPutScheduledUpdateGroupActionWithContext(ctx aws.Context, input *BatchPutScheduledUpdateGroupActionInput, opts ...request.Option) (*BatchPutScheduledUpdateGroupActionOutput, error) { + req, out := c.BatchPutScheduledUpdateGroupActionRequest(input) + req.SetContext(ctx) + req.ApplyOptions(opts...) + return out, req.Send() +} + const opCompleteLifecycleAction = "CompleteLifecycleAction" // CompleteLifecycleActionRequest generates a "aws/request.Request" representing the @@ -346,11 +517,12 @@ func (c *AutoScaling) CompleteLifecycleActionRequest(input *CompleteLifecycleAct // Scaling group: // // (Optional) Create a Lambda function and a rule that allows CloudWatch Events -// to invoke your Lambda function when Auto Scaling launches or terminates instances. +// to invoke your Lambda function when Amazon EC2 Auto Scaling launches or terminates +// instances. // // (Optional) Create a notification target and an IAM role. The target can be -// either an Amazon SQS queue or an Amazon SNS topic. The role allows Auto Scaling -// to publish lifecycle notifications to the target. +// either an Amazon SQS queue or an Amazon SNS topic. The role allows Amazon +// EC2 Auto Scaling to publish lifecycle notifications to the target. // // Create the lifecycle hook. Specify whether the hook is used when the instances // launch or terminate. @@ -360,8 +532,8 @@ func (c *AutoScaling) CompleteLifecycleActionRequest(input *CompleteLifecycleAct // // If you finish before the timeout period ends, complete the lifecycle action. // -// For more information, see Auto Scaling Lifecycle (http://docs.aws.amazon.com/autoscaling/latest/userguide/AutoScalingGroupLifecycle.html) -// in the Auto Scaling User Guide. +// For more information, see Auto Scaling Lifecycle (http://docs.aws.amazon.com/autoscaling/ec2/userguide/AutoScalingGroupLifecycle.html) +// in the Amazon EC2 Auto Scaling User Guide. // // Returns awserr.Error for service API and SDK errors. Use runtime type assertions // with awserr.Error's Code and Message methods to get detailed information about @@ -447,11 +619,11 @@ func (c *AutoScaling) CreateAutoScalingGroupRequest(input *CreateAutoScalingGrou // // If you exceed your maximum limit of Auto Scaling groups, the call fails. // For information about viewing this limit, see DescribeAccountLimits. For -// information about updating this limit, see Auto Scaling Limits (http://docs.aws.amazon.com/autoscaling/latest/userguide/as-account-limits.html) -// in the Auto Scaling User Guide. +// information about updating this limit, see Auto Scaling Limits (http://docs.aws.amazon.com/autoscaling/ec2/userguide/as-account-limits.html) +// in the Amazon EC2 Auto Scaling User Guide. // -// For more information, see Auto Scaling Groups (http://docs.aws.amazon.com/autoscaling/latest/userguide/AutoScalingGroup.html) -// in the Auto Scaling User Guide. +// For more information, see Auto Scaling Groups (http://docs.aws.amazon.com/autoscaling/ec2/userguide/AutoScalingGroup.html) +// in the Amazon EC2 Auto Scaling User Guide. // // Returns awserr.Error for service API and SDK errors. Use runtime type assertions // with awserr.Error's Code and Message methods to get detailed information about @@ -549,11 +721,11 @@ func (c *AutoScaling) CreateLaunchConfigurationRequest(input *CreateLaunchConfig // // If you exceed your maximum limit of launch configurations, the call fails. // For information about viewing this limit, see DescribeAccountLimits. For -// information about updating this limit, see Auto Scaling Limits (http://docs.aws.amazon.com/autoscaling/latest/userguide/as-account-limits.html) -// in the Auto Scaling User Guide. +// information about updating this limit, see Auto Scaling Limits (http://docs.aws.amazon.com/autoscaling/ec2/userguide/as-account-limits.html) +// in the Amazon EC2 Auto Scaling User Guide. // -// For more information, see Launch Configurations (http://docs.aws.amazon.com/autoscaling/latest/userguide/LaunchConfiguration.html) -// in the Auto Scaling User Guide. +// For more information, see Launch Configurations (http://docs.aws.amazon.com/autoscaling/ec2/userguide/LaunchConfiguration.html) +// in the Amazon EC2 Auto Scaling User Guide. // // Returns awserr.Error for service API and SDK errors. Use runtime type assertions // with awserr.Error's Code and Message methods to get detailed information about @@ -649,8 +821,8 @@ func (c *AutoScaling) CreateOrUpdateTagsRequest(input *CreateOrUpdateTagsInput) // When you specify a tag with a key that already exists, the operation overwrites // the previous tag definition, and you do not get an error message. // -// For more information, see Tagging Auto Scaling Groups and Instances (http://docs.aws.amazon.com/autoscaling/latest/userguide/autoscaling-tagging.html) -// in the Auto Scaling User Guide. +// For more information, see Tagging Auto Scaling Groups and Instances (http://docs.aws.amazon.com/autoscaling/ec2/userguide/autoscaling-tagging.html) +// in the Amazon EC2 Auto Scaling User Guide. // // Returns awserr.Error for service API and SDK errors. Use runtime type assertions // with awserr.Error's Code and Message methods to get detailed information about @@ -754,7 +926,8 @@ func (c *AutoScaling) DeleteAutoScalingGroupRequest(input *DeleteAutoScalingGrou // // To remove instances from the Auto Scaling group before deleting it, call // DetachInstances with the list of instances and the option to decrement the -// desired capacity so that Auto Scaling does not launch replacement instances. +// desired capacity so that Amazon EC2 Auto Scaling does not launch replacement +// instances. // // To terminate all instances before deleting the Auto Scaling group, call UpdateAutoScalingGroup // and set the minimum size and desired capacity of the Auto Scaling group to @@ -1357,8 +1530,8 @@ func (c *AutoScaling) DescribeAccountLimitsRequest(input *DescribeAccountLimitsI // Describes the current Auto Scaling resource limits for your AWS account. // // For information about requesting an increase in these limits, see Auto Scaling -// Limits (http://docs.aws.amazon.com/autoscaling/latest/userguide/as-account-limits.html) -// in the Auto Scaling User Guide. +// Limits (http://docs.aws.amazon.com/autoscaling/ec2/userguide/as-account-limits.html) +// in the Amazon EC2 Auto Scaling User Guide. // // Returns awserr.Error for service API and SDK errors. Use runtime type assertions // with awserr.Error's Code and Message methods to get detailed information about @@ -1796,7 +1969,7 @@ func (c *AutoScaling) DescribeAutoScalingNotificationTypesRequest(input *Describ // DescribeAutoScalingNotificationTypes API operation for Auto Scaling. // -// Describes the notification types that are supported by Auto Scaling. +// Describes the notification types that are supported by Amazon EC2 Auto Scaling. // // Returns awserr.Error for service API and SDK errors. Use runtime type assertions // with awserr.Error's Code and Message methods to get detailed information about @@ -2017,6 +2190,12 @@ func (c *AutoScaling) DescribeLifecycleHookTypesRequest(input *DescribeLifecycle // // Describes the available types of lifecycle hooks. // +// The following hook types are supported: +// +// * autoscaling:EC2_INSTANCE_LAUNCHING +// +// * autoscaling:EC2_INSTANCE_TERMINATING +// // Returns awserr.Error for service API and SDK errors. Use runtime type assertions // with awserr.Error's Code and Message methods to get detailed information about // the error. @@ -2338,7 +2517,7 @@ func (c *AutoScaling) DescribeMetricCollectionTypesRequest(input *DescribeMetric // DescribeMetricCollectionTypes API operation for Auto Scaling. // -// Describes the available CloudWatch metrics for Auto Scaling. +// Describes the available CloudWatch metrics for Amazon EC2 Auto Scaling. // // Note that the GroupStandbyInstances metric is not returned by default. You // must explicitly request this metric when calling EnableMetricsCollection. @@ -3210,7 +3389,7 @@ func (c *AutoScaling) DescribeTerminationPolicyTypesRequest(input *DescribeTermi // DescribeTerminationPolicyTypes API operation for Auto Scaling. // -// Describes the termination policies supported by Auto Scaling. +// Describes the termination policies supported by Amazon EC2 Auto Scaling. // // Returns awserr.Error for service API and SDK errors. Use runtime type assertions // with awserr.Error's Code and Message methods to get detailed information about @@ -3295,8 +3474,8 @@ func (c *AutoScaling) DetachInstancesRequest(input *DetachInstancesInput) (req * // After the instances are detached, you can manage them independent of the // Auto Scaling group. // -// If you do not specify the option to decrement the desired capacity, Auto -// Scaling launches instances to replace the ones that are detached. +// If you do not specify the option to decrement the desired capacity, Amazon +// EC2 Auto Scaling launches instances to replace the ones that are detached. // // If there is a Classic Load Balancer attached to the Auto Scaling group, the // instances are deregistered from the load balancer. If there are target groups @@ -3304,8 +3483,8 @@ func (c *AutoScaling) DetachInstancesRequest(input *DetachInstancesInput) (req * // target groups. // // For more information, see Detach EC2 Instances from Your Auto Scaling Group -// (http://docs.aws.amazon.com/autoscaling/latest/userguide/detach-instance-asg.html) -// in the Auto Scaling User Guide. +// (http://docs.aws.amazon.com/autoscaling/ec2/userguide/detach-instance-asg.html) +// in the Amazon EC2 Auto Scaling User Guide. // // Returns awserr.Error for service API and SDK errors. Use runtime type assertions // with awserr.Error's Code and Message methods to get detailed information about @@ -3639,8 +3818,8 @@ func (c *AutoScaling) EnableMetricsCollectionRequest(input *EnableMetricsCollect // EnableMetricsCollection API operation for Auto Scaling. // // Enables group metrics for the specified Auto Scaling group. For more information, -// see Monitoring Your Auto Scaling Groups and Instances (http://docs.aws.amazon.com/autoscaling/latest/userguide/as-instance-monitoring.html) -// in the Auto Scaling User Guide. +// see Monitoring Your Auto Scaling Groups and Instances (http://docs.aws.amazon.com/autoscaling/ec2/userguide/as-instance-monitoring.html) +// in the Amazon EC2 Auto Scaling User Guide. // // Returns awserr.Error for service API and SDK errors. Use runtime type assertions // with awserr.Error's Code and Message methods to get detailed information about @@ -3723,8 +3902,8 @@ func (c *AutoScaling) EnterStandbyRequest(input *EnterStandbyInput) (req *reques // Moves the specified instances into the standby state. // // For more information, see Temporarily Removing Instances from Your Auto Scaling -// Group (http://docs.aws.amazon.com/autoscaling/latest/userguide/as-enter-exit-standby.html) -// in the Auto Scaling User Guide. +// Group (http://docs.aws.amazon.com/autoscaling/ec2/userguide/as-enter-exit-standby.html) +// in the Amazon EC2 Auto Scaling User Guide. // // Returns awserr.Error for service API and SDK errors. Use runtime type assertions // with awserr.Error's Code and Message methods to get detailed information about @@ -3893,8 +4072,8 @@ func (c *AutoScaling) ExitStandbyRequest(input *ExitStandbyInput) (req *request. // Moves the specified instances out of the standby state. // // For more information, see Temporarily Removing Instances from Your Auto Scaling -// Group (http://docs.aws.amazon.com/autoscaling/latest/userguide/as-enter-exit-standby.html) -// in the Auto Scaling User Guide. +// Group (http://docs.aws.amazon.com/autoscaling/ec2/userguide/as-enter-exit-standby.html) +// in the Amazon EC2 Auto Scaling User Guide. // // Returns awserr.Error for service API and SDK errors. Use runtime type assertions // with awserr.Error's Code and Message methods to get detailed information about @@ -3976,19 +4155,20 @@ func (c *AutoScaling) PutLifecycleHookRequest(input *PutLifecycleHookInput) (req // // Creates or updates a lifecycle hook for the specified Auto Scaling Group. // -// A lifecycle hook tells Auto Scaling that you want to perform an action on -// an instance that is not actively in service; for example, either when the -// instance launches or before the instance terminates. +// A lifecycle hook tells Amazon EC2 Auto Scaling that you want to perform an +// action on an instance that is not actively in service; for example, either +// when the instance launches or before the instance terminates. // // This step is a part of the procedure for adding a lifecycle hook to an Auto // Scaling group: // // (Optional) Create a Lambda function and a rule that allows CloudWatch Events -// to invoke your Lambda function when Auto Scaling launches or terminates instances. +// to invoke your Lambda function when Amazon EC2 Auto Scaling launches or terminates +// instances. // // (Optional) Create a notification target and an IAM role. The target can be -// either an Amazon SQS queue or an Amazon SNS topic. The role allows Auto Scaling -// to publish lifecycle notifications to the target. +// either an Amazon SQS queue or an Amazon SNS topic. The role allows Amazon +// EC2 Auto Scaling to publish lifecycle notifications to the target. // // Create the lifecycle hook. Specify whether the hook is used when the instances // launch or terminate. @@ -3998,8 +4178,8 @@ func (c *AutoScaling) PutLifecycleHookRequest(input *PutLifecycleHookInput) (req // // If you finish before the timeout period ends, complete the lifecycle action. // -// For more information, see Auto Scaling Lifecycle Hooks (http://docs.aws.amazon.com/autoscaling/latest/userguide/lifecycle-hooks.html) -// in the Auto Scaling User Guide. +// For more information, see Auto Scaling Lifecycle Hooks (http://docs.aws.amazon.com/autoscaling/ec2/userguide/lifecycle-hooks.html) +// in the Amazon EC2 Auto Scaling User Guide. // // If you exceed your maximum limit of lifecycle hooks, which by default is // 50 per Auto Scaling group, the call fails. For information about updating @@ -4098,7 +4278,7 @@ func (c *AutoScaling) PutNotificationConfigurationRequest(input *PutNotification // This configuration overwrites any existing configuration. // // For more information see Getting SNS Notifications When Your Auto Scaling -// Group Scales (http://docs.aws.amazon.com/autoscaling/latest/userguide/ASGettingNotifications.html) +// Group Scales (http://docs.aws.amazon.com/autoscaling/ec2/userguide/ASGettingNotifications.html) // in the Auto Scaling User Guide. // // Returns awserr.Error for service API and SDK errors. Use runtime type assertions @@ -4289,8 +4469,8 @@ func (c *AutoScaling) PutScheduledUpdateGroupActionRequest(input *PutScheduledUp // When updating a scheduled scaling action, if you leave a parameter unspecified, // the corresponding value remains unchanged. // -// For more information, see Scheduled Scaling (http://docs.aws.amazon.com/autoscaling/latest/userguide/schedule_time.html) -// in the Auto Scaling User Guide. +// For more information, see Scheduled Scaling (http://docs.aws.amazon.com/autoscaling/ec2/userguide/schedule_time.html) +// in the Amazon EC2 Auto Scaling User Guide. // // Returns awserr.Error for service API and SDK errors. Use runtime type assertions // with awserr.Error's Code and Message methods to get detailed information about @@ -4387,11 +4567,12 @@ func (c *AutoScaling) RecordLifecycleActionHeartbeatRequest(input *RecordLifecyc // Scaling group: // // (Optional) Create a Lambda function and a rule that allows CloudWatch Events -// to invoke your Lambda function when Auto Scaling launches or terminates instances. +// to invoke your Lambda function when Amazon EC2 Auto Scaling launches or terminates +// instances. // // (Optional) Create a notification target and an IAM role. The target can be -// either an Amazon SQS queue or an Amazon SNS topic. The role allows Auto Scaling -// to publish lifecycle notifications to the target. +// either an Amazon SQS queue or an Amazon SNS topic. The role allows Amazon +// EC2 Auto Scaling to publish lifecycle notifications to the target. // // Create the lifecycle hook. Specify whether the hook is used when the instances // launch or terminate. @@ -4401,8 +4582,8 @@ func (c *AutoScaling) RecordLifecycleActionHeartbeatRequest(input *RecordLifecyc // // If you finish before the timeout period ends, complete the lifecycle action. // -// For more information, see Auto Scaling Lifecycle (http://docs.aws.amazon.com/autoscaling/latest/userguide/AutoScalingGroupLifecycle.html) -// in the Auto Scaling User Guide. +// For more information, see Auto Scaling Lifecycle (http://docs.aws.amazon.com/autoscaling/ec2/userguide/AutoScalingGroupLifecycle.html) +// in the Amazon EC2 Auto Scaling User Guide. // // Returns awserr.Error for service API and SDK errors. Use runtime type assertions // with awserr.Error's Code and Message methods to get detailed information about @@ -4484,12 +4665,11 @@ func (c *AutoScaling) ResumeProcessesRequest(input *ScalingProcessQuery) (req *r // ResumeProcesses API operation for Auto Scaling. // -// Resumes the specified suspended Auto Scaling processes, or all suspended +// Resumes the specified suspended automatic scaling processes, or all suspended // process, for the specified Auto Scaling group. // -// For more information, see Suspending and Resuming Auto Scaling Processes -// (http://docs.aws.amazon.com/autoscaling/latest/userguide/as-suspend-resume-processes.html) -// in the Auto Scaling User Guide. +// For more information, see Suspending and Resuming Scaling Processes (http://docs.aws.amazon.com/autoscaling/ec2/userguide/as-suspend-resume-processes.html) +// in the Amazon EC2 Auto Scaling User Guide. // // Returns awserr.Error for service API and SDK errors. Use runtime type assertions // with awserr.Error's Code and Message methods to get detailed information about @@ -4576,8 +4756,9 @@ func (c *AutoScaling) SetDesiredCapacityRequest(input *SetDesiredCapacityInput) // // Sets the size of the specified Auto Scaling group. // -// For more information about desired capacity, see What Is Auto Scaling? (http://docs.aws.amazon.com/autoscaling/latest/userguide/WhatIsAutoScaling.html) -// in the Auto Scaling User Guide. +// For more information about desired capacity, see What Is Amazon EC2 Auto +// Scaling? (http://docs.aws.amazon.com/autoscaling/ec2/userguide/WhatIsAutoScaling.html) +// in the Amazon EC2 Auto Scaling User Guide. // // Returns awserr.Error for service API and SDK errors. Use runtime type assertions // with awserr.Error's Code and Message methods to get detailed information about @@ -4665,8 +4846,8 @@ func (c *AutoScaling) SetInstanceHealthRequest(input *SetInstanceHealthInput) (r // // Sets the health status of the specified instance. // -// For more information, see Health Checks (http://docs.aws.amazon.com/autoscaling/latest/userguide/healthcheck.html) -// in the Auto Scaling User Guide. +// For more information, see Health Checks (http://docs.aws.amazon.com/autoscaling/ec2/userguide/healthcheck.html) +// in the Amazon EC2 Auto Scaling User Guide. // // Returns awserr.Error for service API and SDK errors. Use runtime type assertions // with awserr.Error's Code and Message methods to get detailed information about @@ -4748,8 +4929,8 @@ func (c *AutoScaling) SetInstanceProtectionRequest(input *SetInstanceProtectionI // // Updates the instance protection settings of the specified instances. // -// For more information, see Instance Protection (http://docs.aws.amazon.com/autoscaling/latest/userguide/as-instance-termination.html#instance-protection) -// in the Auto Scaling User Guide. +// For more information, see Instance Protection (http://docs.aws.amazon.com/autoscaling/ec2/userguide/as-instance-termination.html#instance-protection) +// in the Amazon EC2 Auto Scaling User Guide. // // Returns awserr.Error for service API and SDK errors. Use runtime type assertions // with awserr.Error's Code and Message methods to get detailed information about @@ -4836,17 +5017,16 @@ func (c *AutoScaling) SuspendProcessesRequest(input *ScalingProcessQuery) (req * // SuspendProcesses API operation for Auto Scaling. // -// Suspends the specified Auto Scaling processes, or all processes, for the -// specified Auto Scaling group. +// Suspends the specified automatic scaling processes, or all processes, for +// the specified Auto Scaling group. // // Note that if you suspend either the Launch or Terminate process types, it // can prevent other process types from functioning properly. // // To resume processes that have been suspended, use ResumeProcesses. // -// For more information, see Suspending and Resuming Auto Scaling Processes -// (http://docs.aws.amazon.com/autoscaling/latest/userguide/as-suspend-resume-processes.html) -// in the Auto Scaling User Guide. +// For more information, see Suspending and Resuming Scaling Processes (http://docs.aws.amazon.com/autoscaling/ec2/userguide/as-suspend-resume-processes.html) +// in the Amazon EC2 Auto Scaling User Guide. // // Returns awserr.Error for service API and SDK errors. Use runtime type assertions // with awserr.Error's Code and Message methods to get detailed information about @@ -5203,8 +5383,8 @@ func (s *Activity) SetStatusMessage(v string) *Activity { // Describes a policy adjustment type. // -// For more information, see Dynamic Scaling (http://docs.aws.amazon.com/AutoScaling/latest/DeveloperGuide/as-scale-based-on-demand.html) -// in the Auto Scaling User Guide. +// For more information, see Dynamic Scaling (http://docs.aws.amazon.com/autoscaling/ec2/DeveloperGuide/as-scale-based-on-demand.html) +// in the Amazon EC2 Auto Scaling User Guide. type AdjustmentType struct { _ struct{} `type:"structure"` @@ -5465,6 +5645,175 @@ func (s AttachLoadBalancersOutput) GoString() string { return s.String() } +type BatchDeleteScheduledActionInput struct { + _ struct{} `type:"structure"` + + // The name of the Auto Scaling group. + // + // AutoScalingGroupName is a required field + AutoScalingGroupName *string `min:"1" type:"string" required:"true"` + + // The names of the scheduled actions to delete. The maximum number allowed + // is 50. + // + // ScheduledActionNames is a required field + ScheduledActionNames []*string `type:"list" required:"true"` +} + +// String returns the string representation +func (s BatchDeleteScheduledActionInput) String() string { + return awsutil.Prettify(s) +} + +// GoString returns the string representation +func (s BatchDeleteScheduledActionInput) GoString() string { + return s.String() +} + +// Validate inspects the fields of the type to determine if they are valid. +func (s *BatchDeleteScheduledActionInput) Validate() error { + invalidParams := request.ErrInvalidParams{Context: "BatchDeleteScheduledActionInput"} + if s.AutoScalingGroupName == nil { + invalidParams.Add(request.NewErrParamRequired("AutoScalingGroupName")) + } + if s.AutoScalingGroupName != nil && len(*s.AutoScalingGroupName) < 1 { + invalidParams.Add(request.NewErrParamMinLen("AutoScalingGroupName", 1)) + } + if s.ScheduledActionNames == nil { + invalidParams.Add(request.NewErrParamRequired("ScheduledActionNames")) + } + + if invalidParams.Len() > 0 { + return invalidParams + } + return nil +} + +// SetAutoScalingGroupName sets the AutoScalingGroupName field's value. +func (s *BatchDeleteScheduledActionInput) SetAutoScalingGroupName(v string) *BatchDeleteScheduledActionInput { + s.AutoScalingGroupName = &v + return s +} + +// SetScheduledActionNames sets the ScheduledActionNames field's value. +func (s *BatchDeleteScheduledActionInput) SetScheduledActionNames(v []*string) *BatchDeleteScheduledActionInput { + s.ScheduledActionNames = v + return s +} + +type BatchDeleteScheduledActionOutput struct { + _ struct{} `type:"structure"` + + // The names of the scheduled actions that could not be deleted, including an + // error message. + FailedScheduledActions []*FailedScheduledUpdateGroupActionRequest `type:"list"` +} + +// String returns the string representation +func (s BatchDeleteScheduledActionOutput) String() string { + return awsutil.Prettify(s) +} + +// GoString returns the string representation +func (s BatchDeleteScheduledActionOutput) GoString() string { + return s.String() +} + +// SetFailedScheduledActions sets the FailedScheduledActions field's value. +func (s *BatchDeleteScheduledActionOutput) SetFailedScheduledActions(v []*FailedScheduledUpdateGroupActionRequest) *BatchDeleteScheduledActionOutput { + s.FailedScheduledActions = v + return s +} + +type BatchPutScheduledUpdateGroupActionInput struct { + _ struct{} `type:"structure"` + + // The name of the Auto Scaling group. + // + // AutoScalingGroupName is a required field + AutoScalingGroupName *string `min:"1" type:"string" required:"true"` + + // One or more scheduled actions. The maximum number allowed is 50. + // + // ScheduledUpdateGroupActions is a required field + ScheduledUpdateGroupActions []*ScheduledUpdateGroupActionRequest `type:"list" required:"true"` +} + +// String returns the string representation +func (s BatchPutScheduledUpdateGroupActionInput) String() string { + return awsutil.Prettify(s) +} + +// GoString returns the string representation +func (s BatchPutScheduledUpdateGroupActionInput) GoString() string { + return s.String() +} + +// Validate inspects the fields of the type to determine if they are valid. +func (s *BatchPutScheduledUpdateGroupActionInput) Validate() error { + invalidParams := request.ErrInvalidParams{Context: "BatchPutScheduledUpdateGroupActionInput"} + if s.AutoScalingGroupName == nil { + invalidParams.Add(request.NewErrParamRequired("AutoScalingGroupName")) + } + if s.AutoScalingGroupName != nil && len(*s.AutoScalingGroupName) < 1 { + invalidParams.Add(request.NewErrParamMinLen("AutoScalingGroupName", 1)) + } + if s.ScheduledUpdateGroupActions == nil { + invalidParams.Add(request.NewErrParamRequired("ScheduledUpdateGroupActions")) + } + if s.ScheduledUpdateGroupActions != nil { + for i, v := range s.ScheduledUpdateGroupActions { + if v == nil { + continue + } + if err := v.Validate(); err != nil { + invalidParams.AddNested(fmt.Sprintf("%s[%v]", "ScheduledUpdateGroupActions", i), err.(request.ErrInvalidParams)) + } + } + } + + if invalidParams.Len() > 0 { + return invalidParams + } + return nil +} + +// SetAutoScalingGroupName sets the AutoScalingGroupName field's value. +func (s *BatchPutScheduledUpdateGroupActionInput) SetAutoScalingGroupName(v string) *BatchPutScheduledUpdateGroupActionInput { + s.AutoScalingGroupName = &v + return s +} + +// SetScheduledUpdateGroupActions sets the ScheduledUpdateGroupActions field's value. +func (s *BatchPutScheduledUpdateGroupActionInput) SetScheduledUpdateGroupActions(v []*ScheduledUpdateGroupActionRequest) *BatchPutScheduledUpdateGroupActionInput { + s.ScheduledUpdateGroupActions = v + return s +} + +type BatchPutScheduledUpdateGroupActionOutput struct { + _ struct{} `type:"structure"` + + // The names of the scheduled actions that could not be created or updated, + // including an error message. + FailedScheduledUpdateGroupActions []*FailedScheduledUpdateGroupActionRequest `type:"list"` +} + +// String returns the string representation +func (s BatchPutScheduledUpdateGroupActionOutput) String() string { + return awsutil.Prettify(s) +} + +// GoString returns the string representation +func (s BatchPutScheduledUpdateGroupActionOutput) GoString() string { + return s.String() +} + +// SetFailedScheduledUpdateGroupActions sets the FailedScheduledUpdateGroupActions field's value. +func (s *BatchPutScheduledUpdateGroupActionOutput) SetFailedScheduledUpdateGroupActions(v []*FailedScheduledUpdateGroupActionRequest) *BatchPutScheduledUpdateGroupActionOutput { + s.FailedScheduledUpdateGroupActions = v + return s +} + // Describes a block device mapping. type BlockDeviceMapping struct { _ struct{} `type:"structure"` @@ -5480,8 +5829,8 @@ type BlockDeviceMapping struct { // Suppresses a device mapping. // // If this parameter is true for the root device, the instance might fail the - // EC2 health check. Auto Scaling launches a replacement instance if the instance - // fails the health check. + // EC2 health check. Amazon EC2 Auto Scaling launches a replacement instance + // if the instance fails the health check. NoDevice *bool `type:"boolean"` // The name of the virtual device (for example, ephemeral0). @@ -5564,8 +5913,8 @@ type CompleteLifecycleActionInput struct { LifecycleActionResult *string `type:"string" required:"true"` // A universally unique identifier (UUID) that identifies a specific lifecycle - // action associated with an instance. Auto Scaling sends this token to the - // notification target you specified when you created the lifecycle hook. + // action associated with an instance. Amazon EC2 Auto Scaling sends this token + // to the notification target you specified when you created the lifecycle hook. LifecycleActionToken *string `min:"36" type:"string"` // The name of the lifecycle hook. @@ -5675,8 +6024,8 @@ type CreateAutoScalingGroupInput struct { // The amount of time, in seconds, after a scaling activity completes before // another scaling activity can start. The default is 300. // - // For more information, see Auto Scaling Cooldowns (http://docs.aws.amazon.com/autoscaling/latest/userguide/Cooldown.html) - // in the Auto Scaling User Guide. + // For more information, see Scaling Cooldowns (http://docs.aws.amazon.com/autoscaling/ec2/userguide/Cooldown.html) + // in the Amazon EC2 Auto Scaling User Guide. DefaultCooldown *int64 `type:"integer"` // The number of EC2 instances that should be running in the group. This number @@ -5685,36 +6034,36 @@ type CreateAutoScalingGroupInput struct { // capacity, the default is the minimum size of the group. DesiredCapacity *int64 `type:"integer"` - // The amount of time, in seconds, that Auto Scaling waits before checking the - // health status of an EC2 instance that has come into service. During this - // time, any health check failures for the instance are ignored. The default - // is 0. + // The amount of time, in seconds, that Amazon EC2 Auto Scaling waits before + // checking the health status of an EC2 instance that has come into service. + // During this time, any health check failures for the instance are ignored. + // The default is 0. // // This parameter is required if you are adding an ELB health check. // - // For more information, see Health Checks (http://docs.aws.amazon.com/autoscaling/latest/userguide/healthcheck.html) - // in the Auto Scaling User Guide. + // For more information, see Health Checks (http://docs.aws.amazon.com/autoscaling/ec2/userguide/healthcheck.html) + // in the Amazon EC2 Auto Scaling User Guide. HealthCheckGracePeriod *int64 `type:"integer"` // The service to use for the health checks. The valid values are EC2 and ELB. // // By default, health checks use Amazon EC2 instance status checks to determine - // the health of an instance. For more information, see Health Checks (http://docs.aws.amazon.com/autoscaling/latest/userguide/healthcheck.html) - // in the Auto Scaling User Guide. + // the health of an instance. For more information, see Health Checks (http://docs.aws.amazon.com/autoscaling/ec2/userguide/healthcheck.html) + // in the Amazon EC2 Auto Scaling User Guide. HealthCheckType *string `min:"1" type:"string"` // The ID of the instance used to create a launch configuration for the group. // You must specify one of the following: an EC2 instance, a launch configuration, // or a launch template. // - // When you specify an ID of an instance, Auto Scaling creates a new launch - // configuration and associates it with the group. This launch configuration + // When you specify an ID of an instance, Amazon EC2 Auto Scaling creates a + // new launch configuration and associates it with the group. This launch configuration // derives its attributes from the specified instance, with the exception of // the block device mapping. // // For more information, see Create an Auto Scaling Group Using an EC2 Instance - // (http://docs.aws.amazon.com/autoscaling/latest/userguide/create-asg-from-instance.html) - // in the Auto Scaling User Guide. + // (http://docs.aws.amazon.com/autoscaling/ec2/userguide/create-asg-from-instance.html) + // in the Amazon EC2 Auto Scaling User Guide. InstanceId *string `min:"1" type:"string"` // The name of the launch configuration. You must specify one of the following: @@ -5732,8 +6081,8 @@ type CreateAutoScalingGroupInput struct { // use TargetGroupARNs instead. // // For more information, see Using a Load Balancer With an Auto Scaling Group - // (http://docs.aws.amazon.com/autoscaling/latest/userguide/create-asg-from-instance.html) - // in the Auto Scaling User Guide. + // (http://docs.aws.amazon.com/autoscaling/ec2/userguide/create-asg-from-instance.html) + // in the Amazon EC2 Auto Scaling User Guide. LoadBalancerNames []*string `type:"list"` // The maximum size of the group. @@ -5756,15 +6105,15 @@ type CreateAutoScalingGroupInput struct { PlacementGroup *string `min:"1" type:"string"` // The Amazon Resource Name (ARN) of the service-linked role that the Auto Scaling - // group uses to call other AWS services on your behalf. By default, Auto Scaling - // uses a service-linked role named AWSServiceRoleForAutoScaling, which it creates - // if it does not exist. + // group uses to call other AWS services on your behalf. By default, Amazon + // EC2 Auto Scaling uses a service-linked role named AWSServiceRoleForAutoScaling, + // which it creates if it does not exist. ServiceLinkedRoleARN *string `min:"1" type:"string"` // One or more tags. // - // For more information, see Tagging Auto Scaling Groups and Instances (http://docs.aws.amazon.com/autoscaling/latest/userguide/autoscaling-tagging.html) - // in the Auto Scaling User Guide. + // For more information, see Tagging Auto Scaling Groups and Instances (http://docs.aws.amazon.com/autoscaling/ec2/userguide/autoscaling-tagging.html) + // in the Amazon EC2 Auto Scaling User Guide. Tags []*Tag `type:"list"` // The Amazon Resource Names (ARN) of the target groups. @@ -5774,7 +6123,7 @@ type CreateAutoScalingGroupInput struct { // These policies are executed in the order that they are listed. // // For more information, see Controlling Which Instances Auto Scaling Terminates - // During Scale In (http://docs.aws.amazon.com/autoscaling/latest/userguide/as-instance-termination.html) + // During Scale In (http://docs.aws.amazon.com/autoscaling/ec2/userguide/as-instance-termination.html) // in the Auto Scaling User Guide. TerminationPolicies []*string `type:"list"` @@ -5784,8 +6133,8 @@ type CreateAutoScalingGroupInput struct { // If you specify subnets and Availability Zones with this call, ensure that // the subnets' Availability Zones match the Availability Zones specified. // - // For more information, see Launching Auto Scaling Instances in a VPC (http://docs.aws.amazon.com/autoscaling/latest/userguide/asg-in-vpc.html) - // in the Auto Scaling User Guide. + // For more information, see Launching Auto Scaling Instances in a VPC (http://docs.aws.amazon.com/autoscaling/ec2/userguide/asg-in-vpc.html) + // in the Amazon EC2 Auto Scaling User Guide. VPCZoneIdentifier *string `min:"1" type:"string"` } @@ -6006,8 +6355,8 @@ type CreateLaunchConfigurationInput struct { // Used for groups that launch instances into a virtual private cloud (VPC). // Specifies whether to assign a public IP address to each instance. For more - // information, see Launching Auto Scaling Instances in a VPC (http://docs.aws.amazon.com/autoscaling/latest/userguide/asg-in-vpc.html) - // in the Auto Scaling User Guide. + // information, see Launching Auto Scaling Instances in a VPC (http://docs.aws.amazon.com/autoscaling/ec2/userguide/asg-in-vpc.html) + // in the Amazon EC2 Auto Scaling User Guide. // // If you specify this parameter, be sure to specify at least one subnet when // you create your group. @@ -6047,11 +6396,11 @@ type CreateLaunchConfigurationInput struct { // with the IAM role for the instance. // // EC2 instances launched with an IAM role will automatically have AWS security - // credentials available. You can use IAM roles with Auto Scaling to automatically - // enable applications running on your EC2 instances to securely access other - // AWS resources. For more information, see Launch Auto Scaling Instances with - // an IAM Role (http://docs.aws.amazon.com/autoscaling/latest/userguide/us-iam-role.html) - // in the Auto Scaling User Guide. + // credentials available. You can use IAM roles with Amazon EC2 Auto Scaling + // to automatically enable applications running on your EC2 instances to securely + // access other AWS resources. For more information, see Launch Auto Scaling + // Instances with an IAM Role (http://docs.aws.amazon.com/autoscaling/ec2/userguide/us-iam-role.html) + // in the Amazon EC2 Auto Scaling User Guide. IamInstanceProfile *string `min:"1" type:"string"` // The ID of the Amazon Machine Image (AMI) to use to launch your EC2 instances. @@ -6072,8 +6421,8 @@ type CreateLaunchConfigurationInput struct { // any other instance attributes, specify them as part of the same request. // // For more information, see Create a Launch Configuration Using an EC2 Instance - // (http://docs.aws.amazon.com/autoscaling/latest/userguide/create-lc-with-instanceID.html) - // in the Auto Scaling User Guide. + // (http://docs.aws.amazon.com/autoscaling/ec2/userguide/create-lc-with-instanceID.html) + // in the Amazon EC2 Auto Scaling User Guide. InstanceId *string `min:"1" type:"string"` // Enables detailed monitoring (true) or basic monitoring (false) for the Auto @@ -6113,8 +6462,8 @@ type CreateLaunchConfigurationInput struct { // If you specify this parameter, be sure to specify at least one subnet when // you create your group. // - // For more information, see Launching Auto Scaling Instances in a VPC (http://docs.aws.amazon.com/autoscaling/latest/userguide/asg-in-vpc.html) - // in the Auto Scaling User Guide. + // For more information, see Launching Auto Scaling Instances in a VPC (http://docs.aws.amazon.com/autoscaling/ec2/userguide/asg-in-vpc.html) + // in the Amazon EC2 Auto Scaling User Guide. // // Valid values: default | dedicated PlacementTenancy *string `min:"1" type:"string"` @@ -6137,8 +6486,8 @@ type CreateLaunchConfigurationInput struct { // The maximum hourly price to be paid for any Spot Instance launched to fulfill // the request. Spot Instances are launched when the price you specify exceeds // the current Spot market price. For more information, see Launching Spot Instances - // in Your Auto Scaling Group (http://docs.aws.amazon.com/autoscaling/latest/userguide/US-SpotInstances.html) - // in the Auto Scaling User Guide. + // in Your Auto Scaling Group (http://docs.aws.amazon.com/autoscaling/ec2/userguide/asg-launch-spot-instances.html) + // in the Amazon EC2 Auto Scaling User Guide. SpotPrice *string `min:"1" type:"string"` // The user data to make available to the launched EC2 instances. For more information, @@ -7065,8 +7414,8 @@ func (s *DescribeAdjustmentTypesOutput) SetAdjustmentTypes(v []*AdjustmentType) type DescribeAutoScalingGroupsInput struct { _ struct{} `type:"structure"` - // The names of the Auto Scaling groups. If you omit this parameter, all Auto - // Scaling groups are described. + // The names of the Auto Scaling groups. You can specify up to MaxRecords names. + // If you omit this parameter, all Auto Scaling groups are described. AutoScalingGroupNames []*string `type:"list"` // The maximum number of items to return with this call. The default value is @@ -7144,9 +7493,9 @@ func (s *DescribeAutoScalingGroupsOutput) SetNextToken(v string) *DescribeAutoSc type DescribeAutoScalingInstancesInput struct { _ struct{} `type:"structure"` - // The instances to describe; up to 50 instance IDs. If you omit this parameter, - // all Auto Scaling instances are described. If you specify an ID that does - // not exist, it is ignored with no error. + // The IDs of the instances. You can specify up to MaxRecords IDs. If you omit + // this parameter, all Auto Scaling instances are described. If you specify + // an ID that does not exist, it is ignored with no error. InstanceIds []*string `type:"list"` // The maximum number of items to return with this call. The default value is @@ -7871,11 +8220,11 @@ func (s *DescribePoliciesOutput) SetScalingPolicies(v []*ScalingPolicy) *Describ type DescribeScalingActivitiesInput struct { _ struct{} `type:"structure"` - // The activity IDs of the desired scaling activities. If you omit this parameter, - // all activities for the past six weeks are described. If you specify an Auto - // Scaling group, the results are limited to that group. The list of requested - // activities cannot contain more than 50 items. If unknown activities are requested, - // they are ignored with no error. + // The activity IDs of the desired scaling activities. You can specify up to + // 50 IDs. If you omit this parameter, all activities for the past six weeks + // are described. If unknown activities are requested, they are ignored with + // no error. If you specify an Auto Scaling group, the results are limited to + // that group. ActivityIds []*string `type:"list"` // The name of the Auto Scaling group. @@ -8028,13 +8377,9 @@ type DescribeScheduledActionsInput struct { // a previous call.) NextToken *string `type:"string"` - // Describes one or more scheduled actions. If you omit this parameter, all - // scheduled actions are described. If you specify an unknown scheduled action, - // it is ignored with no error. - // - // You can describe up to a maximum of 50 instances with a single call. If there - // are more items to return, the call returns a token. To get the next set of - // items, repeat the call with the returned token. + // The names of one or more scheduled actions. You can specify up to 50 actions. + // If you omit this parameter, all scheduled actions are described. If you specify + // an unknown scheduled action, it is ignored with no error. ScheduledActionNames []*string `type:"list"` // The earliest scheduled start time to return. If scheduled action names are @@ -8227,8 +8572,9 @@ func (s DescribeTerminationPolicyTypesInput) GoString() string { type DescribeTerminationPolicyTypesOutput struct { _ struct{} `type:"structure"` - // The termination policies supported by Auto Scaling (OldestInstance, OldestLaunchConfiguration, - // NewestInstance, ClosestToNextInstanceHour, and Default). + // The termination policies supported by Amazon EC2 Auto Scaling (OldestInstance, + // OldestLaunchConfiguration, NewestInstance, ClosestToNextInstanceHour, and + // Default). TerminationPolicyTypes []*string `type:"list"` } @@ -8594,8 +8940,6 @@ type Ebs struct { // in the Amazon Elastic Compute Cloud User Guide. // // Valid values: standard | io1 | gp2 - // - // Default: standard VolumeType *string `min:"1" type:"string"` } @@ -8915,13 +9259,13 @@ type ExecutePolicyInput struct { // otherwise. BreachThreshold *float64 `type:"double"` - // Indicates whether Auto Scaling waits for the cooldown period to complete - // before executing the policy. + // Indicates whether Amazon EC2 Auto Scaling waits for the cooldown period to + // complete before executing the policy. // // This parameter is not supported if the policy type is StepScaling. // - // For more information, see Auto Scaling Cooldowns (http://docs.aws.amazon.com/autoscaling/latest/userguide/Cooldown.html) - // in the Auto Scaling User Guide. + // For more information, see Scaling Cooldowns (http://docs.aws.amazon.com/autoscaling/ec2/userguide/Cooldown.html) + // in the Amazon EC2 Auto Scaling User Guide. HonorCooldown *bool `type:"boolean"` // The metric value to compare to BreachThreshold. This enables you to execute @@ -9089,6 +9433,50 @@ func (s *ExitStandbyOutput) SetActivities(v []*Activity) *ExitStandbyOutput { return s } +// Describes a scheduled action that could not be created, updated, or deleted. +type FailedScheduledUpdateGroupActionRequest struct { + _ struct{} `type:"structure"` + + // The error code. + ErrorCode *string `min:"1" type:"string"` + + // The error message accompanying the error code. + ErrorMessage *string `type:"string"` + + // The name of the scheduled action. + // + // ScheduledActionName is a required field + ScheduledActionName *string `min:"1" type:"string" required:"true"` +} + +// String returns the string representation +func (s FailedScheduledUpdateGroupActionRequest) String() string { + return awsutil.Prettify(s) +} + +// GoString returns the string representation +func (s FailedScheduledUpdateGroupActionRequest) GoString() string { + return s.String() +} + +// SetErrorCode sets the ErrorCode field's value. +func (s *FailedScheduledUpdateGroupActionRequest) SetErrorCode(v string) *FailedScheduledUpdateGroupActionRequest { + s.ErrorCode = &v + return s +} + +// SetErrorMessage sets the ErrorMessage field's value. +func (s *FailedScheduledUpdateGroupActionRequest) SetErrorMessage(v string) *FailedScheduledUpdateGroupActionRequest { + s.ErrorMessage = &v + return s +} + +// SetScheduledActionName sets the ScheduledActionName field's value. +func (s *FailedScheduledUpdateGroupActionRequest) SetScheduledActionName(v string) *FailedScheduledUpdateGroupActionRequest { + s.ScheduledActionName = &v + return s +} + // Describes a filter. type Filter struct { _ struct{} `type:"structure"` @@ -9159,8 +9547,8 @@ type Group struct { // The metrics enabled for the group. EnabledMetrics []*EnabledMetric `type:"list"` - // The amount of time, in seconds, that Auto Scaling waits before checking the - // health status of an EC2 instance that has come into service. + // The amount of time, in seconds, that Amazon EC2 Auto Scaling waits before + // checking the health status of an EC2 instance that has come into service. HealthCheckGracePeriod *int64 `type:"integer"` // The service to use for the health checks. The valid values are EC2 and ELB. @@ -9390,7 +9778,8 @@ type Instance struct { // The last reported health status of the instance. "Healthy" means that the // instance is healthy and should remain in service. "Unhealthy" means that - // the instance is unhealthy and Auto Scaling should terminate and replace it. + // the instance is unhealthy and Amazon EC2 Auto Scaling should terminate and + // replace it. // // HealthStatus is a required field HealthStatus *string `min:"1" type:"string" required:"true"` @@ -9412,8 +9801,8 @@ type Instance struct { // LifecycleState is a required field LifecycleState *string `type:"string" required:"true" enum:"LifecycleState"` - // Indicates whether the instance is protected from termination by Auto Scaling - // when scaling in. + // Indicates whether the instance is protected from termination by Amazon EC2 + // Auto Scaling when scaling in. // // ProtectedFromScaleIn is a required field ProtectedFromScaleIn *bool `type:"boolean" required:"true"` @@ -9487,7 +9876,8 @@ type InstanceDetails struct { // The last reported health status of this instance. "Healthy" means that the // instance is healthy and should remain in service. "Unhealthy" means that - // the instance is unhealthy and Auto Scaling should terminate and replace it. + // the instance is unhealthy and Amazon EC2 Auto Scaling should terminate and + // replace it. // // HealthStatus is a required field HealthStatus *string `min:"1" type:"string" required:"true"` @@ -9505,14 +9895,14 @@ type InstanceDetails struct { LaunchTemplate *LaunchTemplateSpecification `type:"structure"` // The lifecycle state for the instance. For more information, see Auto Scaling - // Lifecycle (http://docs.aws.amazon.com/autoscaling/latest/userguide/AutoScalingGroupLifecycle.html) - // in the Auto Scaling User Guide. + // Lifecycle (http://docs.aws.amazon.com/autoscaling/ec2/userguide/AutoScalingGroupLifecycle.html) + // in the Amazon EC2 Auto Scaling User Guide. // // LifecycleState is a required field LifecycleState *string `min:"1" type:"string" required:"true"` - // Indicates whether the instance is protected from termination by Auto Scaling - // when scaling in. + // Indicates whether the instance is protected from termination by Amazon EC2 + // Auto Scaling when scaling in. // // ProtectedFromScaleIn is a required field ProtectedFromScaleIn *bool `type:"boolean" required:"true"` @@ -9816,10 +10206,11 @@ type LaunchTemplateSpecification struct { // or a template ID. LaunchTemplateName *string `min:"3" type:"string"` - // The version number, $Latest, or $Default. If the value is $Latest, Auto Scaling - // selects the latest version of the launch template when launching instances. - // If the value is $Default, Auto Scaling selects the default version of the - // launch template when launching instances. The default value is $Default. + // The version number, $Latest, or $Default. If the value is $Latest, Amazon + // EC2 Auto Scaling selects the latest version of the launch template when launching + // instances. If the value is $Default, Amazon EC2 Auto Scaling selects the + // default version of the launch template when launching instances. The default + // value is $Default. Version *string `min:"1" type:"string"` } @@ -9870,11 +10261,12 @@ func (s *LaunchTemplateSpecification) SetVersion(v string) *LaunchTemplateSpecif return s } -// Describes a lifecycle hook, which tells Auto Scaling that you want to perform -// an action whenever it launches instances or whenever it terminates instances. +// Describes a lifecycle hook, which tells Amazon EC2 Auto Scaling that you +// want to perform an action whenever it launches instances or whenever it terminates +// instances. // -// For more information, see Auto Scaling Lifecycle Hooks (http://docs.aws.amazon.com/autoscaling/latest/userguide/lifecycle-hooks.html) -// in the Auto Scaling User Guide. +// For more information, see Lifecycle Hooks (http://docs.aws.amazon.com/autoscaling/ec2/userguide/lifecycle-hooks.html) +// in the Amazon EC2 Auto Scaling User Guide. type LifecycleHook struct { _ struct{} `type:"structure"` @@ -9892,24 +10284,29 @@ type LifecycleHook struct { GlobalTimeout *int64 `type:"integer"` // The maximum time, in seconds, that can elapse before the lifecycle hook times - // out. If the lifecycle hook times out, Auto Scaling performs the default action. - // You can prevent the lifecycle hook from timing out by calling RecordLifecycleActionHeartbeat. + // out. If the lifecycle hook times out, Amazon EC2 Auto Scaling performs the + // default action. You can prevent the lifecycle hook from timing out by calling + // RecordLifecycleActionHeartbeat. HeartbeatTimeout *int64 `type:"integer"` // The name of the lifecycle hook. LifecycleHookName *string `min:"1" type:"string"` // The state of the EC2 instance to which you want to attach the lifecycle hook. - // For a list of lifecycle hook types, see DescribeLifecycleHookTypes. + // The following are possible values: + // + // * autoscaling:EC2_INSTANCE_LAUNCHING + // + // * autoscaling:EC2_INSTANCE_TERMINATING LifecycleTransition *string `type:"string"` - // Additional information that you want to include any time Auto Scaling sends - // a message to the notification target. + // Additional information that you want to include any time Amazon EC2 Auto + // Scaling sends a message to the notification target. NotificationMetadata *string `min:"1" type:"string"` - // The ARN of the target that Auto Scaling sends notifications to when an instance - // is in the transition state for the lifecycle hook. The notification target - // can be either an SQS queue or an SNS topic. + // The ARN of the target that Amazon EC2 Auto Scaling sends notifications to + // when an instance is in the transition state for the lifecycle hook. The notification + // target can be either an SQS queue or an SNS topic. NotificationTargetARN *string `min:"1" type:"string"` // The ARN of the IAM role that allows the Auto Scaling group to publish to @@ -9981,11 +10378,12 @@ func (s *LifecycleHook) SetRoleARN(v string) *LifecycleHook { return s } -// Describes a lifecycle hook, which tells Auto Scaling that you want to perform -// an action whenever it launches instances or whenever it terminates instances. +// Describes a lifecycle hook, which tells Amazon EC2 Auto Scaling that you +// want to perform an action whenever it launches instances or whenever it terminates +// instances. // -// For more information, see Auto Scaling Lifecycle Hooks (http://docs.aws.amazon.com/autoscaling/latest/userguide/lifecycle-hooks.html) -// in the Auto Scaling User Guide. +// For more information, see Lifecycle Hooks (http://docs.aws.amazon.com/autoscaling/ec2/userguide/lifecycle-hooks.html) +// in the Amazon EC2 Auto Scaling User Guide. type LifecycleHookSpecification struct { _ struct{} `type:"structure"` @@ -9995,8 +10393,9 @@ type LifecycleHookSpecification struct { DefaultResult *string `type:"string"` // The maximum time, in seconds, that can elapse before the lifecycle hook times - // out. If the lifecycle hook times out, Auto Scaling performs the default action. - // You can prevent the lifecycle hook from timing out by calling RecordLifecycleActionHeartbeat. + // out. If the lifecycle hook times out, Amazon EC2 Auto Scaling performs the + // default action. You can prevent the lifecycle hook from timing out by calling + // RecordLifecycleActionHeartbeat. HeartbeatTimeout *int64 `type:"integer"` // The name of the lifecycle hook. @@ -10005,18 +10404,22 @@ type LifecycleHookSpecification struct { LifecycleHookName *string `min:"1" type:"string" required:"true"` // The state of the EC2 instance to which you want to attach the lifecycle hook. - // For a list of lifecycle hook types, see DescribeLifecycleHookTypes. + // The possible values are: + // + // * autoscaling:EC2_INSTANCE_LAUNCHING + // + // * autoscaling:EC2_INSTANCE_TERMINATING // // LifecycleTransition is a required field LifecycleTransition *string `type:"string" required:"true"` - // Additional information that you want to include any time Auto Scaling sends - // a message to the notification target. + // Additional information that you want to include any time Amazon EC2 Auto + // Scaling sends a message to the notification target. NotificationMetadata *string `min:"1" type:"string"` - // The ARN of the target that Auto Scaling sends notifications to when an instance - // is in the transition state for the lifecycle hook. The notification target - // can be either an SQS queue or an SNS topic. + // The ARN of the target that Amazon EC2 Auto Scaling sends notifications to + // when an instance is in the transition state for the lifecycle hook. The notification + // target can be either an SQS queue or an SNS topic. NotificationTargetARN *string `type:"string"` // The ARN of the IAM role that allows the Auto Scaling group to publish to @@ -10460,8 +10863,8 @@ func (s *PredefinedMetricSpecification) SetResourceLabel(v string) *PredefinedMe // Describes a process type. // -// For more information, see Auto Scaling Processes (http://docs.aws.amazon.com/autoscaling/latest/userguide/as-suspend-resume-processes.html#process-types) -// in the Auto Scaling User Guide. +// For more information, see Scaling Processes (http://docs.aws.amazon.com/autoscaling/ec2/userguide/as-suspend-resume-processes.html#process-types) +// in the Amazon EC2 Auto Scaling User Guide. type ProcessType struct { _ struct{} `type:"structure"` @@ -10520,8 +10923,8 @@ type PutLifecycleHookInput struct { // out. The range is from 30 to 7200 seconds. The default is 3600 seconds (1 // hour). // - // If the lifecycle hook times out, Auto Scaling performs the default action. - // You can prevent the lifecycle hook from timing out by calling RecordLifecycleActionHeartbeat. + // If the lifecycle hook times out, Amazon EC2 Auto Scaling performs the default + // action. You can prevent the lifecycle hook from timing out by calling RecordLifecycleActionHeartbeat. HeartbeatTimeout *int64 `type:"integer"` // The name of the lifecycle hook. @@ -10529,29 +10932,33 @@ type PutLifecycleHookInput struct { // LifecycleHookName is a required field LifecycleHookName *string `min:"1" type:"string" required:"true"` - // The instance state to which you want to attach the lifecycle hook. For a - // list of lifecycle hook types, see DescribeLifecycleHookTypes. + // The instance state to which you want to attach the lifecycle hook. The possible + // values are: + // + // * autoscaling:EC2_INSTANCE_LAUNCHING + // + // * autoscaling:EC2_INSTANCE_TERMINATING // // This parameter is required for new lifecycle hooks, but optional when updating // existing hooks. LifecycleTransition *string `type:"string"` - // Contains additional information that you want to include any time Auto Scaling - // sends a message to the notification target. + // Contains additional information that you want to include any time Amazon + // EC2 Auto Scaling sends a message to the notification target. NotificationMetadata *string `min:"1" type:"string"` - // The ARN of the notification target that Auto Scaling will use to notify you - // when an instance is in the transition state for the lifecycle hook. This - // target can be either an SQS queue or an SNS topic. If you specify an empty - // string, this overrides the current ARN. + // The ARN of the notification target that Amazon EC2 Auto Scaling will use + // to notify you when an instance is in the transition state for the lifecycle + // hook. This target can be either an SQS queue or an SNS topic. If you specify + // an empty string, this overrides the current ARN. // // This operation uses the JSON format when sending notifications to an Amazon // SQS queue, and an email key/value pair format when sending notifications // to an Amazon SNS topic. // - // When you specify a notification target, Auto Scaling sends it a test message. - // Test messages contains the following additional key/value pair: "Event": - // "autoscaling:TEST_NOTIFICATION". + // When you specify a notification target, Amazon EC2 Auto Scaling sends it + // a test message. Test messages contains the following additional key/value + // pair: "Event": "autoscaling:TEST_NOTIFICATION". NotificationTargetARN *string `type:"string"` // The ARN of the IAM role that allows the Auto Scaling group to publish to @@ -10671,7 +11078,7 @@ type PutNotificationConfigurationInput struct { AutoScalingGroupName *string `min:"1" type:"string" required:"true"` // The type of event that will cause the notification to be sent. For details - // about notification types supported by Auto Scaling, see DescribeAutoScalingNotificationTypes. + // about notification types supported by Amazon EC2 Auto Scaling, see DescribeAutoScalingNotificationTypes. // // NotificationTypes is a required field NotificationTypes []*string `type:"list" required:"true"` @@ -10758,8 +11165,8 @@ type PutScalingPolicyInput struct { // // This parameter is supported if the policy type is SimpleScaling or StepScaling. // - // For more information, see Dynamic Scaling (http://docs.aws.amazon.com/autoscaling/latest/userguide/as-scale-based-on-demand.html) - // in the Auto Scaling User Guide. + // For more information, see Dynamic Scaling (http://docs.aws.amazon.com/autoscaling/ec2/userguide/as-scale-based-on-demand.html) + // in the Amazon EC2 Auto Scaling User Guide. AdjustmentType *string `min:"1" type:"string"` // The name of the Auto Scaling group. @@ -10773,8 +11180,8 @@ type PutScalingPolicyInput struct { // // This parameter is supported if the policy type is SimpleScaling. // - // For more information, see Auto Scaling Cooldowns (http://docs.aws.amazon.com/autoscaling/latest/userguide/Cooldown.html) - // in the Auto Scaling User Guide. + // For more information, see Scaling Cooldowns (http://docs.aws.amazon.com/autoscaling/ec2/userguide/Cooldown.html) + // in the Amazon EC2 Auto Scaling User Guide. Cooldown *int64 `type:"integer"` // The estimated time, in seconds, until a newly launched instance can contribute @@ -11005,8 +11412,8 @@ type PutScheduledUpdateGroupActionInput struct { // The number of EC2 instances that should be running in the group. DesiredCapacity *int64 `type:"integer"` - // The time for the recurring schedule to end. Auto Scaling does not perform - // the action after this time. + // The time for the recurring schedule to end. Amazon EC2 Auto Scaling does + // not perform the action after this time. EndTime *time.Time `type:"timestamp"` // The maximum size for the Auto Scaling group. @@ -11016,7 +11423,7 @@ type PutScheduledUpdateGroupActionInput struct { MinSize *int64 `type:"integer"` // The recurring schedule for this action, in Unix cron syntax format. For more - // information, see Cron (http://en.wikipedia.org/wiki/Cron) in Wikipedia. + // information about this format, see Crontab (http://crontab.org). Recurrence *string `min:"1" type:"string"` // The name of this scaling action. @@ -11027,11 +11434,12 @@ type PutScheduledUpdateGroupActionInput struct { // The time for this action to start, in "YYYY-MM-DDThh:mm:ssZ" format in UTC/GMT // only (for example, 2014-06-01T00:00:00Z). // - // If you specify Recurrence and StartTime, Auto Scaling performs the action - // at this time, and then performs the action based on the specified recurrence. + // If you specify Recurrence and StartTime, Amazon EC2 Auto Scaling performs + // the action at this time, and then performs the action based on the specified + // recurrence. // - // If you try to schedule your action in the past, Auto Scaling returns an error - // message. + // If you try to schedule your action in the past, Amazon EC2 Auto Scaling returns + // an error message. StartTime *time.Time `type:"timestamp"` // This parameter is deprecated. @@ -11153,8 +11561,8 @@ type RecordLifecycleActionHeartbeatInput struct { InstanceId *string `min:"1" type:"string"` // A token that uniquely identifies a specific lifecycle action associated with - // an instance. Auto Scaling sends this token to the notification target you - // specified when you created the lifecycle hook. + // an instance. Amazon EC2 Auto Scaling sends this token to the notification + // target you specified when you created the lifecycle hook. LifecycleActionToken *string `min:"36" type:"string"` // The name of the lifecycle hook. @@ -11471,7 +11879,7 @@ func (s *ScalingProcessQuery) SetScalingProcesses(v []*string) *ScalingProcessQu return s } -// Describes a scheduled update to an Auto Scaling group. +// Describes a scheduled scaling action. Used in response to DescribeScheduledActions. type ScheduledUpdateGroupAction struct { _ struct{} `type:"structure"` @@ -11581,6 +11989,119 @@ func (s *ScheduledUpdateGroupAction) SetTime(v time.Time) *ScheduledUpdateGroupA return s } +// Describes one or more scheduled scaling action updates for a specified Auto +// Scaling group. Used in combination with BatchPutScheduledUpdateGroupAction. +// +// When updating a scheduled scaling action, all optional parameters are left +// unchanged if not specified. +type ScheduledUpdateGroupActionRequest struct { + _ struct{} `type:"structure"` + + // The number of EC2 instances that should be running in the group. + DesiredCapacity *int64 `type:"integer"` + + // The time for the recurring schedule to end. Amazon EC2 Auto Scaling does + // not perform the action after this time. + EndTime *time.Time `type:"timestamp"` + + // The maximum size of the group. + MaxSize *int64 `type:"integer"` + + // The minimum size of the group. + MinSize *int64 `type:"integer"` + + // The recurring schedule for the action, in Unix cron syntax format. For more + // information about this format, see Crontab (http://crontab.org). + Recurrence *string `min:"1" type:"string"` + + // The name of the scaling action. + // + // ScheduledActionName is a required field + ScheduledActionName *string `min:"1" type:"string" required:"true"` + + // The time for the action to start, in "YYYY-MM-DDThh:mm:ssZ" format in UTC/GMT + // only (for example, 2014-06-01T00:00:00Z). + // + // If you specify Recurrence and StartTime, Amazon EC2 Auto Scaling performs + // the action at this time, and then performs the action based on the specified + // recurrence. + // + // If you try to schedule the action in the past, Amazon EC2 Auto Scaling returns + // an error message. + StartTime *time.Time `type:"timestamp"` +} + +// String returns the string representation +func (s ScheduledUpdateGroupActionRequest) String() string { + return awsutil.Prettify(s) +} + +// GoString returns the string representation +func (s ScheduledUpdateGroupActionRequest) GoString() string { + return s.String() +} + +// Validate inspects the fields of the type to determine if they are valid. +func (s *ScheduledUpdateGroupActionRequest) Validate() error { + invalidParams := request.ErrInvalidParams{Context: "ScheduledUpdateGroupActionRequest"} + if s.Recurrence != nil && len(*s.Recurrence) < 1 { + invalidParams.Add(request.NewErrParamMinLen("Recurrence", 1)) + } + if s.ScheduledActionName == nil { + invalidParams.Add(request.NewErrParamRequired("ScheduledActionName")) + } + if s.ScheduledActionName != nil && len(*s.ScheduledActionName) < 1 { + invalidParams.Add(request.NewErrParamMinLen("ScheduledActionName", 1)) + } + + if invalidParams.Len() > 0 { + return invalidParams + } + return nil +} + +// SetDesiredCapacity sets the DesiredCapacity field's value. +func (s *ScheduledUpdateGroupActionRequest) SetDesiredCapacity(v int64) *ScheduledUpdateGroupActionRequest { + s.DesiredCapacity = &v + return s +} + +// SetEndTime sets the EndTime field's value. +func (s *ScheduledUpdateGroupActionRequest) SetEndTime(v time.Time) *ScheduledUpdateGroupActionRequest { + s.EndTime = &v + return s +} + +// SetMaxSize sets the MaxSize field's value. +func (s *ScheduledUpdateGroupActionRequest) SetMaxSize(v int64) *ScheduledUpdateGroupActionRequest { + s.MaxSize = &v + return s +} + +// SetMinSize sets the MinSize field's value. +func (s *ScheduledUpdateGroupActionRequest) SetMinSize(v int64) *ScheduledUpdateGroupActionRequest { + s.MinSize = &v + return s +} + +// SetRecurrence sets the Recurrence field's value. +func (s *ScheduledUpdateGroupActionRequest) SetRecurrence(v string) *ScheduledUpdateGroupActionRequest { + s.Recurrence = &v + return s +} + +// SetScheduledActionName sets the ScheduledActionName field's value. +func (s *ScheduledUpdateGroupActionRequest) SetScheduledActionName(v string) *ScheduledUpdateGroupActionRequest { + s.ScheduledActionName = &v + return s +} + +// SetStartTime sets the StartTime field's value. +func (s *ScheduledUpdateGroupActionRequest) SetStartTime(v time.Time) *ScheduledUpdateGroupActionRequest { + s.StartTime = &v + return s +} + type SetDesiredCapacityInput struct { _ struct{} `type:"structure"` @@ -11594,10 +12115,10 @@ type SetDesiredCapacityInput struct { // DesiredCapacity is a required field DesiredCapacity *int64 `type:"integer" required:"true"` - // Indicates whether Auto Scaling waits for the cooldown period to complete - // before initiating a scaling activity to set your Auto Scaling group to its - // new capacity. By default, Auto Scaling does not honor the cooldown period - // during manual scaling activities. + // Indicates whether Amazon EC2 Auto Scaling waits for the cooldown period to + // complete before initiating a scaling activity to set your Auto Scaling group + // to its new capacity. By default, Amazon EC2 Auto Scaling does not honor the + // cooldown period during manual scaling activities. HonorCooldown *bool `type:"boolean"` } @@ -11667,7 +12188,8 @@ type SetInstanceHealthInput struct { // The health status of the instance. Set to Healthy if you want the instance // to remain in service. Set to Unhealthy if you want the instance to be out - // of service. Auto Scaling will terminate and replace the unhealthy instance. + // of service. Amazon EC2 Auto Scaling will terminate and replace the unhealthy + // instance. // // HealthStatus is a required field HealthStatus *string `min:"1" type:"string" required:"true"` @@ -11764,8 +12286,8 @@ type SetInstanceProtectionInput struct { // InstanceIds is a required field InstanceIds []*string `type:"list" required:"true"` - // Indicates whether the instance is protected from termination by Auto Scaling - // when scaling in. + // Indicates whether the instance is protected from termination by Amazon EC2 + // Auto Scaling when scaling in. // // ProtectedFromScaleIn is a required field ProtectedFromScaleIn *bool `type:"boolean" required:"true"` @@ -11946,8 +12468,8 @@ func (s SuspendProcessesOutput) GoString() string { return s.String() } -// Describes an Auto Scaling process that has been suspended. For more information, -// see ProcessType. +// Describes an automatic scaling process that has been suspended. For more +// information, see ProcessType. type SuspendedProcess struct { _ struct{} `type:"structure"` @@ -12293,8 +12815,8 @@ type UpdateAutoScalingGroupInput struct { // The amount of time, in seconds, after a scaling activity completes before // another scaling activity can start. The default is 300. // - // For more information, see Auto Scaling Cooldowns (http://docs.aws.amazon.com/autoscaling/latest/userguide/Cooldown.html) - // in the Auto Scaling User Guide. + // For more information, see Scaling Cooldowns (http://docs.aws.amazon.com/autoscaling/ec2/userguide/Cooldown.html) + // in the Amazon EC2 Auto Scaling User Guide. DefaultCooldown *int64 `type:"integer"` // The number of EC2 instances that should be running in the Auto Scaling group. @@ -12302,12 +12824,12 @@ type UpdateAutoScalingGroupInput struct { // and less than or equal to the maximum size of the group. DesiredCapacity *int64 `type:"integer"` - // The amount of time, in seconds, that Auto Scaling waits before checking the - // health status of an EC2 instance that has come into service. The default - // is 0. + // The amount of time, in seconds, that Amazon EC2 Auto Scaling waits before + // checking the health status of an EC2 instance that has come into service. + // The default is 0. // - // For more information, see Health Checks (http://docs.aws.amazon.com/autoscaling/latest/userguide/healthcheck.html) - // in the Auto Scaling User Guide. + // For more information, see Health Checks (http://docs.aws.amazon.com/autoscaling/ec2/userguide/healthcheck.html) + // in the Amazon EC2 Auto Scaling User Guide. HealthCheckGracePeriod *int64 `type:"integer"` // The service to use for the health checks. The valid values are EC2 and ELB. @@ -12345,7 +12867,7 @@ type UpdateAutoScalingGroupInput struct { // that they are listed. // // For more information, see Controlling Which Instances Auto Scaling Terminates - // During Scale In (http://docs.aws.amazon.com/autoscaling/latest/userguide/as-instance-termination.html) + // During Scale In (http://docs.aws.amazon.com/autoscaling/ec2/userguide/as-instance-termination.html) // in the Auto Scaling User Guide. TerminationPolicies []*string `type:"list"` @@ -12355,8 +12877,8 @@ type UpdateAutoScalingGroupInput struct { // When you specify VPCZoneIdentifier with AvailabilityZones, ensure that the // subnets' Availability Zones match the values you specify for AvailabilityZones. // - // For more information, see Launching Auto Scaling Instances in a VPC (http://docs.aws.amazon.com/autoscaling/latest/userguide/asg-in-vpc.html) - // in the Auto Scaling User Guide. + // For more information, see Launching Auto Scaling Instances in a VPC (http://docs.aws.amazon.com/autoscaling/ec2/userguide/asg-in-vpc.html) + // in the Amazon EC2 Auto Scaling User Guide. VPCZoneIdentifier *string `min:"1" type:"string"` } diff --git a/vendor/github.com/aws/aws-sdk-go/service/cloudfront/api.go b/vendor/github.com/aws/aws-sdk-go/service/cloudfront/api.go index 5109b4485..1e4ce44ab 100644 --- a/vendor/github.com/aws/aws-sdk-go/service/cloudfront/api.go +++ b/vendor/github.com/aws/aws-sdk-go/service/cloudfront/api.go @@ -13,7 +13,7 @@ import ( "github.com/aws/aws-sdk-go/private/protocol/restxml" ) -const opCreateCloudFrontOriginAccessIdentity = "CreateCloudFrontOriginAccessIdentity2017_10_30" +const opCreateCloudFrontOriginAccessIdentity = "CreateCloudFrontOriginAccessIdentity2018_06_18" // CreateCloudFrontOriginAccessIdentityRequest generates a "aws/request.Request" representing the // client's request for the CreateCloudFrontOriginAccessIdentity operation. The "output" return @@ -38,12 +38,12 @@ const opCreateCloudFrontOriginAccessIdentity = "CreateCloudFrontOriginAccessIden // fmt.Println(resp) // } // -// See also, https://docs.aws.amazon.com/goto/WebAPI/cloudfront-2017-10-30/CreateCloudFrontOriginAccessIdentity +// See also, https://docs.aws.amazon.com/goto/WebAPI/cloudfront-2018-06-18/CreateCloudFrontOriginAccessIdentity func (c *CloudFront) CreateCloudFrontOriginAccessIdentityRequest(input *CreateCloudFrontOriginAccessIdentityInput) (req *request.Request, output *CreateCloudFrontOriginAccessIdentityOutput) { op := &request.Operation{ Name: opCreateCloudFrontOriginAccessIdentity, HTTPMethod: "POST", - HTTPPath: "/2017-10-30/origin-access-identity/cloudfront", + HTTPPath: "/2018-06-18/origin-access-identity/cloudfront", } if input == nil { @@ -92,7 +92,7 @@ func (c *CloudFront) CreateCloudFrontOriginAccessIdentityRequest(input *CreateCl // * ErrCodeInconsistentQuantities "InconsistentQuantities" // The value of Quantity and the size of Items don't match. // -// See also, https://docs.aws.amazon.com/goto/WebAPI/cloudfront-2017-10-30/CreateCloudFrontOriginAccessIdentity +// See also, https://docs.aws.amazon.com/goto/WebAPI/cloudfront-2018-06-18/CreateCloudFrontOriginAccessIdentity func (c *CloudFront) CreateCloudFrontOriginAccessIdentity(input *CreateCloudFrontOriginAccessIdentityInput) (*CreateCloudFrontOriginAccessIdentityOutput, error) { req, out := c.CreateCloudFrontOriginAccessIdentityRequest(input) return out, req.Send() @@ -114,7 +114,7 @@ func (c *CloudFront) CreateCloudFrontOriginAccessIdentityWithContext(ctx aws.Con return out, req.Send() } -const opCreateDistribution = "CreateDistribution2017_10_30" +const opCreateDistribution = "CreateDistribution2018_06_18" // CreateDistributionRequest generates a "aws/request.Request" representing the // client's request for the CreateDistribution operation. The "output" return @@ -139,12 +139,12 @@ const opCreateDistribution = "CreateDistribution2017_10_30" // fmt.Println(resp) // } // -// See also, https://docs.aws.amazon.com/goto/WebAPI/cloudfront-2017-10-30/CreateDistribution +// See also, https://docs.aws.amazon.com/goto/WebAPI/cloudfront-2018-06-18/CreateDistribution func (c *CloudFront) CreateDistributionRequest(input *CreateDistributionInput) (req *request.Request, output *CreateDistributionOutput) { op := &request.Operation{ Name: opCreateDistribution, HTTPMethod: "POST", - HTTPPath: "/2017-10-30/distribution", + HTTPPath: "/2018-06-18/distribution", } if input == nil { @@ -158,8 +158,21 @@ func (c *CloudFront) CreateDistributionRequest(input *CreateDistributionInput) ( // CreateDistribution API operation for Amazon CloudFront. // -// Creates a new web distribution. Send a POST request to the /CloudFront API -// version/distribution/distribution ID resource. +// Creates a new web distribution. You create a CloudFront distribution to tell +// CloudFront where you want content to be delivered from, and the details about +// how to track and manage content delivery. Send a POST request to the /CloudFront +// API version/distribution/distribution ID resource. +// +// When you update a distribution, there are more required fields than when +// you create a distribution. When you update your distribution by using UpdateDistribution, +// follow the steps included in the documentation to get the current configuration +// and then make your updates. This helps to make sure that you include all +// of the required fields. To view a summary, see Required Fields for Create +// Distribution and Update Distribution (http://docs.aws.amazon.com/AmazonCloudFront/latest/DeveloperGuide/distribution-overview-required-fields.html) +// in the Amazon CloudFront Developer Guide. +// +// If you are using Adobe Flash Media Server's RTMP protocol, you set up a different +// kind of CloudFront distribution. For more information, see CreateStreamingDistribution. // // Returns awserr.Error for service API and SDK errors. Use runtime type assertions // with awserr.Error's Code and Message methods to get detailed information about @@ -298,7 +311,7 @@ func (c *CloudFront) CreateDistributionRequest(input *CreateDistributionInput) ( // The maximum number of distributions have been associated with the specified // configuration for field-level encryption. // -// See also, https://docs.aws.amazon.com/goto/WebAPI/cloudfront-2017-10-30/CreateDistribution +// See also, https://docs.aws.amazon.com/goto/WebAPI/cloudfront-2018-06-18/CreateDistribution func (c *CloudFront) CreateDistribution(input *CreateDistributionInput) (*CreateDistributionOutput, error) { req, out := c.CreateDistributionRequest(input) return out, req.Send() @@ -320,7 +333,7 @@ func (c *CloudFront) CreateDistributionWithContext(ctx aws.Context, input *Creat return out, req.Send() } -const opCreateDistributionWithTags = "CreateDistributionWithTags2017_10_30" +const opCreateDistributionWithTags = "CreateDistributionWithTags2018_06_18" // CreateDistributionWithTagsRequest generates a "aws/request.Request" representing the // client's request for the CreateDistributionWithTags operation. The "output" return @@ -345,12 +358,12 @@ const opCreateDistributionWithTags = "CreateDistributionWithTags2017_10_30" // fmt.Println(resp) // } // -// See also, https://docs.aws.amazon.com/goto/WebAPI/cloudfront-2017-10-30/CreateDistributionWithTags +// See also, https://docs.aws.amazon.com/goto/WebAPI/cloudfront-2018-06-18/CreateDistributionWithTags func (c *CloudFront) CreateDistributionWithTagsRequest(input *CreateDistributionWithTagsInput) (req *request.Request, output *CreateDistributionWithTagsOutput) { op := &request.Operation{ Name: opCreateDistributionWithTags, HTTPMethod: "POST", - HTTPPath: "/2017-10-30/distribution?WithTags", + HTTPPath: "/2018-06-18/distribution?WithTags", } if input == nil { @@ -505,7 +518,7 @@ func (c *CloudFront) CreateDistributionWithTagsRequest(input *CreateDistribution // The maximum number of distributions have been associated with the specified // configuration for field-level encryption. // -// See also, https://docs.aws.amazon.com/goto/WebAPI/cloudfront-2017-10-30/CreateDistributionWithTags +// See also, https://docs.aws.amazon.com/goto/WebAPI/cloudfront-2018-06-18/CreateDistributionWithTags func (c *CloudFront) CreateDistributionWithTags(input *CreateDistributionWithTagsInput) (*CreateDistributionWithTagsOutput, error) { req, out := c.CreateDistributionWithTagsRequest(input) return out, req.Send() @@ -527,7 +540,7 @@ func (c *CloudFront) CreateDistributionWithTagsWithContext(ctx aws.Context, inpu return out, req.Send() } -const opCreateFieldLevelEncryptionConfig = "CreateFieldLevelEncryptionConfig2017_10_30" +const opCreateFieldLevelEncryptionConfig = "CreateFieldLevelEncryptionConfig2018_06_18" // CreateFieldLevelEncryptionConfigRequest generates a "aws/request.Request" representing the // client's request for the CreateFieldLevelEncryptionConfig operation. The "output" return @@ -552,12 +565,12 @@ const opCreateFieldLevelEncryptionConfig = "CreateFieldLevelEncryptionConfig2017 // fmt.Println(resp) // } // -// See also, https://docs.aws.amazon.com/goto/WebAPI/cloudfront-2017-10-30/CreateFieldLevelEncryptionConfig +// See also, https://docs.aws.amazon.com/goto/WebAPI/cloudfront-2018-06-18/CreateFieldLevelEncryptionConfig func (c *CloudFront) CreateFieldLevelEncryptionConfigRequest(input *CreateFieldLevelEncryptionConfigInput) (req *request.Request, output *CreateFieldLevelEncryptionConfigOutput) { op := &request.Operation{ Name: opCreateFieldLevelEncryptionConfig, HTTPMethod: "POST", - HTTPPath: "/2017-10-30/field-level-encryption", + HTTPPath: "/2018-06-18/field-level-encryption", } if input == nil { @@ -608,7 +621,7 @@ func (c *CloudFront) CreateFieldLevelEncryptionConfigRequest(input *CreateFieldL // * ErrCodeQueryArgProfileEmpty "QueryArgProfileEmpty" // No profile specified for the field-level encryption query argument. // -// See also, https://docs.aws.amazon.com/goto/WebAPI/cloudfront-2017-10-30/CreateFieldLevelEncryptionConfig +// See also, https://docs.aws.amazon.com/goto/WebAPI/cloudfront-2018-06-18/CreateFieldLevelEncryptionConfig func (c *CloudFront) CreateFieldLevelEncryptionConfig(input *CreateFieldLevelEncryptionConfigInput) (*CreateFieldLevelEncryptionConfigOutput, error) { req, out := c.CreateFieldLevelEncryptionConfigRequest(input) return out, req.Send() @@ -630,7 +643,7 @@ func (c *CloudFront) CreateFieldLevelEncryptionConfigWithContext(ctx aws.Context return out, req.Send() } -const opCreateFieldLevelEncryptionProfile = "CreateFieldLevelEncryptionProfile2017_10_30" +const opCreateFieldLevelEncryptionProfile = "CreateFieldLevelEncryptionProfile2018_06_18" // CreateFieldLevelEncryptionProfileRequest generates a "aws/request.Request" representing the // client's request for the CreateFieldLevelEncryptionProfile operation. The "output" return @@ -655,12 +668,12 @@ const opCreateFieldLevelEncryptionProfile = "CreateFieldLevelEncryptionProfile20 // fmt.Println(resp) // } // -// See also, https://docs.aws.amazon.com/goto/WebAPI/cloudfront-2017-10-30/CreateFieldLevelEncryptionProfile +// See also, https://docs.aws.amazon.com/goto/WebAPI/cloudfront-2018-06-18/CreateFieldLevelEncryptionProfile func (c *CloudFront) CreateFieldLevelEncryptionProfileRequest(input *CreateFieldLevelEncryptionProfileInput) (req *request.Request, output *CreateFieldLevelEncryptionProfileOutput) { op := &request.Operation{ Name: opCreateFieldLevelEncryptionProfile, HTTPMethod: "POST", - HTTPPath: "/2017-10-30/field-level-encryption-profile", + HTTPPath: "/2018-06-18/field-level-encryption-profile", } if input == nil { @@ -710,7 +723,7 @@ func (c *CloudFront) CreateFieldLevelEncryptionProfileRequest(input *CreateField // The maximum number of field patterns for field-level encryption have been // created. // -// See also, https://docs.aws.amazon.com/goto/WebAPI/cloudfront-2017-10-30/CreateFieldLevelEncryptionProfile +// See also, https://docs.aws.amazon.com/goto/WebAPI/cloudfront-2018-06-18/CreateFieldLevelEncryptionProfile func (c *CloudFront) CreateFieldLevelEncryptionProfile(input *CreateFieldLevelEncryptionProfileInput) (*CreateFieldLevelEncryptionProfileOutput, error) { req, out := c.CreateFieldLevelEncryptionProfileRequest(input) return out, req.Send() @@ -732,7 +745,7 @@ func (c *CloudFront) CreateFieldLevelEncryptionProfileWithContext(ctx aws.Contex return out, req.Send() } -const opCreateInvalidation = "CreateInvalidation2017_10_30" +const opCreateInvalidation = "CreateInvalidation2018_06_18" // CreateInvalidationRequest generates a "aws/request.Request" representing the // client's request for the CreateInvalidation operation. The "output" return @@ -757,12 +770,12 @@ const opCreateInvalidation = "CreateInvalidation2017_10_30" // fmt.Println(resp) // } // -// See also, https://docs.aws.amazon.com/goto/WebAPI/cloudfront-2017-10-30/CreateInvalidation +// See also, https://docs.aws.amazon.com/goto/WebAPI/cloudfront-2018-06-18/CreateInvalidation func (c *CloudFront) CreateInvalidationRequest(input *CreateInvalidationInput) (req *request.Request, output *CreateInvalidationOutput) { op := &request.Operation{ Name: opCreateInvalidation, HTTPMethod: "POST", - HTTPPath: "/2017-10-30/distribution/{DistributionId}/invalidation", + HTTPPath: "/2018-06-18/distribution/{DistributionId}/invalidation", } if input == nil { @@ -808,7 +821,7 @@ func (c *CloudFront) CreateInvalidationRequest(input *CreateInvalidationInput) ( // * ErrCodeInconsistentQuantities "InconsistentQuantities" // The value of Quantity and the size of Items don't match. // -// See also, https://docs.aws.amazon.com/goto/WebAPI/cloudfront-2017-10-30/CreateInvalidation +// See also, https://docs.aws.amazon.com/goto/WebAPI/cloudfront-2018-06-18/CreateInvalidation func (c *CloudFront) CreateInvalidation(input *CreateInvalidationInput) (*CreateInvalidationOutput, error) { req, out := c.CreateInvalidationRequest(input) return out, req.Send() @@ -830,7 +843,7 @@ func (c *CloudFront) CreateInvalidationWithContext(ctx aws.Context, input *Creat return out, req.Send() } -const opCreatePublicKey = "CreatePublicKey2017_10_30" +const opCreatePublicKey = "CreatePublicKey2018_06_18" // CreatePublicKeyRequest generates a "aws/request.Request" representing the // client's request for the CreatePublicKey operation. The "output" return @@ -855,12 +868,12 @@ const opCreatePublicKey = "CreatePublicKey2017_10_30" // fmt.Println(resp) // } // -// See also, https://docs.aws.amazon.com/goto/WebAPI/cloudfront-2017-10-30/CreatePublicKey +// See also, https://docs.aws.amazon.com/goto/WebAPI/cloudfront-2018-06-18/CreatePublicKey func (c *CloudFront) CreatePublicKeyRequest(input *CreatePublicKeyInput) (req *request.Request, output *CreatePublicKeyOutput) { op := &request.Operation{ Name: opCreatePublicKey, HTTPMethod: "POST", - HTTPPath: "/2017-10-30/public-key", + HTTPPath: "/2018-06-18/public-key", } if input == nil { @@ -895,7 +908,7 @@ func (c *CloudFront) CreatePublicKeyRequest(input *CreatePublicKeyInput) (req *r // The maximum number of public keys for field-level encryption have been created. // To create a new public key, delete one of the existing keys. // -// See also, https://docs.aws.amazon.com/goto/WebAPI/cloudfront-2017-10-30/CreatePublicKey +// See also, https://docs.aws.amazon.com/goto/WebAPI/cloudfront-2018-06-18/CreatePublicKey func (c *CloudFront) CreatePublicKey(input *CreatePublicKeyInput) (*CreatePublicKeyOutput, error) { req, out := c.CreatePublicKeyRequest(input) return out, req.Send() @@ -917,7 +930,7 @@ func (c *CloudFront) CreatePublicKeyWithContext(ctx aws.Context, input *CreatePu return out, req.Send() } -const opCreateStreamingDistribution = "CreateStreamingDistribution2017_10_30" +const opCreateStreamingDistribution = "CreateStreamingDistribution2018_06_18" // CreateStreamingDistributionRequest generates a "aws/request.Request" representing the // client's request for the CreateStreamingDistribution operation. The "output" return @@ -942,12 +955,12 @@ const opCreateStreamingDistribution = "CreateStreamingDistribution2017_10_30" // fmt.Println(resp) // } // -// See also, https://docs.aws.amazon.com/goto/WebAPI/cloudfront-2017-10-30/CreateStreamingDistribution +// See also, https://docs.aws.amazon.com/goto/WebAPI/cloudfront-2018-06-18/CreateStreamingDistribution func (c *CloudFront) CreateStreamingDistributionRequest(input *CreateStreamingDistributionInput) (req *request.Request, output *CreateStreamingDistributionOutput) { op := &request.Operation{ Name: opCreateStreamingDistribution, HTTPMethod: "POST", - HTTPPath: "/2017-10-30/streaming-distribution", + HTTPPath: "/2018-06-18/streaming-distribution", } if input == nil { @@ -1034,7 +1047,7 @@ func (c *CloudFront) CreateStreamingDistributionRequest(input *CreateStreamingDi // * ErrCodeInconsistentQuantities "InconsistentQuantities" // The value of Quantity and the size of Items don't match. // -// See also, https://docs.aws.amazon.com/goto/WebAPI/cloudfront-2017-10-30/CreateStreamingDistribution +// See also, https://docs.aws.amazon.com/goto/WebAPI/cloudfront-2018-06-18/CreateStreamingDistribution func (c *CloudFront) CreateStreamingDistribution(input *CreateStreamingDistributionInput) (*CreateStreamingDistributionOutput, error) { req, out := c.CreateStreamingDistributionRequest(input) return out, req.Send() @@ -1056,7 +1069,7 @@ func (c *CloudFront) CreateStreamingDistributionWithContext(ctx aws.Context, inp return out, req.Send() } -const opCreateStreamingDistributionWithTags = "CreateStreamingDistributionWithTags2017_10_30" +const opCreateStreamingDistributionWithTags = "CreateStreamingDistributionWithTags2018_06_18" // CreateStreamingDistributionWithTagsRequest generates a "aws/request.Request" representing the // client's request for the CreateStreamingDistributionWithTags operation. The "output" return @@ -1081,12 +1094,12 @@ const opCreateStreamingDistributionWithTags = "CreateStreamingDistributionWithTa // fmt.Println(resp) // } // -// See also, https://docs.aws.amazon.com/goto/WebAPI/cloudfront-2017-10-30/CreateStreamingDistributionWithTags +// See also, https://docs.aws.amazon.com/goto/WebAPI/cloudfront-2018-06-18/CreateStreamingDistributionWithTags func (c *CloudFront) CreateStreamingDistributionWithTagsRequest(input *CreateStreamingDistributionWithTagsInput) (req *request.Request, output *CreateStreamingDistributionWithTagsOutput) { op := &request.Operation{ Name: opCreateStreamingDistributionWithTags, HTTPMethod: "POST", - HTTPPath: "/2017-10-30/streaming-distribution?WithTags", + HTTPPath: "/2018-06-18/streaming-distribution?WithTags", } if input == nil { @@ -1148,7 +1161,7 @@ func (c *CloudFront) CreateStreamingDistributionWithTagsRequest(input *CreateStr // // * ErrCodeInvalidTagging "InvalidTagging" // -// See also, https://docs.aws.amazon.com/goto/WebAPI/cloudfront-2017-10-30/CreateStreamingDistributionWithTags +// See also, https://docs.aws.amazon.com/goto/WebAPI/cloudfront-2018-06-18/CreateStreamingDistributionWithTags func (c *CloudFront) CreateStreamingDistributionWithTags(input *CreateStreamingDistributionWithTagsInput) (*CreateStreamingDistributionWithTagsOutput, error) { req, out := c.CreateStreamingDistributionWithTagsRequest(input) return out, req.Send() @@ -1170,7 +1183,7 @@ func (c *CloudFront) CreateStreamingDistributionWithTagsWithContext(ctx aws.Cont return out, req.Send() } -const opDeleteCloudFrontOriginAccessIdentity = "DeleteCloudFrontOriginAccessIdentity2017_10_30" +const opDeleteCloudFrontOriginAccessIdentity = "DeleteCloudFrontOriginAccessIdentity2018_06_18" // DeleteCloudFrontOriginAccessIdentityRequest generates a "aws/request.Request" representing the // client's request for the DeleteCloudFrontOriginAccessIdentity operation. The "output" return @@ -1195,12 +1208,12 @@ const opDeleteCloudFrontOriginAccessIdentity = "DeleteCloudFrontOriginAccessIden // fmt.Println(resp) // } // -// See also, https://docs.aws.amazon.com/goto/WebAPI/cloudfront-2017-10-30/DeleteCloudFrontOriginAccessIdentity +// See also, https://docs.aws.amazon.com/goto/WebAPI/cloudfront-2018-06-18/DeleteCloudFrontOriginAccessIdentity func (c *CloudFront) DeleteCloudFrontOriginAccessIdentityRequest(input *DeleteCloudFrontOriginAccessIdentityInput) (req *request.Request, output *DeleteCloudFrontOriginAccessIdentityOutput) { op := &request.Operation{ Name: opDeleteCloudFrontOriginAccessIdentity, HTTPMethod: "DELETE", - HTTPPath: "/2017-10-30/origin-access-identity/cloudfront/{Id}", + HTTPPath: "/2018-06-18/origin-access-identity/cloudfront/{Id}", } if input == nil { @@ -1241,7 +1254,7 @@ func (c *CloudFront) DeleteCloudFrontOriginAccessIdentityRequest(input *DeleteCl // // * ErrCodeOriginAccessIdentityInUse "CloudFrontOriginAccessIdentityInUse" // -// See also, https://docs.aws.amazon.com/goto/WebAPI/cloudfront-2017-10-30/DeleteCloudFrontOriginAccessIdentity +// See also, https://docs.aws.amazon.com/goto/WebAPI/cloudfront-2018-06-18/DeleteCloudFrontOriginAccessIdentity func (c *CloudFront) DeleteCloudFrontOriginAccessIdentity(input *DeleteCloudFrontOriginAccessIdentityInput) (*DeleteCloudFrontOriginAccessIdentityOutput, error) { req, out := c.DeleteCloudFrontOriginAccessIdentityRequest(input) return out, req.Send() @@ -1263,7 +1276,7 @@ func (c *CloudFront) DeleteCloudFrontOriginAccessIdentityWithContext(ctx aws.Con return out, req.Send() } -const opDeleteDistribution = "DeleteDistribution2017_10_30" +const opDeleteDistribution = "DeleteDistribution2018_06_18" // DeleteDistributionRequest generates a "aws/request.Request" representing the // client's request for the DeleteDistribution operation. The "output" return @@ -1288,12 +1301,12 @@ const opDeleteDistribution = "DeleteDistribution2017_10_30" // fmt.Println(resp) // } // -// See also, https://docs.aws.amazon.com/goto/WebAPI/cloudfront-2017-10-30/DeleteDistribution +// See also, https://docs.aws.amazon.com/goto/WebAPI/cloudfront-2018-06-18/DeleteDistribution func (c *CloudFront) DeleteDistributionRequest(input *DeleteDistributionInput) (req *request.Request, output *DeleteDistributionOutput) { op := &request.Operation{ Name: opDeleteDistribution, HTTPMethod: "DELETE", - HTTPPath: "/2017-10-30/distribution/{Id}", + HTTPPath: "/2018-06-18/distribution/{Id}", } if input == nil { @@ -1334,7 +1347,7 @@ func (c *CloudFront) DeleteDistributionRequest(input *DeleteDistributionInput) ( // The precondition given in one or more of the request-header fields evaluated // to false. // -// See also, https://docs.aws.amazon.com/goto/WebAPI/cloudfront-2017-10-30/DeleteDistribution +// See also, https://docs.aws.amazon.com/goto/WebAPI/cloudfront-2018-06-18/DeleteDistribution func (c *CloudFront) DeleteDistribution(input *DeleteDistributionInput) (*DeleteDistributionOutput, error) { req, out := c.DeleteDistributionRequest(input) return out, req.Send() @@ -1356,7 +1369,7 @@ func (c *CloudFront) DeleteDistributionWithContext(ctx aws.Context, input *Delet return out, req.Send() } -const opDeleteFieldLevelEncryptionConfig = "DeleteFieldLevelEncryptionConfig2017_10_30" +const opDeleteFieldLevelEncryptionConfig = "DeleteFieldLevelEncryptionConfig2018_06_18" // DeleteFieldLevelEncryptionConfigRequest generates a "aws/request.Request" representing the // client's request for the DeleteFieldLevelEncryptionConfig operation. The "output" return @@ -1381,12 +1394,12 @@ const opDeleteFieldLevelEncryptionConfig = "DeleteFieldLevelEncryptionConfig2017 // fmt.Println(resp) // } // -// See also, https://docs.aws.amazon.com/goto/WebAPI/cloudfront-2017-10-30/DeleteFieldLevelEncryptionConfig +// See also, https://docs.aws.amazon.com/goto/WebAPI/cloudfront-2018-06-18/DeleteFieldLevelEncryptionConfig func (c *CloudFront) DeleteFieldLevelEncryptionConfigRequest(input *DeleteFieldLevelEncryptionConfigInput) (req *request.Request, output *DeleteFieldLevelEncryptionConfigOutput) { op := &request.Operation{ Name: opDeleteFieldLevelEncryptionConfig, HTTPMethod: "DELETE", - HTTPPath: "/2017-10-30/field-level-encryption/{Id}", + HTTPPath: "/2018-06-18/field-level-encryption/{Id}", } if input == nil { @@ -1428,7 +1441,7 @@ func (c *CloudFront) DeleteFieldLevelEncryptionConfigRequest(input *DeleteFieldL // * ErrCodeFieldLevelEncryptionConfigInUse "FieldLevelEncryptionConfigInUse" // The specified configuration for field-level encryption is in use. // -// See also, https://docs.aws.amazon.com/goto/WebAPI/cloudfront-2017-10-30/DeleteFieldLevelEncryptionConfig +// See also, https://docs.aws.amazon.com/goto/WebAPI/cloudfront-2018-06-18/DeleteFieldLevelEncryptionConfig func (c *CloudFront) DeleteFieldLevelEncryptionConfig(input *DeleteFieldLevelEncryptionConfigInput) (*DeleteFieldLevelEncryptionConfigOutput, error) { req, out := c.DeleteFieldLevelEncryptionConfigRequest(input) return out, req.Send() @@ -1450,7 +1463,7 @@ func (c *CloudFront) DeleteFieldLevelEncryptionConfigWithContext(ctx aws.Context return out, req.Send() } -const opDeleteFieldLevelEncryptionProfile = "DeleteFieldLevelEncryptionProfile2017_10_30" +const opDeleteFieldLevelEncryptionProfile = "DeleteFieldLevelEncryptionProfile2018_06_18" // DeleteFieldLevelEncryptionProfileRequest generates a "aws/request.Request" representing the // client's request for the DeleteFieldLevelEncryptionProfile operation. The "output" return @@ -1475,12 +1488,12 @@ const opDeleteFieldLevelEncryptionProfile = "DeleteFieldLevelEncryptionProfile20 // fmt.Println(resp) // } // -// See also, https://docs.aws.amazon.com/goto/WebAPI/cloudfront-2017-10-30/DeleteFieldLevelEncryptionProfile +// See also, https://docs.aws.amazon.com/goto/WebAPI/cloudfront-2018-06-18/DeleteFieldLevelEncryptionProfile func (c *CloudFront) DeleteFieldLevelEncryptionProfileRequest(input *DeleteFieldLevelEncryptionProfileInput) (req *request.Request, output *DeleteFieldLevelEncryptionProfileOutput) { op := &request.Operation{ Name: opDeleteFieldLevelEncryptionProfile, HTTPMethod: "DELETE", - HTTPPath: "/2017-10-30/field-level-encryption-profile/{Id}", + HTTPPath: "/2018-06-18/field-level-encryption-profile/{Id}", } if input == nil { @@ -1522,7 +1535,7 @@ func (c *CloudFront) DeleteFieldLevelEncryptionProfileRequest(input *DeleteField // * ErrCodeFieldLevelEncryptionProfileInUse "FieldLevelEncryptionProfileInUse" // The specified profile for field-level encryption is in use. // -// See also, https://docs.aws.amazon.com/goto/WebAPI/cloudfront-2017-10-30/DeleteFieldLevelEncryptionProfile +// See also, https://docs.aws.amazon.com/goto/WebAPI/cloudfront-2018-06-18/DeleteFieldLevelEncryptionProfile func (c *CloudFront) DeleteFieldLevelEncryptionProfile(input *DeleteFieldLevelEncryptionProfileInput) (*DeleteFieldLevelEncryptionProfileOutput, error) { req, out := c.DeleteFieldLevelEncryptionProfileRequest(input) return out, req.Send() @@ -1544,7 +1557,7 @@ func (c *CloudFront) DeleteFieldLevelEncryptionProfileWithContext(ctx aws.Contex return out, req.Send() } -const opDeletePublicKey = "DeletePublicKey2017_10_30" +const opDeletePublicKey = "DeletePublicKey2018_06_18" // DeletePublicKeyRequest generates a "aws/request.Request" representing the // client's request for the DeletePublicKey operation. The "output" return @@ -1569,12 +1582,12 @@ const opDeletePublicKey = "DeletePublicKey2017_10_30" // fmt.Println(resp) // } // -// See also, https://docs.aws.amazon.com/goto/WebAPI/cloudfront-2017-10-30/DeletePublicKey +// See also, https://docs.aws.amazon.com/goto/WebAPI/cloudfront-2018-06-18/DeletePublicKey func (c *CloudFront) DeletePublicKeyRequest(input *DeletePublicKeyInput) (req *request.Request, output *DeletePublicKeyOutput) { op := &request.Operation{ Name: opDeletePublicKey, HTTPMethod: "DELETE", - HTTPPath: "/2017-10-30/public-key/{Id}", + HTTPPath: "/2018-06-18/public-key/{Id}", } if input == nil { @@ -1616,7 +1629,7 @@ func (c *CloudFront) DeletePublicKeyRequest(input *DeletePublicKeyInput) (req *r // The precondition given in one or more of the request-header fields evaluated // to false. // -// See also, https://docs.aws.amazon.com/goto/WebAPI/cloudfront-2017-10-30/DeletePublicKey +// See also, https://docs.aws.amazon.com/goto/WebAPI/cloudfront-2018-06-18/DeletePublicKey func (c *CloudFront) DeletePublicKey(input *DeletePublicKeyInput) (*DeletePublicKeyOutput, error) { req, out := c.DeletePublicKeyRequest(input) return out, req.Send() @@ -1638,7 +1651,7 @@ func (c *CloudFront) DeletePublicKeyWithContext(ctx aws.Context, input *DeletePu return out, req.Send() } -const opDeleteStreamingDistribution = "DeleteStreamingDistribution2017_10_30" +const opDeleteStreamingDistribution = "DeleteStreamingDistribution2018_06_18" // DeleteStreamingDistributionRequest generates a "aws/request.Request" representing the // client's request for the DeleteStreamingDistribution operation. The "output" return @@ -1663,12 +1676,12 @@ const opDeleteStreamingDistribution = "DeleteStreamingDistribution2017_10_30" // fmt.Println(resp) // } // -// See also, https://docs.aws.amazon.com/goto/WebAPI/cloudfront-2017-10-30/DeleteStreamingDistribution +// See also, https://docs.aws.amazon.com/goto/WebAPI/cloudfront-2018-06-18/DeleteStreamingDistribution func (c *CloudFront) DeleteStreamingDistributionRequest(input *DeleteStreamingDistributionInput) (req *request.Request, output *DeleteStreamingDistributionOutput) { op := &request.Operation{ Name: opDeleteStreamingDistribution, HTTPMethod: "DELETE", - HTTPPath: "/2017-10-30/streaming-distribution/{Id}", + HTTPPath: "/2018-06-18/streaming-distribution/{Id}", } if input == nil { @@ -1744,7 +1757,7 @@ func (c *CloudFront) DeleteStreamingDistributionRequest(input *DeleteStreamingDi // The precondition given in one or more of the request-header fields evaluated // to false. // -// See also, https://docs.aws.amazon.com/goto/WebAPI/cloudfront-2017-10-30/DeleteStreamingDistribution +// See also, https://docs.aws.amazon.com/goto/WebAPI/cloudfront-2018-06-18/DeleteStreamingDistribution func (c *CloudFront) DeleteStreamingDistribution(input *DeleteStreamingDistributionInput) (*DeleteStreamingDistributionOutput, error) { req, out := c.DeleteStreamingDistributionRequest(input) return out, req.Send() @@ -1766,7 +1779,7 @@ func (c *CloudFront) DeleteStreamingDistributionWithContext(ctx aws.Context, inp return out, req.Send() } -const opGetCloudFrontOriginAccessIdentity = "GetCloudFrontOriginAccessIdentity2017_10_30" +const opGetCloudFrontOriginAccessIdentity = "GetCloudFrontOriginAccessIdentity2018_06_18" // GetCloudFrontOriginAccessIdentityRequest generates a "aws/request.Request" representing the // client's request for the GetCloudFrontOriginAccessIdentity operation. The "output" return @@ -1791,12 +1804,12 @@ const opGetCloudFrontOriginAccessIdentity = "GetCloudFrontOriginAccessIdentity20 // fmt.Println(resp) // } // -// See also, https://docs.aws.amazon.com/goto/WebAPI/cloudfront-2017-10-30/GetCloudFrontOriginAccessIdentity +// See also, https://docs.aws.amazon.com/goto/WebAPI/cloudfront-2018-06-18/GetCloudFrontOriginAccessIdentity func (c *CloudFront) GetCloudFrontOriginAccessIdentityRequest(input *GetCloudFrontOriginAccessIdentityInput) (req *request.Request, output *GetCloudFrontOriginAccessIdentityOutput) { op := &request.Operation{ Name: opGetCloudFrontOriginAccessIdentity, HTTPMethod: "GET", - HTTPPath: "/2017-10-30/origin-access-identity/cloudfront/{Id}", + HTTPPath: "/2018-06-18/origin-access-identity/cloudfront/{Id}", } if input == nil { @@ -1826,7 +1839,7 @@ func (c *CloudFront) GetCloudFrontOriginAccessIdentityRequest(input *GetCloudFro // * ErrCodeAccessDenied "AccessDenied" // Access denied. // -// See also, https://docs.aws.amazon.com/goto/WebAPI/cloudfront-2017-10-30/GetCloudFrontOriginAccessIdentity +// See also, https://docs.aws.amazon.com/goto/WebAPI/cloudfront-2018-06-18/GetCloudFrontOriginAccessIdentity func (c *CloudFront) GetCloudFrontOriginAccessIdentity(input *GetCloudFrontOriginAccessIdentityInput) (*GetCloudFrontOriginAccessIdentityOutput, error) { req, out := c.GetCloudFrontOriginAccessIdentityRequest(input) return out, req.Send() @@ -1848,7 +1861,7 @@ func (c *CloudFront) GetCloudFrontOriginAccessIdentityWithContext(ctx aws.Contex return out, req.Send() } -const opGetCloudFrontOriginAccessIdentityConfig = "GetCloudFrontOriginAccessIdentityConfig2017_10_30" +const opGetCloudFrontOriginAccessIdentityConfig = "GetCloudFrontOriginAccessIdentityConfig2018_06_18" // GetCloudFrontOriginAccessIdentityConfigRequest generates a "aws/request.Request" representing the // client's request for the GetCloudFrontOriginAccessIdentityConfig operation. The "output" return @@ -1873,12 +1886,12 @@ const opGetCloudFrontOriginAccessIdentityConfig = "GetCloudFrontOriginAccessIden // fmt.Println(resp) // } // -// See also, https://docs.aws.amazon.com/goto/WebAPI/cloudfront-2017-10-30/GetCloudFrontOriginAccessIdentityConfig +// See also, https://docs.aws.amazon.com/goto/WebAPI/cloudfront-2018-06-18/GetCloudFrontOriginAccessIdentityConfig func (c *CloudFront) GetCloudFrontOriginAccessIdentityConfigRequest(input *GetCloudFrontOriginAccessIdentityConfigInput) (req *request.Request, output *GetCloudFrontOriginAccessIdentityConfigOutput) { op := &request.Operation{ Name: opGetCloudFrontOriginAccessIdentityConfig, HTTPMethod: "GET", - HTTPPath: "/2017-10-30/origin-access-identity/cloudfront/{Id}/config", + HTTPPath: "/2018-06-18/origin-access-identity/cloudfront/{Id}/config", } if input == nil { @@ -1908,7 +1921,7 @@ func (c *CloudFront) GetCloudFrontOriginAccessIdentityConfigRequest(input *GetCl // * ErrCodeAccessDenied "AccessDenied" // Access denied. // -// See also, https://docs.aws.amazon.com/goto/WebAPI/cloudfront-2017-10-30/GetCloudFrontOriginAccessIdentityConfig +// See also, https://docs.aws.amazon.com/goto/WebAPI/cloudfront-2018-06-18/GetCloudFrontOriginAccessIdentityConfig func (c *CloudFront) GetCloudFrontOriginAccessIdentityConfig(input *GetCloudFrontOriginAccessIdentityConfigInput) (*GetCloudFrontOriginAccessIdentityConfigOutput, error) { req, out := c.GetCloudFrontOriginAccessIdentityConfigRequest(input) return out, req.Send() @@ -1930,7 +1943,7 @@ func (c *CloudFront) GetCloudFrontOriginAccessIdentityConfigWithContext(ctx aws. return out, req.Send() } -const opGetDistribution = "GetDistribution2017_10_30" +const opGetDistribution = "GetDistribution2018_06_18" // GetDistributionRequest generates a "aws/request.Request" representing the // client's request for the GetDistribution operation. The "output" return @@ -1955,12 +1968,12 @@ const opGetDistribution = "GetDistribution2017_10_30" // fmt.Println(resp) // } // -// See also, https://docs.aws.amazon.com/goto/WebAPI/cloudfront-2017-10-30/GetDistribution +// See also, https://docs.aws.amazon.com/goto/WebAPI/cloudfront-2018-06-18/GetDistribution func (c *CloudFront) GetDistributionRequest(input *GetDistributionInput) (req *request.Request, output *GetDistributionOutput) { op := &request.Operation{ Name: opGetDistribution, HTTPMethod: "GET", - HTTPPath: "/2017-10-30/distribution/{Id}", + HTTPPath: "/2018-06-18/distribution/{Id}", } if input == nil { @@ -1990,7 +2003,7 @@ func (c *CloudFront) GetDistributionRequest(input *GetDistributionInput) (req *r // * ErrCodeAccessDenied "AccessDenied" // Access denied. // -// See also, https://docs.aws.amazon.com/goto/WebAPI/cloudfront-2017-10-30/GetDistribution +// See also, https://docs.aws.amazon.com/goto/WebAPI/cloudfront-2018-06-18/GetDistribution func (c *CloudFront) GetDistribution(input *GetDistributionInput) (*GetDistributionOutput, error) { req, out := c.GetDistributionRequest(input) return out, req.Send() @@ -2012,7 +2025,7 @@ func (c *CloudFront) GetDistributionWithContext(ctx aws.Context, input *GetDistr return out, req.Send() } -const opGetDistributionConfig = "GetDistributionConfig2017_10_30" +const opGetDistributionConfig = "GetDistributionConfig2018_06_18" // GetDistributionConfigRequest generates a "aws/request.Request" representing the // client's request for the GetDistributionConfig operation. The "output" return @@ -2037,12 +2050,12 @@ const opGetDistributionConfig = "GetDistributionConfig2017_10_30" // fmt.Println(resp) // } // -// See also, https://docs.aws.amazon.com/goto/WebAPI/cloudfront-2017-10-30/GetDistributionConfig +// See also, https://docs.aws.amazon.com/goto/WebAPI/cloudfront-2018-06-18/GetDistributionConfig func (c *CloudFront) GetDistributionConfigRequest(input *GetDistributionConfigInput) (req *request.Request, output *GetDistributionConfigOutput) { op := &request.Operation{ Name: opGetDistributionConfig, HTTPMethod: "GET", - HTTPPath: "/2017-10-30/distribution/{Id}/config", + HTTPPath: "/2018-06-18/distribution/{Id}/config", } if input == nil { @@ -2072,7 +2085,7 @@ func (c *CloudFront) GetDistributionConfigRequest(input *GetDistributionConfigIn // * ErrCodeAccessDenied "AccessDenied" // Access denied. // -// See also, https://docs.aws.amazon.com/goto/WebAPI/cloudfront-2017-10-30/GetDistributionConfig +// See also, https://docs.aws.amazon.com/goto/WebAPI/cloudfront-2018-06-18/GetDistributionConfig func (c *CloudFront) GetDistributionConfig(input *GetDistributionConfigInput) (*GetDistributionConfigOutput, error) { req, out := c.GetDistributionConfigRequest(input) return out, req.Send() @@ -2094,7 +2107,7 @@ func (c *CloudFront) GetDistributionConfigWithContext(ctx aws.Context, input *Ge return out, req.Send() } -const opGetFieldLevelEncryption = "GetFieldLevelEncryption2017_10_30" +const opGetFieldLevelEncryption = "GetFieldLevelEncryption2018_06_18" // GetFieldLevelEncryptionRequest generates a "aws/request.Request" representing the // client's request for the GetFieldLevelEncryption operation. The "output" return @@ -2119,12 +2132,12 @@ const opGetFieldLevelEncryption = "GetFieldLevelEncryption2017_10_30" // fmt.Println(resp) // } // -// See also, https://docs.aws.amazon.com/goto/WebAPI/cloudfront-2017-10-30/GetFieldLevelEncryption +// See also, https://docs.aws.amazon.com/goto/WebAPI/cloudfront-2018-06-18/GetFieldLevelEncryption func (c *CloudFront) GetFieldLevelEncryptionRequest(input *GetFieldLevelEncryptionInput) (req *request.Request, output *GetFieldLevelEncryptionOutput) { op := &request.Operation{ Name: opGetFieldLevelEncryption, HTTPMethod: "GET", - HTTPPath: "/2017-10-30/field-level-encryption/{Id}", + HTTPPath: "/2018-06-18/field-level-encryption/{Id}", } if input == nil { @@ -2154,7 +2167,7 @@ func (c *CloudFront) GetFieldLevelEncryptionRequest(input *GetFieldLevelEncrypti // * ErrCodeNoSuchFieldLevelEncryptionConfig "NoSuchFieldLevelEncryptionConfig" // The specified configuration for field-level encryption doesn't exist. // -// See also, https://docs.aws.amazon.com/goto/WebAPI/cloudfront-2017-10-30/GetFieldLevelEncryption +// See also, https://docs.aws.amazon.com/goto/WebAPI/cloudfront-2018-06-18/GetFieldLevelEncryption func (c *CloudFront) GetFieldLevelEncryption(input *GetFieldLevelEncryptionInput) (*GetFieldLevelEncryptionOutput, error) { req, out := c.GetFieldLevelEncryptionRequest(input) return out, req.Send() @@ -2176,7 +2189,7 @@ func (c *CloudFront) GetFieldLevelEncryptionWithContext(ctx aws.Context, input * return out, req.Send() } -const opGetFieldLevelEncryptionConfig = "GetFieldLevelEncryptionConfig2017_10_30" +const opGetFieldLevelEncryptionConfig = "GetFieldLevelEncryptionConfig2018_06_18" // GetFieldLevelEncryptionConfigRequest generates a "aws/request.Request" representing the // client's request for the GetFieldLevelEncryptionConfig operation. The "output" return @@ -2201,12 +2214,12 @@ const opGetFieldLevelEncryptionConfig = "GetFieldLevelEncryptionConfig2017_10_30 // fmt.Println(resp) // } // -// See also, https://docs.aws.amazon.com/goto/WebAPI/cloudfront-2017-10-30/GetFieldLevelEncryptionConfig +// See also, https://docs.aws.amazon.com/goto/WebAPI/cloudfront-2018-06-18/GetFieldLevelEncryptionConfig func (c *CloudFront) GetFieldLevelEncryptionConfigRequest(input *GetFieldLevelEncryptionConfigInput) (req *request.Request, output *GetFieldLevelEncryptionConfigOutput) { op := &request.Operation{ Name: opGetFieldLevelEncryptionConfig, HTTPMethod: "GET", - HTTPPath: "/2017-10-30/field-level-encryption/{Id}/config", + HTTPPath: "/2018-06-18/field-level-encryption/{Id}/config", } if input == nil { @@ -2236,7 +2249,7 @@ func (c *CloudFront) GetFieldLevelEncryptionConfigRequest(input *GetFieldLevelEn // * ErrCodeNoSuchFieldLevelEncryptionConfig "NoSuchFieldLevelEncryptionConfig" // The specified configuration for field-level encryption doesn't exist. // -// See also, https://docs.aws.amazon.com/goto/WebAPI/cloudfront-2017-10-30/GetFieldLevelEncryptionConfig +// See also, https://docs.aws.amazon.com/goto/WebAPI/cloudfront-2018-06-18/GetFieldLevelEncryptionConfig func (c *CloudFront) GetFieldLevelEncryptionConfig(input *GetFieldLevelEncryptionConfigInput) (*GetFieldLevelEncryptionConfigOutput, error) { req, out := c.GetFieldLevelEncryptionConfigRequest(input) return out, req.Send() @@ -2258,7 +2271,7 @@ func (c *CloudFront) GetFieldLevelEncryptionConfigWithContext(ctx aws.Context, i return out, req.Send() } -const opGetFieldLevelEncryptionProfile = "GetFieldLevelEncryptionProfile2017_10_30" +const opGetFieldLevelEncryptionProfile = "GetFieldLevelEncryptionProfile2018_06_18" // GetFieldLevelEncryptionProfileRequest generates a "aws/request.Request" representing the // client's request for the GetFieldLevelEncryptionProfile operation. The "output" return @@ -2283,12 +2296,12 @@ const opGetFieldLevelEncryptionProfile = "GetFieldLevelEncryptionProfile2017_10_ // fmt.Println(resp) // } // -// See also, https://docs.aws.amazon.com/goto/WebAPI/cloudfront-2017-10-30/GetFieldLevelEncryptionProfile +// See also, https://docs.aws.amazon.com/goto/WebAPI/cloudfront-2018-06-18/GetFieldLevelEncryptionProfile func (c *CloudFront) GetFieldLevelEncryptionProfileRequest(input *GetFieldLevelEncryptionProfileInput) (req *request.Request, output *GetFieldLevelEncryptionProfileOutput) { op := &request.Operation{ Name: opGetFieldLevelEncryptionProfile, HTTPMethod: "GET", - HTTPPath: "/2017-10-30/field-level-encryption-profile/{Id}", + HTTPPath: "/2018-06-18/field-level-encryption-profile/{Id}", } if input == nil { @@ -2318,7 +2331,7 @@ func (c *CloudFront) GetFieldLevelEncryptionProfileRequest(input *GetFieldLevelE // * ErrCodeNoSuchFieldLevelEncryptionProfile "NoSuchFieldLevelEncryptionProfile" // The specified profile for field-level encryption doesn't exist. // -// See also, https://docs.aws.amazon.com/goto/WebAPI/cloudfront-2017-10-30/GetFieldLevelEncryptionProfile +// See also, https://docs.aws.amazon.com/goto/WebAPI/cloudfront-2018-06-18/GetFieldLevelEncryptionProfile func (c *CloudFront) GetFieldLevelEncryptionProfile(input *GetFieldLevelEncryptionProfileInput) (*GetFieldLevelEncryptionProfileOutput, error) { req, out := c.GetFieldLevelEncryptionProfileRequest(input) return out, req.Send() @@ -2340,7 +2353,7 @@ func (c *CloudFront) GetFieldLevelEncryptionProfileWithContext(ctx aws.Context, return out, req.Send() } -const opGetFieldLevelEncryptionProfileConfig = "GetFieldLevelEncryptionProfileConfig2017_10_30" +const opGetFieldLevelEncryptionProfileConfig = "GetFieldLevelEncryptionProfileConfig2018_06_18" // GetFieldLevelEncryptionProfileConfigRequest generates a "aws/request.Request" representing the // client's request for the GetFieldLevelEncryptionProfileConfig operation. The "output" return @@ -2365,12 +2378,12 @@ const opGetFieldLevelEncryptionProfileConfig = "GetFieldLevelEncryptionProfileCo // fmt.Println(resp) // } // -// See also, https://docs.aws.amazon.com/goto/WebAPI/cloudfront-2017-10-30/GetFieldLevelEncryptionProfileConfig +// See also, https://docs.aws.amazon.com/goto/WebAPI/cloudfront-2018-06-18/GetFieldLevelEncryptionProfileConfig func (c *CloudFront) GetFieldLevelEncryptionProfileConfigRequest(input *GetFieldLevelEncryptionProfileConfigInput) (req *request.Request, output *GetFieldLevelEncryptionProfileConfigOutput) { op := &request.Operation{ Name: opGetFieldLevelEncryptionProfileConfig, HTTPMethod: "GET", - HTTPPath: "/2017-10-30/field-level-encryption-profile/{Id}/config", + HTTPPath: "/2018-06-18/field-level-encryption-profile/{Id}/config", } if input == nil { @@ -2400,7 +2413,7 @@ func (c *CloudFront) GetFieldLevelEncryptionProfileConfigRequest(input *GetField // * ErrCodeNoSuchFieldLevelEncryptionProfile "NoSuchFieldLevelEncryptionProfile" // The specified profile for field-level encryption doesn't exist. // -// See also, https://docs.aws.amazon.com/goto/WebAPI/cloudfront-2017-10-30/GetFieldLevelEncryptionProfileConfig +// See also, https://docs.aws.amazon.com/goto/WebAPI/cloudfront-2018-06-18/GetFieldLevelEncryptionProfileConfig func (c *CloudFront) GetFieldLevelEncryptionProfileConfig(input *GetFieldLevelEncryptionProfileConfigInput) (*GetFieldLevelEncryptionProfileConfigOutput, error) { req, out := c.GetFieldLevelEncryptionProfileConfigRequest(input) return out, req.Send() @@ -2422,7 +2435,7 @@ func (c *CloudFront) GetFieldLevelEncryptionProfileConfigWithContext(ctx aws.Con return out, req.Send() } -const opGetInvalidation = "GetInvalidation2017_10_30" +const opGetInvalidation = "GetInvalidation2018_06_18" // GetInvalidationRequest generates a "aws/request.Request" representing the // client's request for the GetInvalidation operation. The "output" return @@ -2447,12 +2460,12 @@ const opGetInvalidation = "GetInvalidation2017_10_30" // fmt.Println(resp) // } // -// See also, https://docs.aws.amazon.com/goto/WebAPI/cloudfront-2017-10-30/GetInvalidation +// See also, https://docs.aws.amazon.com/goto/WebAPI/cloudfront-2018-06-18/GetInvalidation func (c *CloudFront) GetInvalidationRequest(input *GetInvalidationInput) (req *request.Request, output *GetInvalidationOutput) { op := &request.Operation{ Name: opGetInvalidation, HTTPMethod: "GET", - HTTPPath: "/2017-10-30/distribution/{DistributionId}/invalidation/{Id}", + HTTPPath: "/2018-06-18/distribution/{DistributionId}/invalidation/{Id}", } if input == nil { @@ -2485,7 +2498,7 @@ func (c *CloudFront) GetInvalidationRequest(input *GetInvalidationInput) (req *r // * ErrCodeAccessDenied "AccessDenied" // Access denied. // -// See also, https://docs.aws.amazon.com/goto/WebAPI/cloudfront-2017-10-30/GetInvalidation +// See also, https://docs.aws.amazon.com/goto/WebAPI/cloudfront-2018-06-18/GetInvalidation func (c *CloudFront) GetInvalidation(input *GetInvalidationInput) (*GetInvalidationOutput, error) { req, out := c.GetInvalidationRequest(input) return out, req.Send() @@ -2507,7 +2520,7 @@ func (c *CloudFront) GetInvalidationWithContext(ctx aws.Context, input *GetInval return out, req.Send() } -const opGetPublicKey = "GetPublicKey2017_10_30" +const opGetPublicKey = "GetPublicKey2018_06_18" // GetPublicKeyRequest generates a "aws/request.Request" representing the // client's request for the GetPublicKey operation. The "output" return @@ -2532,12 +2545,12 @@ const opGetPublicKey = "GetPublicKey2017_10_30" // fmt.Println(resp) // } // -// See also, https://docs.aws.amazon.com/goto/WebAPI/cloudfront-2017-10-30/GetPublicKey +// See also, https://docs.aws.amazon.com/goto/WebAPI/cloudfront-2018-06-18/GetPublicKey func (c *CloudFront) GetPublicKeyRequest(input *GetPublicKeyInput) (req *request.Request, output *GetPublicKeyOutput) { op := &request.Operation{ Name: opGetPublicKey, HTTPMethod: "GET", - HTTPPath: "/2017-10-30/public-key/{Id}", + HTTPPath: "/2018-06-18/public-key/{Id}", } if input == nil { @@ -2567,7 +2580,7 @@ func (c *CloudFront) GetPublicKeyRequest(input *GetPublicKeyInput) (req *request // * ErrCodeNoSuchPublicKey "NoSuchPublicKey" // The specified public key doesn't exist. // -// See also, https://docs.aws.amazon.com/goto/WebAPI/cloudfront-2017-10-30/GetPublicKey +// See also, https://docs.aws.amazon.com/goto/WebAPI/cloudfront-2018-06-18/GetPublicKey func (c *CloudFront) GetPublicKey(input *GetPublicKeyInput) (*GetPublicKeyOutput, error) { req, out := c.GetPublicKeyRequest(input) return out, req.Send() @@ -2589,7 +2602,7 @@ func (c *CloudFront) GetPublicKeyWithContext(ctx aws.Context, input *GetPublicKe return out, req.Send() } -const opGetPublicKeyConfig = "GetPublicKeyConfig2017_10_30" +const opGetPublicKeyConfig = "GetPublicKeyConfig2018_06_18" // GetPublicKeyConfigRequest generates a "aws/request.Request" representing the // client's request for the GetPublicKeyConfig operation. The "output" return @@ -2614,12 +2627,12 @@ const opGetPublicKeyConfig = "GetPublicKeyConfig2017_10_30" // fmt.Println(resp) // } // -// See also, https://docs.aws.amazon.com/goto/WebAPI/cloudfront-2017-10-30/GetPublicKeyConfig +// See also, https://docs.aws.amazon.com/goto/WebAPI/cloudfront-2018-06-18/GetPublicKeyConfig func (c *CloudFront) GetPublicKeyConfigRequest(input *GetPublicKeyConfigInput) (req *request.Request, output *GetPublicKeyConfigOutput) { op := &request.Operation{ Name: opGetPublicKeyConfig, HTTPMethod: "GET", - HTTPPath: "/2017-10-30/public-key/{Id}/config", + HTTPPath: "/2018-06-18/public-key/{Id}/config", } if input == nil { @@ -2649,7 +2662,7 @@ func (c *CloudFront) GetPublicKeyConfigRequest(input *GetPublicKeyConfigInput) ( // * ErrCodeNoSuchPublicKey "NoSuchPublicKey" // The specified public key doesn't exist. // -// See also, https://docs.aws.amazon.com/goto/WebAPI/cloudfront-2017-10-30/GetPublicKeyConfig +// See also, https://docs.aws.amazon.com/goto/WebAPI/cloudfront-2018-06-18/GetPublicKeyConfig func (c *CloudFront) GetPublicKeyConfig(input *GetPublicKeyConfigInput) (*GetPublicKeyConfigOutput, error) { req, out := c.GetPublicKeyConfigRequest(input) return out, req.Send() @@ -2671,7 +2684,7 @@ func (c *CloudFront) GetPublicKeyConfigWithContext(ctx aws.Context, input *GetPu return out, req.Send() } -const opGetStreamingDistribution = "GetStreamingDistribution2017_10_30" +const opGetStreamingDistribution = "GetStreamingDistribution2018_06_18" // GetStreamingDistributionRequest generates a "aws/request.Request" representing the // client's request for the GetStreamingDistribution operation. The "output" return @@ -2696,12 +2709,12 @@ const opGetStreamingDistribution = "GetStreamingDistribution2017_10_30" // fmt.Println(resp) // } // -// See also, https://docs.aws.amazon.com/goto/WebAPI/cloudfront-2017-10-30/GetStreamingDistribution +// See also, https://docs.aws.amazon.com/goto/WebAPI/cloudfront-2018-06-18/GetStreamingDistribution func (c *CloudFront) GetStreamingDistributionRequest(input *GetStreamingDistributionInput) (req *request.Request, output *GetStreamingDistributionOutput) { op := &request.Operation{ Name: opGetStreamingDistribution, HTTPMethod: "GET", - HTTPPath: "/2017-10-30/streaming-distribution/{Id}", + HTTPPath: "/2018-06-18/streaming-distribution/{Id}", } if input == nil { @@ -2732,7 +2745,7 @@ func (c *CloudFront) GetStreamingDistributionRequest(input *GetStreamingDistribu // * ErrCodeAccessDenied "AccessDenied" // Access denied. // -// See also, https://docs.aws.amazon.com/goto/WebAPI/cloudfront-2017-10-30/GetStreamingDistribution +// See also, https://docs.aws.amazon.com/goto/WebAPI/cloudfront-2018-06-18/GetStreamingDistribution func (c *CloudFront) GetStreamingDistribution(input *GetStreamingDistributionInput) (*GetStreamingDistributionOutput, error) { req, out := c.GetStreamingDistributionRequest(input) return out, req.Send() @@ -2754,7 +2767,7 @@ func (c *CloudFront) GetStreamingDistributionWithContext(ctx aws.Context, input return out, req.Send() } -const opGetStreamingDistributionConfig = "GetStreamingDistributionConfig2017_10_30" +const opGetStreamingDistributionConfig = "GetStreamingDistributionConfig2018_06_18" // GetStreamingDistributionConfigRequest generates a "aws/request.Request" representing the // client's request for the GetStreamingDistributionConfig operation. The "output" return @@ -2779,12 +2792,12 @@ const opGetStreamingDistributionConfig = "GetStreamingDistributionConfig2017_10_ // fmt.Println(resp) // } // -// See also, https://docs.aws.amazon.com/goto/WebAPI/cloudfront-2017-10-30/GetStreamingDistributionConfig +// See also, https://docs.aws.amazon.com/goto/WebAPI/cloudfront-2018-06-18/GetStreamingDistributionConfig func (c *CloudFront) GetStreamingDistributionConfigRequest(input *GetStreamingDistributionConfigInput) (req *request.Request, output *GetStreamingDistributionConfigOutput) { op := &request.Operation{ Name: opGetStreamingDistributionConfig, HTTPMethod: "GET", - HTTPPath: "/2017-10-30/streaming-distribution/{Id}/config", + HTTPPath: "/2018-06-18/streaming-distribution/{Id}/config", } if input == nil { @@ -2814,7 +2827,7 @@ func (c *CloudFront) GetStreamingDistributionConfigRequest(input *GetStreamingDi // * ErrCodeAccessDenied "AccessDenied" // Access denied. // -// See also, https://docs.aws.amazon.com/goto/WebAPI/cloudfront-2017-10-30/GetStreamingDistributionConfig +// See also, https://docs.aws.amazon.com/goto/WebAPI/cloudfront-2018-06-18/GetStreamingDistributionConfig func (c *CloudFront) GetStreamingDistributionConfig(input *GetStreamingDistributionConfigInput) (*GetStreamingDistributionConfigOutput, error) { req, out := c.GetStreamingDistributionConfigRequest(input) return out, req.Send() @@ -2836,7 +2849,7 @@ func (c *CloudFront) GetStreamingDistributionConfigWithContext(ctx aws.Context, return out, req.Send() } -const opListCloudFrontOriginAccessIdentities = "ListCloudFrontOriginAccessIdentities2017_10_30" +const opListCloudFrontOriginAccessIdentities = "ListCloudFrontOriginAccessIdentities2018_06_18" // ListCloudFrontOriginAccessIdentitiesRequest generates a "aws/request.Request" representing the // client's request for the ListCloudFrontOriginAccessIdentities operation. The "output" return @@ -2861,12 +2874,12 @@ const opListCloudFrontOriginAccessIdentities = "ListCloudFrontOriginAccessIdenti // fmt.Println(resp) // } // -// See also, https://docs.aws.amazon.com/goto/WebAPI/cloudfront-2017-10-30/ListCloudFrontOriginAccessIdentities +// See also, https://docs.aws.amazon.com/goto/WebAPI/cloudfront-2018-06-18/ListCloudFrontOriginAccessIdentities func (c *CloudFront) ListCloudFrontOriginAccessIdentitiesRequest(input *ListCloudFrontOriginAccessIdentitiesInput) (req *request.Request, output *ListCloudFrontOriginAccessIdentitiesOutput) { op := &request.Operation{ Name: opListCloudFrontOriginAccessIdentities, HTTPMethod: "GET", - HTTPPath: "/2017-10-30/origin-access-identity/cloudfront", + HTTPPath: "/2018-06-18/origin-access-identity/cloudfront", Paginator: &request.Paginator{ InputTokens: []string{"Marker"}, OutputTokens: []string{"CloudFrontOriginAccessIdentityList.NextMarker"}, @@ -2899,7 +2912,7 @@ func (c *CloudFront) ListCloudFrontOriginAccessIdentitiesRequest(input *ListClou // * ErrCodeInvalidArgument "InvalidArgument" // The argument is invalid. // -// See also, https://docs.aws.amazon.com/goto/WebAPI/cloudfront-2017-10-30/ListCloudFrontOriginAccessIdentities +// See also, https://docs.aws.amazon.com/goto/WebAPI/cloudfront-2018-06-18/ListCloudFrontOriginAccessIdentities func (c *CloudFront) ListCloudFrontOriginAccessIdentities(input *ListCloudFrontOriginAccessIdentitiesInput) (*ListCloudFrontOriginAccessIdentitiesOutput, error) { req, out := c.ListCloudFrontOriginAccessIdentitiesRequest(input) return out, req.Send() @@ -2971,7 +2984,7 @@ func (c *CloudFront) ListCloudFrontOriginAccessIdentitiesPagesWithContext(ctx aw return p.Err() } -const opListDistributions = "ListDistributions2017_10_30" +const opListDistributions = "ListDistributions2018_06_18" // ListDistributionsRequest generates a "aws/request.Request" representing the // client's request for the ListDistributions operation. The "output" return @@ -2996,12 +3009,12 @@ const opListDistributions = "ListDistributions2017_10_30" // fmt.Println(resp) // } // -// See also, https://docs.aws.amazon.com/goto/WebAPI/cloudfront-2017-10-30/ListDistributions +// See also, https://docs.aws.amazon.com/goto/WebAPI/cloudfront-2018-06-18/ListDistributions func (c *CloudFront) ListDistributionsRequest(input *ListDistributionsInput) (req *request.Request, output *ListDistributionsOutput) { op := &request.Operation{ Name: opListDistributions, HTTPMethod: "GET", - HTTPPath: "/2017-10-30/distribution", + HTTPPath: "/2018-06-18/distribution", Paginator: &request.Paginator{ InputTokens: []string{"Marker"}, OutputTokens: []string{"DistributionList.NextMarker"}, @@ -3034,7 +3047,7 @@ func (c *CloudFront) ListDistributionsRequest(input *ListDistributionsInput) (re // * ErrCodeInvalidArgument "InvalidArgument" // The argument is invalid. // -// See also, https://docs.aws.amazon.com/goto/WebAPI/cloudfront-2017-10-30/ListDistributions +// See also, https://docs.aws.amazon.com/goto/WebAPI/cloudfront-2018-06-18/ListDistributions func (c *CloudFront) ListDistributions(input *ListDistributionsInput) (*ListDistributionsOutput, error) { req, out := c.ListDistributionsRequest(input) return out, req.Send() @@ -3106,7 +3119,7 @@ func (c *CloudFront) ListDistributionsPagesWithContext(ctx aws.Context, input *L return p.Err() } -const opListDistributionsByWebACLId = "ListDistributionsByWebACLId2017_10_30" +const opListDistributionsByWebACLId = "ListDistributionsByWebACLId2018_06_18" // ListDistributionsByWebACLIdRequest generates a "aws/request.Request" representing the // client's request for the ListDistributionsByWebACLId operation. The "output" return @@ -3131,12 +3144,12 @@ const opListDistributionsByWebACLId = "ListDistributionsByWebACLId2017_10_30" // fmt.Println(resp) // } // -// See also, https://docs.aws.amazon.com/goto/WebAPI/cloudfront-2017-10-30/ListDistributionsByWebACLId +// See also, https://docs.aws.amazon.com/goto/WebAPI/cloudfront-2018-06-18/ListDistributionsByWebACLId func (c *CloudFront) ListDistributionsByWebACLIdRequest(input *ListDistributionsByWebACLIdInput) (req *request.Request, output *ListDistributionsByWebACLIdOutput) { op := &request.Operation{ Name: opListDistributionsByWebACLId, HTTPMethod: "GET", - HTTPPath: "/2017-10-30/distributionsByWebACLId/{WebACLId}", + HTTPPath: "/2018-06-18/distributionsByWebACLId/{WebACLId}", } if input == nil { @@ -3165,7 +3178,7 @@ func (c *CloudFront) ListDistributionsByWebACLIdRequest(input *ListDistributions // // * ErrCodeInvalidWebACLId "InvalidWebACLId" // -// See also, https://docs.aws.amazon.com/goto/WebAPI/cloudfront-2017-10-30/ListDistributionsByWebACLId +// See also, https://docs.aws.amazon.com/goto/WebAPI/cloudfront-2018-06-18/ListDistributionsByWebACLId func (c *CloudFront) ListDistributionsByWebACLId(input *ListDistributionsByWebACLIdInput) (*ListDistributionsByWebACLIdOutput, error) { req, out := c.ListDistributionsByWebACLIdRequest(input) return out, req.Send() @@ -3187,7 +3200,7 @@ func (c *CloudFront) ListDistributionsByWebACLIdWithContext(ctx aws.Context, inp return out, req.Send() } -const opListFieldLevelEncryptionConfigs = "ListFieldLevelEncryptionConfigs2017_10_30" +const opListFieldLevelEncryptionConfigs = "ListFieldLevelEncryptionConfigs2018_06_18" // ListFieldLevelEncryptionConfigsRequest generates a "aws/request.Request" representing the // client's request for the ListFieldLevelEncryptionConfigs operation. The "output" return @@ -3212,12 +3225,12 @@ const opListFieldLevelEncryptionConfigs = "ListFieldLevelEncryptionConfigs2017_1 // fmt.Println(resp) // } // -// See also, https://docs.aws.amazon.com/goto/WebAPI/cloudfront-2017-10-30/ListFieldLevelEncryptionConfigs +// See also, https://docs.aws.amazon.com/goto/WebAPI/cloudfront-2018-06-18/ListFieldLevelEncryptionConfigs func (c *CloudFront) ListFieldLevelEncryptionConfigsRequest(input *ListFieldLevelEncryptionConfigsInput) (req *request.Request, output *ListFieldLevelEncryptionConfigsOutput) { op := &request.Operation{ Name: opListFieldLevelEncryptionConfigs, HTTPMethod: "GET", - HTTPPath: "/2017-10-30/field-level-encryption", + HTTPPath: "/2018-06-18/field-level-encryption", } if input == nil { @@ -3245,7 +3258,7 @@ func (c *CloudFront) ListFieldLevelEncryptionConfigsRequest(input *ListFieldLeve // * ErrCodeInvalidArgument "InvalidArgument" // The argument is invalid. // -// See also, https://docs.aws.amazon.com/goto/WebAPI/cloudfront-2017-10-30/ListFieldLevelEncryptionConfigs +// See also, https://docs.aws.amazon.com/goto/WebAPI/cloudfront-2018-06-18/ListFieldLevelEncryptionConfigs func (c *CloudFront) ListFieldLevelEncryptionConfigs(input *ListFieldLevelEncryptionConfigsInput) (*ListFieldLevelEncryptionConfigsOutput, error) { req, out := c.ListFieldLevelEncryptionConfigsRequest(input) return out, req.Send() @@ -3267,7 +3280,7 @@ func (c *CloudFront) ListFieldLevelEncryptionConfigsWithContext(ctx aws.Context, return out, req.Send() } -const opListFieldLevelEncryptionProfiles = "ListFieldLevelEncryptionProfiles2017_10_30" +const opListFieldLevelEncryptionProfiles = "ListFieldLevelEncryptionProfiles2018_06_18" // ListFieldLevelEncryptionProfilesRequest generates a "aws/request.Request" representing the // client's request for the ListFieldLevelEncryptionProfiles operation. The "output" return @@ -3292,12 +3305,12 @@ const opListFieldLevelEncryptionProfiles = "ListFieldLevelEncryptionProfiles2017 // fmt.Println(resp) // } // -// See also, https://docs.aws.amazon.com/goto/WebAPI/cloudfront-2017-10-30/ListFieldLevelEncryptionProfiles +// See also, https://docs.aws.amazon.com/goto/WebAPI/cloudfront-2018-06-18/ListFieldLevelEncryptionProfiles func (c *CloudFront) ListFieldLevelEncryptionProfilesRequest(input *ListFieldLevelEncryptionProfilesInput) (req *request.Request, output *ListFieldLevelEncryptionProfilesOutput) { op := &request.Operation{ Name: opListFieldLevelEncryptionProfiles, HTTPMethod: "GET", - HTTPPath: "/2017-10-30/field-level-encryption-profile", + HTTPPath: "/2018-06-18/field-level-encryption-profile", } if input == nil { @@ -3325,7 +3338,7 @@ func (c *CloudFront) ListFieldLevelEncryptionProfilesRequest(input *ListFieldLev // * ErrCodeInvalidArgument "InvalidArgument" // The argument is invalid. // -// See also, https://docs.aws.amazon.com/goto/WebAPI/cloudfront-2017-10-30/ListFieldLevelEncryptionProfiles +// See also, https://docs.aws.amazon.com/goto/WebAPI/cloudfront-2018-06-18/ListFieldLevelEncryptionProfiles func (c *CloudFront) ListFieldLevelEncryptionProfiles(input *ListFieldLevelEncryptionProfilesInput) (*ListFieldLevelEncryptionProfilesOutput, error) { req, out := c.ListFieldLevelEncryptionProfilesRequest(input) return out, req.Send() @@ -3347,7 +3360,7 @@ func (c *CloudFront) ListFieldLevelEncryptionProfilesWithContext(ctx aws.Context return out, req.Send() } -const opListInvalidations = "ListInvalidations2017_10_30" +const opListInvalidations = "ListInvalidations2018_06_18" // ListInvalidationsRequest generates a "aws/request.Request" representing the // client's request for the ListInvalidations operation. The "output" return @@ -3372,12 +3385,12 @@ const opListInvalidations = "ListInvalidations2017_10_30" // fmt.Println(resp) // } // -// See also, https://docs.aws.amazon.com/goto/WebAPI/cloudfront-2017-10-30/ListInvalidations +// See also, https://docs.aws.amazon.com/goto/WebAPI/cloudfront-2018-06-18/ListInvalidations func (c *CloudFront) ListInvalidationsRequest(input *ListInvalidationsInput) (req *request.Request, output *ListInvalidationsOutput) { op := &request.Operation{ Name: opListInvalidations, HTTPMethod: "GET", - HTTPPath: "/2017-10-30/distribution/{DistributionId}/invalidation", + HTTPPath: "/2018-06-18/distribution/{DistributionId}/invalidation", Paginator: &request.Paginator{ InputTokens: []string{"Marker"}, OutputTokens: []string{"InvalidationList.NextMarker"}, @@ -3416,7 +3429,7 @@ func (c *CloudFront) ListInvalidationsRequest(input *ListInvalidationsInput) (re // * ErrCodeAccessDenied "AccessDenied" // Access denied. // -// See also, https://docs.aws.amazon.com/goto/WebAPI/cloudfront-2017-10-30/ListInvalidations +// See also, https://docs.aws.amazon.com/goto/WebAPI/cloudfront-2018-06-18/ListInvalidations func (c *CloudFront) ListInvalidations(input *ListInvalidationsInput) (*ListInvalidationsOutput, error) { req, out := c.ListInvalidationsRequest(input) return out, req.Send() @@ -3488,7 +3501,7 @@ func (c *CloudFront) ListInvalidationsPagesWithContext(ctx aws.Context, input *L return p.Err() } -const opListPublicKeys = "ListPublicKeys2017_10_30" +const opListPublicKeys = "ListPublicKeys2018_06_18" // ListPublicKeysRequest generates a "aws/request.Request" representing the // client's request for the ListPublicKeys operation. The "output" return @@ -3513,12 +3526,12 @@ const opListPublicKeys = "ListPublicKeys2017_10_30" // fmt.Println(resp) // } // -// See also, https://docs.aws.amazon.com/goto/WebAPI/cloudfront-2017-10-30/ListPublicKeys +// See also, https://docs.aws.amazon.com/goto/WebAPI/cloudfront-2018-06-18/ListPublicKeys func (c *CloudFront) ListPublicKeysRequest(input *ListPublicKeysInput) (req *request.Request, output *ListPublicKeysOutput) { op := &request.Operation{ Name: opListPublicKeys, HTTPMethod: "GET", - HTTPPath: "/2017-10-30/public-key", + HTTPPath: "/2018-06-18/public-key", } if input == nil { @@ -3545,7 +3558,7 @@ func (c *CloudFront) ListPublicKeysRequest(input *ListPublicKeysInput) (req *req // * ErrCodeInvalidArgument "InvalidArgument" // The argument is invalid. // -// See also, https://docs.aws.amazon.com/goto/WebAPI/cloudfront-2017-10-30/ListPublicKeys +// See also, https://docs.aws.amazon.com/goto/WebAPI/cloudfront-2018-06-18/ListPublicKeys func (c *CloudFront) ListPublicKeys(input *ListPublicKeysInput) (*ListPublicKeysOutput, error) { req, out := c.ListPublicKeysRequest(input) return out, req.Send() @@ -3567,7 +3580,7 @@ func (c *CloudFront) ListPublicKeysWithContext(ctx aws.Context, input *ListPubli return out, req.Send() } -const opListStreamingDistributions = "ListStreamingDistributions2017_10_30" +const opListStreamingDistributions = "ListStreamingDistributions2018_06_18" // ListStreamingDistributionsRequest generates a "aws/request.Request" representing the // client's request for the ListStreamingDistributions operation. The "output" return @@ -3592,12 +3605,12 @@ const opListStreamingDistributions = "ListStreamingDistributions2017_10_30" // fmt.Println(resp) // } // -// See also, https://docs.aws.amazon.com/goto/WebAPI/cloudfront-2017-10-30/ListStreamingDistributions +// See also, https://docs.aws.amazon.com/goto/WebAPI/cloudfront-2018-06-18/ListStreamingDistributions func (c *CloudFront) ListStreamingDistributionsRequest(input *ListStreamingDistributionsInput) (req *request.Request, output *ListStreamingDistributionsOutput) { op := &request.Operation{ Name: opListStreamingDistributions, HTTPMethod: "GET", - HTTPPath: "/2017-10-30/streaming-distribution", + HTTPPath: "/2018-06-18/streaming-distribution", Paginator: &request.Paginator{ InputTokens: []string{"Marker"}, OutputTokens: []string{"StreamingDistributionList.NextMarker"}, @@ -3630,7 +3643,7 @@ func (c *CloudFront) ListStreamingDistributionsRequest(input *ListStreamingDistr // * ErrCodeInvalidArgument "InvalidArgument" // The argument is invalid. // -// See also, https://docs.aws.amazon.com/goto/WebAPI/cloudfront-2017-10-30/ListStreamingDistributions +// See also, https://docs.aws.amazon.com/goto/WebAPI/cloudfront-2018-06-18/ListStreamingDistributions func (c *CloudFront) ListStreamingDistributions(input *ListStreamingDistributionsInput) (*ListStreamingDistributionsOutput, error) { req, out := c.ListStreamingDistributionsRequest(input) return out, req.Send() @@ -3702,7 +3715,7 @@ func (c *CloudFront) ListStreamingDistributionsPagesWithContext(ctx aws.Context, return p.Err() } -const opListTagsForResource = "ListTagsForResource2017_10_30" +const opListTagsForResource = "ListTagsForResource2018_06_18" // ListTagsForResourceRequest generates a "aws/request.Request" representing the // client's request for the ListTagsForResource operation. The "output" return @@ -3727,12 +3740,12 @@ const opListTagsForResource = "ListTagsForResource2017_10_30" // fmt.Println(resp) // } // -// See also, https://docs.aws.amazon.com/goto/WebAPI/cloudfront-2017-10-30/ListTagsForResource +// See also, https://docs.aws.amazon.com/goto/WebAPI/cloudfront-2018-06-18/ListTagsForResource func (c *CloudFront) ListTagsForResourceRequest(input *ListTagsForResourceInput) (req *request.Request, output *ListTagsForResourceOutput) { op := &request.Operation{ Name: opListTagsForResource, HTTPMethod: "GET", - HTTPPath: "/2017-10-30/tagging", + HTTPPath: "/2018-06-18/tagging", } if input == nil { @@ -3766,7 +3779,7 @@ func (c *CloudFront) ListTagsForResourceRequest(input *ListTagsForResourceInput) // // * ErrCodeNoSuchResource "NoSuchResource" // -// See also, https://docs.aws.amazon.com/goto/WebAPI/cloudfront-2017-10-30/ListTagsForResource +// See also, https://docs.aws.amazon.com/goto/WebAPI/cloudfront-2018-06-18/ListTagsForResource func (c *CloudFront) ListTagsForResource(input *ListTagsForResourceInput) (*ListTagsForResourceOutput, error) { req, out := c.ListTagsForResourceRequest(input) return out, req.Send() @@ -3788,7 +3801,7 @@ func (c *CloudFront) ListTagsForResourceWithContext(ctx aws.Context, input *List return out, req.Send() } -const opTagResource = "TagResource2017_10_30" +const opTagResource = "TagResource2018_06_18" // TagResourceRequest generates a "aws/request.Request" representing the // client's request for the TagResource operation. The "output" return @@ -3813,12 +3826,12 @@ const opTagResource = "TagResource2017_10_30" // fmt.Println(resp) // } // -// See also, https://docs.aws.amazon.com/goto/WebAPI/cloudfront-2017-10-30/TagResource +// See also, https://docs.aws.amazon.com/goto/WebAPI/cloudfront-2018-06-18/TagResource func (c *CloudFront) TagResourceRequest(input *TagResourceInput) (req *request.Request, output *TagResourceOutput) { op := &request.Operation{ Name: opTagResource, HTTPMethod: "POST", - HTTPPath: "/2017-10-30/tagging?Operation=Tag", + HTTPPath: "/2018-06-18/tagging?Operation=Tag", } if input == nil { @@ -3854,7 +3867,7 @@ func (c *CloudFront) TagResourceRequest(input *TagResourceInput) (req *request.R // // * ErrCodeNoSuchResource "NoSuchResource" // -// See also, https://docs.aws.amazon.com/goto/WebAPI/cloudfront-2017-10-30/TagResource +// See also, https://docs.aws.amazon.com/goto/WebAPI/cloudfront-2018-06-18/TagResource func (c *CloudFront) TagResource(input *TagResourceInput) (*TagResourceOutput, error) { req, out := c.TagResourceRequest(input) return out, req.Send() @@ -3876,7 +3889,7 @@ func (c *CloudFront) TagResourceWithContext(ctx aws.Context, input *TagResourceI return out, req.Send() } -const opUntagResource = "UntagResource2017_10_30" +const opUntagResource = "UntagResource2018_06_18" // UntagResourceRequest generates a "aws/request.Request" representing the // client's request for the UntagResource operation. The "output" return @@ -3901,12 +3914,12 @@ const opUntagResource = "UntagResource2017_10_30" // fmt.Println(resp) // } // -// See also, https://docs.aws.amazon.com/goto/WebAPI/cloudfront-2017-10-30/UntagResource +// See also, https://docs.aws.amazon.com/goto/WebAPI/cloudfront-2018-06-18/UntagResource func (c *CloudFront) UntagResourceRequest(input *UntagResourceInput) (req *request.Request, output *UntagResourceOutput) { op := &request.Operation{ Name: opUntagResource, HTTPMethod: "POST", - HTTPPath: "/2017-10-30/tagging?Operation=Untag", + HTTPPath: "/2018-06-18/tagging?Operation=Untag", } if input == nil { @@ -3942,7 +3955,7 @@ func (c *CloudFront) UntagResourceRequest(input *UntagResourceInput) (req *reque // // * ErrCodeNoSuchResource "NoSuchResource" // -// See also, https://docs.aws.amazon.com/goto/WebAPI/cloudfront-2017-10-30/UntagResource +// See also, https://docs.aws.amazon.com/goto/WebAPI/cloudfront-2018-06-18/UntagResource func (c *CloudFront) UntagResource(input *UntagResourceInput) (*UntagResourceOutput, error) { req, out := c.UntagResourceRequest(input) return out, req.Send() @@ -3964,7 +3977,7 @@ func (c *CloudFront) UntagResourceWithContext(ctx aws.Context, input *UntagResou return out, req.Send() } -const opUpdateCloudFrontOriginAccessIdentity = "UpdateCloudFrontOriginAccessIdentity2017_10_30" +const opUpdateCloudFrontOriginAccessIdentity = "UpdateCloudFrontOriginAccessIdentity2018_06_18" // UpdateCloudFrontOriginAccessIdentityRequest generates a "aws/request.Request" representing the // client's request for the UpdateCloudFrontOriginAccessIdentity operation. The "output" return @@ -3989,12 +4002,12 @@ const opUpdateCloudFrontOriginAccessIdentity = "UpdateCloudFrontOriginAccessIden // fmt.Println(resp) // } // -// See also, https://docs.aws.amazon.com/goto/WebAPI/cloudfront-2017-10-30/UpdateCloudFrontOriginAccessIdentity +// See also, https://docs.aws.amazon.com/goto/WebAPI/cloudfront-2018-06-18/UpdateCloudFrontOriginAccessIdentity func (c *CloudFront) UpdateCloudFrontOriginAccessIdentityRequest(input *UpdateCloudFrontOriginAccessIdentityInput) (req *request.Request, output *UpdateCloudFrontOriginAccessIdentityOutput) { op := &request.Operation{ Name: opUpdateCloudFrontOriginAccessIdentity, HTTPMethod: "PUT", - HTTPPath: "/2017-10-30/origin-access-identity/cloudfront/{Id}/config", + HTTPPath: "/2018-06-18/origin-access-identity/cloudfront/{Id}/config", } if input == nil { @@ -4044,7 +4057,7 @@ func (c *CloudFront) UpdateCloudFrontOriginAccessIdentityRequest(input *UpdateCl // * ErrCodeInconsistentQuantities "InconsistentQuantities" // The value of Quantity and the size of Items don't match. // -// See also, https://docs.aws.amazon.com/goto/WebAPI/cloudfront-2017-10-30/UpdateCloudFrontOriginAccessIdentity +// See also, https://docs.aws.amazon.com/goto/WebAPI/cloudfront-2018-06-18/UpdateCloudFrontOriginAccessIdentity func (c *CloudFront) UpdateCloudFrontOriginAccessIdentity(input *UpdateCloudFrontOriginAccessIdentityInput) (*UpdateCloudFrontOriginAccessIdentityOutput, error) { req, out := c.UpdateCloudFrontOriginAccessIdentityRequest(input) return out, req.Send() @@ -4066,7 +4079,7 @@ func (c *CloudFront) UpdateCloudFrontOriginAccessIdentityWithContext(ctx aws.Con return out, req.Send() } -const opUpdateDistribution = "UpdateDistribution2017_10_30" +const opUpdateDistribution = "UpdateDistribution2018_06_18" // UpdateDistributionRequest generates a "aws/request.Request" representing the // client's request for the UpdateDistribution operation. The "output" return @@ -4091,12 +4104,12 @@ const opUpdateDistribution = "UpdateDistribution2017_10_30" // fmt.Println(resp) // } // -// See also, https://docs.aws.amazon.com/goto/WebAPI/cloudfront-2017-10-30/UpdateDistribution +// See also, https://docs.aws.amazon.com/goto/WebAPI/cloudfront-2018-06-18/UpdateDistribution func (c *CloudFront) UpdateDistributionRequest(input *UpdateDistributionInput) (req *request.Request, output *UpdateDistributionOutput) { op := &request.Operation{ Name: opUpdateDistribution, HTTPMethod: "PUT", - HTTPPath: "/2017-10-30/distribution/{Id}/config", + HTTPPath: "/2018-06-18/distribution/{Id}/config", } if input == nil { @@ -4110,11 +4123,22 @@ func (c *CloudFront) UpdateDistributionRequest(input *UpdateDistributionInput) ( // UpdateDistribution API operation for Amazon CloudFront. // -// Updates the configuration for a web distribution. Perform the following steps. +// Updates the configuration for a web distribution. // -// For information about updating a distribution using the CloudFront console, -// see Creating or Updating a Web Distribution Using the CloudFront Console -// (http://docs.aws.amazon.com/AmazonCloudFront/latest/DeveloperGuide/distribution-web-creating-console.html) +// When you update a distribution, there are more required fields than when +// you create a distribution. When you update your distribution by using this +// API action, follow the steps here to get the current configuration and then +// make your updates, to make sure that you include all of the required fields. +// To view a summary, see Required Fields for Create Distribution and Update +// Distribution (http://docs.aws.amazon.com/AmazonCloudFront/latest/DeveloperGuide/distribution-overview-required-fields.html) +// in the Amazon CloudFront Developer Guide. +// +// The update process includes getting the current distribution configuration, +// updating the XML document that is returned to make your changes, and then +// submitting an UpdateDistribution request to make the updates. +// +// For information about updating a distribution using the CloudFront console +// instead, see Creating a Distribution (http://docs.aws.amazon.com/AmazonCloudFront/latest/DeveloperGuide/distribution-web-creating-console.html) // in the Amazon CloudFront Developer Guide. // // To update a web distribution using the CloudFront API @@ -4122,14 +4146,25 @@ func (c *CloudFront) UpdateDistributionRequest(input *UpdateDistributionInput) ( // Submit a GetDistributionConfig request to get the current configuration and // an Etag header for the distribution. // -// If you update the distribution again, you need to get a new Etag header. +// If you update the distribution again, you must get a new Etag header. // // Update the XML document that was returned in the response to your GetDistributionConfig -// request to include the desired changes. You can't change the value of CallerReference. -// If you try to change this value, CloudFront returns an IllegalUpdate error. +// request to include your changes. +// +// When you edit the XML file, be aware of the following: +// +// You must strip out the ETag parameter that is returned. +// +// Additional fields are required when you update a distribution. There may +// be fields included in the XML file for features that you haven't configured +// for your distribution. This is expected and required to successfully update +// the distribution. +// +// You can't change the value of CallerReference. If you try to change this +// value, CloudFront returns an IllegalUpdate error. // // The new configuration replaces the existing configuration; the values that -// you specify in an UpdateDistribution request are not merged into the existing +// you specify in an UpdateDistribution request are not merged into your existing // configuration. When you add, delete, or replace values in an element that // allows multiple values (for example, CNAME), you must specify all of the // values that you want to appear in the updated distribution. In addition, @@ -4151,16 +4186,6 @@ func (c *CloudFront) UpdateDistributionRequest(input *UpdateDistributionInput) ( // Optional: Submit a GetDistribution request to confirm that your changes have // propagated. When propagation is complete, the value of Status is Deployed. // -// Beginning with the 2012-05-05 version of the CloudFront API, we made substantial -// changes to the format of the XML document that you include in the request -// body when you create or update a distribution. With previous versions of -// the API, we discovered that it was too easy to accidentally delete one or -// more values for an element that accepts multiple values, for example, CNAMEs -// and trusted signers. Our changes for the 2012-05-05 release are intended -// to prevent these accidental deletions and to notify you when there's a mismatch -// between the number of values you say you're specifying in the Quantity element -// and the number of values you're actually specifying. -// // Returns awserr.Error for service API and SDK errors. Use runtime type assertions // with awserr.Error's Code and Message methods to get detailed information about // the error. @@ -4295,7 +4320,7 @@ func (c *CloudFront) UpdateDistributionRequest(input *UpdateDistributionInput) ( // The maximum number of distributions have been associated with the specified // configuration for field-level encryption. // -// See also, https://docs.aws.amazon.com/goto/WebAPI/cloudfront-2017-10-30/UpdateDistribution +// See also, https://docs.aws.amazon.com/goto/WebAPI/cloudfront-2018-06-18/UpdateDistribution func (c *CloudFront) UpdateDistribution(input *UpdateDistributionInput) (*UpdateDistributionOutput, error) { req, out := c.UpdateDistributionRequest(input) return out, req.Send() @@ -4317,7 +4342,7 @@ func (c *CloudFront) UpdateDistributionWithContext(ctx aws.Context, input *Updat return out, req.Send() } -const opUpdateFieldLevelEncryptionConfig = "UpdateFieldLevelEncryptionConfig2017_10_30" +const opUpdateFieldLevelEncryptionConfig = "UpdateFieldLevelEncryptionConfig2018_06_18" // UpdateFieldLevelEncryptionConfigRequest generates a "aws/request.Request" representing the // client's request for the UpdateFieldLevelEncryptionConfig operation. The "output" return @@ -4342,12 +4367,12 @@ const opUpdateFieldLevelEncryptionConfig = "UpdateFieldLevelEncryptionConfig2017 // fmt.Println(resp) // } // -// See also, https://docs.aws.amazon.com/goto/WebAPI/cloudfront-2017-10-30/UpdateFieldLevelEncryptionConfig +// See also, https://docs.aws.amazon.com/goto/WebAPI/cloudfront-2018-06-18/UpdateFieldLevelEncryptionConfig func (c *CloudFront) UpdateFieldLevelEncryptionConfigRequest(input *UpdateFieldLevelEncryptionConfigInput) (req *request.Request, output *UpdateFieldLevelEncryptionConfigOutput) { op := &request.Operation{ Name: opUpdateFieldLevelEncryptionConfig, HTTPMethod: "PUT", - HTTPPath: "/2017-10-30/field-level-encryption/{Id}/config", + HTTPPath: "/2018-06-18/field-level-encryption/{Id}/config", } if input == nil { @@ -4407,7 +4432,7 @@ func (c *CloudFront) UpdateFieldLevelEncryptionConfigRequest(input *UpdateFieldL // * ErrCodeQueryArgProfileEmpty "QueryArgProfileEmpty" // No profile specified for the field-level encryption query argument. // -// See also, https://docs.aws.amazon.com/goto/WebAPI/cloudfront-2017-10-30/UpdateFieldLevelEncryptionConfig +// See also, https://docs.aws.amazon.com/goto/WebAPI/cloudfront-2018-06-18/UpdateFieldLevelEncryptionConfig func (c *CloudFront) UpdateFieldLevelEncryptionConfig(input *UpdateFieldLevelEncryptionConfigInput) (*UpdateFieldLevelEncryptionConfigOutput, error) { req, out := c.UpdateFieldLevelEncryptionConfigRequest(input) return out, req.Send() @@ -4429,7 +4454,7 @@ func (c *CloudFront) UpdateFieldLevelEncryptionConfigWithContext(ctx aws.Context return out, req.Send() } -const opUpdateFieldLevelEncryptionProfile = "UpdateFieldLevelEncryptionProfile2017_10_30" +const opUpdateFieldLevelEncryptionProfile = "UpdateFieldLevelEncryptionProfile2018_06_18" // UpdateFieldLevelEncryptionProfileRequest generates a "aws/request.Request" representing the // client's request for the UpdateFieldLevelEncryptionProfile operation. The "output" return @@ -4454,12 +4479,12 @@ const opUpdateFieldLevelEncryptionProfile = "UpdateFieldLevelEncryptionProfile20 // fmt.Println(resp) // } // -// See also, https://docs.aws.amazon.com/goto/WebAPI/cloudfront-2017-10-30/UpdateFieldLevelEncryptionProfile +// See also, https://docs.aws.amazon.com/goto/WebAPI/cloudfront-2018-06-18/UpdateFieldLevelEncryptionProfile func (c *CloudFront) UpdateFieldLevelEncryptionProfileRequest(input *UpdateFieldLevelEncryptionProfileInput) (req *request.Request, output *UpdateFieldLevelEncryptionProfileOutput) { op := &request.Operation{ Name: opUpdateFieldLevelEncryptionProfile, HTTPMethod: "PUT", - HTTPPath: "/2017-10-30/field-level-encryption-profile/{Id}/config", + HTTPPath: "/2018-06-18/field-level-encryption-profile/{Id}/config", } if input == nil { @@ -4522,7 +4547,7 @@ func (c *CloudFront) UpdateFieldLevelEncryptionProfileRequest(input *UpdateField // The maximum number of field patterns for field-level encryption have been // created. // -// See also, https://docs.aws.amazon.com/goto/WebAPI/cloudfront-2017-10-30/UpdateFieldLevelEncryptionProfile +// See also, https://docs.aws.amazon.com/goto/WebAPI/cloudfront-2018-06-18/UpdateFieldLevelEncryptionProfile func (c *CloudFront) UpdateFieldLevelEncryptionProfile(input *UpdateFieldLevelEncryptionProfileInput) (*UpdateFieldLevelEncryptionProfileOutput, error) { req, out := c.UpdateFieldLevelEncryptionProfileRequest(input) return out, req.Send() @@ -4544,7 +4569,7 @@ func (c *CloudFront) UpdateFieldLevelEncryptionProfileWithContext(ctx aws.Contex return out, req.Send() } -const opUpdatePublicKey = "UpdatePublicKey2017_10_30" +const opUpdatePublicKey = "UpdatePublicKey2018_06_18" // UpdatePublicKeyRequest generates a "aws/request.Request" representing the // client's request for the UpdatePublicKey operation. The "output" return @@ -4569,12 +4594,12 @@ const opUpdatePublicKey = "UpdatePublicKey2017_10_30" // fmt.Println(resp) // } // -// See also, https://docs.aws.amazon.com/goto/WebAPI/cloudfront-2017-10-30/UpdatePublicKey +// See also, https://docs.aws.amazon.com/goto/WebAPI/cloudfront-2018-06-18/UpdatePublicKey func (c *CloudFront) UpdatePublicKeyRequest(input *UpdatePublicKeyInput) (req *request.Request, output *UpdatePublicKeyOutput) { op := &request.Operation{ Name: opUpdatePublicKey, HTTPMethod: "PUT", - HTTPPath: "/2017-10-30/public-key/{Id}/config", + HTTPPath: "/2018-06-18/public-key/{Id}/config", } if input == nil { @@ -4621,7 +4646,7 @@ func (c *CloudFront) UpdatePublicKeyRequest(input *UpdatePublicKeyInput) (req *r // The precondition given in one or more of the request-header fields evaluated // to false. // -// See also, https://docs.aws.amazon.com/goto/WebAPI/cloudfront-2017-10-30/UpdatePublicKey +// See also, https://docs.aws.amazon.com/goto/WebAPI/cloudfront-2018-06-18/UpdatePublicKey func (c *CloudFront) UpdatePublicKey(input *UpdatePublicKeyInput) (*UpdatePublicKeyOutput, error) { req, out := c.UpdatePublicKeyRequest(input) return out, req.Send() @@ -4643,7 +4668,7 @@ func (c *CloudFront) UpdatePublicKeyWithContext(ctx aws.Context, input *UpdatePu return out, req.Send() } -const opUpdateStreamingDistribution = "UpdateStreamingDistribution2017_10_30" +const opUpdateStreamingDistribution = "UpdateStreamingDistribution2018_06_18" // UpdateStreamingDistributionRequest generates a "aws/request.Request" representing the // client's request for the UpdateStreamingDistribution operation. The "output" return @@ -4668,12 +4693,12 @@ const opUpdateStreamingDistribution = "UpdateStreamingDistribution2017_10_30" // fmt.Println(resp) // } // -// See also, https://docs.aws.amazon.com/goto/WebAPI/cloudfront-2017-10-30/UpdateStreamingDistribution +// See also, https://docs.aws.amazon.com/goto/WebAPI/cloudfront-2018-06-18/UpdateStreamingDistribution func (c *CloudFront) UpdateStreamingDistributionRequest(input *UpdateStreamingDistributionInput) (req *request.Request, output *UpdateStreamingDistributionOutput) { op := &request.Operation{ Name: opUpdateStreamingDistribution, HTTPMethod: "PUT", - HTTPPath: "/2017-10-30/streaming-distribution/{Id}/config", + HTTPPath: "/2018-06-18/streaming-distribution/{Id}/config", } if input == nil { @@ -4736,7 +4761,7 @@ func (c *CloudFront) UpdateStreamingDistributionRequest(input *UpdateStreamingDi // * ErrCodeInconsistentQuantities "InconsistentQuantities" // The value of Quantity and the size of Items don't match. // -// See also, https://docs.aws.amazon.com/goto/WebAPI/cloudfront-2017-10-30/UpdateStreamingDistribution +// See also, https://docs.aws.amazon.com/goto/WebAPI/cloudfront-2018-06-18/UpdateStreamingDistribution func (c *CloudFront) UpdateStreamingDistribution(input *UpdateStreamingDistributionInput) (*UpdateStreamingDistributionOutput, error) { req, out := c.UpdateStreamingDistributionRequest(input) return out, req.Send() @@ -5030,6 +5055,9 @@ type CacheBehavior struct { // in the Amazon CloudFront Developer Guide. DefaultTTL *int64 `type:"long"` + // The value of ID for the field-level encryption configuration that you want + // CloudFront to use for encrypting specific fields of data for a cache behavior + // or for the default cache behavior in your distribution. FieldLevelEncryptionId *string `type:"string"` // A complex type that specifies how CloudFront handles query strings and cookies. @@ -5091,7 +5119,7 @@ type CacheBehavior struct { // The value of ID for the origin that you want CloudFront to route requests // to when a request matches the path pattern either for a cache behavior or - // for the default cache behavior. + // for the default cache behavior in your distribution. // // TargetOriginId is a required field TargetOriginId *string `type:"string" required:"true"` @@ -5719,7 +5747,7 @@ type CreateCloudFrontOriginAccessIdentityInput struct { // The current configuration information for the identity. // // CloudFrontOriginAccessIdentityConfig is a required field - CloudFrontOriginAccessIdentityConfig *OriginAccessIdentityConfig `locationName:"CloudFrontOriginAccessIdentityConfig" type:"structure" required:"true" xmlURI:"http://cloudfront.amazonaws.com/doc/2017-10-30/"` + CloudFrontOriginAccessIdentityConfig *OriginAccessIdentityConfig `locationName:"CloudFrontOriginAccessIdentityConfig" type:"structure" required:"true" xmlURI:"http://cloudfront.amazonaws.com/doc/2018-06-18/"` } // String returns the string representation @@ -5806,7 +5834,7 @@ type CreateDistributionInput struct { // The distribution's configuration information. // // DistributionConfig is a required field - DistributionConfig *DistributionConfig `locationName:"DistributionConfig" type:"structure" required:"true" xmlURI:"http://cloudfront.amazonaws.com/doc/2017-10-30/"` + DistributionConfig *DistributionConfig `locationName:"DistributionConfig" type:"structure" required:"true" xmlURI:"http://cloudfront.amazonaws.com/doc/2018-06-18/"` } // String returns the string representation @@ -5893,7 +5921,7 @@ type CreateDistributionWithTagsInput struct { // The distribution's configuration information. // // DistributionConfigWithTags is a required field - DistributionConfigWithTags *DistributionConfigWithTags `locationName:"DistributionConfigWithTags" type:"structure" required:"true" xmlURI:"http://cloudfront.amazonaws.com/doc/2017-10-30/"` + DistributionConfigWithTags *DistributionConfigWithTags `locationName:"DistributionConfigWithTags" type:"structure" required:"true" xmlURI:"http://cloudfront.amazonaws.com/doc/2018-06-18/"` } // String returns the string representation @@ -5979,7 +6007,7 @@ type CreateFieldLevelEncryptionConfigInput struct { // The request to create a new field-level encryption configuration. // // FieldLevelEncryptionConfig is a required field - FieldLevelEncryptionConfig *FieldLevelEncryptionConfig `locationName:"FieldLevelEncryptionConfig" type:"structure" required:"true" xmlURI:"http://cloudfront.amazonaws.com/doc/2017-10-30/"` + FieldLevelEncryptionConfig *FieldLevelEncryptionConfig `locationName:"FieldLevelEncryptionConfig" type:"structure" required:"true" xmlURI:"http://cloudfront.amazonaws.com/doc/2018-06-18/"` } // String returns the string representation @@ -6065,7 +6093,7 @@ type CreateFieldLevelEncryptionProfileInput struct { // The request to create a field-level encryption profile. // // FieldLevelEncryptionProfileConfig is a required field - FieldLevelEncryptionProfileConfig *FieldLevelEncryptionProfileConfig `locationName:"FieldLevelEncryptionProfileConfig" type:"structure" required:"true" xmlURI:"http://cloudfront.amazonaws.com/doc/2017-10-30/"` + FieldLevelEncryptionProfileConfig *FieldLevelEncryptionProfileConfig `locationName:"FieldLevelEncryptionProfileConfig" type:"structure" required:"true" xmlURI:"http://cloudfront.amazonaws.com/doc/2018-06-18/"` } // String returns the string representation @@ -6156,7 +6184,7 @@ type CreateInvalidationInput struct { // The batch information for the invalidation. // // InvalidationBatch is a required field - InvalidationBatch *InvalidationBatch `locationName:"InvalidationBatch" type:"structure" required:"true" xmlURI:"http://cloudfront.amazonaws.com/doc/2017-10-30/"` + InvalidationBatch *InvalidationBatch `locationName:"InvalidationBatch" type:"structure" required:"true" xmlURI:"http://cloudfront.amazonaws.com/doc/2018-06-18/"` } // String returns the string representation @@ -6242,7 +6270,7 @@ type CreatePublicKeyInput struct { // The request to add a public key to CloudFront. // // PublicKeyConfig is a required field - PublicKeyConfig *PublicKeyConfig `locationName:"PublicKeyConfig" type:"structure" required:"true" xmlURI:"http://cloudfront.amazonaws.com/doc/2017-10-30/"` + PublicKeyConfig *PublicKeyConfig `locationName:"PublicKeyConfig" type:"structure" required:"true" xmlURI:"http://cloudfront.amazonaws.com/doc/2018-06-18/"` } // String returns the string representation @@ -6328,7 +6356,7 @@ type CreateStreamingDistributionInput struct { // The streaming distribution's configuration information. // // StreamingDistributionConfig is a required field - StreamingDistributionConfig *StreamingDistributionConfig `locationName:"StreamingDistributionConfig" type:"structure" required:"true" xmlURI:"http://cloudfront.amazonaws.com/doc/2017-10-30/"` + StreamingDistributionConfig *StreamingDistributionConfig `locationName:"StreamingDistributionConfig" type:"structure" required:"true" xmlURI:"http://cloudfront.amazonaws.com/doc/2018-06-18/"` } // String returns the string representation @@ -6415,7 +6443,7 @@ type CreateStreamingDistributionWithTagsInput struct { // The streaming distribution's configuration information. // // StreamingDistributionConfigWithTags is a required field - StreamingDistributionConfigWithTags *StreamingDistributionConfigWithTags `locationName:"StreamingDistributionConfigWithTags" type:"structure" required:"true" xmlURI:"http://cloudfront.amazonaws.com/doc/2017-10-30/"` + StreamingDistributionConfigWithTags *StreamingDistributionConfigWithTags `locationName:"StreamingDistributionConfigWithTags" type:"structure" required:"true" xmlURI:"http://cloudfront.amazonaws.com/doc/2018-06-18/"` } // String returns the string representation @@ -6752,7 +6780,7 @@ func (s *CustomHeaders) SetQuantity(v int64) *CustomHeaders { return s } -// A customer origin. +// A customer origin or an Amazon S3 bucket configured as a website endpoint. type CustomOriginConfig struct { _ struct{} `type:"structure"` @@ -6902,6 +6930,9 @@ type DefaultCacheBehavior struct { // in the Amazon CloudFront Developer Guide. DefaultTTL *int64 `type:"long"` + // The value of ID for the field-level encryption configuration that you want + // CloudFront to use for encrypting specific fields of data for a cache behavior + // or for the default cache behavior in your distribution. FieldLevelEncryptionId *string `type:"string"` // A complex type that specifies how CloudFront handles query strings and cookies. @@ -6937,7 +6968,7 @@ type DefaultCacheBehavior struct { // The value of ID for the origin that you want CloudFront to route requests // to when a request matches the path pattern either for a cache behavior or - // for the default cache behavior. + // for the default cache behavior in your distribution. // // TargetOriginId is a required field TargetOriginId *string `type:"string" required:"true"` @@ -7727,9 +7758,6 @@ type DistributionConfig struct { // From this field, you can enable or disable the selected distribution. // - // If you specify false for Enabled but you specify values for Bucket and Prefix, - // the values are automatically deleted. - // // Enabled is a required field Enabled *bool `type:"boolean" required:"true"` @@ -7804,8 +7832,10 @@ type DistributionConfig struct { // For more information about price classes, see Choosing the Price Class for // a CloudFront Distribution (http://docs.aws.amazon.com/AmazonCloudFront/latest/DeveloperGuide/PriceClass.html) // in the Amazon CloudFront Developer Guide. For information about CloudFront - // pricing, including how price classes map to CloudFront regions, see Amazon - // CloudFront Pricing (https://aws.amazon.com/cloudfront/pricing/). + // pricing, including how price classes (such as Price Class 100) map to CloudFront + // regions, see Amazon CloudFront Pricing (https://aws.amazon.com/cloudfront/pricing/). + // For price class information, scroll down to see the table at the bottom of + // the page. PriceClass *string `type:"string" enum:"PriceClass"` // A complex type that identifies ways in which you want to restrict distribution @@ -10802,6 +10832,12 @@ type LambdaFunctionAssociation struct { // EventType is a required field EventType *string `type:"string" required:"true" enum:"EventType"` + // A flag that allows a Lambda function to have read access to the body content. + // For more information, see Accessing the Request Body by Choosing the Include + // Body Option (http://docs.aws.amazon.com/AmazonCloudFront/latest/DeveloperGuide/lambda-include-body-access.html) + // in the Amazon CloudFront Developer Guide. + IncludeBody *bool `type:"boolean"` + // The ARN of the Lambda function. You must specify the ARN of a function version; // you can't specify a Lambda alias or $LATEST. // @@ -10841,6 +10877,12 @@ func (s *LambdaFunctionAssociation) SetEventType(v string) *LambdaFunctionAssoci return s } +// SetIncludeBody sets the IncludeBody field's value. +func (s *LambdaFunctionAssociation) SetIncludeBody(v bool) *LambdaFunctionAssociation { + s.IncludeBody = &v + return s +} + // SetLambdaFunctionARN sets the LambdaFunctionARN field's value. func (s *LambdaFunctionAssociation) SetLambdaFunctionARN(v string) *LambdaFunctionAssociation { s.LambdaFunctionARN = &v @@ -11634,6 +11676,8 @@ type Origin struct { // Amazon S3 origins: The DNS name of the Amazon S3 bucket from which you want // CloudFront to get objects for this origin, for example, myawsbucket.s3.amazonaws.com. + // If you set up your bucket to be configured as a website endpoint, enter the + // Amazon S3 static website hosting endpoint for the bucket. // // Constraints for Amazon S3 origins: // @@ -13678,7 +13722,7 @@ type TagResourceInput struct { // A complex type that contains zero or more Tag elements. // // Tags is a required field - Tags *Tags `locationName:"Tags" type:"structure" required:"true" xmlURI:"http://cloudfront.amazonaws.com/doc/2017-10-30/"` + Tags *Tags `locationName:"Tags" type:"structure" required:"true" xmlURI:"http://cloudfront.amazonaws.com/doc/2018-06-18/"` } // String returns the string representation @@ -13875,7 +13919,7 @@ type UntagResourceInput struct { // A complex type that contains zero or more Tag key elements. // // TagKeys is a required field - TagKeys *TagKeys `locationName:"TagKeys" type:"structure" required:"true" xmlURI:"http://cloudfront.amazonaws.com/doc/2017-10-30/"` + TagKeys *TagKeys `locationName:"TagKeys" type:"structure" required:"true" xmlURI:"http://cloudfront.amazonaws.com/doc/2018-06-18/"` } // String returns the string representation @@ -13937,7 +13981,7 @@ type UpdateCloudFrontOriginAccessIdentityInput struct { // The identity's configuration information. // // CloudFrontOriginAccessIdentityConfig is a required field - CloudFrontOriginAccessIdentityConfig *OriginAccessIdentityConfig `locationName:"CloudFrontOriginAccessIdentityConfig" type:"structure" required:"true" xmlURI:"http://cloudfront.amazonaws.com/doc/2017-10-30/"` + CloudFrontOriginAccessIdentityConfig *OriginAccessIdentityConfig `locationName:"CloudFrontOriginAccessIdentityConfig" type:"structure" required:"true" xmlURI:"http://cloudfront.amazonaws.com/doc/2018-06-18/"` // The identity's id. // @@ -14038,7 +14082,7 @@ type UpdateDistributionInput struct { // The distribution's configuration information. // // DistributionConfig is a required field - DistributionConfig *DistributionConfig `locationName:"DistributionConfig" type:"structure" required:"true" xmlURI:"http://cloudfront.amazonaws.com/doc/2017-10-30/"` + DistributionConfig *DistributionConfig `locationName:"DistributionConfig" type:"structure" required:"true" xmlURI:"http://cloudfront.amazonaws.com/doc/2018-06-18/"` // The distribution's id. // @@ -14138,7 +14182,7 @@ type UpdateFieldLevelEncryptionConfigInput struct { // Request to update a field-level encryption configuration. // // FieldLevelEncryptionConfig is a required field - FieldLevelEncryptionConfig *FieldLevelEncryptionConfig `locationName:"FieldLevelEncryptionConfig" type:"structure" required:"true" xmlURI:"http://cloudfront.amazonaws.com/doc/2017-10-30/"` + FieldLevelEncryptionConfig *FieldLevelEncryptionConfig `locationName:"FieldLevelEncryptionConfig" type:"structure" required:"true" xmlURI:"http://cloudfront.amazonaws.com/doc/2018-06-18/"` // The ID of the configuration you want to update. // @@ -14238,7 +14282,7 @@ type UpdateFieldLevelEncryptionProfileInput struct { // Request to update a field-level encryption profile. // // FieldLevelEncryptionProfileConfig is a required field - FieldLevelEncryptionProfileConfig *FieldLevelEncryptionProfileConfig `locationName:"FieldLevelEncryptionProfileConfig" type:"structure" required:"true" xmlURI:"http://cloudfront.amazonaws.com/doc/2017-10-30/"` + FieldLevelEncryptionProfileConfig *FieldLevelEncryptionProfileConfig `locationName:"FieldLevelEncryptionProfileConfig" type:"structure" required:"true" xmlURI:"http://cloudfront.amazonaws.com/doc/2018-06-18/"` // The ID of the field-level encryption profile request. // @@ -14346,7 +14390,7 @@ type UpdatePublicKeyInput struct { // Request to update public key information. // // PublicKeyConfig is a required field - PublicKeyConfig *PublicKeyConfig `locationName:"PublicKeyConfig" type:"structure" required:"true" xmlURI:"http://cloudfront.amazonaws.com/doc/2017-10-30/"` + PublicKeyConfig *PublicKeyConfig `locationName:"PublicKeyConfig" type:"structure" required:"true" xmlURI:"http://cloudfront.amazonaws.com/doc/2018-06-18/"` } // String returns the string representation @@ -14446,7 +14490,7 @@ type UpdateStreamingDistributionInput struct { // The streaming distribution's configuration information. // // StreamingDistributionConfig is a required field - StreamingDistributionConfig *StreamingDistributionConfig `locationName:"StreamingDistributionConfig" type:"structure" required:"true" xmlURI:"http://cloudfront.amazonaws.com/doc/2017-10-30/"` + StreamingDistributionConfig *StreamingDistributionConfig `locationName:"StreamingDistributionConfig" type:"structure" required:"true" xmlURI:"http://cloudfront.amazonaws.com/doc/2018-06-18/"` } // String returns the string representation @@ -14630,6 +14674,8 @@ type ViewerCertificate struct { // * ViewerCertificate$IAMCertificateId // // * ViewerCertificate$CloudFrontDefaultCertificate + // + // Deprecated: Certificate has been deprecated Certificate *string `deprecated:"true" type:"string"` // This field has been deprecated. Use one of the following fields instead: @@ -14639,6 +14685,8 @@ type ViewerCertificate struct { // * ViewerCertificate$IAMCertificateId // // * ViewerCertificate$CloudFrontDefaultCertificate + // + // Deprecated: CertificateSource has been deprecated CertificateSource *string `deprecated:"true" type:"string" enum:"CertificateSource"` // For information about how and when to use CloudFrontDefaultCertificate, see diff --git a/vendor/github.com/aws/aws-sdk-go/service/cloudfront/doc.go b/vendor/github.com/aws/aws-sdk-go/service/cloudfront/doc.go index e5125244f..0a4319621 100644 --- a/vendor/github.com/aws/aws-sdk-go/service/cloudfront/doc.go +++ b/vendor/github.com/aws/aws-sdk-go/service/cloudfront/doc.go @@ -8,7 +8,7 @@ // errors. For detailed information about CloudFront features, see the Amazon // CloudFront Developer Guide. // -// See https://docs.aws.amazon.com/goto/WebAPI/cloudfront-2017-10-30 for more information on this service. +// See https://docs.aws.amazon.com/goto/WebAPI/cloudfront-2018-06-18 for more information on this service. // // See cloudfront package documentation for more information. // https://docs.aws.amazon.com/sdk-for-go/api/service/cloudfront/ diff --git a/vendor/github.com/aws/aws-sdk-go/service/cloudfront/service.go b/vendor/github.com/aws/aws-sdk-go/service/cloudfront/service.go index 103bab6a2..24b06e0a0 100644 --- a/vendor/github.com/aws/aws-sdk-go/service/cloudfront/service.go +++ b/vendor/github.com/aws/aws-sdk-go/service/cloudfront/service.go @@ -60,7 +60,7 @@ func newClient(cfg aws.Config, handlers request.Handlers, endpoint, signingRegio SigningName: signingName, SigningRegion: signingRegion, Endpoint: endpoint, - APIVersion: "2017-10-30", + APIVersion: "2018-06-18", }, handlers, ), diff --git a/vendor/github.com/aws/aws-sdk-go/service/cloudtrail/api.go b/vendor/github.com/aws/aws-sdk-go/service/cloudtrail/api.go index 270720907..db7a6d2eb 100644 --- a/vendor/github.com/aws/aws-sdk-go/service/cloudtrail/api.go +++ b/vendor/github.com/aws/aws-sdk-go/service/cloudtrail/api.go @@ -1993,6 +1993,8 @@ type CreateTrailOutput struct { SnsTopicARN *string `type:"string"` // This field is deprecated. Use SnsTopicARN. + // + // Deprecated: SnsTopicName has been deprecated SnsTopicName *string `deprecated:"true" type:"string"` // Specifies the ARN of the trail that was created. The format of a trail ARN @@ -3624,6 +3626,8 @@ type Trail struct { SnsTopicARN *string `type:"string"` // This field is deprecated. Use SnsTopicARN. + // + // Deprecated: SnsTopicName has been deprecated SnsTopicName *string `deprecated:"true" type:"string"` // Specifies the ARN of the trail. The format of a trail ARN is: @@ -3946,6 +3950,8 @@ type UpdateTrailOutput struct { SnsTopicARN *string `type:"string"` // This field is deprecated. Use SnsTopicARN. + // + // Deprecated: SnsTopicName has been deprecated SnsTopicName *string `deprecated:"true" type:"string"` // Specifies the ARN of the trail that was updated. The format of a trail ARN diff --git a/vendor/github.com/aws/aws-sdk-go/service/cloudwatch/api.go b/vendor/github.com/aws/aws-sdk-go/service/cloudwatch/api.go index 135c56d89..773336a73 100644 --- a/vendor/github.com/aws/aws-sdk-go/service/cloudwatch/api.go +++ b/vendor/github.com/aws/aws-sdk-go/service/cloudwatch/api.go @@ -830,6 +830,29 @@ func (c *CloudWatch) GetMetricDataRequest(input *GetMetricDataInput) (req *reque // to GetMetricStatistics. For more information about pricing, see Amazon CloudWatch // Pricing (https://aws.amazon.com/cloudwatch/pricing/). // +// Amazon CloudWatch retains metric data as follows: +// +// * Data points with a period of less than 60 seconds are available for +// 3 hours. These data points are high-resolution metrics and are available +// only for custom metrics that have been defined with a StorageResolution +// of 1. +// +// * Data points with a period of 60 seconds (1-minute) are available for +// 15 days. +// +// * Data points with a period of 300 seconds (5-minute) are available for +// 63 days. +// +// * Data points with a period of 3600 seconds (1 hour) are available for +// 455 days (15 months). +// +// Data points that are initially published with a shorter period are aggregated +// together for long-term storage. For example, if you collect data using a +// period of 1 minute, the data remains available for 15 days with 1-minute +// resolution. After 15 days, this data is still available, but is aggregated +// and retrievable only with a resolution of 5 minutes. After 63 days, the data +// is further aggregated and is available with a resolution of 1 hour. +// // Returns awserr.Error for service API and SDK errors. Use runtime type assertions // with awserr.Error's Code and Message methods to get detailed information about // the error. @@ -929,6 +952,9 @@ func (c *CloudWatch) GetMetricStatisticsRequest(input *GetMetricStatisticsInput) // // * The Min and the Max values of the statistic set are equal. // +// Percentile statistics are not available for metrics when any of the metric +// values are negative numbers. +// // Amazon CloudWatch retains metric data as follows: // // * Data points with a period of less than 60 seconds are available for @@ -1001,6 +1027,94 @@ func (c *CloudWatch) GetMetricStatisticsWithContext(ctx aws.Context, input *GetM return out, req.Send() } +const opGetMetricWidgetImage = "GetMetricWidgetImage" + +// GetMetricWidgetImageRequest generates a "aws/request.Request" representing the +// client's request for the GetMetricWidgetImage operation. The "output" return +// value will be populated with the request's response once the request completes +// successfuly. +// +// Use "Send" method on the returned Request to send the API call to the service. +// the "output" return value is not valid until after Send returns without error. +// +// See GetMetricWidgetImage for more information on using the GetMetricWidgetImage +// API call, and error handling. +// +// This method is useful when you want to inject custom logic or configuration +// into the SDK's request lifecycle. Such as custom headers, or retry logic. +// +// +// // Example sending a request using the GetMetricWidgetImageRequest method. +// req, resp := client.GetMetricWidgetImageRequest(params) +// +// err := req.Send() +// if err == nil { // resp is now filled +// fmt.Println(resp) +// } +// +// See also, https://docs.aws.amazon.com/goto/WebAPI/monitoring-2010-08-01/GetMetricWidgetImage +func (c *CloudWatch) GetMetricWidgetImageRequest(input *GetMetricWidgetImageInput) (req *request.Request, output *GetMetricWidgetImageOutput) { + op := &request.Operation{ + Name: opGetMetricWidgetImage, + HTTPMethod: "POST", + HTTPPath: "/", + } + + if input == nil { + input = &GetMetricWidgetImageInput{} + } + + output = &GetMetricWidgetImageOutput{} + req = c.newRequest(op, input, output) + return +} + +// GetMetricWidgetImage API operation for Amazon CloudWatch. +// +// You can use the GetMetricWidgetImage API to retrieve a snapshot graph of +// one or more Amazon CloudWatch metrics as a bitmap image. You can then embed +// this image into your services and products, such as wiki pages, reports, +// and documents. You could also retrieve images regularly, such as every minute, +// and create your own custom live dashboard. +// +// The graph you retrieve can include all CloudWatch metric graph features, +// including metric math and horizontal and vertical annotations. +// +// There is a limit of 20 transactions per second for this API. Each GetMetricWidgetImage +// action has the following limits: +// +// * As many as 100 metrics in the graph. +// +// * Up to 100 KB uncompressed payload. +// +// Returns awserr.Error for service API and SDK errors. Use runtime type assertions +// with awserr.Error's Code and Message methods to get detailed information about +// the error. +// +// See the AWS API reference guide for Amazon CloudWatch's +// API operation GetMetricWidgetImage for usage and error information. +// See also, https://docs.aws.amazon.com/goto/WebAPI/monitoring-2010-08-01/GetMetricWidgetImage +func (c *CloudWatch) GetMetricWidgetImage(input *GetMetricWidgetImageInput) (*GetMetricWidgetImageOutput, error) { + req, out := c.GetMetricWidgetImageRequest(input) + return out, req.Send() +} + +// GetMetricWidgetImageWithContext is the same as GetMetricWidgetImage with the addition of +// the ability to pass a context and additional request options. +// +// See GetMetricWidgetImage for details on how to use this API operation. +// +// The context must be non-nil and will be used for request cancellation. If +// the context is nil a panic will occur. In the future the SDK may create +// sub-contexts for http.Requests. See https://golang.org/pkg/context/ +// for more information on using Contexts. +func (c *CloudWatch) GetMetricWidgetImageWithContext(ctx aws.Context, input *GetMetricWidgetImageInput, opts ...request.Option) (*GetMetricWidgetImageOutput, error) { + req, out := c.GetMetricWidgetImageRequest(input) + req.SetContext(ctx) + req.ApplyOptions(opts...) + return out, req.Send() +} + const opListDashboards = "ListDashboards" // ListDashboardsRequest generates a "aws/request.Request" representing the @@ -1049,6 +1163,10 @@ func (c *CloudWatch) ListDashboardsRequest(input *ListDashboardsInput) (req *req // only those dashboards with names starting with the prefix are listed. Otherwise, // all dashboards in your account are listed. // +// ListDashboards returns up to 1000 results on one page. If there are more +// than 1000 dashboards, you can call ListDashboards again and include the value +// you received for NextToken in the first call, to receive the next 1000 results. +// // Returns awserr.Error for service API and SDK errors. Use runtime type assertions // with awserr.Error's Code and Message methods to get detailed information about // the error. @@ -1135,15 +1253,15 @@ func (c *CloudWatch) ListMetricsRequest(input *ListMetricsInput) (req *request.R // ListMetrics API operation for Amazon CloudWatch. // -// List the specified metrics. You can use the returned metrics with GetMetricStatistics -// to obtain statistical data. +// List the specified metrics. You can use the returned metrics with GetMetricData +// or GetMetricStatistics to obtain statistical data. // // Up to 500 results are returned for any one call. To retrieve additional results, // use the returned token with subsequent calls. // // After you create a metric, allow up to fifteen minutes before the metric // appears. Statistics about the metric, however, are available sooner using -// GetMetricStatistics. +// GetMetricData or GetMetricStatistics. // // Returns awserr.Error for service API and SDK errors. Use runtime type assertions // with awserr.Error's Code and Message methods to get detailed information about @@ -1279,8 +1397,8 @@ func (c *CloudWatch) PutDashboardRequest(input *PutDashboardInput) (req *request // dashboard. If you update a dashboard, the entire contents are replaced with // what you specify here. // -// You can have up to 500 dashboards per account. All dashboards in your account -// are global, not region-specific. +// There is no limit to the number of dashboards in your account. All dashboards +// in your account are global, not region-specific. // // A simple way to create a dashboard using PutDashboard is to copy an existing // dashboard. To copy an existing dashboard using the console, you can load @@ -1415,10 +1533,11 @@ func (c *CloudWatch) PutMetricAlarmRequest(input *PutMetricAlarmInput) (req *req // If you are using temporary security credentials granted using AWS STS, you // cannot stop or terminate an EC2 instance using alarm actions. // -// You must create at least one stop, terminate, or reboot alarm using either -// the Amazon EC2 or CloudWatch consoles to create the EC2ActionsAccess IAM -// role. After this IAM role is created, you can create stop, terminate, or -// reboot alarms using a command-line interface or API. +// The first time you create an alarm in the AWS Management Console, the CLI, +// or by using the PutMetricAlarm API, CloudWatch creates the necessary service-linked +// role for you. The service-linked role is called AWSServiceRoleForCloudWatchEvents. +// For more information about service-linked roles, see AWS service-linked role +// (http://docs.aws.amazon.com/IAM/latest/UserGuide/id_roles_terms-and-concepts.html#iam-term-service-linked-role). // // Returns awserr.Error for service API and SDK errors. Use runtime type assertions // with awserr.Error's Code and Message methods to get detailed information about @@ -1499,12 +1618,21 @@ func (c *CloudWatch) PutMetricDataRequest(input *PutMetricDataInput) (req *reque // PutMetricData API operation for Amazon CloudWatch. // -// Publishes metric data points to Amazon CloudWatch. CloudWatch associates -// the data points with the specified metric. If the specified metric does not -// exist, CloudWatch creates the metric. When CloudWatch creates a metric, it -// can take up to fifteen minutes for the metric to appear in calls to ListMetrics. +// Publishes metric data to Amazon CloudWatch. CloudWatch associates the data +// with the specified metric. If the specified metric does not exist, CloudWatch +// creates the metric. When CloudWatch creates a metric, it can take up to fifteen +// minutes for the metric to appear in calls to ListMetrics. +// +// You can publish either individual data points in the Value field, or arrays +// of values and the number of times each value occurred during the period by +// using the Values and Counts fields in the MetricDatum structure. Using the +// Values and Counts method enables you to publish up to 150 values per metric +// with one PutMetricData request, and supports retrieving percentile statistics +// on this data. // // Each PutMetricData request is limited to 40 KB in size for HTTP POST requests. +// You can send a payload compressed by gzip. Each request is also limited to +// no more than 20 different metrics. // // Although the Value parameter accepts numbers of type Double, CloudWatch rejects // values that are either too small or too large. Values must be in the range @@ -1518,16 +1646,19 @@ func (c *CloudWatch) PutMetricDataRequest(input *PutMetricDataInput) (req *reque // in the Amazon CloudWatch User Guide. // // Data points with time stamps from 24 hours ago or longer can take at least -// 48 hours to become available for GetMetricStatistics from the time they are -// submitted. +// 48 hours to become available for GetMetricData or GetMetricStatistics from +// the time they are submitted. // -// CloudWatch needs raw data points to calculate percentile statistics. If you -// publish data using a statistic set instead, you can only retrieve percentile -// statistics for this data if one of the following conditions is true: +// CloudWatch needs raw data points to calculate percentile statistics. These +// raw data points could be published individually or as part of Values and +// Counts arrays. If you publish data using statistic sets in the StatisticValues +// field instead, you can only retrieve percentile statistics for this data +// if one of the following conditions is true: // -// * The SampleCount value of the statistic set is 1 +// * The SampleCount value of the statistic set is 1 and Min, Max, and Sum +// are all equal. // -// * The Min and the Max values of the statistic set are equal +// * The Min and Max are equal, and Sum is equal to Min multiplied by SampleCount. // // Returns awserr.Error for service API and SDK errors. Use runtime type assertions // with awserr.Error's Code and Message methods to get detailed information about @@ -2683,6 +2814,12 @@ type GetMetricDataInput struct { // The time stamp indicating the latest data to be returned. // + // For better performance, specify StartTime and EndTime values that align with + // the value of the metric's Period and sync up with the beginning and end of + // an hour. For example, if the Period of a metric is 5 minutes, specifying + // 12:05 or 12:30 as EndTime can get a faster response from CloudWatch then + // setting 12:07 or 12:29 as the EndTime. + // // EndTime is a required field EndTime *time.Time `type:"timestamp" required:"true"` @@ -2710,6 +2847,12 @@ type GetMetricDataInput struct { // The time stamp indicating the earliest data to be returned. // + // For better performance, specify StartTime and EndTime values that align with + // the value of the metric's Period and sync up with the beginning and end of + // an hour. For example, if the Period of a metric is 5 minutes, specifying + // 12:05 or 12:30 as StartTime can get a faster response from CloudWatch then + // setting 12:07 or 12:29 as the StartTime. + // // StartTime is a required field StartTime *time.Time `type:"timestamp" required:"true"` } @@ -2846,7 +2989,8 @@ type GetMetricStatisticsInput struct { // The percentile statistics. Specify values between p0.0 and p100. When calling // GetMetricStatistics, you must specify either Statistics or ExtendedStatistics, - // but not both. + // but not both. Percentile statistics are not available for metrics when any + // of the metric values are negative numbers. ExtendedStatistics []*string `min:"1" type:"list"` // The name of the metric, with or without spaces. @@ -3067,6 +3211,115 @@ func (s *GetMetricStatisticsOutput) SetLabel(v string) *GetMetricStatisticsOutpu return s } +type GetMetricWidgetImageInput struct { + _ struct{} `type:"structure"` + + // A JSON string that defines the bitmap graph to be retrieved. The string includes + // the metrics to include in the graph, statistics, annotations, title, axis + // limits, and so on. You can include only one MetricWidget parameter in each + // GetMetricWidgetImage call. + // + // For more information about the syntax of MetricWidget see CloudWatch-Metric-Widget-Structure. + // + // If any metric on the graph could not load all the requested data points, + // an orange triangle with an exclamation point appears next to the graph legend. + // + // MetricWidget is a required field + MetricWidget *string `type:"string" required:"true"` + + // The format of the resulting image. Only PNG images are supported. + // + // The default is png. If you specify png, the API returns an HTTP response + // with the content-type set to text/xml. The image data is in a MetricWidgetImage + // field. For example: + // + // + // + // + // + // + // + // iVBORw0KGgoAAAANSUhEUgAAAlgAAAGQEAYAAAAip... + // + // + // + // + // + // + // + // 6f0d4192-4d42-11e8-82c1-f539a07e0e3b + // + // + // + // + // + // The image/png setting is intended only for custom HTTP requests. For most + // use cases, and all actions using an AWS SDK, you should use png. If you specify + // image/png, the HTTP response has a content-type set to image/png, and the + // body of the response is a PNG image. + OutputFormat *string `type:"string"` +} + +// String returns the string representation +func (s GetMetricWidgetImageInput) String() string { + return awsutil.Prettify(s) +} + +// GoString returns the string representation +func (s GetMetricWidgetImageInput) GoString() string { + return s.String() +} + +// Validate inspects the fields of the type to determine if they are valid. +func (s *GetMetricWidgetImageInput) Validate() error { + invalidParams := request.ErrInvalidParams{Context: "GetMetricWidgetImageInput"} + if s.MetricWidget == nil { + invalidParams.Add(request.NewErrParamRequired("MetricWidget")) + } + + if invalidParams.Len() > 0 { + return invalidParams + } + return nil +} + +// SetMetricWidget sets the MetricWidget field's value. +func (s *GetMetricWidgetImageInput) SetMetricWidget(v string) *GetMetricWidgetImageInput { + s.MetricWidget = &v + return s +} + +// SetOutputFormat sets the OutputFormat field's value. +func (s *GetMetricWidgetImageInput) SetOutputFormat(v string) *GetMetricWidgetImageInput { + s.OutputFormat = &v + return s +} + +type GetMetricWidgetImageOutput struct { + _ struct{} `type:"structure"` + + // The image of the graph, in the output format specified. + // + // MetricWidgetImage is automatically base64 encoded/decoded by the SDK. + MetricWidgetImage []byte `type:"blob"` +} + +// String returns the string representation +func (s GetMetricWidgetImageOutput) String() string { + return awsutil.Prettify(s) +} + +// GoString returns the string representation +func (s GetMetricWidgetImageOutput) GoString() string { + return s.String() +} + +// SetMetricWidgetImage sets the MetricWidgetImage field's value. +func (s *GetMetricWidgetImageOutput) SetMetricWidgetImage(v []byte) *GetMetricWidgetImageOutput { + s.MetricWidgetImage = v + return s +} + type ListDashboardsInput struct { _ struct{} `type:"structure"` @@ -3792,6 +4045,15 @@ func (s *MetricDataResult) SetValues(v []*float64) *MetricDataResult { type MetricDatum struct { _ struct{} `type:"structure"` + // Array of numbers that is used along with the Values array. Each number in + // the Count array is the number of times the corresponding value in the Values + // array occurred during the period. + // + // If you omit the Counts array, the default of 1 is used as the value for each + // count. If you include a Counts array, it must include the same amount of + // values as the Values array. + Counts []*float64 `type:"list"` + // The dimensions associated with the metric. Dimensions []*Dimension `type:"list"` @@ -3829,6 +4091,19 @@ type MetricDatum struct { // In addition, special values (for example, NaN, +Infinity, -Infinity) are // not supported. Value *float64 `type:"double"` + + // Array of numbers representing the values for the metric during the period. + // Each unique value is listed just once in this array, and the corresponding + // number in the Counts array specifies the number of times that value occurred + // during the period. You can include up to 150 unique values in each PutMetricData + // action that specifies a Values array. + // + // Although the Values array accepts numbers of type Double, CloudWatch rejects + // values that are either too small or too large. Values must be in the range + // of 8.515920e-109 to 1.174271e+108 (Base 10) or 2e-360 to 2e360 (Base 2). + // In addition, special values (for example, NaN, +Infinity, -Infinity) are + // not supported. + Values []*float64 `type:"list"` } // String returns the string representation @@ -3875,6 +4150,12 @@ func (s *MetricDatum) Validate() error { return nil } +// SetCounts sets the Counts field's value. +func (s *MetricDatum) SetCounts(v []*float64) *MetricDatum { + s.Counts = v + return s +} + // SetDimensions sets the Dimensions field's value. func (s *MetricDatum) SetDimensions(v []*Dimension) *MetricDatum { s.Dimensions = v @@ -3917,6 +4198,12 @@ func (s *MetricDatum) SetValue(v float64) *MetricDatum { return s } +// SetValues sets the Values field's value. +func (s *MetricDatum) SetValues(v []*float64) *MetricDatum { + s.Values = v + return s +} + // This structure defines the metric to be returned, along with the statistics, // period, and units. type MetricStat struct { @@ -4105,11 +4392,11 @@ type PutMetricAlarmInput struct { // // Valid Values: arn:aws:automate:region:ec2:stop | arn:aws:automate:region:ec2:terminate // | arn:aws:automate:region:ec2:recover | arn:aws:sns:region:account-id:sns-topic-name - // | arn:aws:autoscaling:region:account-id:scalingPolicy:policy-id autoScalingGroupName/group-friendly-name:policyName/policy-friendly-name + // | arn:aws:autoscaling:region:account-id:scalingPolicy:policy-idautoScalingGroupName/group-friendly-name:policyName/policy-friendly-name // - // Valid Values (for use with IAM roles): arn:aws:swf:region:{account-id}:action/actions/AWS_EC2.InstanceId.Stop/1.0 - // | arn:aws:swf:region:{account-id}:action/actions/AWS_EC2.InstanceId.Terminate/1.0 - // | arn:aws:swf:region:{account-id}:action/actions/AWS_EC2.InstanceId.Reboot/1.0 + // Valid Values (for use with IAM roles): arn:aws:swf:region:account-id:action/actions/AWS_EC2.InstanceId.Stop/1.0 + // | arn:aws:swf:region:account-id:action/actions/AWS_EC2.InstanceId.Terminate/1.0 + // | arn:aws:swf:region:account-id:action/actions/AWS_EC2.InstanceId.Reboot/1.0 AlarmActions []*string `type:"list"` // The description for the alarm. @@ -4167,11 +4454,11 @@ type PutMetricAlarmInput struct { // // Valid Values: arn:aws:automate:region:ec2:stop | arn:aws:automate:region:ec2:terminate // | arn:aws:automate:region:ec2:recover | arn:aws:sns:region:account-id:sns-topic-name - // | arn:aws:autoscaling:region:account-id:scalingPolicy:policy-id autoScalingGroupName/group-friendly-name:policyName/policy-friendly-name + // | arn:aws:autoscaling:region:account-id:scalingPolicy:policy-idautoScalingGroupName/group-friendly-name:policyName/policy-friendly-name // - // Valid Values (for use with IAM roles): arn:aws:swf:region:{account-id}:action/actions/AWS_EC2.InstanceId.Stop/1.0 - // | arn:aws:swf:region:{account-id}:action/actions/AWS_EC2.InstanceId.Terminate/1.0 - // | arn:aws:swf:region:{account-id}:action/actions/AWS_EC2.InstanceId.Reboot/1.0 + // Valid Values (for use with IAM roles): >arn:aws:swf:region:account-id:action/actions/AWS_EC2.InstanceId.Stop/1.0 + // | arn:aws:swf:region:account-id:action/actions/AWS_EC2.InstanceId.Terminate/1.0 + // | arn:aws:swf:region:account-id:action/actions/AWS_EC2.InstanceId.Reboot/1.0 InsufficientDataActions []*string `type:"list"` // The name for the metric associated with the alarm. @@ -4189,11 +4476,11 @@ type PutMetricAlarmInput struct { // // Valid Values: arn:aws:automate:region:ec2:stop | arn:aws:automate:region:ec2:terminate // | arn:aws:automate:region:ec2:recover | arn:aws:sns:region:account-id:sns-topic-name - // | arn:aws:autoscaling:region:account-id:scalingPolicy:policy-id autoScalingGroupName/group-friendly-name:policyName/policy-friendly-name + // | arn:aws:autoscaling:region:account-id:scalingPolicy:policy-idautoScalingGroupName/group-friendly-name:policyName/policy-friendly-name // - // Valid Values (for use with IAM roles): arn:aws:swf:region:{account-id}:action/actions/AWS_EC2.InstanceId.Stop/1.0 - // | arn:aws:swf:region:{account-id}:action/actions/AWS_EC2.InstanceId.Terminate/1.0 - // | arn:aws:swf:region:{account-id}:action/actions/AWS_EC2.InstanceId.Reboot/1.0 + // Valid Values (for use with IAM roles): arn:aws:swf:region:account-id:action/actions/AWS_EC2.InstanceId.Stop/1.0 + // | arn:aws:swf:region:account-id:action/actions/AWS_EC2.InstanceId.Terminate/1.0 + // | arn:aws:swf:region:account-id:action/actions/AWS_EC2.InstanceId.Reboot/1.0 OKActions []*string `type:"list"` // The period, in seconds, over which the specified statistic is applied. Valid @@ -4450,7 +4737,8 @@ func (s PutMetricAlarmOutput) GoString() string { type PutMetricDataInput struct { _ struct{} `type:"structure"` - // The data for the metric. + // The data for the metric. The array can include no more than 20 metrics per + // call. // // MetricData is a required field MetricData []*MetricDatum `type:"list" required:"true"` diff --git a/vendor/github.com/aws/aws-sdk-go/service/cloudwatchevents/api.go b/vendor/github.com/aws/aws-sdk-go/service/cloudwatchevents/api.go index 77a27140f..18bea0fa1 100644 --- a/vendor/github.com/aws/aws-sdk-go/service/cloudwatchevents/api.go +++ b/vendor/github.com/aws/aws-sdk-go/service/cloudwatchevents/api.go @@ -61,11 +61,10 @@ func (c *CloudWatchEvents) DeleteRuleRequest(input *DeleteRuleInput) (req *reque // // Deletes the specified rule. // -// You must remove all targets from a rule using RemoveTargets before you can -// delete the rule. +// Before you can delete the rule, you must remove all targets, using RemoveTargets. // // When you delete a rule, incoming events might continue to match to the deleted -// rule. Please allow a short period of time for changes to take effect. +// rule. Allow a short period of time for changes to take effect. // // Returns awserr.Error for service API and SDK errors. Use runtime type assertions // with awserr.Error's Code and Message methods to get detailed information about @@ -233,6 +232,9 @@ func (c *CloudWatchEvents) DescribeRuleRequest(input *DescribeRuleInput) (req *r // // Describes the specified rule. // +// DescribeRule does not list the targets of a rule. To see the targets associated +// with a rule, use ListTargetsByRule. +// // Returns awserr.Error for service API and SDK errors. Use runtime type assertions // with awserr.Error's Code and Message methods to get detailed information about // the error. @@ -319,7 +321,7 @@ func (c *CloudWatchEvents) DisableRuleRequest(input *DisableRuleInput) (req *req // won't self-trigger if it has a schedule expression. // // When you disable a rule, incoming events might continue to match to the disabled -// rule. Please allow a short period of time for changes to take effect. +// rule. Allow a short period of time for changes to take effect. // // Returns awserr.Error for service API and SDK errors. Use runtime type assertions // with awserr.Error's Code and Message methods to get detailed information about @@ -409,8 +411,8 @@ func (c *CloudWatchEvents) EnableRuleRequest(input *EnableRuleInput) (req *reque // Enables the specified rule. If the rule does not exist, the operation fails. // // When you enable a rule, incoming events might not immediately start matching -// to a newly enabled rule. Please allow a short period of time for changes -// to take effect. +// to a newly enabled rule. Allow a short period of time for changes to take +// effect. // // Returns awserr.Error for service API and SDK errors. Use runtime type assertions // with awserr.Error's Code and Message methods to get detailed information about @@ -578,6 +580,9 @@ func (c *CloudWatchEvents) ListRulesRequest(input *ListRulesInput) (req *request // Lists your Amazon CloudWatch Events rules. You can either list all the rules // or you can provide a prefix to match to the rule names. // +// ListRules does not list the targets of a rule. To see the targets associated +// with a rule, use ListTargetsByRule. +// // Returns awserr.Error for service API and SDK errors. Use runtime type assertions // with awserr.Error's Code and Message methods to get detailed information about // the error. @@ -830,7 +835,7 @@ func (c *CloudWatchEvents) PutPermissionRequest(input *PutPermissionInput) (req // To enable multiple AWS accounts to put events to your default event bus, // run PutPermission once for each of these accounts. // -// The permission policy on the default event bus cannot exceed 10KB in size. +// The permission policy on the default event bus cannot exceed 10 KB in size. // // Returns awserr.Error for service API and SDK errors. Use runtime type assertions // with awserr.Error's Code and Message methods to get detailed information about @@ -921,14 +926,14 @@ func (c *CloudWatchEvents) PutRuleRequest(input *PutRuleInput) (req *request.Req // Creates or updates the specified rule. Rules are enabled by default, or based // on value of the state. You can disable a rule using DisableRule. // -// If you are updating an existing rule, the rule is completely replaced with -// what you specify in this PutRule command. If you omit arguments in PutRule, -// the old values for those arguments are not kept. Instead, they are replaced -// with null values. +// If you are updating an existing rule, the rule is replaced with what you +// specify in this PutRule command. If you omit arguments in PutRule, the old +// values for those arguments are not kept. Instead, they are replaced with +// null values. // // When you create or update a rule, incoming events might not immediately start -// matching to new or updated rules. Please allow a short period of time for -// changes to take effect. +// matching to new or updated rules. Allow a short period of time for changes +// to take effect. // // A rule must contain at least an EventPattern or ScheduleExpression. Rules // with EventPatterns are triggered when a matching event is observed. Rules @@ -1036,11 +1041,15 @@ func (c *CloudWatchEvents) PutTargetsRequest(input *PutTargetsInput) (req *reque // // * EC2 instances // +// * SSM Run Command +// +// * SSM Automation +// // * AWS Lambda functions // -// * Streams in Amazon Kinesis Streams +// * Data streams in Amazon Kinesis Data Streams // -// * Delivery streams in Amazon Kinesis Firehose +// * Data delivery streams in Amazon Kinesis Data Firehose // // * Amazon ECS tasks // @@ -1048,7 +1057,9 @@ func (c *CloudWatchEvents) PutTargetsRequest(input *PutTargetsInput) (req *reque // // * AWS Batch jobs // -// * Pipelines in Amazon Code Pipeline +// * AWS CodeBuild projects +// +// * Pipelines in AWS CodePipeline // // * Amazon Inspector assessment templates // @@ -1058,40 +1069,40 @@ func (c *CloudWatchEvents) PutTargetsRequest(input *PutTargetsInput) (req *reque // // * The default event bus of another AWS account // -// Note that creating rules with built-in targets is supported only in the AWS -// Management Console. +// Creating rules with built-in targets is supported only in the AWS Management +// Console. The built-in targets are EC2 CreateSnapshot API call, EC2 RebootInstances +// API call, EC2 StopInstances API call, and EC2 TerminateInstances API call. // // For some target types, PutTargets provides target-specific parameters. If -// the target is an Amazon Kinesis stream, you can optionally specify which -// shard the event goes to by using the KinesisParameters argument. To invoke -// a command on multiple EC2 instances with one rule, you can use the RunCommandParameters +// the target is a Kinesis data stream, you can optionally specify which shard +// the event goes to by using the KinesisParameters argument. To invoke a command +// on multiple EC2 instances with one rule, you can use the RunCommandParameters // field. // // To be able to make API calls against the resources that you own, Amazon CloudWatch // Events needs the appropriate permissions. For AWS Lambda and Amazon SNS resources, -// CloudWatch Events relies on resource-based policies. For EC2 instances, Amazon -// Kinesis streams, and AWS Step Functions state machines, CloudWatch Events -// relies on IAM roles that you specify in the RoleARN argument in PutTargets. -// For more information, see Authentication and Access Control (http://docs.aws.amazon.com/AmazonCloudWatch/latest/events/auth-and-access-control-cwe.html) +// CloudWatch Events relies on resource-based policies. For EC2 instances, Kinesis +// data streams, and AWS Step Functions state machines, CloudWatch Events relies +// on IAM roles that you specify in the RoleARN argument in PutTargets. For +// more information, see Authentication and Access Control (http://docs.aws.amazon.com/AmazonCloudWatch/latest/events/auth-and-access-control-cwe.html) // in the Amazon CloudWatch Events User Guide. // // If another AWS account is in the same region and has granted you permission -// (using PutPermission), you can send events to that account by setting that -// account's event bus as a target of the rules in your account. To send the -// matched events to the other account, specify that account's event bus as -// the Arn when you run PutTargets. If your account sends events to another -// account, your account is charged for each sent event. Each event sent to -// antoher account is charged as a custom event. The account receiving the event -// is not charged. For more information on pricing, see Amazon CloudWatch Pricing -// (https://aws.amazon.com/cloudwatch/pricing/). +// (using PutPermission), you can send events to that account. Set that account's +// event bus as a target of the rules in your account. To send the matched events +// to the other account, specify that account's event bus as the Arn value when +// you run PutTargets. If your account sends events to another account, your +// account is charged for each sent event. Each event sent to another account +// is charged as a custom event. The account receiving the event is not charged. +// For more information, see Amazon CloudWatch Pricing (https://aws.amazon.com/cloudwatch/pricing/). // // For more information about enabling cross-account events, see PutPermission. // -// Input, InputPath and InputTransformer are mutually exclusive and optional +// Input, InputPath, and InputTransformer are mutually exclusive and optional // parameters of a target. When a rule is triggered due to a matched event: // // * If none of the following arguments are specified for a target, then -// the entire event is passed to the target in JSON form (unless the target +// the entire event is passed to the target in JSON format (unless the target // is Amazon EC2 Run Command or Amazon ECS task, in which case nothing from // the event is passed to the target). // @@ -1110,8 +1121,8 @@ func (c *CloudWatchEvents) PutTargetsRequest(input *PutTargetsInput) (req *reque // not bracket notation. // // When you add targets to a rule and the associated rule triggers soon after, -// new or updated targets might not be immediately invoked. Please allow a short -// period of time for changes to take effect. +// new or updated targets might not be immediately invoked. Allow a short period +// of time for changes to take effect. // // This action can partially fail if too many requests are made at the same // time. If that happens, FailedEntryCount is non-zero in the response and each @@ -1298,8 +1309,8 @@ func (c *CloudWatchEvents) RemoveTargetsRequest(input *RemoveTargetsInput) (req // those targets are no longer be invoked. // // When you remove a target, when the associated rule triggers, removed targets -// might continue to be invoked. Please allow a short period of time for changes -// to take effect. +// might continue to be invoked. Allow a short period of time for changes to +// take effect. // // This action can partially fail if too many requests are made at the same // time. If that happens, FailedEntryCount is non-zero in the response and each @@ -1432,6 +1443,71 @@ func (c *CloudWatchEvents) TestEventPatternWithContext(ctx aws.Context, input *T return out, req.Send() } +// This structure specifies the VPC subnets and security groups for the task, +// and whether a public IP address is to be used. This structure is relevant +// only for ECS tasks that use the awsvpc network mode. +type AwsVpcConfiguration struct { + _ struct{} `type:"structure"` + + // Specifies whether the task's elastic network interface receives a public + // IP address. You can specify ENABLED only when LaunchType in EcsParameters + // is set to FARGATE. + AssignPublicIp *string `type:"string" enum:"AssignPublicIp"` + + // Specifies the security groups associated with the task. These security groups + // must all be in the same VPC. You can specify as many as five security groups. + // If you do not specify a security group, the default security group for the + // VPC is used. + SecurityGroups []*string `type:"list"` + + // Specifies the subnets associated with the task. These subnets must all be + // in the same VPC. You can specify as many as 16 subnets. + // + // Subnets is a required field + Subnets []*string `type:"list" required:"true"` +} + +// String returns the string representation +func (s AwsVpcConfiguration) String() string { + return awsutil.Prettify(s) +} + +// GoString returns the string representation +func (s AwsVpcConfiguration) GoString() string { + return s.String() +} + +// Validate inspects the fields of the type to determine if they are valid. +func (s *AwsVpcConfiguration) Validate() error { + invalidParams := request.ErrInvalidParams{Context: "AwsVpcConfiguration"} + if s.Subnets == nil { + invalidParams.Add(request.NewErrParamRequired("Subnets")) + } + + if invalidParams.Len() > 0 { + return invalidParams + } + return nil +} + +// SetAssignPublicIp sets the AssignPublicIp field's value. +func (s *AwsVpcConfiguration) SetAssignPublicIp(v string) *AwsVpcConfiguration { + s.AssignPublicIp = &v + return s +} + +// SetSecurityGroups sets the SecurityGroups field's value. +func (s *AwsVpcConfiguration) SetSecurityGroups(v []*string) *AwsVpcConfiguration { + s.SecurityGroups = v + return s +} + +// SetSubnets sets the Subnets field's value. +func (s *AwsVpcConfiguration) SetSubnets(v []*string) *AwsVpcConfiguration { + s.Subnets = v + return s +} + // The array properties for the submitted job, such as the size of the array. // The array size can be between 2 and 10,000. If you specify array properties // for a job, it becomes an array job. This parameter is used only if the target @@ -1484,7 +1560,7 @@ type BatchParameters struct { // The retry strategy to use for failed jobs, if the target is an AWS Batch // job. The retry strategy is the number of times to retry the failed job execution. - // Valid values are 1 to 10. When you specify a retry strategy here, it overrides + // Valid values are 1–10. When you specify a retry strategy here, it overrides // the retry strategy defined in the job definition. RetryStrategy *BatchRetryStrategy `type:"structure"` } @@ -1546,7 +1622,7 @@ type BatchRetryStrategy struct { _ struct{} `type:"structure"` // The number of times to attempt to retry, if the job fails. Valid values are - // 1 to 10. + // 1–10. Attempts *int64 `type:"integer"` } @@ -1851,16 +1927,43 @@ func (s DisableRuleOutput) GoString() string { return s.String() } -// The custom parameters to be used when the target is an Amazon ECS cluster. +// The custom parameters to be used when the target is an Amazon ECS task. type EcsParameters struct { _ struct{} `type:"structure"` - // The number of tasks to create based on the TaskDefinition. The default is - // one. + // Specifies an ECS task group for the task. The maximum length is 255 characters. + Group *string `type:"string"` + + // Specifies the launch type on which your task is running. The launch type + // that you specify here must match one of the launch type (compatibilities) + // of the target task. The FARGATE value is supported only in the Regions where + // AWS Fargate with Amazon ECS is supported. For more information, see AWS Fargate + // on Amazon ECS (http://docs.aws.amazon.com/AmazonECS/latest/developerguide/AWS-Fargate.html) + // in the Amazon Elastic Container Service Developer Guide. + LaunchType *string `type:"string" enum:"LaunchType"` + + // Use this structure if the ECS task uses the awsvpc network mode. This structure + // specifies the VPC subnets and security groups associated with the task, and + // whether a public IP address is to be used. This structure is required if + // LaunchType is FARGATE because the awsvpc mode is required for Fargate tasks. + // + // If you specify NetworkConfiguration when the target ECS task does not use + // the awsvpc network mode, the task fails. + NetworkConfiguration *NetworkConfiguration `type:"structure"` + + // Specifies the platform version for the task. Specify only the numeric portion + // of the platform version, such as 1.1.0. + // + // This structure is used only if LaunchType is FARGATE. For more information + // about valid platform versions, see AWS Fargate Platform Versions (http://docs.aws.amazon.com/AmazonECS/latest/developerguide/platform_versions.html) + // in the Amazon Elastic Container Service Developer Guide. + PlatformVersion *string `type:"string"` + + // The number of tasks to create based on TaskDefinition. The default is 1. TaskCount *int64 `min:"1" type:"integer"` // The ARN of the task definition to use if the event target is an Amazon ECS - // cluster. + // task. // // TaskDefinitionArn is a required field TaskDefinitionArn *string `min:"1" type:"string" required:"true"` @@ -1888,6 +1991,11 @@ func (s *EcsParameters) Validate() error { if s.TaskDefinitionArn != nil && len(*s.TaskDefinitionArn) < 1 { invalidParams.Add(request.NewErrParamMinLen("TaskDefinitionArn", 1)) } + if s.NetworkConfiguration != nil { + if err := s.NetworkConfiguration.Validate(); err != nil { + invalidParams.AddNested("NetworkConfiguration", err.(request.ErrInvalidParams)) + } + } if invalidParams.Len() > 0 { return invalidParams @@ -1895,6 +2003,30 @@ func (s *EcsParameters) Validate() error { return nil } +// SetGroup sets the Group field's value. +func (s *EcsParameters) SetGroup(v string) *EcsParameters { + s.Group = &v + return s +} + +// SetLaunchType sets the LaunchType field's value. +func (s *EcsParameters) SetLaunchType(v string) *EcsParameters { + s.LaunchType = &v + return s +} + +// SetNetworkConfiguration sets the NetworkConfiguration field's value. +func (s *EcsParameters) SetNetworkConfiguration(v *NetworkConfiguration) *EcsParameters { + s.NetworkConfiguration = v + return s +} + +// SetPlatformVersion sets the PlatformVersion field's value. +func (s *EcsParameters) SetPlatformVersion(v string) *EcsParameters { + s.PlatformVersion = &v + return s +} + // SetTaskCount sets the TaskCount field's value. func (s *EcsParameters) SetTaskCount(v int64) *EcsParameters { s.TaskCount = &v @@ -1967,13 +2099,53 @@ func (s EnableRuleOutput) GoString() string { type InputTransformer struct { _ struct{} `type:"structure"` - // Map of JSON paths to be extracted from the event. These are key-value pairs, - // where each value is a JSON path. You must use JSON dot notation, not bracket - // notation. + // Map of JSON paths to be extracted from the event. You can then insert these + // in the template in InputTemplate to produce the output you want to be sent + // to the target. + // + // InputPathsMap is an array key-value pairs, where each value is a valid JSON + // path. You can have as many as 10 key-value pairs. You must use JSON dot notation, + // not bracket notation. + // + // The keys cannot start with "AWS." InputPathsMap map[string]*string `type:"map"` - // Input template where you can use the values of the keys from InputPathsMap - // to customize the data sent to the target. + // Input template where you specify placeholders that will be filled with the + // values of the keys from InputPathsMap to customize the data sent to the target. + // Enclose each InputPathsMaps value in brackets: The InputTemplate + // must be valid JSON. + // + // If InputTemplate is a JSON object (surrounded by curly braces), the following + // restrictions apply: + // + // * The placeholder cannot be used as an object key. + // + // * Object values cannot include quote marks. + // + // The following example shows the syntax for using InputPathsMap and InputTemplate. + // + // "InputTransformer": + // + // { + // + // "InputPathsMap": {"instance": "$.detail.instance","status": "$.detail.status"}, + // + // "InputTemplate": " is in state " + // + // } + // + // To have the InputTemplate include quote marks within a JSON string, escape + // each quote marks with a slash, as in the following example: + // + // "InputTransformer": + // + // { + // + // "InputPathsMap": {"instance": "$.detail.instance","status": "$.detail.status"}, + // + // "InputTemplate": " is in state \"\"" + // + // } // // InputTemplate is a required field InputTemplate *string `min:"1" type:"string" required:"true"` @@ -2018,9 +2190,9 @@ func (s *InputTransformer) SetInputTemplate(v string) *InputTransformer { } // This object enables you to specify a JSON path to extract from the event -// and use as the partition key for the Amazon Kinesis stream, so that you can -// control the shard to which the event goes. If you do not include this parameter, -// the default is to use the eventId as the partition key. +// and use as the partition key for the Amazon Kinesis data stream, so that +// you can control the shard to which the event goes. If you do not include +// this parameter, the default is to use the eventId as the partition key. type KinesisParameters struct { _ struct{} `type:"structure"` @@ -2350,6 +2522,47 @@ func (s *ListTargetsByRuleOutput) SetTargets(v []*Target) *ListTargetsByRuleOutp return s } +// This structure specifies the network configuration for an ECS task. +type NetworkConfiguration struct { + _ struct{} `type:"structure"` + + // Use this structure to specify the VPC subnets and security groups for the + // task, and whether a public IP address is to be used. This structure is relevant + // only for ECS tasks that use the awsvpc network mode. + AwsvpcConfiguration *AwsVpcConfiguration `locationName:"awsvpcConfiguration" type:"structure"` +} + +// String returns the string representation +func (s NetworkConfiguration) String() string { + return awsutil.Prettify(s) +} + +// GoString returns the string representation +func (s NetworkConfiguration) GoString() string { + return s.String() +} + +// Validate inspects the fields of the type to determine if they are valid. +func (s *NetworkConfiguration) Validate() error { + invalidParams := request.ErrInvalidParams{Context: "NetworkConfiguration"} + if s.AwsvpcConfiguration != nil { + if err := s.AwsvpcConfiguration.Validate(); err != nil { + invalidParams.AddNested("AwsvpcConfiguration", err.(request.ErrInvalidParams)) + } + } + + if invalidParams.Len() > 0 { + return invalidParams + } + return nil +} + +// SetAwsvpcConfiguration sets the AwsvpcConfiguration field's value. +func (s *NetworkConfiguration) SetAwsvpcConfiguration(v *AwsVpcConfiguration) *NetworkConfiguration { + s.AwsvpcConfiguration = v + return s +} + type PutEventsInput struct { _ struct{} `type:"structure"` @@ -2442,11 +2655,11 @@ type PutEventsRequestEntry struct { // primarily concerns. Any number, including zero, may be present. Resources []*string `type:"list"` - // The source of the event. + // The source of the event. This field is required. Source *string `type:"string"` - // The timestamp of the event, per RFC3339 (https://www.rfc-editor.org/rfc/rfc3339.txt). - // If no timestamp is provided, the timestamp of the PutEvents call is used. + // The time stamp of the event, per RFC3339 (https://www.rfc-editor.org/rfc/rfc3339.txt). + // If no time stamp is provided, the time stamp of the PutEvents call is used. Time *time.Time `type:"timestamp"` } @@ -3300,10 +3513,8 @@ func (s *SqsParameters) SetMessageGroupId(v string) *SqsParameters { return s } -// Targets are the resources to be invoked when a rule is triggered. Target -// types include EC2 instances, AWS Lambda functions, Amazon Kinesis streams, -// Amazon ECS tasks, AWS Step Functions state machines, Run Command, and built-in -// targets. +// Targets are the resources to be invoked when a rule is triggered. For a complete +// list of services and resources that can be set as a target, see PutTargets. type Target struct { _ struct{} `type:"structure"` @@ -3312,10 +3523,9 @@ type Target struct { // Arn is a required field Arn *string `min:"1" type:"string" required:"true"` - // Contains the job definition, job name, and other parameters if the event - // target is an AWS Batch job. For more information about AWS Batch, see Jobs - // (http://docs.aws.amazon.com/batch/latest/userguide/jobs.html) in the AWS - // Batch User Guide. + // If the event target is an AWS Batch job, this contains the job definition, + // job name, and other parameters. For more information, see Jobs (http://docs.aws.amazon.com/batch/latest/userguide/jobs.html) + // in the AWS Batch User Guide. BatchParameters *BatchParameters `type:"structure"` // Contains the Amazon ECS task definition and task count to be used, if the @@ -3344,9 +3554,9 @@ type Target struct { // then use that data to send customized input to the target. InputTransformer *InputTransformer `type:"structure"` - // The custom parameter you can use to control shard assignment, when the target - // is an Amazon Kinesis stream. If you do not include this parameter, the default - // is to use the eventId as the partition key. + // The custom parameter you can use to control the shard assignment, when the + // target is a Kinesis data stream. If you do not include this parameter, the + // default is to use the eventId as the partition key. KinesisParameters *KinesisParameters `type:"structure"` // The Amazon Resource Name (ARN) of the IAM role to be used for this target @@ -3358,6 +3568,9 @@ type Target struct { RunCommandParameters *RunCommandParameters `type:"structure"` // Contains the message group ID to use when the target is a FIFO queue. + // + // If you specify an SQS FIFO queue as a target, the queue must have content-based + // deduplication enabled. SqsParameters *SqsParameters `type:"structure"` } @@ -3563,6 +3776,22 @@ func (s *TestEventPatternOutput) SetResult(v bool) *TestEventPatternOutput { return s } +const ( + // AssignPublicIpEnabled is a AssignPublicIp enum value + AssignPublicIpEnabled = "ENABLED" + + // AssignPublicIpDisabled is a AssignPublicIp enum value + AssignPublicIpDisabled = "DISABLED" +) + +const ( + // LaunchTypeEc2 is a LaunchType enum value + LaunchTypeEc2 = "EC2" + + // LaunchTypeFargate is a LaunchType enum value + LaunchTypeFargate = "FARGATE" +) + const ( // RuleStateEnabled is a RuleState enum value RuleStateEnabled = "ENABLED" diff --git a/vendor/github.com/aws/aws-sdk-go/service/cloudwatchevents/doc.go b/vendor/github.com/aws/aws-sdk-go/service/cloudwatchevents/doc.go index b55c8709d..16976e0d1 100644 --- a/vendor/github.com/aws/aws-sdk-go/service/cloudwatchevents/doc.go +++ b/vendor/github.com/aws/aws-sdk-go/service/cloudwatchevents/doc.go @@ -13,8 +13,9 @@ // * Automatically invoke an AWS Lambda function to update DNS entries when // an event notifies you that Amazon EC2 instance enters the running state. // -// * Direct specific API records from CloudTrail to an Amazon Kinesis stream -// for detailed analysis of potential security or availability risks. +// * Direct specific API records from AWS CloudTrail to an Amazon Kinesis +// data stream for detailed analysis of potential security or availability +// risks. // // * Periodically invoke a built-in target to create a snapshot of an Amazon // EBS volume. diff --git a/vendor/github.com/aws/aws-sdk-go/service/cloudwatchlogs/api.go b/vendor/github.com/aws/aws-sdk-go/service/cloudwatchlogs/api.go index 7d05f0826..d93b9c418 100644 --- a/vendor/github.com/aws/aws-sdk-go/service/cloudwatchlogs/api.go +++ b/vendor/github.com/aws/aws-sdk-go/service/cloudwatchlogs/api.go @@ -2769,14 +2769,19 @@ func (c *CloudWatchLogs) PutLogEventsRequest(input *PutLogEventsInput) (req *req // retention period of the log group. // // * The log events in the batch must be in chronological ordered by their -// time stamp (the time the event occurred, expressed as the number of milliseconds -// after Jan 1, 1970 00:00:00 UTC). +// time stamp. The time stamp is the time the event occurred, expressed as +// the number of milliseconds after Jan 1, 1970 00:00:00 UTC. (In AWS Tools +// for PowerShell and the AWS SDK for .NET, the timestamp is specified in +// .NET format: yyyy-mm-ddThh:mm:ss. For example, 2017-09-15T13:45:30.) // // * The maximum number of log events in a batch is 10,000. // // * A batch of log events in a single request cannot span more than 24 hours. // Otherwise, the operation fails. // +// If a call to PutLogEvents returns "UnrecognizedClientException" the most +// likely cause is an invalid AWS access key ID or secret key. +// // Returns awserr.Error for service API and SDK errors. Use runtime type assertions // with awserr.Error's Code and Message methods to get detailed information about // the error. @@ -2800,6 +2805,9 @@ func (c *CloudWatchLogs) PutLogEventsRequest(input *PutLogEventsInput) (req *req // * ErrCodeServiceUnavailableException "ServiceUnavailableException" // The service cannot complete the request. // +// * ErrCodeUnrecognizedClientException "UnrecognizedClientException" +// The most likely cause is an invalid AWS access key ID or secret key. +// // See also, https://docs.aws.amazon.com/goto/WebAPI/logs-2014-03-28/PutLogEvents func (c *CloudWatchLogs) PutLogEvents(input *PutLogEventsInput) (*PutLogEventsOutput, error) { req, out := c.PutLogEventsRequest(input) @@ -2966,7 +2974,7 @@ func (c *CloudWatchLogs) PutResourcePolicyRequest(input *PutResourcePolicyInput) // // Creates or updates a resource policy allowing other AWS services to put log // events to this account, such as Amazon Route 53. An account can have up to -// 50 resource policies per region. +// 10 resource policies per region. // // Returns awserr.Error for service API and SDK errors. Use runtime type assertions // with awserr.Error's Code and Message methods to get detailed information about @@ -4629,7 +4637,7 @@ type DescribeLogStreamsInput struct { // The prefix to match. // - // iIf orderBy is LastEventTime,you cannot specify this parameter. + // If orderBy is LastEventTime,you cannot specify this parameter. LogStreamNamePrefix *string `locationName:"logStreamNamePrefix" min:"1" type:"string"` // The token for the next set of items to return. (You received this token from @@ -4768,11 +4776,14 @@ type DescribeMetricFiltersInput struct { // The name of the log group. LogGroupName *string `locationName:"logGroupName" min:"1" type:"string"` - // The name of the CloudWatch metric to which the monitored log information - // should be published. For example, you may publish to a metric called ErrorCount. + // Filters results to include only those with the specified metric name. If + // you include this parameter in your request, you must also include the metricNamespace + // parameter. MetricName *string `locationName:"metricName" type:"string"` - // The namespace of the CloudWatch metric. + // Filters results to include only those in the specified namespace. If you + // include this parameter in your request, you must also include the metricName + // parameter. MetricNamespace *string `locationName:"metricNamespace" type:"string"` // The token for the next set of items to return. (You received this token from @@ -5377,7 +5388,10 @@ type FilterLogEventsInput struct { // not returned. EndTime *int64 `locationName:"endTime" type:"long"` - // The filter pattern to use. If not provided, all the events are matched. + // The filter pattern to use. For more information, see Filter and Pattern Syntax + // (http://docs.aws.amazon.com/AmazonCloudWatch/latest/logs/FilterAndPatternSyntax.html). + // + // If not provided, all the events are matched. FilterPattern *string `locationName:"filterPattern" type:"string"` // If the value is true, the operation makes a best effort to provide responses @@ -5390,12 +5404,24 @@ type FilterLogEventsInput struct { // The maximum number of events to return. The default is 10,000 events. Limit *int64 `locationName:"limit" min:"1" type:"integer"` - // The name of the log group. + // The name of the log group to search. // // LogGroupName is a required field LogGroupName *string `locationName:"logGroupName" min:"1" type:"string" required:"true"` - // Optional list of log stream names. + // Filters the results to include only events from log streams that have names + // starting with this prefix. + // + // If you specify a value for both logStreamNamePrefix and logStreamNames, but + // the value for logStreamNamePrefix does not match any log stream names specified + // in logStreamNames, the action returns an InvalidParameterException error. + LogStreamNamePrefix *string `locationName:"logStreamNamePrefix" min:"1" type:"string"` + + // Filters the results to only logs from the log streams in this list. + // + // If you specify a value for both logStreamNamePrefix and logStreamNames, but + // the value for logStreamNamePrefix does not match any log stream names specified + // in logStreamNames, the action returns an InvalidParameterException error. LogStreamNames []*string `locationName:"logStreamNames" min:"1" type:"list"` // The token for the next set of events to return. (You received this token @@ -5430,6 +5456,9 @@ func (s *FilterLogEventsInput) Validate() error { if s.LogGroupName != nil && len(*s.LogGroupName) < 1 { invalidParams.Add(request.NewErrParamMinLen("LogGroupName", 1)) } + if s.LogStreamNamePrefix != nil && len(*s.LogStreamNamePrefix) < 1 { + invalidParams.Add(request.NewErrParamMinLen("LogStreamNamePrefix", 1)) + } if s.LogStreamNames != nil && len(s.LogStreamNames) < 1 { invalidParams.Add(request.NewErrParamMinLen("LogStreamNames", 1)) } @@ -5473,6 +5502,12 @@ func (s *FilterLogEventsInput) SetLogGroupName(v string) *FilterLogEventsInput { return s } +// SetLogStreamNamePrefix sets the LogStreamNamePrefix field's value. +func (s *FilterLogEventsInput) SetLogStreamNamePrefix(v string) *FilterLogEventsInput { + s.LogStreamNamePrefix = &v + return s +} + // SetLogStreamNames sets the LogStreamNames field's value. func (s *FilterLogEventsInput) SetLogStreamNames(v []*string) *FilterLogEventsInput { s.LogStreamNames = v @@ -5600,8 +5635,8 @@ type GetLogEventsInput struct { _ struct{} `type:"structure"` // The end of the time range, expressed as the number of milliseconds after - // Jan 1, 1970 00:00:00 UTC. Events with a time stamp later than this time are - // not included. + // Jan 1, 1970 00:00:00 UTC. Events with a time stamp equal to or later than + // this time are not included. EndTime *int64 `locationName:"endTime" type:"long"` // The maximum number of log events returned. If you don't specify a value, @@ -5629,8 +5664,9 @@ type GetLogEventsInput struct { StartFromHead *bool `locationName:"startFromHead" type:"boolean"` // The start of the time range, expressed as the number of milliseconds after - // Jan 1, 1970 00:00:00 UTC. Events with a time stamp earlier than this time - // are not included. + // Jan 1, 1970 00:00:00 UTC. Events with a time stamp equal to this time or + // later than this time are included. Events with a time stamp earlier than + // this time are not included. StartTime *int64 `locationName:"startTime" type:"long"` } @@ -5721,11 +5757,13 @@ type GetLogEventsOutput struct { Events []*OutputLogEvent `locationName:"events" type:"list"` // The token for the next set of items in the backward direction. The token - // expires after 24 hours. + // expires after 24 hours. This token will never be null. If you have reached + // the end of the stream, it will return the same token you passed in. NextBackwardToken *string `locationName:"nextBackwardToken" min:"1" type:"string"` // The token for the next set of items in the forward direction. The token expires - // after 24 hours. + // after 24 hours. If you have reached the end of the stream, it will return + // the same token you passed in. NextForwardToken *string `locationName:"nextForwardToken" min:"1" type:"string"` } @@ -5767,7 +5805,7 @@ type InputLogEvent struct { // Message is a required field Message *string `locationName:"message" min:"1" type:"string" required:"true"` - // The time the event occurred, expressed as the number of milliseconds fter + // The time the event occurred, expressed as the number of milliseconds after // Jan 1, 1970 00:00:00 UTC. // // Timestamp is a required field @@ -6714,9 +6752,9 @@ type PutResourcePolicyInput struct { // to put DNS query logs in to the specified log group. Replace "logArn" with // the ARN of your CloudWatch Logs resource, such as a log group or log stream. // - // { "Version": "2012-10-17" "Statement": [ { "Sid": "Route53LogsToCloudWatchLogs", + // { "Version": "2012-10-17", "Statement": [ { "Sid": "Route53LogsToCloudWatchLogs", // "Effect": "Allow", "Principal": { "Service": [ "route53.amazonaws.com" ] - // }, "Action":"logs:PutLogEvents", "Resource": logArn } ] } + // }, "Action":"logs:PutLogEvents", "Resource": "logArn" } ] } PolicyDocument *string `locationName:"policyDocument" min:"1" type:"string"` // Name of the new policy. This parameter is required. diff --git a/vendor/github.com/aws/aws-sdk-go/service/cloudwatchlogs/errors.go b/vendor/github.com/aws/aws-sdk-go/service/cloudwatchlogs/errors.go index 772141f53..d8f3338b3 100644 --- a/vendor/github.com/aws/aws-sdk-go/service/cloudwatchlogs/errors.go +++ b/vendor/github.com/aws/aws-sdk-go/service/cloudwatchlogs/errors.go @@ -57,4 +57,10 @@ const ( // // The service cannot complete the request. ErrCodeServiceUnavailableException = "ServiceUnavailableException" + + // ErrCodeUnrecognizedClientException for service response error code + // "UnrecognizedClientException". + // + // The most likely cause is an invalid AWS access key ID or secret key. + ErrCodeUnrecognizedClientException = "UnrecognizedClientException" ) diff --git a/vendor/github.com/aws/aws-sdk-go/service/codebuild/api.go b/vendor/github.com/aws/aws-sdk-go/service/codebuild/api.go index 8337312ca..b61b96fc9 100644 --- a/vendor/github.com/aws/aws-sdk-go/service/codebuild/api.go +++ b/vendor/github.com/aws/aws-sdk-go/service/codebuild/api.go @@ -1585,6 +1585,13 @@ type Build struct { // The current build phase. CurrentPhase *string `locationName:"currentPhase" type:"string"` + // The AWS Key Management Service (AWS KMS) customer master key (CMK) to be + // used for encrypting the build output artifacts. + // + // This is expressed either as the CMK's Amazon Resource Name (ARN) or, if specified, + // the CMK's alias (using the format alias/alias-name). + EncryptionKey *string `locationName:"encryptionKey" min:"1" type:"string"` + // When the build process ended, expressed in Unix time format. EndTime *time.Time `locationName:"endTime" type:"timestamp"` @@ -1619,6 +1626,44 @@ type Build struct { // The name of the AWS CodeBuild project. ProjectName *string `locationName:"projectName" min:"1" type:"string"` + // An identifier for the version of this build's source code. + // + // * For AWS CodeCommit, GitHub, GitHub Enterprise, and BitBucket, the commit + // ID. + // + // * For AWS CodePipeline, the source revision provided by AWS CodePipeline. + // + // + // * For Amazon Simple Storage Service (Amazon S3), this does not apply. + ResolvedSourceVersion *string `locationName:"resolvedSourceVersion" min:"1" type:"string"` + + // An array of ProjectArtifacts objects. + SecondaryArtifacts []*BuildArtifacts `locationName:"secondaryArtifacts" type:"list"` + + // An array of ProjectSourceVersion objects. Each ProjectSourceVersion must + // be one of: + // + // * For AWS CodeCommit: the commit ID to use. + // + // * For GitHub: the commit ID, pull request ID, branch name, or tag name + // that corresponds to the version of the source code you want to build. + // If a pull request ID is specified, it must use the format pr/pull-request-ID + // (for example pr/25). If a branch name is specified, the branch's HEAD + // commit ID will be used. If not specified, the default branch's HEAD commit + // ID will be used. + // + // * For Bitbucket: the commit ID, branch name, or tag name that corresponds + // to the version of the source code you want to build. If a branch name + // is specified, the branch's HEAD commit ID will be used. If not specified, + // the default branch's HEAD commit ID will be used. + // + // * For Amazon Simple Storage Service (Amazon S3): the version ID of the + // object representing the build input ZIP file to use. + SecondarySourceVersions []*ProjectSourceVersion `locationName:"secondarySourceVersions" type:"list"` + + // An array of ProjectSource objects. + SecondarySources []*ProjectSource `locationName:"secondarySources" type:"list"` + // The name of a service role used for this build. ServiceRole *string `locationName:"serviceRole" min:"1" type:"string"` @@ -1688,6 +1733,12 @@ func (s *Build) SetCurrentPhase(v string) *Build { return s } +// SetEncryptionKey sets the EncryptionKey field's value. +func (s *Build) SetEncryptionKey(v string) *Build { + s.EncryptionKey = &v + return s +} + // SetEndTime sets the EndTime field's value. func (s *Build) SetEndTime(v time.Time) *Build { s.EndTime = &v @@ -1736,6 +1787,30 @@ func (s *Build) SetProjectName(v string) *Build { return s } +// SetResolvedSourceVersion sets the ResolvedSourceVersion field's value. +func (s *Build) SetResolvedSourceVersion(v string) *Build { + s.ResolvedSourceVersion = &v + return s +} + +// SetSecondaryArtifacts sets the SecondaryArtifacts field's value. +func (s *Build) SetSecondaryArtifacts(v []*BuildArtifacts) *Build { + s.SecondaryArtifacts = v + return s +} + +// SetSecondarySourceVersions sets the SecondarySourceVersions field's value. +func (s *Build) SetSecondarySourceVersions(v []*ProjectSourceVersion) *Build { + s.SecondarySourceVersions = v + return s +} + +// SetSecondarySources sets the SecondarySources field's value. +func (s *Build) SetSecondarySources(v []*ProjectSource) *Build { + s.SecondarySources = v + return s +} + // SetServiceRole sets the ServiceRole field's value. func (s *Build) SetServiceRole(v string) *Build { s.ServiceRole = &v @@ -1776,6 +1851,12 @@ func (s *Build) SetVpcConfig(v *VpcConfig) *Build { type BuildArtifacts struct { _ struct{} `type:"structure"` + // An identifier for this artifact definition. + ArtifactIdentifier *string `locationName:"artifactIdentifier" type:"string"` + + // Information that tells you if encryption for build artifacts is disabled. + EncryptionDisabled *bool `locationName:"encryptionDisabled" type:"boolean"` + // Information about the location of the build artifacts. Location *string `locationName:"location" type:"string"` @@ -1788,6 +1869,12 @@ type BuildArtifacts struct { // to ZIP. Md5sum *string `locationName:"md5sum" type:"string"` + // If this flag is set, a name specified in the buildspec file overrides the + // artifact name. The name specified in a buildspec file is calculated at build + // time and uses the Shell Command Language. For example, you can append a date + // and time to your artifact name so that it is always unique. + OverrideArtifactName *bool `locationName:"overrideArtifactName" type:"boolean"` + // The SHA-256 hash of the build artifact. // // You can use this hash along with a checksum tool to confirm both file integrity @@ -1808,6 +1895,18 @@ func (s BuildArtifacts) GoString() string { return s.String() } +// SetArtifactIdentifier sets the ArtifactIdentifier field's value. +func (s *BuildArtifacts) SetArtifactIdentifier(v string) *BuildArtifacts { + s.ArtifactIdentifier = &v + return s +} + +// SetEncryptionDisabled sets the EncryptionDisabled field's value. +func (s *BuildArtifacts) SetEncryptionDisabled(v bool) *BuildArtifacts { + s.EncryptionDisabled = &v + return s +} + // SetLocation sets the Location field's value. func (s *BuildArtifacts) SetLocation(v string) *BuildArtifacts { s.Location = &v @@ -1820,6 +1919,12 @@ func (s *BuildArtifacts) SetMd5sum(v string) *BuildArtifacts { return s } +// SetOverrideArtifactName sets the OverrideArtifactName field's value. +func (s *BuildArtifacts) SetOverrideArtifactName(v bool) *BuildArtifacts { + s.OverrideArtifactName = &v + return s +} + // SetSha256sum sets the Sha256sum field's value. func (s *BuildArtifacts) SetSha256sum(v string) *BuildArtifacts { s.Sha256sum = &v @@ -1963,6 +2068,70 @@ func (s *BuildPhase) SetStartTime(v time.Time) *BuildPhase { return s } +// Information about Amazon CloudWatch Logs for a build project. +type CloudWatchLogsConfig struct { + _ struct{} `type:"structure"` + + // The group name of the Amazon CloudWatch Logs. For more information, see Working + // with Log Groups and Log Streams (http://docs.aws.amazon.com/AmazonCloudWatch/latest/logs/Working-with-log-groups-and-streams.html) + GroupName *string `locationName:"groupName" type:"string"` + + // The current status of the Amazon CloudWatch Logs for a build project. Valid + // values are: + // + // * ENABLED: Amazon CloudWatch Logs are enabled for this build project. + // + // * DISABLED: Amazon CloudWatch Logs are not enabled for this build project. + // + // Status is a required field + Status *string `locationName:"status" type:"string" required:"true" enum:"LogsConfigStatusType"` + + // The prefix of the stream name of the Amazon CloudWatch Logs. For more information, + // see Working with Log Groups and Log Streams (http://docs.aws.amazon.com/AmazonCloudWatch/latest/logs/Working-with-log-groups-and-streams.html) + StreamName *string `locationName:"streamName" type:"string"` +} + +// String returns the string representation +func (s CloudWatchLogsConfig) String() string { + return awsutil.Prettify(s) +} + +// GoString returns the string representation +func (s CloudWatchLogsConfig) GoString() string { + return s.String() +} + +// Validate inspects the fields of the type to determine if they are valid. +func (s *CloudWatchLogsConfig) Validate() error { + invalidParams := request.ErrInvalidParams{Context: "CloudWatchLogsConfig"} + if s.Status == nil { + invalidParams.Add(request.NewErrParamRequired("Status")) + } + + if invalidParams.Len() > 0 { + return invalidParams + } + return nil +} + +// SetGroupName sets the GroupName field's value. +func (s *CloudWatchLogsConfig) SetGroupName(v string) *CloudWatchLogsConfig { + s.GroupName = &v + return s +} + +// SetStatus sets the Status field's value. +func (s *CloudWatchLogsConfig) SetStatus(v string) *CloudWatchLogsConfig { + s.Status = &v + return s +} + +// SetStreamName sets the StreamName field's value. +func (s *CloudWatchLogsConfig) SetStreamName(v string) *CloudWatchLogsConfig { + s.StreamName = &v + return s +} + type CreateProjectInput struct { _ struct{} `type:"structure"` @@ -1994,11 +2163,21 @@ type CreateProjectInput struct { // Environment is a required field Environment *ProjectEnvironment `locationName:"environment" type:"structure" required:"true"` + // Information about logs for the build project. Logs can be Amazon CloudWatch + // Logs, uploaded to a specified S3 bucket, or both. + LogsConfig *LogsConfig `locationName:"logsConfig" type:"structure"` + // The name of the build project. // // Name is a required field Name *string `locationName:"name" min:"2" type:"string" required:"true"` + // An array of ProjectArtifacts objects. + SecondaryArtifacts []*ProjectArtifacts `locationName:"secondaryArtifacts" type:"list"` + + // An array of ProjectSource objects. + SecondarySources []*ProjectSource `locationName:"secondarySources" type:"list"` + // The ARN of the AWS Identity and Access Management (IAM) role that enables // AWS CodeBuild to interact with dependent AWS services on behalf of the AWS // account. @@ -2081,6 +2260,31 @@ func (s *CreateProjectInput) Validate() error { invalidParams.AddNested("Environment", err.(request.ErrInvalidParams)) } } + if s.LogsConfig != nil { + if err := s.LogsConfig.Validate(); err != nil { + invalidParams.AddNested("LogsConfig", err.(request.ErrInvalidParams)) + } + } + if s.SecondaryArtifacts != nil { + for i, v := range s.SecondaryArtifacts { + if v == nil { + continue + } + if err := v.Validate(); err != nil { + invalidParams.AddNested(fmt.Sprintf("%s[%v]", "SecondaryArtifacts", i), err.(request.ErrInvalidParams)) + } + } + } + if s.SecondarySources != nil { + for i, v := range s.SecondarySources { + if v == nil { + continue + } + if err := v.Validate(); err != nil { + invalidParams.AddNested(fmt.Sprintf("%s[%v]", "SecondarySources", i), err.(request.ErrInvalidParams)) + } + } + } if s.Source != nil { if err := s.Source.Validate(); err != nil { invalidParams.AddNested("Source", err.(request.ErrInvalidParams)) @@ -2144,12 +2348,30 @@ func (s *CreateProjectInput) SetEnvironment(v *ProjectEnvironment) *CreateProjec return s } +// SetLogsConfig sets the LogsConfig field's value. +func (s *CreateProjectInput) SetLogsConfig(v *LogsConfig) *CreateProjectInput { + s.LogsConfig = v + return s +} + // SetName sets the Name field's value. func (s *CreateProjectInput) SetName(v string) *CreateProjectInput { s.Name = &v return s } +// SetSecondaryArtifacts sets the SecondaryArtifacts field's value. +func (s *CreateProjectInput) SetSecondaryArtifacts(v []*ProjectArtifacts) *CreateProjectInput { + s.SecondaryArtifacts = v + return s +} + +// SetSecondarySources sets the SecondarySources field's value. +func (s *CreateProjectInput) SetSecondarySources(v []*ProjectSource) *CreateProjectInput { + s.SecondarySources = v + return s +} + // SetServiceRole sets the ServiceRole field's value. func (s *CreateProjectInput) SetServiceRole(v string) *CreateProjectInput { s.ServiceRole = &v @@ -2961,16 +3183,81 @@ func (s *ListProjectsOutput) SetProjects(v []*string) *ListProjectsOutput { return s } +// Information about logs for a build project. Logs can be Amazon CloudWatch +// Logs, built in a specified S3 bucket, or both. +type LogsConfig struct { + _ struct{} `type:"structure"` + + // Information about Amazon CloudWatch Logs for a build project. Amazon CloudWatch + // Logs are enabled by default. + CloudWatchLogs *CloudWatchLogsConfig `locationName:"cloudWatchLogs" type:"structure"` + + // Information about logs built to an S3 bucket for a build project. S3 logs + // are not enabled by default. + S3Logs *S3LogsConfig `locationName:"s3Logs" type:"structure"` +} + +// String returns the string representation +func (s LogsConfig) String() string { + return awsutil.Prettify(s) +} + +// GoString returns the string representation +func (s LogsConfig) GoString() string { + return s.String() +} + +// Validate inspects the fields of the type to determine if they are valid. +func (s *LogsConfig) Validate() error { + invalidParams := request.ErrInvalidParams{Context: "LogsConfig"} + if s.CloudWatchLogs != nil { + if err := s.CloudWatchLogs.Validate(); err != nil { + invalidParams.AddNested("CloudWatchLogs", err.(request.ErrInvalidParams)) + } + } + if s.S3Logs != nil { + if err := s.S3Logs.Validate(); err != nil { + invalidParams.AddNested("S3Logs", err.(request.ErrInvalidParams)) + } + } + + if invalidParams.Len() > 0 { + return invalidParams + } + return nil +} + +// SetCloudWatchLogs sets the CloudWatchLogs field's value. +func (s *LogsConfig) SetCloudWatchLogs(v *CloudWatchLogsConfig) *LogsConfig { + s.CloudWatchLogs = v + return s +} + +// SetS3Logs sets the S3Logs field's value. +func (s *LogsConfig) SetS3Logs(v *S3LogsConfig) *LogsConfig { + s.S3Logs = v + return s +} + // Information about build logs in Amazon CloudWatch Logs. type LogsLocation struct { _ struct{} `type:"structure"` + // Information about Amazon CloudWatch Logs for a build project. + CloudWatchLogs *CloudWatchLogsConfig `locationName:"cloudWatchLogs" type:"structure"` + // The URL to an individual build log in Amazon CloudWatch Logs. DeepLink *string `locationName:"deepLink" type:"string"` // The name of the Amazon CloudWatch Logs group for the build logs. GroupName *string `locationName:"groupName" type:"string"` + // The URL to an individual build log in an S3 bucket. + S3DeepLink *string `locationName:"s3DeepLink" type:"string"` + + // Information about S3 logs for a build project. + S3Logs *S3LogsConfig `locationName:"s3Logs" type:"structure"` + // The name of the Amazon CloudWatch Logs stream for the build logs. StreamName *string `locationName:"streamName" type:"string"` } @@ -2985,6 +3272,12 @@ func (s LogsLocation) GoString() string { return s.String() } +// SetCloudWatchLogs sets the CloudWatchLogs field's value. +func (s *LogsLocation) SetCloudWatchLogs(v *CloudWatchLogsConfig) *LogsLocation { + s.CloudWatchLogs = v + return s +} + // SetDeepLink sets the DeepLink field's value. func (s *LogsLocation) SetDeepLink(v string) *LogsLocation { s.DeepLink = &v @@ -2997,6 +3290,18 @@ func (s *LogsLocation) SetGroupName(v string) *LogsLocation { return s } +// SetS3DeepLink sets the S3DeepLink field's value. +func (s *LogsLocation) SetS3DeepLink(v string) *LogsLocation { + s.S3DeepLink = &v + return s +} + +// SetS3Logs sets the S3Logs field's value. +func (s *LogsLocation) SetS3Logs(v *S3LogsConfig) *LogsLocation { + s.S3Logs = v + return s +} + // SetStreamName sets the StreamName field's value. func (s *LogsLocation) SetStreamName(v string) *LogsLocation { s.StreamName = &v @@ -3107,9 +3412,19 @@ type Project struct { // format. LastModified *time.Time `locationName:"lastModified" type:"timestamp"` + // Information about logs for the build project. A project can create Amazon + // CloudWatch Logs, logs in an S3 bucket, or both. + LogsConfig *LogsConfig `locationName:"logsConfig" type:"structure"` + // The name of the build project. Name *string `locationName:"name" min:"2" type:"string"` + // An array of ProjectArtifacts objects. + SecondaryArtifacts []*ProjectArtifacts `locationName:"secondaryArtifacts" type:"list"` + + // An array of ProjectSource objects. + SecondarySources []*ProjectSource `locationName:"secondarySources" type:"list"` + // The ARN of the AWS Identity and Access Management (IAM) role that enables // AWS CodeBuild to interact with dependent AWS services on behalf of the AWS // account. @@ -3201,12 +3516,30 @@ func (s *Project) SetLastModified(v time.Time) *Project { return s } +// SetLogsConfig sets the LogsConfig field's value. +func (s *Project) SetLogsConfig(v *LogsConfig) *Project { + s.LogsConfig = v + return s +} + // SetName sets the Name field's value. func (s *Project) SetName(v string) *Project { s.Name = &v return s } +// SetSecondaryArtifacts sets the SecondaryArtifacts field's value. +func (s *Project) SetSecondaryArtifacts(v []*ProjectArtifacts) *Project { + s.SecondaryArtifacts = v + return s +} + +// SetSecondarySources sets the SecondarySources field's value. +func (s *Project) SetSecondarySources(v []*ProjectSource) *Project { + s.SecondarySources = v + return s +} + // SetServiceRole sets the ServiceRole field's value. func (s *Project) SetServiceRole(v string) *Project { s.ServiceRole = &v @@ -3247,6 +3580,14 @@ func (s *Project) SetWebhook(v *Webhook) *Project { type ProjectArtifacts struct { _ struct{} `type:"structure"` + // An identifier for this artifact definition. + ArtifactIdentifier *string `locationName:"artifactIdentifier" type:"string"` + + // Set to true if you do not want your output artifacts encrypted. This option + // is only valid if your artifacts type is Amazon S3. If this is set with another + // artifacts type, an invalidInputException will be thrown. + EncryptionDisabled *bool `locationName:"encryptionDisabled" type:"boolean"` + // Information about the build output artifact location, as follows: // // * If type is set to CODEPIPELINE, then AWS CodePipeline will ignore this @@ -3309,6 +3650,12 @@ type ProjectArtifacts struct { // in MyArtifacts/build-ID/MyArtifact.zip. NamespaceType *string `locationName:"namespaceType" type:"string" enum:"ArtifactNamespace"` + // If this flag is set, a name specified in the buildspec file overrides the + // artifact name. The name specified in a buildspec file is calculated at build + // time and uses the Shell Command Language. For example, you can append a date + // and time to your artifact name so that it is always unique. + OverrideArtifactName *bool `locationName:"overrideArtifactName" type:"boolean"` + // The type of build output artifact to create, as follows: // // * If type is set to CODEPIPELINE, then AWS CodePipeline will ignore this @@ -3382,6 +3729,18 @@ func (s *ProjectArtifacts) Validate() error { return nil } +// SetArtifactIdentifier sets the ArtifactIdentifier field's value. +func (s *ProjectArtifacts) SetArtifactIdentifier(v string) *ProjectArtifacts { + s.ArtifactIdentifier = &v + return s +} + +// SetEncryptionDisabled sets the EncryptionDisabled field's value. +func (s *ProjectArtifacts) SetEncryptionDisabled(v bool) *ProjectArtifacts { + s.EncryptionDisabled = &v + return s +} + // SetLocation sets the Location field's value. func (s *ProjectArtifacts) SetLocation(v string) *ProjectArtifacts { s.Location = &v @@ -3400,6 +3759,12 @@ func (s *ProjectArtifacts) SetNamespaceType(v string) *ProjectArtifacts { return s } +// SetOverrideArtifactName sets the OverrideArtifactName field's value. +func (s *ProjectArtifacts) SetOverrideArtifactName(v bool) *ProjectArtifacts { + s.OverrideArtifactName = &v + return s +} + // SetPackaging sets the Packaging field's value. func (s *ProjectArtifacts) SetPackaging(v string) *ProjectArtifacts { s.Packaging = &v @@ -3717,6 +4082,9 @@ type ProjectSource struct { // is thrown. ReportBuildStatus *bool `locationName:"reportBuildStatus" type:"boolean"` + // An identifier for this project source. + SourceIdentifier *string `locationName:"sourceIdentifier" type:"string"` + // The type of repository that contains the source code to be built. Valid values // include: // @@ -3729,6 +4097,8 @@ type ProjectSource struct { // // * GITHUB: The source code is in a GitHub repository. // + // * NO_SOURCE: The project does not have input source code. + // // * S3: The source code is in an Amazon Simple Storage Service (Amazon S3) // input bucket. // @@ -3800,12 +4170,143 @@ func (s *ProjectSource) SetReportBuildStatus(v bool) *ProjectSource { return s } +// SetSourceIdentifier sets the SourceIdentifier field's value. +func (s *ProjectSource) SetSourceIdentifier(v string) *ProjectSource { + s.SourceIdentifier = &v + return s +} + // SetType sets the Type field's value. func (s *ProjectSource) SetType(v string) *ProjectSource { s.Type = &v return s } +// A source identifier and its corresponding version. +type ProjectSourceVersion struct { + _ struct{} `type:"structure"` + + // An identifier for a source in the build project. + // + // SourceIdentifier is a required field + SourceIdentifier *string `locationName:"sourceIdentifier" type:"string" required:"true"` + + // The source version for the corresponding source identifier. If specified, + // must be one of: + // + // * For AWS CodeCommit: the commit ID to use. + // + // * For GitHub: the commit ID, pull request ID, branch name, or tag name + // that corresponds to the version of the source code you want to build. + // If a pull request ID is specified, it must use the format pr/pull-request-ID + // (for example pr/25). If a branch name is specified, the branch's HEAD + // commit ID will be used. If not specified, the default branch's HEAD commit + // ID will be used. + // + // * For Bitbucket: the commit ID, branch name, or tag name that corresponds + // to the version of the source code you want to build. If a branch name + // is specified, the branch's HEAD commit ID will be used. If not specified, + // the default branch's HEAD commit ID will be used. + // + // * For Amazon Simple Storage Service (Amazon S3): the version ID of the + // object representing the build input ZIP file to use. + // + // SourceVersion is a required field + SourceVersion *string `locationName:"sourceVersion" type:"string" required:"true"` +} + +// String returns the string representation +func (s ProjectSourceVersion) String() string { + return awsutil.Prettify(s) +} + +// GoString returns the string representation +func (s ProjectSourceVersion) GoString() string { + return s.String() +} + +// Validate inspects the fields of the type to determine if they are valid. +func (s *ProjectSourceVersion) Validate() error { + invalidParams := request.ErrInvalidParams{Context: "ProjectSourceVersion"} + if s.SourceIdentifier == nil { + invalidParams.Add(request.NewErrParamRequired("SourceIdentifier")) + } + if s.SourceVersion == nil { + invalidParams.Add(request.NewErrParamRequired("SourceVersion")) + } + + if invalidParams.Len() > 0 { + return invalidParams + } + return nil +} + +// SetSourceIdentifier sets the SourceIdentifier field's value. +func (s *ProjectSourceVersion) SetSourceIdentifier(v string) *ProjectSourceVersion { + s.SourceIdentifier = &v + return s +} + +// SetSourceVersion sets the SourceVersion field's value. +func (s *ProjectSourceVersion) SetSourceVersion(v string) *ProjectSourceVersion { + s.SourceVersion = &v + return s +} + +// Information about S3 logs for a build project. +type S3LogsConfig struct { + _ struct{} `type:"structure"` + + // The ARN of an S3 bucket and the path prefix for S3 logs. If your Amazon S3 + // bucket name is my-bucket, and your path prefix is build-log, then acceptable + // formats are my-bucket/build-log or arn:aws:s3:::my-bucket/build-log. + Location *string `locationName:"location" type:"string"` + + // The current status of the S3 build logs. Valid values are: + // + // * ENABLED: S3 build logs are enabled for this build project. + // + // * DISABLED: S3 build logs are not enabled for this build project. + // + // Status is a required field + Status *string `locationName:"status" type:"string" required:"true" enum:"LogsConfigStatusType"` +} + +// String returns the string representation +func (s S3LogsConfig) String() string { + return awsutil.Prettify(s) +} + +// GoString returns the string representation +func (s S3LogsConfig) GoString() string { + return s.String() +} + +// Validate inspects the fields of the type to determine if they are valid. +func (s *S3LogsConfig) Validate() error { + invalidParams := request.ErrInvalidParams{Context: "S3LogsConfig"} + if s.Status == nil { + invalidParams.Add(request.NewErrParamRequired("Status")) + } + + if invalidParams.Len() > 0 { + return invalidParams + } + return nil +} + +// SetLocation sets the Location field's value. +func (s *S3LogsConfig) SetLocation(v string) *S3LogsConfig { + s.Location = &v + return s +} + +// SetStatus sets the Status field's value. +func (s *S3LogsConfig) SetStatus(v string) *S3LogsConfig { + s.Status = &v + return s +} + // Information about the authorization settings for AWS CodeBuild to access // the source code to be built. // @@ -3912,6 +4413,10 @@ type StartBuildInput struct { // only if the build's source is GitHub Enterprise. InsecureSslOverride *bool `locationName:"insecureSslOverride" type:"boolean"` + // Log settings for this build that override the log settings defined in the + // build project. + LogsConfigOverride *LogsConfig `locationName:"logsConfigOverride" type:"structure"` + // Enable this flag to override privileged mode in the build project. PrivilegedModeOverride *bool `locationName:"privilegedModeOverride" type:"boolean"` @@ -3925,6 +4430,16 @@ type StartBuildInput struct { // GitHub, an invalidInputException is thrown. ReportBuildStatusOverride *bool `locationName:"reportBuildStatusOverride" type:"boolean"` + // An array of ProjectArtifacts objects. + SecondaryArtifactsOverride []*ProjectArtifacts `locationName:"secondaryArtifactsOverride" type:"list"` + + // An array of ProjectSource objects. + SecondarySourcesOverride []*ProjectSource `locationName:"secondarySourcesOverride" type:"list"` + + // An array of ProjectSourceVersion objects that specify one or more versions + // of the project's secondary sources to be used for this build only. + SecondarySourcesVersionOverride []*ProjectSourceVersion `locationName:"secondarySourcesVersionOverride" type:"list"` + // The name of a service role for this build that overrides the one specified // in the build project. ServiceRoleOverride *string `locationName:"serviceRoleOverride" min:"1" type:"string"` @@ -3939,7 +4454,7 @@ type StartBuildInput struct { SourceLocationOverride *string `locationName:"sourceLocationOverride" type:"string"` // A source input type for this build that overrides the source input defined - // in the build project + // in the build project. SourceTypeOverride *string `locationName:"sourceTypeOverride" type:"string" enum:"SourceType"` // A version of the build input to be built, for this build only. If not specified, @@ -4016,6 +4531,41 @@ func (s *StartBuildInput) Validate() error { } } } + if s.LogsConfigOverride != nil { + if err := s.LogsConfigOverride.Validate(); err != nil { + invalidParams.AddNested("LogsConfigOverride", err.(request.ErrInvalidParams)) + } + } + if s.SecondaryArtifactsOverride != nil { + for i, v := range s.SecondaryArtifactsOverride { + if v == nil { + continue + } + if err := v.Validate(); err != nil { + invalidParams.AddNested(fmt.Sprintf("%s[%v]", "SecondaryArtifactsOverride", i), err.(request.ErrInvalidParams)) + } + } + } + if s.SecondarySourcesOverride != nil { + for i, v := range s.SecondarySourcesOverride { + if v == nil { + continue + } + if err := v.Validate(); err != nil { + invalidParams.AddNested(fmt.Sprintf("%s[%v]", "SecondarySourcesOverride", i), err.(request.ErrInvalidParams)) + } + } + } + if s.SecondarySourcesVersionOverride != nil { + for i, v := range s.SecondarySourcesVersionOverride { + if v == nil { + continue + } + if err := v.Validate(); err != nil { + invalidParams.AddNested(fmt.Sprintf("%s[%v]", "SecondarySourcesVersionOverride", i), err.(request.ErrInvalidParams)) + } + } + } if s.SourceAuthOverride != nil { if err := s.SourceAuthOverride.Validate(); err != nil { invalidParams.AddNested("SourceAuthOverride", err.(request.ErrInvalidParams)) @@ -4094,6 +4644,12 @@ func (s *StartBuildInput) SetInsecureSslOverride(v bool) *StartBuildInput { return s } +// SetLogsConfigOverride sets the LogsConfigOverride field's value. +func (s *StartBuildInput) SetLogsConfigOverride(v *LogsConfig) *StartBuildInput { + s.LogsConfigOverride = v + return s +} + // SetPrivilegedModeOverride sets the PrivilegedModeOverride field's value. func (s *StartBuildInput) SetPrivilegedModeOverride(v bool) *StartBuildInput { s.PrivilegedModeOverride = &v @@ -4112,6 +4668,24 @@ func (s *StartBuildInput) SetReportBuildStatusOverride(v bool) *StartBuildInput return s } +// SetSecondaryArtifactsOverride sets the SecondaryArtifactsOverride field's value. +func (s *StartBuildInput) SetSecondaryArtifactsOverride(v []*ProjectArtifacts) *StartBuildInput { + s.SecondaryArtifactsOverride = v + return s +} + +// SetSecondarySourcesOverride sets the SecondarySourcesOverride field's value. +func (s *StartBuildInput) SetSecondarySourcesOverride(v []*ProjectSource) *StartBuildInput { + s.SecondarySourcesOverride = v + return s +} + +// SetSecondarySourcesVersionOverride sets the SecondarySourcesVersionOverride field's value. +func (s *StartBuildInput) SetSecondarySourcesVersionOverride(v []*ProjectSourceVersion) *StartBuildInput { + s.SecondarySourcesVersionOverride = v + return s +} + // SetServiceRoleOverride sets the ServiceRoleOverride field's value. func (s *StartBuildInput) SetServiceRoleOverride(v string) *StartBuildInput { s.ServiceRoleOverride = &v @@ -4314,6 +4888,10 @@ type UpdateProjectInput struct { // Information to be changed about the build environment for the build project. Environment *ProjectEnvironment `locationName:"environment" type:"structure"` + // Information about logs for the build project. A project can create Amazon + // CloudWatch Logs, logs in an S3 bucket, or both. + LogsConfig *LogsConfig `locationName:"logsConfig" type:"structure"` + // The name of the build project. // // You cannot change a build project's name. @@ -4321,6 +4899,12 @@ type UpdateProjectInput struct { // Name is a required field Name *string `locationName:"name" min:"1" type:"string" required:"true"` + // An array of ProjectSource objects. + SecondaryArtifacts []*ProjectArtifacts `locationName:"secondaryArtifacts" type:"list"` + + // An array of ProjectSource objects. + SecondarySources []*ProjectSource `locationName:"secondarySources" type:"list"` + // The replacement ARN of the AWS Identity and Access Management (IAM) role // that enables AWS CodeBuild to interact with dependent AWS services on behalf // of the AWS account. @@ -4387,6 +4971,31 @@ func (s *UpdateProjectInput) Validate() error { invalidParams.AddNested("Environment", err.(request.ErrInvalidParams)) } } + if s.LogsConfig != nil { + if err := s.LogsConfig.Validate(); err != nil { + invalidParams.AddNested("LogsConfig", err.(request.ErrInvalidParams)) + } + } + if s.SecondaryArtifacts != nil { + for i, v := range s.SecondaryArtifacts { + if v == nil { + continue + } + if err := v.Validate(); err != nil { + invalidParams.AddNested(fmt.Sprintf("%s[%v]", "SecondaryArtifacts", i), err.(request.ErrInvalidParams)) + } + } + } + if s.SecondarySources != nil { + for i, v := range s.SecondarySources { + if v == nil { + continue + } + if err := v.Validate(); err != nil { + invalidParams.AddNested(fmt.Sprintf("%s[%v]", "SecondarySources", i), err.(request.ErrInvalidParams)) + } + } + } if s.Source != nil { if err := s.Source.Validate(); err != nil { invalidParams.AddNested("Source", err.(request.ErrInvalidParams)) @@ -4450,12 +5059,30 @@ func (s *UpdateProjectInput) SetEnvironment(v *ProjectEnvironment) *UpdateProjec return s } +// SetLogsConfig sets the LogsConfig field's value. +func (s *UpdateProjectInput) SetLogsConfig(v *LogsConfig) *UpdateProjectInput { + s.LogsConfig = v + return s +} + // SetName sets the Name field's value. func (s *UpdateProjectInput) SetName(v string) *UpdateProjectInput { s.Name = &v return s } +// SetSecondaryArtifacts sets the SecondaryArtifacts field's value. +func (s *UpdateProjectInput) SetSecondaryArtifacts(v []*ProjectArtifacts) *UpdateProjectInput { + s.SecondaryArtifacts = v + return s +} + +// SetSecondarySources sets the SecondarySources field's value. +func (s *UpdateProjectInput) SetSecondarySources(v []*ProjectSource) *UpdateProjectInput { + s.SecondarySources = v + return s +} + // SetServiceRole sets the ServiceRole field's value. func (s *UpdateProjectInput) SetServiceRole(v string) *UpdateProjectInput { s.ServiceRole = &v @@ -4838,6 +5465,14 @@ const ( LanguageTypeBase = "BASE" ) +const ( + // LogsConfigStatusTypeEnabled is a LogsConfigStatusType enum value + LogsConfigStatusTypeEnabled = "ENABLED" + + // LogsConfigStatusTypeDisabled is a LogsConfigStatusType enum value + LogsConfigStatusTypeDisabled = "DISABLED" +) + const ( // PlatformTypeDebian is a PlatformType enum value PlatformTypeDebian = "DEBIAN" @@ -4894,6 +5529,9 @@ const ( // SourceTypeGithubEnterprise is a SourceType enum value SourceTypeGithubEnterprise = "GITHUB_ENTERPRISE" + + // SourceTypeNoSource is a SourceType enum value + SourceTypeNoSource = "NO_SOURCE" ) const ( diff --git a/vendor/github.com/aws/aws-sdk-go/service/codecommit/api.go b/vendor/github.com/aws/aws-sdk-go/service/codecommit/api.go index b52c07732..9553a7f5f 100644 --- a/vendor/github.com/aws/aws-sdk-go/service/codecommit/api.go +++ b/vendor/github.com/aws/aws-sdk-go/service/codecommit/api.go @@ -746,6 +746,168 @@ func (c *CodeCommit) DeleteCommentContentWithContext(ctx aws.Context, input *Del return out, req.Send() } +const opDeleteFile = "DeleteFile" + +// DeleteFileRequest generates a "aws/request.Request" representing the +// client's request for the DeleteFile operation. The "output" return +// value will be populated with the request's response once the request completes +// successfuly. +// +// Use "Send" method on the returned Request to send the API call to the service. +// the "output" return value is not valid until after Send returns without error. +// +// See DeleteFile for more information on using the DeleteFile +// API call, and error handling. +// +// This method is useful when you want to inject custom logic or configuration +// into the SDK's request lifecycle. Such as custom headers, or retry logic. +// +// +// // Example sending a request using the DeleteFileRequest method. +// req, resp := client.DeleteFileRequest(params) +// +// err := req.Send() +// if err == nil { // resp is now filled +// fmt.Println(resp) +// } +// +// See also, https://docs.aws.amazon.com/goto/WebAPI/codecommit-2015-04-13/DeleteFile +func (c *CodeCommit) DeleteFileRequest(input *DeleteFileInput) (req *request.Request, output *DeleteFileOutput) { + op := &request.Operation{ + Name: opDeleteFile, + HTTPMethod: "POST", + HTTPPath: "/", + } + + if input == nil { + input = &DeleteFileInput{} + } + + output = &DeleteFileOutput{} + req = c.newRequest(op, input, output) + return +} + +// DeleteFile API operation for AWS CodeCommit. +// +// Deletes a specified file from a specified branch. A commit is created on +// the branch that contains the revision. The file will still exist in the commits +// prior to the commit that contains the deletion. +// +// Returns awserr.Error for service API and SDK errors. Use runtime type assertions +// with awserr.Error's Code and Message methods to get detailed information about +// the error. +// +// See the AWS API reference guide for AWS CodeCommit's +// API operation DeleteFile for usage and error information. +// +// Returned Error Codes: +// * ErrCodeRepositoryNameRequiredException "RepositoryNameRequiredException" +// A repository name is required but was not specified. +// +// * ErrCodeInvalidRepositoryNameException "InvalidRepositoryNameException" +// At least one specified repository name is not valid. +// +// This exception only occurs when a specified repository name is not valid. +// Other exceptions occur when a required repository parameter is missing, or +// when a specified repository does not exist. +// +// * ErrCodeRepositoryDoesNotExistException "RepositoryDoesNotExistException" +// The specified repository does not exist. +// +// * ErrCodeParentCommitIdRequiredException "ParentCommitIdRequiredException" +// A parent commit ID is required. To view the full commit ID of a branch in +// a repository, use GetBranch or a Git command (for example, git pull or git +// log). +// +// * ErrCodeInvalidParentCommitIdException "InvalidParentCommitIdException" +// The parent commit ID is not valid. The commit ID cannot be empty, and must +// match the head commit ID for the branch of the repository where you want +// to add or update a file. +// +// * ErrCodeParentCommitDoesNotExistException "ParentCommitDoesNotExistException" +// The parent commit ID is not valid because it does not exist. The specified +// parent commit ID does not exist in the specified branch of the repository. +// +// * ErrCodeParentCommitIdOutdatedException "ParentCommitIdOutdatedException" +// The file could not be added because the provided parent commit ID is not +// the current tip of the specified branch. To view the full commit ID of the +// current head of the branch, use GetBranch. +// +// * ErrCodePathRequiredException "PathRequiredException" +// The folderPath for a location cannot be null. +// +// * ErrCodeInvalidPathException "InvalidPathException" +// The specified path is not valid. +// +// * ErrCodeFileDoesNotExistException "FileDoesNotExistException" +// The specified file does not exist. Verify that you have provided the correct +// name of the file, including its full path and extension. +// +// * ErrCodeBranchNameRequiredException "BranchNameRequiredException" +// A branch name is required but was not specified. +// +// * ErrCodeInvalidBranchNameException "InvalidBranchNameException" +// The specified reference name is not valid. +// +// * ErrCodeBranchDoesNotExistException "BranchDoesNotExistException" +// The specified branch does not exist. +// +// * ErrCodeBranchNameIsTagNameException "BranchNameIsTagNameException" +// The specified branch name is not valid because it is a tag name. Type the +// name of a current branch in the repository. For a list of valid branch names, +// use ListBranches. +// +// * ErrCodeNameLengthExceededException "NameLengthExceededException" +// The user name is not valid because it has exceeded the character limit for +// file names. File names, including the path to the file, cannot exceed the +// character limit. +// +// * ErrCodeInvalidEmailException "InvalidEmailException" +// The specified email address either contains one or more characters that are +// not allowed, or it exceeds the maximum number of characters allowed for an +// email address. +// +// * ErrCodeCommitMessageLengthExceededException "CommitMessageLengthExceededException" +// The commit message is too long. Provide a shorter string. +// +// * ErrCodeEncryptionIntegrityChecksFailedException "EncryptionIntegrityChecksFailedException" +// An encryption integrity check failed. +// +// * ErrCodeEncryptionKeyAccessDeniedException "EncryptionKeyAccessDeniedException" +// An encryption key could not be accessed. +// +// * ErrCodeEncryptionKeyDisabledException "EncryptionKeyDisabledException" +// The encryption key is disabled. +// +// * ErrCodeEncryptionKeyNotFoundException "EncryptionKeyNotFoundException" +// No encryption key was found. +// +// * ErrCodeEncryptionKeyUnavailableException "EncryptionKeyUnavailableException" +// The encryption key is not available. +// +// See also, https://docs.aws.amazon.com/goto/WebAPI/codecommit-2015-04-13/DeleteFile +func (c *CodeCommit) DeleteFile(input *DeleteFileInput) (*DeleteFileOutput, error) { + req, out := c.DeleteFileRequest(input) + return out, req.Send() +} + +// DeleteFileWithContext is the same as DeleteFile with the addition of +// the ability to pass a context and additional request options. +// +// See DeleteFile for details on how to use this API operation. +// +// The context must be non-nil and will be used for request cancellation. If +// the context is nil a panic will occur. In the future the SDK may create +// sub-contexts for http.Requests. See https://golang.org/pkg/context/ +// for more information on using Contexts. +func (c *CodeCommit) DeleteFileWithContext(ctx aws.Context, input *DeleteFileInput, opts ...request.Option) (*DeleteFileOutput, error) { + req, out := c.DeleteFileRequest(input) + req.SetContext(ctx) + req.ApplyOptions(opts...) + return out, req.Send() +} + const opDeleteRepository = "DeleteRepository" // DeleteRepositoryRequest generates a "aws/request.Request" representing the @@ -2021,6 +2183,253 @@ func (c *CodeCommit) GetDifferencesPagesWithContext(ctx aws.Context, input *GetD return p.Err() } +const opGetFile = "GetFile" + +// GetFileRequest generates a "aws/request.Request" representing the +// client's request for the GetFile operation. The "output" return +// value will be populated with the request's response once the request completes +// successfuly. +// +// Use "Send" method on the returned Request to send the API call to the service. +// the "output" return value is not valid until after Send returns without error. +// +// See GetFile for more information on using the GetFile +// API call, and error handling. +// +// This method is useful when you want to inject custom logic or configuration +// into the SDK's request lifecycle. Such as custom headers, or retry logic. +// +// +// // Example sending a request using the GetFileRequest method. +// req, resp := client.GetFileRequest(params) +// +// err := req.Send() +// if err == nil { // resp is now filled +// fmt.Println(resp) +// } +// +// See also, https://docs.aws.amazon.com/goto/WebAPI/codecommit-2015-04-13/GetFile +func (c *CodeCommit) GetFileRequest(input *GetFileInput) (req *request.Request, output *GetFileOutput) { + op := &request.Operation{ + Name: opGetFile, + HTTPMethod: "POST", + HTTPPath: "/", + } + + if input == nil { + input = &GetFileInput{} + } + + output = &GetFileOutput{} + req = c.newRequest(op, input, output) + return +} + +// GetFile API operation for AWS CodeCommit. +// +// Returns the base-64 encoded contents of a specified file and its metadata. +// +// Returns awserr.Error for service API and SDK errors. Use runtime type assertions +// with awserr.Error's Code and Message methods to get detailed information about +// the error. +// +// See the AWS API reference guide for AWS CodeCommit's +// API operation GetFile for usage and error information. +// +// Returned Error Codes: +// * ErrCodeRepositoryNameRequiredException "RepositoryNameRequiredException" +// A repository name is required but was not specified. +// +// * ErrCodeInvalidRepositoryNameException "InvalidRepositoryNameException" +// At least one specified repository name is not valid. +// +// This exception only occurs when a specified repository name is not valid. +// Other exceptions occur when a required repository parameter is missing, or +// when a specified repository does not exist. +// +// * ErrCodeRepositoryDoesNotExistException "RepositoryDoesNotExistException" +// The specified repository does not exist. +// +// * ErrCodeInvalidCommitException "InvalidCommitException" +// The specified commit is not valid. +// +// * ErrCodeCommitDoesNotExistException "CommitDoesNotExistException" +// The specified commit does not exist or no commit was specified, and the specified +// repository has no default branch. +// +// * ErrCodePathRequiredException "PathRequiredException" +// The folderPath for a location cannot be null. +// +// * ErrCodeInvalidPathException "InvalidPathException" +// The specified path is not valid. +// +// * ErrCodeFileDoesNotExistException "FileDoesNotExistException" +// The specified file does not exist. Verify that you have provided the correct +// name of the file, including its full path and extension. +// +// * ErrCodeEncryptionIntegrityChecksFailedException "EncryptionIntegrityChecksFailedException" +// An encryption integrity check failed. +// +// * ErrCodeEncryptionKeyAccessDeniedException "EncryptionKeyAccessDeniedException" +// An encryption key could not be accessed. +// +// * ErrCodeEncryptionKeyDisabledException "EncryptionKeyDisabledException" +// The encryption key is disabled. +// +// * ErrCodeEncryptionKeyNotFoundException "EncryptionKeyNotFoundException" +// No encryption key was found. +// +// * ErrCodeEncryptionKeyUnavailableException "EncryptionKeyUnavailableException" +// The encryption key is not available. +// +// * ErrCodeFileTooLargeException "FileTooLargeException" +// The specified file exceeds the file size limit for AWS CodeCommit. For more +// information about limits in AWS CodeCommit, see AWS CodeCommit User Guide +// (http://docs.aws.amazon.com/codecommit/latest/userguide/limits.html). +// +// See also, https://docs.aws.amazon.com/goto/WebAPI/codecommit-2015-04-13/GetFile +func (c *CodeCommit) GetFile(input *GetFileInput) (*GetFileOutput, error) { + req, out := c.GetFileRequest(input) + return out, req.Send() +} + +// GetFileWithContext is the same as GetFile with the addition of +// the ability to pass a context and additional request options. +// +// See GetFile for details on how to use this API operation. +// +// The context must be non-nil and will be used for request cancellation. If +// the context is nil a panic will occur. In the future the SDK may create +// sub-contexts for http.Requests. See https://golang.org/pkg/context/ +// for more information on using Contexts. +func (c *CodeCommit) GetFileWithContext(ctx aws.Context, input *GetFileInput, opts ...request.Option) (*GetFileOutput, error) { + req, out := c.GetFileRequest(input) + req.SetContext(ctx) + req.ApplyOptions(opts...) + return out, req.Send() +} + +const opGetFolder = "GetFolder" + +// GetFolderRequest generates a "aws/request.Request" representing the +// client's request for the GetFolder operation. The "output" return +// value will be populated with the request's response once the request completes +// successfuly. +// +// Use "Send" method on the returned Request to send the API call to the service. +// the "output" return value is not valid until after Send returns without error. +// +// See GetFolder for more information on using the GetFolder +// API call, and error handling. +// +// This method is useful when you want to inject custom logic or configuration +// into the SDK's request lifecycle. Such as custom headers, or retry logic. +// +// +// // Example sending a request using the GetFolderRequest method. +// req, resp := client.GetFolderRequest(params) +// +// err := req.Send() +// if err == nil { // resp is now filled +// fmt.Println(resp) +// } +// +// See also, https://docs.aws.amazon.com/goto/WebAPI/codecommit-2015-04-13/GetFolder +func (c *CodeCommit) GetFolderRequest(input *GetFolderInput) (req *request.Request, output *GetFolderOutput) { + op := &request.Operation{ + Name: opGetFolder, + HTTPMethod: "POST", + HTTPPath: "/", + } + + if input == nil { + input = &GetFolderInput{} + } + + output = &GetFolderOutput{} + req = c.newRequest(op, input, output) + return +} + +// GetFolder API operation for AWS CodeCommit. +// +// Returns the contents of a specified folder in a repository. +// +// Returns awserr.Error for service API and SDK errors. Use runtime type assertions +// with awserr.Error's Code and Message methods to get detailed information about +// the error. +// +// See the AWS API reference guide for AWS CodeCommit's +// API operation GetFolder for usage and error information. +// +// Returned Error Codes: +// * ErrCodeRepositoryNameRequiredException "RepositoryNameRequiredException" +// A repository name is required but was not specified. +// +// * ErrCodeInvalidRepositoryNameException "InvalidRepositoryNameException" +// At least one specified repository name is not valid. +// +// This exception only occurs when a specified repository name is not valid. +// Other exceptions occur when a required repository parameter is missing, or +// when a specified repository does not exist. +// +// * ErrCodeRepositoryDoesNotExistException "RepositoryDoesNotExistException" +// The specified repository does not exist. +// +// * ErrCodeInvalidCommitException "InvalidCommitException" +// The specified commit is not valid. +// +// * ErrCodeCommitDoesNotExistException "CommitDoesNotExistException" +// The specified commit does not exist or no commit was specified, and the specified +// repository has no default branch. +// +// * ErrCodePathRequiredException "PathRequiredException" +// The folderPath for a location cannot be null. +// +// * ErrCodeInvalidPathException "InvalidPathException" +// The specified path is not valid. +// +// * ErrCodeFolderDoesNotExistException "FolderDoesNotExistException" +// The specified folder does not exist. Either the folder name is not correct, +// or you did not provide the full path to the folder. +// +// * ErrCodeEncryptionIntegrityChecksFailedException "EncryptionIntegrityChecksFailedException" +// An encryption integrity check failed. +// +// * ErrCodeEncryptionKeyAccessDeniedException "EncryptionKeyAccessDeniedException" +// An encryption key could not be accessed. +// +// * ErrCodeEncryptionKeyDisabledException "EncryptionKeyDisabledException" +// The encryption key is disabled. +// +// * ErrCodeEncryptionKeyNotFoundException "EncryptionKeyNotFoundException" +// No encryption key was found. +// +// * ErrCodeEncryptionKeyUnavailableException "EncryptionKeyUnavailableException" +// The encryption key is not available. +// +// See also, https://docs.aws.amazon.com/goto/WebAPI/codecommit-2015-04-13/GetFolder +func (c *CodeCommit) GetFolder(input *GetFolderInput) (*GetFolderOutput, error) { + req, out := c.GetFolderRequest(input) + return out, req.Send() +} + +// GetFolderWithContext is the same as GetFolder with the addition of +// the ability to pass a context and additional request options. +// +// See GetFolder for details on how to use this API operation. +// +// The context must be non-nil and will be used for request cancellation. If +// the context is nil a panic will occur. In the future the SDK may create +// sub-contexts for http.Requests. See https://golang.org/pkg/context/ +// for more information on using Contexts. +func (c *CodeCommit) GetFolderWithContext(ctx aws.Context, input *GetFolderInput, opts ...request.Option) (*GetFolderOutput, error) { + req, out := c.GetFolderRequest(input) + req.SetContext(ctx) + req.ApplyOptions(opts...) + return out, req.Send() +} + const opGetMergeConflicts = "GetMergeConflicts" // GetMergeConflictsRequest generates a "aws/request.Request" representing the @@ -3187,7 +3596,7 @@ func (c *CodeCommit) PostCommentForComparedCommitRequest(input *PostCommentForCo // is not valid in respect to the current file version. // // * ErrCodePathRequiredException "PathRequiredException" -// The filePath for a location cannot be empty or null. +// The folderPath for a location cannot be null. // // * ErrCodeInvalidFilePositionException "InvalidFilePositionException" // The position is not valid. Make sure that the line number exists in the version @@ -3364,7 +3773,7 @@ func (c *CodeCommit) PostCommentForPullRequestRequest(input *PostCommentForPullR // is not valid in respect to the current file version. // // * ErrCodePathRequiredException "PathRequiredException" -// The filePath for a location cannot be empty or null. +// The folderPath for a location cannot be null. // // * ErrCodeInvalidFilePositionException "InvalidFilePositionException" // The position is not valid. Make sure that the line number exists in the version @@ -3402,7 +3811,7 @@ func (c *CodeCommit) PostCommentForPullRequestRequest(input *PostCommentForPullR // The specified path does not exist. // // * ErrCodePathRequiredException "PathRequiredException" -// The filePath for a location cannot be empty or null. +// The folderPath for a location cannot be null. // // * ErrCodeBeforeCommitIdAndAfterCommitIdAreSameException "BeforeCommitIdAndAfterCommitIdAreSameException" // The before commit ID and the after commit ID are the same, which is not valid. @@ -3583,7 +3992,8 @@ func (c *CodeCommit) PutFileRequest(input *PutFileInput) (req *request.Request, // PutFile API operation for AWS CodeCommit. // -// Adds or updates a file in an AWS CodeCommit repository. +// Adds or updates a file in a branch in an AWS CodeCommit repository, and generates +// a commit for the addition in the specified branch. // // Returns awserr.Error for service API and SDK errors. Use runtime type assertions // with awserr.Error's Code and Message methods to get detailed information about @@ -3617,8 +4027,8 @@ func (c *CodeCommit) PutFileRequest(input *PutFileInput) (req *request.Request, // to add or update a file. // // * ErrCodeParentCommitDoesNotExistException "ParentCommitDoesNotExistException" -// The parent commit ID is not valid. The specified parent commit ID does not -// exist in the specified branch of the repository. +// The parent commit ID is not valid because it does not exist. The specified +// parent commit ID does not exist in the specified branch of the repository. // // * ErrCodeParentCommitIdOutdatedException "ParentCommitIdOutdatedException" // The file could not be added because the provided parent commit ID is not @@ -3635,7 +4045,7 @@ func (c *CodeCommit) PutFileRequest(input *PutFileInput) (req *request.Request, // than 2 GB, add them using a Git client. // // * ErrCodePathRequiredException "PathRequiredException" -// The filePath for a location cannot be empty or null. +// The folderPath for a location cannot be null. // // * ErrCodeInvalidPathException "InvalidPathException" // The specified path is not valid. @@ -3659,7 +4069,7 @@ func (c *CodeCommit) PutFileRequest(input *PutFileInput) (req *request.Request, // mode permissions, see PutFile. // // * ErrCodeNameLengthExceededException "NameLengthExceededException" -// The file name is not valid because it has exceeded the character limit for +// The user name is not valid because it has exceeded the character limit for // file names. File names, including the path to the file, cannot exceed the // character limit. // @@ -3671,6 +4081,9 @@ func (c *CodeCommit) PutFileRequest(input *PutFileInput) (req *request.Request, // * ErrCodeCommitMessageLengthExceededException "CommitMessageLengthExceededException" // The commit message is too long. Provide a shorter string. // +// * ErrCodeInvalidDeletionParameterException "InvalidDeletionParameterException" +// The specified deletion parameter is not valid. +// // * ErrCodeEncryptionIntegrityChecksFailedException "EncryptionIntegrityChecksFailedException" // An encryption integrity check failed. // @@ -5713,6 +6126,203 @@ func (s *DeleteCommentContentOutput) SetComment(v *Comment) *DeleteCommentConten return s } +type DeleteFileInput struct { + _ struct{} `type:"structure"` + + // The name of the branch where the commit will be made deleting the file. + // + // BranchName is a required field + BranchName *string `locationName:"branchName" min:"1" type:"string" required:"true"` + + // The commit message you want to include as part of deleting the file. Commit + // messages are limited to 256 KB. If no message is specified, a default message + // will be used. + CommitMessage *string `locationName:"commitMessage" type:"string"` + + // The email address for the commit that deletes the file. If no email address + // is specified, the email address will be left blank. + Email *string `locationName:"email" type:"string"` + + // The fully-qualified path to the file that will be deleted, including the + // full name and extension of that file. For example, /examples/file.md is a + // fully qualified path to a file named file.md in a folder named examples. + // + // FilePath is a required field + FilePath *string `locationName:"filePath" type:"string" required:"true"` + + // Specifies whether to delete the folder or directory that contains the file + // you want to delete if that file is the only object in the folder or directory. + // By default, empty folders will be deleted. This includes empty folders that + // are part of the directory structure. For example, if the path to a file is + // dir1/dir2/dir3/dir4, and dir2 and dir3 are empty, deleting the last file + // in dir4 will also delete the empty folders dir4, dir3, and dir2. + KeepEmptyFolders *bool `locationName:"keepEmptyFolders" type:"boolean"` + + // The name of the author of the commit that deletes the file. If no name is + // specified, the user's ARN will be used as the author name and committer name. + Name *string `locationName:"name" type:"string"` + + // The ID of the commit that is the tip of the branch where you want to create + // the commit that will delete the file. This must be the HEAD commit for the + // branch. The commit that deletes the file will be created from this commit + // ID. + // + // ParentCommitId is a required field + ParentCommitId *string `locationName:"parentCommitId" type:"string" required:"true"` + + // The name of the repository that contains the file to delete. + // + // RepositoryName is a required field + RepositoryName *string `locationName:"repositoryName" min:"1" type:"string" required:"true"` +} + +// String returns the string representation +func (s DeleteFileInput) String() string { + return awsutil.Prettify(s) +} + +// GoString returns the string representation +func (s DeleteFileInput) GoString() string { + return s.String() +} + +// Validate inspects the fields of the type to determine if they are valid. +func (s *DeleteFileInput) Validate() error { + invalidParams := request.ErrInvalidParams{Context: "DeleteFileInput"} + if s.BranchName == nil { + invalidParams.Add(request.NewErrParamRequired("BranchName")) + } + if s.BranchName != nil && len(*s.BranchName) < 1 { + invalidParams.Add(request.NewErrParamMinLen("BranchName", 1)) + } + if s.FilePath == nil { + invalidParams.Add(request.NewErrParamRequired("FilePath")) + } + if s.ParentCommitId == nil { + invalidParams.Add(request.NewErrParamRequired("ParentCommitId")) + } + if s.RepositoryName == nil { + invalidParams.Add(request.NewErrParamRequired("RepositoryName")) + } + if s.RepositoryName != nil && len(*s.RepositoryName) < 1 { + invalidParams.Add(request.NewErrParamMinLen("RepositoryName", 1)) + } + + if invalidParams.Len() > 0 { + return invalidParams + } + return nil +} + +// SetBranchName sets the BranchName field's value. +func (s *DeleteFileInput) SetBranchName(v string) *DeleteFileInput { + s.BranchName = &v + return s +} + +// SetCommitMessage sets the CommitMessage field's value. +func (s *DeleteFileInput) SetCommitMessage(v string) *DeleteFileInput { + s.CommitMessage = &v + return s +} + +// SetEmail sets the Email field's value. +func (s *DeleteFileInput) SetEmail(v string) *DeleteFileInput { + s.Email = &v + return s +} + +// SetFilePath sets the FilePath field's value. +func (s *DeleteFileInput) SetFilePath(v string) *DeleteFileInput { + s.FilePath = &v + return s +} + +// SetKeepEmptyFolders sets the KeepEmptyFolders field's value. +func (s *DeleteFileInput) SetKeepEmptyFolders(v bool) *DeleteFileInput { + s.KeepEmptyFolders = &v + return s +} + +// SetName sets the Name field's value. +func (s *DeleteFileInput) SetName(v string) *DeleteFileInput { + s.Name = &v + return s +} + +// SetParentCommitId sets the ParentCommitId field's value. +func (s *DeleteFileInput) SetParentCommitId(v string) *DeleteFileInput { + s.ParentCommitId = &v + return s +} + +// SetRepositoryName sets the RepositoryName field's value. +func (s *DeleteFileInput) SetRepositoryName(v string) *DeleteFileInput { + s.RepositoryName = &v + return s +} + +type DeleteFileOutput struct { + _ struct{} `type:"structure"` + + // The blob ID removed from the tree as part of deleting the file. + // + // BlobId is a required field + BlobId *string `locationName:"blobId" type:"string" required:"true"` + + // The full commit ID of the commit that contains the change that deletes the + // file. + // + // CommitId is a required field + CommitId *string `locationName:"commitId" type:"string" required:"true"` + + // The fully-qualified path to the file that will be deleted, including the + // full name and extension of that file. + // + // FilePath is a required field + FilePath *string `locationName:"filePath" type:"string" required:"true"` + + // The full SHA-1 pointer of the tree information for the commit that contains + // the delete file change. + // + // TreeId is a required field + TreeId *string `locationName:"treeId" type:"string" required:"true"` +} + +// String returns the string representation +func (s DeleteFileOutput) String() string { + return awsutil.Prettify(s) +} + +// GoString returns the string representation +func (s DeleteFileOutput) GoString() string { + return s.String() +} + +// SetBlobId sets the BlobId field's value. +func (s *DeleteFileOutput) SetBlobId(v string) *DeleteFileOutput { + s.BlobId = &v + return s +} + +// SetCommitId sets the CommitId field's value. +func (s *DeleteFileOutput) SetCommitId(v string) *DeleteFileOutput { + s.CommitId = &v + return s +} + +// SetFilePath sets the FilePath field's value. +func (s *DeleteFileOutput) SetFilePath(v string) *DeleteFileOutput { + s.FilePath = &v + return s +} + +// SetTreeId sets the TreeId field's value. +func (s *DeleteFileOutput) SetTreeId(v string) *DeleteFileOutput { + s.TreeId = &v + return s +} + // Represents the input of a delete repository operation. type DeleteRepositoryInput struct { _ struct{} `type:"structure"` @@ -5938,6 +6548,102 @@ func (s *Difference) SetChangeType(v string) *Difference { return s } +// Returns information about a file in a repository. +type File struct { + _ struct{} `type:"structure"` + + // The fully-qualified path to the file in the repository. + AbsolutePath *string `locationName:"absolutePath" type:"string"` + + // The blob ID that contains the file information. + BlobId *string `locationName:"blobId" type:"string"` + + // The extrapolated file mode permissions for the file. Valid values include + // EXECUTABLE and NORMAL. + FileMode *string `locationName:"fileMode" type:"string" enum:"FileModeTypeEnum"` + + // The relative path of the file from the folder where the query originated. + RelativePath *string `locationName:"relativePath" type:"string"` +} + +// String returns the string representation +func (s File) String() string { + return awsutil.Prettify(s) +} + +// GoString returns the string representation +func (s File) GoString() string { + return s.String() +} + +// SetAbsolutePath sets the AbsolutePath field's value. +func (s *File) SetAbsolutePath(v string) *File { + s.AbsolutePath = &v + return s +} + +// SetBlobId sets the BlobId field's value. +func (s *File) SetBlobId(v string) *File { + s.BlobId = &v + return s +} + +// SetFileMode sets the FileMode field's value. +func (s *File) SetFileMode(v string) *File { + s.FileMode = &v + return s +} + +// SetRelativePath sets the RelativePath field's value. +func (s *File) SetRelativePath(v string) *File { + s.RelativePath = &v + return s +} + +// Returns information about a folder in a repository. +type Folder struct { + _ struct{} `type:"structure"` + + // The fully-qualified path of the folder in the repository. + AbsolutePath *string `locationName:"absolutePath" type:"string"` + + // The relative path of the specified folder from the folder where the query + // originated. + RelativePath *string `locationName:"relativePath" type:"string"` + + // The full SHA-1 pointer of the tree information for the commit that contains + // the folder. + TreeId *string `locationName:"treeId" type:"string"` +} + +// String returns the string representation +func (s Folder) String() string { + return awsutil.Prettify(s) +} + +// GoString returns the string representation +func (s Folder) GoString() string { + return s.String() +} + +// SetAbsolutePath sets the AbsolutePath field's value. +func (s *Folder) SetAbsolutePath(v string) *Folder { + s.AbsolutePath = &v + return s +} + +// SetRelativePath sets the RelativePath field's value. +func (s *Folder) SetRelativePath(v string) *Folder { + s.RelativePath = &v + return s +} + +// SetTreeId sets the TreeId field's value. +func (s *Folder) SetTreeId(v string) *Folder { + s.TreeId = &v + return s +} + // Represents the input of a get blob operation. type GetBlobInput struct { _ struct{} `type:"structure"` @@ -6628,6 +7334,317 @@ func (s *GetDifferencesOutput) SetNextToken(v string) *GetDifferencesOutput { return s } +type GetFileInput struct { + _ struct{} `type:"structure"` + + // The fully-quaified reference that identifies the commit that contains the + // file. For example, you could specify a full commit ID, a tag, a branch name, + // or a reference such as refs/heads/master. If none is provided, then the head + // commit will be used. + CommitSpecifier *string `locationName:"commitSpecifier" type:"string"` + + // The fully-qualified path to the file, including the full name and extension + // of the file. For example, /examples/file.md is the fully-qualified path to + // a file named file.md in a folder named examples. + // + // FilePath is a required field + FilePath *string `locationName:"filePath" type:"string" required:"true"` + + // The name of the repository that contains the file. + // + // RepositoryName is a required field + RepositoryName *string `locationName:"repositoryName" min:"1" type:"string" required:"true"` +} + +// String returns the string representation +func (s GetFileInput) String() string { + return awsutil.Prettify(s) +} + +// GoString returns the string representation +func (s GetFileInput) GoString() string { + return s.String() +} + +// Validate inspects the fields of the type to determine if they are valid. +func (s *GetFileInput) Validate() error { + invalidParams := request.ErrInvalidParams{Context: "GetFileInput"} + if s.FilePath == nil { + invalidParams.Add(request.NewErrParamRequired("FilePath")) + } + if s.RepositoryName == nil { + invalidParams.Add(request.NewErrParamRequired("RepositoryName")) + } + if s.RepositoryName != nil && len(*s.RepositoryName) < 1 { + invalidParams.Add(request.NewErrParamMinLen("RepositoryName", 1)) + } + + if invalidParams.Len() > 0 { + return invalidParams + } + return nil +} + +// SetCommitSpecifier sets the CommitSpecifier field's value. +func (s *GetFileInput) SetCommitSpecifier(v string) *GetFileInput { + s.CommitSpecifier = &v + return s +} + +// SetFilePath sets the FilePath field's value. +func (s *GetFileInput) SetFilePath(v string) *GetFileInput { + s.FilePath = &v + return s +} + +// SetRepositoryName sets the RepositoryName field's value. +func (s *GetFileInput) SetRepositoryName(v string) *GetFileInput { + s.RepositoryName = &v + return s +} + +type GetFileOutput struct { + _ struct{} `type:"structure"` + + // The blob ID of the object that represents the file content. + // + // BlobId is a required field + BlobId *string `locationName:"blobId" type:"string" required:"true"` + + // The full commit ID of the commit that contains the content returned by GetFile. + // + // CommitId is a required field + CommitId *string `locationName:"commitId" type:"string" required:"true"` + + // The base-64 encoded binary data object that represents the content of the + // file. + // + // FileContent is automatically base64 encoded/decoded by the SDK. + // + // FileContent is a required field + FileContent []byte `locationName:"fileContent" type:"blob" required:"true"` + + // The extrapolated file mode permissions of the blob. Valid values include + // strings such as EXECUTABLE and not numeric values. + // + // The file mode permissions returned by this API are not the standard file + // mode permission values, such as 100644, but rather extrapolated values. See + // below for a full list of supported return values. + // + // FileMode is a required field + FileMode *string `locationName:"fileMode" type:"string" required:"true" enum:"FileModeTypeEnum"` + + // The fully qualified path to the specified file. This returns the name and + // extension of the file. + // + // FilePath is a required field + FilePath *string `locationName:"filePath" type:"string" required:"true"` + + // The size of the contents of the file, in bytes. + // + // FileSize is a required field + FileSize *int64 `locationName:"fileSize" type:"long" required:"true"` +} + +// String returns the string representation +func (s GetFileOutput) String() string { + return awsutil.Prettify(s) +} + +// GoString returns the string representation +func (s GetFileOutput) GoString() string { + return s.String() +} + +// SetBlobId sets the BlobId field's value. +func (s *GetFileOutput) SetBlobId(v string) *GetFileOutput { + s.BlobId = &v + return s +} + +// SetCommitId sets the CommitId field's value. +func (s *GetFileOutput) SetCommitId(v string) *GetFileOutput { + s.CommitId = &v + return s +} + +// SetFileContent sets the FileContent field's value. +func (s *GetFileOutput) SetFileContent(v []byte) *GetFileOutput { + s.FileContent = v + return s +} + +// SetFileMode sets the FileMode field's value. +func (s *GetFileOutput) SetFileMode(v string) *GetFileOutput { + s.FileMode = &v + return s +} + +// SetFilePath sets the FilePath field's value. +func (s *GetFileOutput) SetFilePath(v string) *GetFileOutput { + s.FilePath = &v + return s +} + +// SetFileSize sets the FileSize field's value. +func (s *GetFileOutput) SetFileSize(v int64) *GetFileOutput { + s.FileSize = &v + return s +} + +type GetFolderInput struct { + _ struct{} `type:"structure"` + + // A fully-qualified reference used to identify a commit that contains the version + // of the folder's content to return. A fully-qualified reference can be a commit + // ID, branch name, tag, or reference such as HEAD. If no specifier is provided, + // the folder content will be returned as it exists in the HEAD commit. + CommitSpecifier *string `locationName:"commitSpecifier" type:"string"` + + // The fully-qualified path to the folder whose contents will be returned, including + // the folder name. For example, /examples is a fully-qualified path to a folder + // named examples that was created off of the root directory (/) of a repository. + // + // FolderPath is a required field + FolderPath *string `locationName:"folderPath" type:"string" required:"true"` + + // The name of the repository. + // + // RepositoryName is a required field + RepositoryName *string `locationName:"repositoryName" min:"1" type:"string" required:"true"` +} + +// String returns the string representation +func (s GetFolderInput) String() string { + return awsutil.Prettify(s) +} + +// GoString returns the string representation +func (s GetFolderInput) GoString() string { + return s.String() +} + +// Validate inspects the fields of the type to determine if they are valid. +func (s *GetFolderInput) Validate() error { + invalidParams := request.ErrInvalidParams{Context: "GetFolderInput"} + if s.FolderPath == nil { + invalidParams.Add(request.NewErrParamRequired("FolderPath")) + } + if s.RepositoryName == nil { + invalidParams.Add(request.NewErrParamRequired("RepositoryName")) + } + if s.RepositoryName != nil && len(*s.RepositoryName) < 1 { + invalidParams.Add(request.NewErrParamMinLen("RepositoryName", 1)) + } + + if invalidParams.Len() > 0 { + return invalidParams + } + return nil +} + +// SetCommitSpecifier sets the CommitSpecifier field's value. +func (s *GetFolderInput) SetCommitSpecifier(v string) *GetFolderInput { + s.CommitSpecifier = &v + return s +} + +// SetFolderPath sets the FolderPath field's value. +func (s *GetFolderInput) SetFolderPath(v string) *GetFolderInput { + s.FolderPath = &v + return s +} + +// SetRepositoryName sets the RepositoryName field's value. +func (s *GetFolderInput) SetRepositoryName(v string) *GetFolderInput { + s.RepositoryName = &v + return s +} + +type GetFolderOutput struct { + _ struct{} `type:"structure"` + + // The full commit ID used as a reference for which version of the folder content + // is returned. + // + // CommitId is a required field + CommitId *string `locationName:"commitId" type:"string" required:"true"` + + // The list of files that exist in the specified folder, if any. + Files []*File `locationName:"files" type:"list"` + + // The fully-qualified path of the folder whose contents are returned. + // + // FolderPath is a required field + FolderPath *string `locationName:"folderPath" type:"string" required:"true"` + + // The list of folders that exist beneath the specified folder, if any. + SubFolders []*Folder `locationName:"subFolders" type:"list"` + + // The list of submodules that exist in the specified folder, if any. + SubModules []*SubModule `locationName:"subModules" type:"list"` + + // The list of symbolic links to other files and folders that exist in the specified + // folder, if any. + SymbolicLinks []*SymbolicLink `locationName:"symbolicLinks" type:"list"` + + // The full SHA-1 pointer of the tree information for the commit that contains + // the folder. + TreeId *string `locationName:"treeId" type:"string"` +} + +// String returns the string representation +func (s GetFolderOutput) String() string { + return awsutil.Prettify(s) +} + +// GoString returns the string representation +func (s GetFolderOutput) GoString() string { + return s.String() +} + +// SetCommitId sets the CommitId field's value. +func (s *GetFolderOutput) SetCommitId(v string) *GetFolderOutput { + s.CommitId = &v + return s +} + +// SetFiles sets the Files field's value. +func (s *GetFolderOutput) SetFiles(v []*File) *GetFolderOutput { + s.Files = v + return s +} + +// SetFolderPath sets the FolderPath field's value. +func (s *GetFolderOutput) SetFolderPath(v string) *GetFolderOutput { + s.FolderPath = &v + return s +} + +// SetSubFolders sets the SubFolders field's value. +func (s *GetFolderOutput) SetSubFolders(v []*Folder) *GetFolderOutput { + s.SubFolders = v + return s +} + +// SetSubModules sets the SubModules field's value. +func (s *GetFolderOutput) SetSubModules(v []*SubModule) *GetFolderOutput { + s.SubModules = v + return s +} + +// SetSymbolicLinks sets the SymbolicLinks field's value. +func (s *GetFolderOutput) SetSymbolicLinks(v []*SymbolicLink) *GetFolderOutput { + s.SymbolicLinks = v + return s +} + +// SetTreeId sets the TreeId field's value. +func (s *GetFolderOutput) SetTreeId(v string) *GetFolderOutput { + s.TreeId = &v + return s +} + type GetMergeConflictsInput struct { _ struct{} `type:"structure"` @@ -8002,6 +9019,60 @@ func (s *PullRequest) SetTitle(v string) *PullRequest { return s } +// Metadata about the pull request that is used when comparing the pull request +// source with its destination. +type PullRequestCreatedEventMetadata struct { + _ struct{} `type:"structure"` + + // The commit ID of the tip of the branch specified as the destination branch + // when the pull request was created. + DestinationCommitId *string `locationName:"destinationCommitId" type:"string"` + + // The commit ID of the most recent commit that the source branch and the destination + // branch have in common. + MergeBase *string `locationName:"mergeBase" type:"string"` + + // The name of the repository where the pull request was created. + RepositoryName *string `locationName:"repositoryName" min:"1" type:"string"` + + // The commit ID on the source branch used when the pull request was created. + SourceCommitId *string `locationName:"sourceCommitId" type:"string"` +} + +// String returns the string representation +func (s PullRequestCreatedEventMetadata) String() string { + return awsutil.Prettify(s) +} + +// GoString returns the string representation +func (s PullRequestCreatedEventMetadata) GoString() string { + return s.String() +} + +// SetDestinationCommitId sets the DestinationCommitId field's value. +func (s *PullRequestCreatedEventMetadata) SetDestinationCommitId(v string) *PullRequestCreatedEventMetadata { + s.DestinationCommitId = &v + return s +} + +// SetMergeBase sets the MergeBase field's value. +func (s *PullRequestCreatedEventMetadata) SetMergeBase(v string) *PullRequestCreatedEventMetadata { + s.MergeBase = &v + return s +} + +// SetRepositoryName sets the RepositoryName field's value. +func (s *PullRequestCreatedEventMetadata) SetRepositoryName(v string) *PullRequestCreatedEventMetadata { + s.RepositoryName = &v + return s +} + +// SetSourceCommitId sets the SourceCommitId field's value. +func (s *PullRequestCreatedEventMetadata) SetSourceCommitId(v string) *PullRequestCreatedEventMetadata { + s.SourceCommitId = &v + return s +} + // Returns information about a pull request event. type PullRequestEvent struct { _ struct{} `type:"structure"` @@ -8014,6 +9085,9 @@ type PullRequestEvent struct { // The day and time of the pull request event, in timestamp format. EventDate *time.Time `locationName:"eventDate" type:"timestamp"` + // Information about the source and destination branches for the pull request. + PullRequestCreatedEventMetadata *PullRequestCreatedEventMetadata `locationName:"pullRequestCreatedEventMetadata" type:"structure"` + // The type of the pull request event, for example a status change event (PULL_REQUEST_STATUS_CHANGED) // or update event (PULL_REQUEST_SOURCE_REFERENCE_UPDATED). PullRequestEventType *string `locationName:"pullRequestEventType" type:"string" enum:"PullRequestEventType"` @@ -8053,6 +9127,12 @@ func (s *PullRequestEvent) SetEventDate(v time.Time) *PullRequestEvent { return s } +// SetPullRequestCreatedEventMetadata sets the PullRequestCreatedEventMetadata field's value. +func (s *PullRequestEvent) SetPullRequestCreatedEventMetadata(v *PullRequestCreatedEventMetadata) *PullRequestEvent { + s.PullRequestCreatedEventMetadata = v + return s +} + // SetPullRequestEventType sets the PullRequestEventType field's value. func (s *PullRequestEvent) SetPullRequestEventType(v string) *PullRequestEvent { s.PullRequestEventType = &v @@ -8138,6 +9218,10 @@ type PullRequestSourceReferenceUpdatedEventMetadata struct { // of the branch at the time the pull request was updated. BeforeCommitId *string `locationName:"beforeCommitId" type:"string"` + // The commit ID of the most recent commit that the source branch and the destination + // branch have in common. + MergeBase *string `locationName:"mergeBase" type:"string"` + // The name of the repository where the pull request was updated. RepositoryName *string `locationName:"repositoryName" min:"1" type:"string"` } @@ -8164,6 +9248,12 @@ func (s *PullRequestSourceReferenceUpdatedEventMetadata) SetBeforeCommitId(v str return s } +// SetMergeBase sets the MergeBase field's value. +func (s *PullRequestSourceReferenceUpdatedEventMetadata) SetMergeBase(v string) *PullRequestSourceReferenceUpdatedEventMetadata { + s.MergeBase = &v + return s +} + // SetRepositoryName sets the RepositoryName field's value. func (s *PullRequestSourceReferenceUpdatedEventMetadata) SetRepositoryName(v string) *PullRequestSourceReferenceUpdatedEventMetadata { s.RepositoryName = &v @@ -8206,6 +9296,10 @@ type PullRequestTarget struct { // into. Also known as the destination branch. DestinationReference *string `locationName:"destinationReference" type:"string"` + // The commit ID of the most recent commit that the source branch and the destination + // branch have in common. + MergeBase *string `locationName:"mergeBase" type:"string"` + // Returns metadata about the state of the merge, including whether the merge // has been made. MergeMetadata *MergeMetadata `locationName:"mergeMetadata" type:"structure"` @@ -8246,6 +9340,12 @@ func (s *PullRequestTarget) SetDestinationReference(v string) *PullRequestTarget return s } +// SetMergeBase sets the MergeBase field's value. +func (s *PullRequestTarget) SetMergeBase(v string) *PullRequestTarget { + s.MergeBase = &v + return s +} + // SetMergeMetadata sets the MergeMetadata field's value. func (s *PullRequestTarget) SetMergeMetadata(v *MergeMetadata) *PullRequestTarget { s.MergeMetadata = v @@ -8273,7 +9373,8 @@ func (s *PullRequestTarget) SetSourceReference(v string) *PullRequestTarget { type PutFileInput struct { _ struct{} `type:"structure"` - // The name of the branch where you want to add or update the file. + // The name of the branch where you want to add or update the file. If this + // is an empty repository, this branch will be created. // // BranchName is a required field BranchName *string `locationName:"branchName" min:"1" type:"string" required:"true"` @@ -8312,9 +9413,11 @@ type PutFileInput struct { Name *string `locationName:"name" type:"string"` // The full commit ID of the head commit in the branch where you want to add - // or update the file. If the commit ID does not match the ID of the head commit - // at the time of the operation, an error will occur, and the file will not - // be added or updated. + // or update the file. If this is an empty repository, no commit ID is required. + // If this is not an empty repository, a commit ID is required. + // + // The commit ID must match the ID of the head commit at the time of the operation, + // or an error will occur, and the file will not be added or updated. ParentCommitId *string `locationName:"parentCommitId" type:"string"` // The name of the repository where you want to add or update the file. @@ -8428,7 +9531,8 @@ type PutFileOutput struct { // CommitId is a required field CommitId *string `locationName:"commitId" type:"string" required:"true"` - // Tree information for the commit that contains this file change. + // The full SHA-1 pointer of the tree information for the commit that contains + // this file change. // // TreeId is a required field TreeId *string `locationName:"treeId" type:"string" required:"true"` @@ -8817,6 +9921,101 @@ func (s *RepositoryTriggerExecutionFailure) SetTrigger(v string) *RepositoryTrig return s } +// Returns information about a submodule reference in a repository folder. +type SubModule struct { + _ struct{} `type:"structure"` + + // The fully qualified path to the folder that contains the reference to the + // submodule. + AbsolutePath *string `locationName:"absolutePath" type:"string"` + + // The commit ID that contains the reference to the submodule. + CommitId *string `locationName:"commitId" type:"string"` + + // The relative path of the submodule from the folder where the query originated. + RelativePath *string `locationName:"relativePath" type:"string"` +} + +// String returns the string representation +func (s SubModule) String() string { + return awsutil.Prettify(s) +} + +// GoString returns the string representation +func (s SubModule) GoString() string { + return s.String() +} + +// SetAbsolutePath sets the AbsolutePath field's value. +func (s *SubModule) SetAbsolutePath(v string) *SubModule { + s.AbsolutePath = &v + return s +} + +// SetCommitId sets the CommitId field's value. +func (s *SubModule) SetCommitId(v string) *SubModule { + s.CommitId = &v + return s +} + +// SetRelativePath sets the RelativePath field's value. +func (s *SubModule) SetRelativePath(v string) *SubModule { + s.RelativePath = &v + return s +} + +// Returns information about a symbolic link in a repository folder. +type SymbolicLink struct { + _ struct{} `type:"structure"` + + // The fully-qualified path to the folder that contains the symbolic link. + AbsolutePath *string `locationName:"absolutePath" type:"string"` + + // The blob ID that contains the information about the symbolic link. + BlobId *string `locationName:"blobId" type:"string"` + + // The file mode permissions of the blob that cotains information about the + // symbolic link. + FileMode *string `locationName:"fileMode" type:"string" enum:"FileModeTypeEnum"` + + // The relative path of the symbolic link from the folder where the query originated. + RelativePath *string `locationName:"relativePath" type:"string"` +} + +// String returns the string representation +func (s SymbolicLink) String() string { + return awsutil.Prettify(s) +} + +// GoString returns the string representation +func (s SymbolicLink) GoString() string { + return s.String() +} + +// SetAbsolutePath sets the AbsolutePath field's value. +func (s *SymbolicLink) SetAbsolutePath(v string) *SymbolicLink { + s.AbsolutePath = &v + return s +} + +// SetBlobId sets the BlobId field's value. +func (s *SymbolicLink) SetBlobId(v string) *SymbolicLink { + s.BlobId = &v + return s +} + +// SetFileMode sets the FileMode field's value. +func (s *SymbolicLink) SetFileMode(v string) *SymbolicLink { + s.FileMode = &v + return s +} + +// SetRelativePath sets the RelativePath field's value. +func (s *SymbolicLink) SetRelativePath(v string) *SymbolicLink { + s.RelativePath = &v + return s +} + // Returns information about a target for a pull request. type Target struct { _ struct{} `type:"structure"` diff --git a/vendor/github.com/aws/aws-sdk-go/service/codecommit/doc.go b/vendor/github.com/aws/aws-sdk-go/service/codecommit/doc.go index 39c77b1f9..604881e74 100644 --- a/vendor/github.com/aws/aws-sdk-go/service/codecommit/doc.go +++ b/vendor/github.com/aws/aws-sdk-go/service/codecommit/doc.go @@ -45,6 +45,13 @@ // // Files, by calling the following: // +// * DeleteFile, which deletes the content of a specified file from a specified +// branch. +// +// * GetFile, which returns the base-64 encoded content of a specified file. +// +// * GetFolder, which returns the contents of a specified folder or directory. +// // * PutFile, which adds or modifies a file in a specified repository and // branch. // diff --git a/vendor/github.com/aws/aws-sdk-go/service/codecommit/errors.go b/vendor/github.com/aws/aws-sdk-go/service/codecommit/errors.go index 60c433ac5..2301b41f5 100644 --- a/vendor/github.com/aws/aws-sdk-go/service/codecommit/errors.go +++ b/vendor/github.com/aws/aws-sdk-go/service/codecommit/errors.go @@ -204,6 +204,13 @@ const ( // than 2 GB, add them using a Git client. ErrCodeFileContentSizeLimitExceededException = "FileContentSizeLimitExceededException" + // ErrCodeFileDoesNotExistException for service response error code + // "FileDoesNotExistException". + // + // The specified file does not exist. Verify that you have provided the correct + // name of the file, including its full path and extension. + ErrCodeFileDoesNotExistException = "FileDoesNotExistException" + // ErrCodeFileNameConflictsWithDirectoryNameException for service response error code // "FileNameConflictsWithDirectoryNameException". // @@ -221,6 +228,13 @@ const ( // (http://docs.aws.amazon.com/codecommit/latest/userguide/limits.html). ErrCodeFileTooLargeException = "FileTooLargeException" + // ErrCodeFolderDoesNotExistException for service response error code + // "FolderDoesNotExistException". + // + // The specified folder does not exist. Either the folder name is not correct, + // or you did not provide the full path to the folder. + ErrCodeFolderDoesNotExistException = "FolderDoesNotExistException" + // ErrCodeIdempotencyParameterMismatchException for service response error code // "IdempotencyParameterMismatchException". // @@ -286,6 +300,12 @@ const ( // The specified continuation token is not valid. ErrCodeInvalidContinuationTokenException = "InvalidContinuationTokenException" + // ErrCodeInvalidDeletionParameterException for service response error code + // "InvalidDeletionParameterException". + // + // The specified deletion parameter is not valid. + ErrCodeInvalidDeletionParameterException = "InvalidDeletionParameterException" + // ErrCodeInvalidDescriptionException for service response error code // "InvalidDescriptionException". // @@ -549,7 +569,7 @@ const ( // ErrCodeNameLengthExceededException for service response error code // "NameLengthExceededException". // - // The file name is not valid because it has exceeded the character limit for + // The user name is not valid because it has exceeded the character limit for // file names. File names, including the path to the file, cannot exceed the // character limit. ErrCodeNameLengthExceededException = "NameLengthExceededException" @@ -557,8 +577,8 @@ const ( // ErrCodeParentCommitDoesNotExistException for service response error code // "ParentCommitDoesNotExistException". // - // The parent commit ID is not valid. The specified parent commit ID does not - // exist in the specified branch of the repository. + // The parent commit ID is not valid because it does not exist. The specified + // parent commit ID does not exist in the specified branch of the repository. ErrCodeParentCommitDoesNotExistException = "ParentCommitDoesNotExistException" // ErrCodeParentCommitIdOutdatedException for service response error code @@ -586,7 +606,7 @@ const ( // ErrCodePathRequiredException for service response error code // "PathRequiredException". // - // The filePath for a location cannot be empty or null. + // The folderPath for a location cannot be null. ErrCodePathRequiredException = "PathRequiredException" // ErrCodePullRequestAlreadyClosedException for service response error code diff --git a/vendor/github.com/aws/aws-sdk-go/service/cognitoidentityprovider/api.go b/vendor/github.com/aws/aws-sdk-go/service/cognitoidentityprovider/api.go index a8f24acbe..74c49c15b 100644 --- a/vendor/github.com/aws/aws-sdk-go/service/cognitoidentityprovider/api.go +++ b/vendor/github.com/aws/aws-sdk-go/service/cognitoidentityprovider/api.go @@ -4164,6 +4164,10 @@ func (c *CognitoIdentityProvider) CreateUserPoolDomainRequest(input *CreateUserP // This exception is thrown when the Amazon Cognito service cannot find the // requested resource. // +// * ErrCodeLimitExceededException "LimitExceededException" +// This exception is thrown when a user exceeds the limit for a requested AWS +// resource. +// // * ErrCodeInternalErrorException "InternalErrorException" // This exception is thrown when Amazon Cognito encounters an internal error. // @@ -5500,7 +5504,7 @@ func (c *CognitoIdentityProvider) DescribeUserPoolClientRequest(input *DescribeU // DescribeUserPoolClient API operation for Amazon Cognito Identity Provider. // // Client method for returning the configuration information and metadata of -// the specified user pool client. +// the specified user pool app client. // // Returns awserr.Error for service API and SDK errors. Use runtime type assertions // with awserr.Error's Code and Message methods to get detailed information about @@ -9688,7 +9692,9 @@ func (c *CognitoIdentityProvider) UpdateUserPoolRequest(input *UpdateUserPoolInp // UpdateUserPool API operation for Amazon Cognito Identity Provider. // -// Updates the specified user pool with the specified attributes. +// Updates the specified user pool with the specified attributes. If you don't +// provide a value for an attribute, it will be set to the default value. You +// can get a list of the current user pool settings with . // // Returns awserr.Error for service API and SDK errors. Use runtime type assertions // with awserr.Error's Code and Message methods to get detailed information about @@ -9806,8 +9812,10 @@ func (c *CognitoIdentityProvider) UpdateUserPoolClientRequest(input *UpdateUserP // UpdateUserPoolClient API operation for Amazon Cognito Identity Provider. // -// Allows the developer to update the specified user pool client and password -// policy. +// Updates the specified user pool app client with the specified attributes. +// If you don't provide a value for an attribute, it will be set to the default +// value. You can get a list of the current user pool app client settings with +// . // // Returns awserr.Error for service API and SDK errors. Use runtime type assertions // with awserr.Error's Code and Message methods to get detailed information about @@ -14867,11 +14875,14 @@ type CreateUserPoolClientInput struct { // // * Be registered with the authorization server. // - // * Not use HTTP without TLS (i.e. use HTTPS instead of HTTP). - // // * Not include a fragment component. // // See OAuth 2.0 - Redirection Endpoint (https://tools.ietf.org/html/rfc6749#section-3.1.2). + // + // Amazon Cognito requires HTTPS over HTTP except for http://localhost for testing + // purposes only. + // + // App callback URLs such as myapp://example are also supported. CallbackURLs []*string `type:"list"` // The client name for the user pool client you would like to create. @@ -14887,11 +14898,14 @@ type CreateUserPoolClientInput struct { // // * Be registered with the authorization server. // - // * Not use HTTP without TLS (i.e. use HTTPS instead of HTTP). - // // * Not include a fragment component. // // See OAuth 2.0 - Redirection Endpoint (https://tools.ietf.org/html/rfc6749#section-3.1.2). + // + // Amazon Cognito requires HTTPS over HTTP except for http://localhost for testing + // purposes only. + // + // App callback URLs such as myapp://example are also supported. DefaultRedirectURI *string `min:"1" type:"string"` // The explicit authentication flows. @@ -15081,6 +15095,17 @@ func (s *CreateUserPoolClientOutput) SetUserPoolClient(v *UserPoolClientType) *C type CreateUserPoolDomainInput struct { _ struct{} `type:"structure"` + // The configuration for a custom domain that hosts the sign-up and sign-in + // webpages for your application. + // + // Provide this parameter only if you want to use own custom domain for your + // user pool. Otherwise, you can exclude this parameter and use the Amazon Cognito + // hosted domain instead. + // + // For more information about the hosted domain and custom domains, see Configuring + // a User Pool Domain (http://docs.aws.amazon.com/cognito/latest/developerguide/cognito-user-pools-assign-domain.html). + CustomDomainConfig *CustomDomainConfigType `type:"structure"` + // The domain string. // // Domain is a required field @@ -15117,6 +15142,11 @@ func (s *CreateUserPoolDomainInput) Validate() error { if s.UserPoolId != nil && len(*s.UserPoolId) < 1 { invalidParams.Add(request.NewErrParamMinLen("UserPoolId", 1)) } + if s.CustomDomainConfig != nil { + if err := s.CustomDomainConfig.Validate(); err != nil { + invalidParams.AddNested("CustomDomainConfig", err.(request.ErrInvalidParams)) + } + } if invalidParams.Len() > 0 { return invalidParams @@ -15124,6 +15154,12 @@ func (s *CreateUserPoolDomainInput) Validate() error { return nil } +// SetCustomDomainConfig sets the CustomDomainConfig field's value. +func (s *CreateUserPoolDomainInput) SetCustomDomainConfig(v *CustomDomainConfigType) *CreateUserPoolDomainInput { + s.CustomDomainConfig = v + return s +} + // SetDomain sets the Domain field's value. func (s *CreateUserPoolDomainInput) SetDomain(v string) *CreateUserPoolDomainInput { s.Domain = &v @@ -15138,6 +15174,10 @@ func (s *CreateUserPoolDomainInput) SetUserPoolId(v string) *CreateUserPoolDomai type CreateUserPoolDomainOutput struct { _ struct{} `type:"structure"` + + // The Amazon CloudFront endpoint that you use as the target of the alias that + // you set up with your Domain Name Service (DNS) provider. + CloudFrontDomain *string `min:"1" type:"string"` } // String returns the string representation @@ -15150,6 +15190,12 @@ func (s CreateUserPoolDomainOutput) GoString() string { return s.String() } +// SetCloudFrontDomain sets the CloudFrontDomain field's value. +func (s *CreateUserPoolDomainOutput) SetCloudFrontDomain(v string) *CreateUserPoolDomainOutput { + s.CloudFrontDomain = &v + return s +} + // Represents the request to create a user pool. type CreateUserPoolInput struct { _ struct{} `type:"structure"` @@ -15454,6 +15500,50 @@ func (s *CreateUserPoolOutput) SetUserPool(v *UserPoolType) *CreateUserPoolOutpu return s } +// The configuration for a custom domain that hosts the sign-up and sign-in +// webpages for your application. +type CustomDomainConfigType struct { + _ struct{} `type:"structure"` + + // The Amazon Resource Name (ARN) of an AWS Certificate Manager SSL certificate. + // You use this certificate for the subdomain of your custom domain. + // + // CertificateArn is a required field + CertificateArn *string `min:"20" type:"string" required:"true"` +} + +// String returns the string representation +func (s CustomDomainConfigType) String() string { + return awsutil.Prettify(s) +} + +// GoString returns the string representation +func (s CustomDomainConfigType) GoString() string { + return s.String() +} + +// Validate inspects the fields of the type to determine if they are valid. +func (s *CustomDomainConfigType) Validate() error { + invalidParams := request.ErrInvalidParams{Context: "CustomDomainConfigType"} + if s.CertificateArn == nil { + invalidParams.Add(request.NewErrParamRequired("CertificateArn")) + } + if s.CertificateArn != nil && len(*s.CertificateArn) < 20 { + invalidParams.Add(request.NewErrParamMinLen("CertificateArn", 20)) + } + + if invalidParams.Len() > 0 { + return invalidParams + } + return nil +} + +// SetCertificateArn sets the CertificateArn field's value. +func (s *CustomDomainConfigType) SetCertificateArn(v string) *CustomDomainConfigType { + s.CertificateArn = &v + return s +} + type DeleteGroupInput struct { _ struct{} `type:"structure"` @@ -16672,7 +16762,11 @@ type DomainDescriptionType struct { AWSAccountId *string `type:"string"` // The ARN of the CloudFront distribution. - CloudFrontDistribution *string `min:"20" type:"string"` + CloudFrontDistribution *string `type:"string"` + + // The configuration for a custom domain that hosts the sign-up and sign-in + // webpages for your application. + CustomDomainConfig *CustomDomainConfigType `type:"structure"` // The domain string. Domain *string `min:"1" type:"string"` @@ -16712,6 +16806,12 @@ func (s *DomainDescriptionType) SetCloudFrontDistribution(v string) *DomainDescr return s } +// SetCustomDomainConfig sets the CustomDomainConfig field's value. +func (s *DomainDescriptionType) SetCustomDomainConfig(v *CustomDomainConfigType) *DomainDescriptionType { + s.CustomDomainConfig = v + return s +} + // SetDomain sets the Domain field's value. func (s *DomainDescriptionType) SetDomain(v string) *DomainDescriptionType { s.Domain = &v @@ -19320,9 +19420,9 @@ type ListUsersInput struct { // // * preferred_username // - // * cognito:user_status (called Enabled in the Console) (case-sensitive) + // * cognito:user_status (called Status in the Console) (case-insensitive) // - // * status (case-insensitive) + // * status (called Enabled in the Console) (case-sensitive) // // * sub // @@ -22384,11 +22484,14 @@ type UpdateUserPoolClientInput struct { // // * Be registered with the authorization server. // - // * Not use HTTP without TLS (i.e. use HTTPS instead of HTTP). - // // * Not include a fragment component. // // See OAuth 2.0 - Redirection Endpoint (https://tools.ietf.org/html/rfc6749#section-3.1.2). + // + // Amazon Cognito requires HTTPS over HTTP except for http://localhost for testing + // purposes only. + // + // App callback URLs such as myapp://example are also supported. CallbackURLs []*string `type:"list"` // The ID of the client associated with the user pool. @@ -22407,11 +22510,14 @@ type UpdateUserPoolClientInput struct { // // * Be registered with the authorization server. // - // * Not use HTTP without TLS (i.e. use HTTPS instead of HTTP). - // // * Not include a fragment component. // // See OAuth 2.0 - Redirection Endpoint (https://tools.ietf.org/html/rfc6749#section-3.1.2). + // + // Amazon Cognito requires HTTPS over HTTP except for http://localhost for testing + // purposes only. + // + // App callback URLs such as myapp://example are also supported. DefaultRedirectURI *string `min:"1" type:"string"` // Explicit authentication flows. @@ -23148,11 +23254,14 @@ type UserPoolClientType struct { // // * Be registered with the authorization server. // - // * Not use HTTP without TLS (i.e. use HTTPS instead of HTTP). - // // * Not include a fragment component. // // See OAuth 2.0 - Redirection Endpoint (https://tools.ietf.org/html/rfc6749#section-3.1.2). + // + // Amazon Cognito requires HTTPS over HTTP except for http://localhost for testing + // purposes only. + // + // App callback URLs such as myapp://example are also supported. CallbackURLs []*string `type:"list"` // The ID of the client associated with the user pool. @@ -23175,11 +23284,14 @@ type UserPoolClientType struct { // // * Be registered with the authorization server. // - // * Not use HTTP without TLS (i.e. use HTTPS instead of HTTP). - // // * Not include a fragment component. // // See OAuth 2.0 - Redirection Endpoint (https://tools.ietf.org/html/rfc6749#section-3.1.2). + // + // Amazon Cognito requires HTTPS over HTTP except for http://localhost for testing + // purposes only. + // + // App callback URLs such as myapp://example are also supported. DefaultRedirectURI *string `min:"1" type:"string"` // The explicit authentication flows. @@ -23454,6 +23566,8 @@ type UserPoolType struct { // The date the user pool was created. CreationDate *time.Time `type:"timestamp"` + CustomDomain *string `min:"1" type:"string"` + // The device configuration. DeviceConfiguration *DeviceConfigurationType `type:"structure"` @@ -23574,6 +23688,12 @@ func (s *UserPoolType) SetCreationDate(v time.Time) *UserPoolType { return s } +// SetCustomDomain sets the CustomDomain field's value. +func (s *UserPoolType) SetCustomDomain(v string) *UserPoolType { + s.CustomDomain = &v + return s +} + // SetDeviceConfiguration sets the DeviceConfiguration field's value. func (s *UserPoolType) SetDeviceConfiguration(v *DeviceConfigurationType) *UserPoolType { s.DeviceConfiguration = v diff --git a/vendor/github.com/aws/aws-sdk-go/service/configservice/api.go b/vendor/github.com/aws/aws-sdk-go/service/configservice/api.go index b8bdc9641..c77fdfb82 100644 --- a/vendor/github.com/aws/aws-sdk-go/service/configservice/api.go +++ b/vendor/github.com/aws/aws-sdk-go/service/configservice/api.go @@ -3355,8 +3355,12 @@ func (c *ConfigService) PutConfigurationAggregatorRequest(input *PutConfiguratio // are valid and try again. // // * ErrCodeLimitExceededException "LimitExceededException" -// This exception is thrown if an evaluation is in progress or if you call the -// StartConfigRulesEvaluation API more than once per minute. +// For StartConfigRulesEvaluation API, this exception is thrown if an evaluation +// is in progress or if you call the StartConfigRulesEvaluation API more than +// once per minute. +// +// For PutConfigurationAggregator API, this exception is thrown if the number +// of accounts and aggregators exceeds the limit. // // * ErrCodeInvalidRoleException "InvalidRoleException" // You have provided a null or empty role ARN. @@ -3875,8 +3879,12 @@ func (c *ConfigService) StartConfigRulesEvaluationRequest(input *StartConfigRule // rule names are correct and try again. // // * ErrCodeLimitExceededException "LimitExceededException" -// This exception is thrown if an evaluation is in progress or if you call the -// StartConfigRulesEvaluation API more than once per minute. +// For StartConfigRulesEvaluation API, this exception is thrown if an evaluation +// is in progress or if you call the StartConfigRulesEvaluation API more than +// once per minute. +// +// For PutConfigurationAggregator API, this exception is thrown if the number +// of accounts and aggregators exceeds the limit. // // * ErrCodeResourceInUseException "ResourceInUseException" // The rule is currently being deleted or the rule is deleting your evaluation @@ -5045,6 +5053,12 @@ type ConfigRule struct { // available. ConfigRuleState *string `type:"string" enum:"ConfigRuleState"` + // Service principal name of the service that created the rule. + // + // The field is populated only if the service linked rule is created by a service. + // The field is empty if you create your own rule. + CreatedBy *string `min:"1" type:"string"` + // The description that you provide for the AWS Config rule. Description *string `type:"string"` @@ -5095,6 +5109,9 @@ func (s *ConfigRule) Validate() error { if s.ConfigRuleName != nil && len(*s.ConfigRuleName) < 1 { invalidParams.Add(request.NewErrParamMinLen("ConfigRuleName", 1)) } + if s.CreatedBy != nil && len(*s.CreatedBy) < 1 { + invalidParams.Add(request.NewErrParamMinLen("CreatedBy", 1)) + } if s.InputParameters != nil && len(*s.InputParameters) < 1 { invalidParams.Add(request.NewErrParamMinLen("InputParameters", 1)) } @@ -5142,6 +5159,12 @@ func (s *ConfigRule) SetConfigRuleState(v string) *ConfigRule { return s } +// SetCreatedBy sets the CreatedBy field's value. +func (s *ConfigRule) SetCreatedBy(v string) *ConfigRule { + s.CreatedBy = &v + return s +} + // SetDescription sets the Description field's value. func (s *ConfigRule) SetDescription(v string) *ConfigRule { s.Description = &v diff --git a/vendor/github.com/aws/aws-sdk-go/service/configservice/errors.go b/vendor/github.com/aws/aws-sdk-go/service/configservice/errors.go index b57a5cec4..02ce16d3a 100644 --- a/vendor/github.com/aws/aws-sdk-go/service/configservice/errors.go +++ b/vendor/github.com/aws/aws-sdk-go/service/configservice/errors.go @@ -102,8 +102,12 @@ const ( // ErrCodeLimitExceededException for service response error code // "LimitExceededException". // - // This exception is thrown if an evaluation is in progress or if you call the - // StartConfigRulesEvaluation API more than once per minute. + // For StartConfigRulesEvaluation API, this exception is thrown if an evaluation + // is in progress or if you call the StartConfigRulesEvaluation API more than + // once per minute. + // + // For PutConfigurationAggregator API, this exception is thrown if the number + // of accounts and aggregators exceeds the limit. ErrCodeLimitExceededException = "LimitExceededException" // ErrCodeMaxNumberOfConfigRulesExceededException for service response error code diff --git a/vendor/github.com/aws/aws-sdk-go/service/databasemigrationservice/api.go b/vendor/github.com/aws/aws-sdk-go/service/databasemigrationservice/api.go index 2f746d1ca..6020100f9 100644 --- a/vendor/github.com/aws/aws-sdk-go/service/databasemigrationservice/api.go +++ b/vendor/github.com/aws/aws-sdk-go/service/databasemigrationservice/api.go @@ -10025,12 +10025,16 @@ type ReplicationInstance struct { ReplicationInstanceIdentifier *string `type:"string"` // The private IP address of the replication instance. + // + // Deprecated: ReplicationInstancePrivateIpAddress has been deprecated ReplicationInstancePrivateIpAddress *string `deprecated:"true" type:"string"` // The private IP address of the replication instance. ReplicationInstancePrivateIpAddresses []*string `type:"list"` // The public IP address of the replication instance. + // + // Deprecated: ReplicationInstancePublicIpAddress has been deprecated ReplicationInstancePublicIpAddress *string `deprecated:"true" type:"string"` // The public IP address of the replication instance. diff --git a/vendor/github.com/aws/aws-sdk-go/service/dax/api.go b/vendor/github.com/aws/aws-sdk-go/service/dax/api.go index 843d7d869..73ae665e4 100644 --- a/vendor/github.com/aws/aws-sdk-go/service/dax/api.go +++ b/vendor/github.com/aws/aws-sdk-go/service/dax/api.go @@ -100,6 +100,8 @@ func (c *DAX) CreateClusterRequest(input *CreateClusterInput) (req *request.Requ // * ErrCodeTagQuotaPerResourceExceeded "TagQuotaPerResourceExceeded" // You have exceeded the maximum number of tags for this DAX cluster. // +// * ErrCodeServiceLinkedRoleNotFoundFault "ServiceLinkedRoleNotFoundFault" +// // * ErrCodeInvalidParameterValueException "InvalidParameterValueException" // The value for a parameter is invalid. // @@ -192,6 +194,8 @@ func (c *DAX) CreateParameterGroupRequest(input *CreateParameterGroupInput) (req // * ErrCodeInvalidParameterGroupStateFault "InvalidParameterGroupStateFault" // One or more parameters in a parameter group are in an invalid state. // +// * ErrCodeServiceLinkedRoleNotFoundFault "ServiceLinkedRoleNotFoundFault" +// // * ErrCodeInvalidParameterValueException "InvalidParameterValueException" // The value for a parameter is invalid. // @@ -288,6 +292,8 @@ func (c *DAX) CreateSubnetGroupRequest(input *CreateSubnetGroupInput) (req *requ // * ErrCodeInvalidSubnet "InvalidSubnet" // An invalid subnet identifier was specified. // +// * ErrCodeServiceLinkedRoleNotFoundFault "ServiceLinkedRoleNotFoundFault" +// // See also, https://docs.aws.amazon.com/goto/WebAPI/dax-2017-04-19/CreateSubnetGroup func (c *DAX) CreateSubnetGroup(input *CreateSubnetGroupInput) (*CreateSubnetGroupOutput, error) { req, out := c.CreateSubnetGroupRequest(input) @@ -376,6 +382,8 @@ func (c *DAX) DecreaseReplicationFactorRequest(input *DecreaseReplicationFactorI // * ErrCodeInvalidClusterStateFault "InvalidClusterStateFault" // The requested DAX cluster is not in the available state. // +// * ErrCodeServiceLinkedRoleNotFoundFault "ServiceLinkedRoleNotFoundFault" +// // * ErrCodeInvalidParameterValueException "InvalidParameterValueException" // The value for a parameter is invalid. // @@ -467,6 +475,8 @@ func (c *DAX) DeleteClusterRequest(input *DeleteClusterInput) (req *request.Requ // * ErrCodeInvalidClusterStateFault "InvalidClusterStateFault" // The requested DAX cluster is not in the available state. // +// * ErrCodeServiceLinkedRoleNotFoundFault "ServiceLinkedRoleNotFoundFault" +// // * ErrCodeInvalidParameterValueException "InvalidParameterValueException" // The value for a parameter is invalid. // @@ -556,6 +566,8 @@ func (c *DAX) DeleteParameterGroupRequest(input *DeleteParameterGroupInput) (req // * ErrCodeParameterGroupNotFoundFault "ParameterGroupNotFoundFault" // The specified parameter group does not exist. // +// * ErrCodeServiceLinkedRoleNotFoundFault "ServiceLinkedRoleNotFoundFault" +// // * ErrCodeInvalidParameterValueException "InvalidParameterValueException" // The value for a parameter is invalid. // @@ -646,6 +658,8 @@ func (c *DAX) DeleteSubnetGroupRequest(input *DeleteSubnetGroupInput) (req *requ // * ErrCodeSubnetGroupNotFoundFault "SubnetGroupNotFoundFault" // The requested subnet group name does not refer to an existing subnet group. // +// * ErrCodeServiceLinkedRoleNotFoundFault "ServiceLinkedRoleNotFoundFault" +// // See also, https://docs.aws.amazon.com/goto/WebAPI/dax-2017-04-19/DeleteSubnetGroup func (c *DAX) DeleteSubnetGroup(input *DeleteSubnetGroupInput) (*DeleteSubnetGroupOutput, error) { req, out := c.DeleteSubnetGroupRequest(input) @@ -741,6 +755,8 @@ func (c *DAX) DescribeClustersRequest(input *DescribeClustersInput) (req *reques // * ErrCodeClusterNotFoundFault "ClusterNotFoundFault" // The requested cluster ID does not refer to an existing DAX cluster. // +// * ErrCodeServiceLinkedRoleNotFoundFault "ServiceLinkedRoleNotFoundFault" +// // * ErrCodeInvalidParameterValueException "InvalidParameterValueException" // The value for a parameter is invalid. // @@ -823,6 +839,8 @@ func (c *DAX) DescribeDefaultParametersRequest(input *DescribeDefaultParametersI // API operation DescribeDefaultParameters for usage and error information. // // Returned Error Codes: +// * ErrCodeServiceLinkedRoleNotFoundFault "ServiceLinkedRoleNotFoundFault" +// // * ErrCodeInvalidParameterValueException "InvalidParameterValueException" // The value for a parameter is invalid. // @@ -910,6 +928,8 @@ func (c *DAX) DescribeEventsRequest(input *DescribeEventsInput) (req *request.Re // API operation DescribeEvents for usage and error information. // // Returned Error Codes: +// * ErrCodeServiceLinkedRoleNotFoundFault "ServiceLinkedRoleNotFoundFault" +// // * ErrCodeInvalidParameterValueException "InvalidParameterValueException" // The value for a parameter is invalid. // @@ -996,6 +1016,8 @@ func (c *DAX) DescribeParameterGroupsRequest(input *DescribeParameterGroupsInput // * ErrCodeParameterGroupNotFoundFault "ParameterGroupNotFoundFault" // The specified parameter group does not exist. // +// * ErrCodeServiceLinkedRoleNotFoundFault "ServiceLinkedRoleNotFoundFault" +// // * ErrCodeInvalidParameterValueException "InvalidParameterValueException" // The value for a parameter is invalid. // @@ -1081,6 +1103,8 @@ func (c *DAX) DescribeParametersRequest(input *DescribeParametersInput) (req *re // * ErrCodeParameterGroupNotFoundFault "ParameterGroupNotFoundFault" // The specified parameter group does not exist. // +// * ErrCodeServiceLinkedRoleNotFoundFault "ServiceLinkedRoleNotFoundFault" +// // * ErrCodeInvalidParameterValueException "InvalidParameterValueException" // The value for a parameter is invalid. // @@ -1167,6 +1191,8 @@ func (c *DAX) DescribeSubnetGroupsRequest(input *DescribeSubnetGroupsInput) (req // * ErrCodeSubnetGroupNotFoundFault "SubnetGroupNotFoundFault" // The requested subnet group name does not refer to an existing subnet group. // +// * ErrCodeServiceLinkedRoleNotFoundFault "ServiceLinkedRoleNotFoundFault" +// // See also, https://docs.aws.amazon.com/goto/WebAPI/dax-2017-04-19/DescribeSubnetGroups func (c *DAX) DescribeSubnetGroups(input *DescribeSubnetGroupsInput) (*DescribeSubnetGroupsOutput, error) { req, out := c.DescribeSubnetGroupsRequest(input) @@ -1262,6 +1288,8 @@ func (c *DAX) IncreaseReplicationFactorRequest(input *IncreaseReplicationFactorI // * ErrCodeNodeQuotaForCustomerExceededFault "NodeQuotaForCustomerExceededFault" // You have attempted to exceed the maximum number of nodes for your AWS account. // +// * ErrCodeServiceLinkedRoleNotFoundFault "ServiceLinkedRoleNotFoundFault" +// // * ErrCodeInvalidParameterValueException "InvalidParameterValueException" // The value for a parameter is invalid. // @@ -1354,6 +1382,8 @@ func (c *DAX) ListTagsRequest(input *ListTagsInput) (req *request.Request, outpu // * ErrCodeInvalidClusterStateFault "InvalidClusterStateFault" // The requested DAX cluster is not in the available state. // +// * ErrCodeServiceLinkedRoleNotFoundFault "ServiceLinkedRoleNotFoundFault" +// // * ErrCodeInvalidParameterValueException "InvalidParameterValueException" // The value for a parameter is invalid. // @@ -1446,6 +1476,8 @@ func (c *DAX) RebootNodeRequest(input *RebootNodeInput) (req *request.Request, o // * ErrCodeInvalidClusterStateFault "InvalidClusterStateFault" // The requested DAX cluster is not in the available state. // +// * ErrCodeServiceLinkedRoleNotFoundFault "ServiceLinkedRoleNotFoundFault" +// // * ErrCodeInvalidParameterValueException "InvalidParameterValueException" // The value for a parameter is invalid. // @@ -1541,6 +1573,8 @@ func (c *DAX) TagResourceRequest(input *TagResourceInput) (req *request.Request, // * ErrCodeInvalidClusterStateFault "InvalidClusterStateFault" // The requested DAX cluster is not in the available state. // +// * ErrCodeServiceLinkedRoleNotFoundFault "ServiceLinkedRoleNotFoundFault" +// // * ErrCodeInvalidParameterValueException "InvalidParameterValueException" // The value for a parameter is invalid. // @@ -1636,6 +1670,8 @@ func (c *DAX) UntagResourceRequest(input *UntagResourceInput) (req *request.Requ // * ErrCodeInvalidClusterStateFault "InvalidClusterStateFault" // The requested DAX cluster is not in the available state. // +// * ErrCodeServiceLinkedRoleNotFoundFault "ServiceLinkedRoleNotFoundFault" +// // * ErrCodeInvalidParameterValueException "InvalidParameterValueException" // The value for a parameter is invalid. // @@ -1732,6 +1768,8 @@ func (c *DAX) UpdateClusterRequest(input *UpdateClusterInput) (req *request.Requ // * ErrCodeParameterGroupNotFoundFault "ParameterGroupNotFoundFault" // The specified parameter group does not exist. // +// * ErrCodeServiceLinkedRoleNotFoundFault "ServiceLinkedRoleNotFoundFault" +// // * ErrCodeInvalidParameterValueException "InvalidParameterValueException" // The value for a parameter is invalid. // @@ -1821,6 +1859,8 @@ func (c *DAX) UpdateParameterGroupRequest(input *UpdateParameterGroupInput) (req // * ErrCodeParameterGroupNotFoundFault "ParameterGroupNotFoundFault" // The specified parameter group does not exist. // +// * ErrCodeServiceLinkedRoleNotFoundFault "ServiceLinkedRoleNotFoundFault" +// // * ErrCodeInvalidParameterValueException "InvalidParameterValueException" // The value for a parameter is invalid. // @@ -1916,6 +1956,8 @@ func (c *DAX) UpdateSubnetGroupRequest(input *UpdateSubnetGroupInput) (req *requ // * ErrCodeInvalidSubnet "InvalidSubnet" // An invalid subnet identifier was specified. // +// * ErrCodeServiceLinkedRoleNotFoundFault "ServiceLinkedRoleNotFoundFault" +// // See also, https://docs.aws.amazon.com/goto/WebAPI/dax-2017-04-19/UpdateSubnetGroup func (c *DAX) UpdateSubnetGroup(input *UpdateSubnetGroupInput) (*UpdateSubnetGroupOutput, error) { req, out := c.UpdateSubnetGroupRequest(input) @@ -1989,6 +2031,10 @@ type Cluster struct { // than 30 minutes, and is performed automatically within the maintenance window. PreferredMaintenanceWindow *string `type:"string"` + // The description of the server-side encryption status on the specified DAX + // cluster. + SSEDescription *SSEDescription `type:"structure"` + // A list of security groups, and the status of each, for the nodes in the cluster. SecurityGroups []*SecurityGroupMembership `type:"list"` @@ -2084,6 +2130,12 @@ func (s *Cluster) SetPreferredMaintenanceWindow(v string) *Cluster { return s } +// SetSSEDescription sets the SSEDescription field's value. +func (s *Cluster) SetSSEDescription(v *SSEDescription) *Cluster { + s.SSEDescription = v + return s +} + // SetSecurityGroups sets the SecurityGroups field's value. func (s *Cluster) SetSecurityGroups(v []*SecurityGroupMembership) *Cluster { s.SecurityGroups = v @@ -2189,6 +2241,9 @@ type CreateClusterInput struct { // ReplicationFactor is a required field ReplicationFactor *int64 `type:"integer" required:"true"` + // Represents the settings used to enable server-side encryption on the cluster. + SSESpecification *SSESpecification `type:"structure"` + // A list of security group IDs to be assigned to each node in the DAX cluster. // (Each of the security group ID is system-generated.) // @@ -2231,6 +2286,11 @@ func (s *CreateClusterInput) Validate() error { if s.ReplicationFactor == nil { invalidParams.Add(request.NewErrParamRequired("ReplicationFactor")) } + if s.SSESpecification != nil { + if err := s.SSESpecification.Validate(); err != nil { + invalidParams.AddNested("SSESpecification", err.(request.ErrInvalidParams)) + } + } if invalidParams.Len() > 0 { return invalidParams @@ -2292,6 +2352,12 @@ func (s *CreateClusterInput) SetReplicationFactor(v int64) *CreateClusterInput { return s } +// SetSSESpecification sets the SSESpecification field's value. +func (s *CreateClusterInput) SetSSESpecification(v *SSESpecification) *CreateClusterInput { + s.SSESpecification = v + return s +} + // SetSecurityGroupIds sets the SecurityGroupIds field's value. func (s *CreateClusterInput) SetSecurityGroupIds(v []*string) *CreateClusterInput { s.SecurityGroupIds = v @@ -3992,6 +4058,79 @@ func (s *RebootNodeOutput) SetCluster(v *Cluster) *RebootNodeOutput { return s } +// The description of the server-side encryption status on the specified DAX +// cluster. +type SSEDescription struct { + _ struct{} `type:"structure"` + + // The current state of server-side encryption: + // + // * ENABLING - Server-side encryption is being enabled. + // + // * ENABLED - Server-side encryption is enabled. + // + // * DISABLING - Server-side encryption is being disabled. + // + // * DISABLED - Server-side encryption is disabled. + Status *string `type:"string" enum:"SSEStatus"` +} + +// String returns the string representation +func (s SSEDescription) String() string { + return awsutil.Prettify(s) +} + +// GoString returns the string representation +func (s SSEDescription) GoString() string { + return s.String() +} + +// SetStatus sets the Status field's value. +func (s *SSEDescription) SetStatus(v string) *SSEDescription { + s.Status = &v + return s +} + +// Represents the settings used to enable server-side encryption. +type SSESpecification struct { + _ struct{} `type:"structure"` + + // Indicates whether server-side encryption is enabled (true) or disabled (false) + // on the cluster. + // + // Enabled is a required field + Enabled *bool `type:"boolean" required:"true"` +} + +// String returns the string representation +func (s SSESpecification) String() string { + return awsutil.Prettify(s) +} + +// GoString returns the string representation +func (s SSESpecification) GoString() string { + return s.String() +} + +// Validate inspects the fields of the type to determine if they are valid. +func (s *SSESpecification) Validate() error { + invalidParams := request.ErrInvalidParams{Context: "SSESpecification"} + if s.Enabled == nil { + invalidParams.Add(request.NewErrParamRequired("Enabled")) + } + + if invalidParams.Len() > 0 { + return invalidParams + } + return nil +} + +// SetEnabled sets the Enabled field's value. +func (s *SSESpecification) SetEnabled(v bool) *SSESpecification { + s.Enabled = &v + return s +} + // An individual VPC security group and its status. type SecurityGroupMembership struct { _ struct{} `type:"structure"` @@ -4609,6 +4748,20 @@ const ( ParameterTypeNodeTypeSpecific = "NODE_TYPE_SPECIFIC" ) +const ( + // SSEStatusEnabling is a SSEStatus enum value + SSEStatusEnabling = "ENABLING" + + // SSEStatusEnabled is a SSEStatus enum value + SSEStatusEnabled = "ENABLED" + + // SSEStatusDisabling is a SSEStatus enum value + SSEStatusDisabling = "DISABLING" + + // SSEStatusDisabled is a SSEStatus enum value + SSEStatusDisabled = "DISABLED" +) + const ( // SourceTypeCluster is a SourceType enum value SourceTypeCluster = "CLUSTER" diff --git a/vendor/github.com/aws/aws-sdk-go/service/dax/errors.go b/vendor/github.com/aws/aws-sdk-go/service/dax/errors.go index 24aaf1a23..f5ef87e87 100644 --- a/vendor/github.com/aws/aws-sdk-go/service/dax/errors.go +++ b/vendor/github.com/aws/aws-sdk-go/service/dax/errors.go @@ -108,6 +108,10 @@ const ( // You have attempted to exceed the maximum number of parameter groups. ErrCodeParameterGroupQuotaExceededFault = "ParameterGroupQuotaExceededFault" + // ErrCodeServiceLinkedRoleNotFoundFault for service response error code + // "ServiceLinkedRoleNotFoundFault". + ErrCodeServiceLinkedRoleNotFoundFault = "ServiceLinkedRoleNotFoundFault" + // ErrCodeSubnetGroupAlreadyExistsFault for service response error code // "SubnetGroupAlreadyExistsFault". // diff --git a/vendor/github.com/aws/aws-sdk-go/service/devicefarm/api.go b/vendor/github.com/aws/aws-sdk-go/service/devicefarm/api.go index cf8deb7a7..4d945c971 100644 --- a/vendor/github.com/aws/aws-sdk-go/service/devicefarm/api.go +++ b/vendor/github.com/aws/aws-sdk-go/service/devicefarm/api.go @@ -5604,6 +5604,99 @@ func (c *DeviceFarm) ScheduleRunWithContext(ctx aws.Context, input *ScheduleRunI return out, req.Send() } +const opStopJob = "StopJob" + +// StopJobRequest generates a "aws/request.Request" representing the +// client's request for the StopJob operation. The "output" return +// value will be populated with the request's response once the request completes +// successfuly. +// +// Use "Send" method on the returned Request to send the API call to the service. +// the "output" return value is not valid until after Send returns without error. +// +// See StopJob for more information on using the StopJob +// API call, and error handling. +// +// This method is useful when you want to inject custom logic or configuration +// into the SDK's request lifecycle. Such as custom headers, or retry logic. +// +// +// // Example sending a request using the StopJobRequest method. +// req, resp := client.StopJobRequest(params) +// +// err := req.Send() +// if err == nil { // resp is now filled +// fmt.Println(resp) +// } +// +// See also, https://docs.aws.amazon.com/goto/WebAPI/devicefarm-2015-06-23/StopJob +func (c *DeviceFarm) StopJobRequest(input *StopJobInput) (req *request.Request, output *StopJobOutput) { + op := &request.Operation{ + Name: opStopJob, + HTTPMethod: "POST", + HTTPPath: "/", + } + + if input == nil { + input = &StopJobInput{} + } + + output = &StopJobOutput{} + req = c.newRequest(op, input, output) + return +} + +// StopJob API operation for AWS Device Farm. +// +// Initiates a stop request for the current job. AWS Device Farm will immediately +// stop the job on the device where tests have not started executing, and you +// will not be billed for this device. On the device where tests have started +// executing, Setup Suite and Teardown Suite tests will run to completion before +// stopping execution on the device. You will be billed for Setup, Teardown, +// and any tests that were in progress or already completed. +// +// Returns awserr.Error for service API and SDK errors. Use runtime type assertions +// with awserr.Error's Code and Message methods to get detailed information about +// the error. +// +// See the AWS API reference guide for AWS Device Farm's +// API operation StopJob for usage and error information. +// +// Returned Error Codes: +// * ErrCodeArgumentException "ArgumentException" +// An invalid argument was specified. +// +// * ErrCodeNotFoundException "NotFoundException" +// The specified entity was not found. +// +// * ErrCodeLimitExceededException "LimitExceededException" +// A limit was exceeded. +// +// * ErrCodeServiceAccountException "ServiceAccountException" +// There was a problem with the service account. +// +// See also, https://docs.aws.amazon.com/goto/WebAPI/devicefarm-2015-06-23/StopJob +func (c *DeviceFarm) StopJob(input *StopJobInput) (*StopJobOutput, error) { + req, out := c.StopJobRequest(input) + return out, req.Send() +} + +// StopJobWithContext is the same as StopJob with the addition of +// the ability to pass a context and additional request options. +// +// See StopJob for details on how to use this API operation. +// +// The context must be non-nil and will be used for request cancellation. If +// the context is nil a panic will occur. In the future the SDK may create +// sub-contexts for http.Requests. See https://golang.org/pkg/context/ +// for more information on using Contexts. +func (c *DeviceFarm) StopJobWithContext(ctx aws.Context, input *StopJobInput, opts ...request.Option) (*StopJobOutput, error) { + req, out := c.StopJobRequest(input) + req.SetContext(ctx) + req.ApplyOptions(opts...) + return out, req.Send() +} + const opStopRemoteAccessSession = "StopRemoteAccessSession" // StopRemoteAccessSessionRequest generates a "aws/request.Request" representing the @@ -6227,6 +6320,94 @@ func (c *DeviceFarm) UpdateProjectWithContext(ctx aws.Context, input *UpdateProj return out, req.Send() } +const opUpdateUpload = "UpdateUpload" + +// UpdateUploadRequest generates a "aws/request.Request" representing the +// client's request for the UpdateUpload operation. The "output" return +// value will be populated with the request's response once the request completes +// successfuly. +// +// Use "Send" method on the returned Request to send the API call to the service. +// the "output" return value is not valid until after Send returns without error. +// +// See UpdateUpload for more information on using the UpdateUpload +// API call, and error handling. +// +// This method is useful when you want to inject custom logic or configuration +// into the SDK's request lifecycle. Such as custom headers, or retry logic. +// +// +// // Example sending a request using the UpdateUploadRequest method. +// req, resp := client.UpdateUploadRequest(params) +// +// err := req.Send() +// if err == nil { // resp is now filled +// fmt.Println(resp) +// } +// +// See also, https://docs.aws.amazon.com/goto/WebAPI/devicefarm-2015-06-23/UpdateUpload +func (c *DeviceFarm) UpdateUploadRequest(input *UpdateUploadInput) (req *request.Request, output *UpdateUploadOutput) { + op := &request.Operation{ + Name: opUpdateUpload, + HTTPMethod: "POST", + HTTPPath: "/", + } + + if input == nil { + input = &UpdateUploadInput{} + } + + output = &UpdateUploadOutput{} + req = c.newRequest(op, input, output) + return +} + +// UpdateUpload API operation for AWS Device Farm. +// +// Update an uploaded test specification (test spec). +// +// Returns awserr.Error for service API and SDK errors. Use runtime type assertions +// with awserr.Error's Code and Message methods to get detailed information about +// the error. +// +// See the AWS API reference guide for AWS Device Farm's +// API operation UpdateUpload for usage and error information. +// +// Returned Error Codes: +// * ErrCodeArgumentException "ArgumentException" +// An invalid argument was specified. +// +// * ErrCodeNotFoundException "NotFoundException" +// The specified entity was not found. +// +// * ErrCodeLimitExceededException "LimitExceededException" +// A limit was exceeded. +// +// * ErrCodeServiceAccountException "ServiceAccountException" +// There was a problem with the service account. +// +// See also, https://docs.aws.amazon.com/goto/WebAPI/devicefarm-2015-06-23/UpdateUpload +func (c *DeviceFarm) UpdateUpload(input *UpdateUploadInput) (*UpdateUploadOutput, error) { + req, out := c.UpdateUploadRequest(input) + return out, req.Send() +} + +// UpdateUploadWithContext is the same as UpdateUpload with the addition of +// the ability to pass a context and additional request options. +// +// See UpdateUpload for details on how to use this API operation. +// +// The context must be non-nil and will be used for request cancellation. If +// the context is nil a panic will occur. In the future the SDK may create +// sub-contexts for http.Requests. See https://golang.org/pkg/context/ +// for more information on using Contexts. +func (c *DeviceFarm) UpdateUploadWithContext(ctx aws.Context, input *UpdateUploadInput, opts ...request.Option) (*UpdateUploadOutput, error) { + req, out := c.UpdateUploadRequest(input) + req.SetContext(ctx) + req.ApplyOptions(opts...) + return out, req.Send() +} + const opUpdateVPCEConfiguration = "UpdateVPCEConfiguration" // UpdateVPCEConfigurationRequest generates a "aws/request.Request" representing the @@ -7367,7 +7548,7 @@ type CreateUploadInput struct { // // * IOS_APP: An iOS upload. // - // * WEB_APP: A web appliction upload. + // * WEB_APP: A web application upload. // // * EXTERNAL_DATA: An external data upload. // @@ -8549,6 +8730,10 @@ type ExecutionConfiguration struct { // modify my app? (https://aws.amazon.com/device-farm/faq/) in the AWS Device // Farm FAQs. SkipAppResign *bool `locationName:"skipAppResign" type:"boolean"` + + // Set to true to enable video capture; otherwise, set to false. The default + // is true. + VideoCapture *bool `locationName:"videoCapture" type:"boolean"` } // String returns the string representation @@ -8585,6 +8770,12 @@ func (s *ExecutionConfiguration) SetSkipAppResign(v bool) *ExecutionConfiguratio return s } +// SetVideoCapture sets the VideoCapture field's value. +func (s *ExecutionConfiguration) SetVideoCapture(v bool) *ExecutionConfiguration { + s.VideoCapture = &v + return s +} + // Represents the request sent to retrieve the account settings. type GetAccountSettingsInput struct { _ struct{} `type:"structure"` @@ -10037,6 +10228,13 @@ type Job struct { // // * XCTEST_UI: The XCode UI test type. Type *string `locationName:"type" type:"string" enum:"TestType"` + + // This value is set to true if video capture is enabled; otherwise, it is set + // to false. + VideoCapture *bool `locationName:"videoCapture" type:"boolean"` + + // The endpoint for streaming device video. + VideoEndpoint *string `locationName:"videoEndpoint" type:"string"` } // String returns the string representation @@ -10127,6 +10325,18 @@ func (s *Job) SetType(v string) *Job { return s } +// SetVideoCapture sets the VideoCapture field's value. +func (s *Job) SetVideoCapture(v bool) *Job { + s.VideoCapture = &v + return s +} + +// SetVideoEndpoint sets the VideoEndpoint field's value. +func (s *Job) SetVideoEndpoint(v string) *Job { + s.VideoEndpoint = &v + return s +} + // Represents a request to the list artifacts operation. type ListArtifactsInput struct { _ struct{} `type:"structure"` @@ -11653,6 +11863,62 @@ type ListUploadsInput struct { // An identifier that was returned from the previous call to this operation, // which can be used to return the next set of items in the list. NextToken *string `locationName:"nextToken" min:"4" type:"string"` + + // The type of upload. + // + // Must be one of the following values: + // + // * ANDROID_APP: An Android upload. + // + // * IOS_APP: An iOS upload. + // + // * WEB_APP: A web appliction upload. + // + // * EXTERNAL_DATA: An external data upload. + // + // * APPIUM_JAVA_JUNIT_TEST_PACKAGE: An Appium Java JUnit test package upload. + // + // * APPIUM_JAVA_TESTNG_TEST_PACKAGE: An Appium Java TestNG test package + // upload. + // + // * APPIUM_PYTHON_TEST_PACKAGE: An Appium Python test package upload. + // + // * APPIUM_WEB_JAVA_JUNIT_TEST_PACKAGE: An Appium Java JUnit test package + // upload. + // + // * APPIUM_WEB_JAVA_TESTNG_TEST_PACKAGE: An Appium Java TestNG test package + // upload. + // + // * APPIUM_WEB_PYTHON_TEST_PACKAGE: An Appium Python test package upload. + // + // * CALABASH_TEST_PACKAGE: A Calabash test package upload. + // + // * INSTRUMENTATION_TEST_PACKAGE: An instrumentation upload. + // + // * UIAUTOMATION_TEST_PACKAGE: A uiautomation test package upload. + // + // * UIAUTOMATOR_TEST_PACKAGE: A uiautomator test package upload. + // + // * XCTEST_TEST_PACKAGE: An XCode test package upload. + // + // * XCTEST_UI_TEST_PACKAGE: An XCode UI test package upload. + // + // * APPIUM_JAVA_JUNIT_TEST_SPEC: An Appium Java JUnit test spec upload. + // + // * APPIUM_JAVA_TESTNG_TEST_SPEC: An Appium Java TestNG test spec upload. + // + // * APPIUM_PYTHON_TEST_SPEC: An Appium Python test spec upload. + // + // * APPIUM_WEB_JAVA_JUNIT_TEST_SPEC: An Appium Java JUnit test spec upload. + // + // * APPIUM_WEB_JAVA_TESTNG_TEST_SPEC: An Appium Java TestNG test spec upload. + // + // * APPIUM_WEB_PYTHON_TEST_SPEC: An Appium Python test spec upload. + // + // * INSTRUMENTATION_TEST_SPEC: An instrumentation test spec upload. + // + // * XCTEST_UI_TEST_SPEC: An XCode UI test spec upload. + Type *string `locationName:"type" type:"string" enum:"UploadType"` } // String returns the string representation @@ -11696,6 +11962,12 @@ func (s *ListUploadsInput) SetNextToken(v string) *ListUploadsInput { return s } +// SetType sets the Type field's value. +func (s *ListUploadsInput) SetType(v string) *ListUploadsInput { + s.Type = &v + return s +} + // Represents the result of a list uploads request. type ListUploadsOutput struct { _ struct{} `type:"structure"` @@ -13154,6 +13426,9 @@ type Run struct { // The run's stop time. Stopped *time.Time `locationName:"stopped" type:"timestamp"` + // The ARN of the YAML-formatted test specification for the run. + TestSpecArn *string `locationName:"testSpecArn" min:"32" type:"string"` + // The total number of jobs for the run. TotalJobs *int64 `locationName:"totalJobs" type:"integer"` @@ -13362,6 +13637,12 @@ func (s *Run) SetStopped(v time.Time) *Run { return s } +// SetTestSpecArn sets the TestSpecArn field's value. +func (s *Run) SetTestSpecArn(v string) *Run { + s.TestSpecArn = &v + return s +} + // SetTotalJobs sets the TotalJobs field's value. func (s *Run) SetTotalJobs(v int64) *Run { s.TotalJobs = &v @@ -13817,6 +14098,9 @@ type ScheduleRunTest struct { // The ARN of the uploaded test that will be run. TestPackageArn *string `locationName:"testPackageArn" min:"32" type:"string"` + // The ARN of the YAML-formatted test specification. + TestSpecArn *string `locationName:"testSpecArn" min:"32" type:"string"` + // The test's type. // // Must be one of the following values: @@ -13871,6 +14155,9 @@ func (s *ScheduleRunTest) Validate() error { if s.TestPackageArn != nil && len(*s.TestPackageArn) < 32 { invalidParams.Add(request.NewErrParamMinLen("TestPackageArn", 32)) } + if s.TestSpecArn != nil && len(*s.TestSpecArn) < 32 { + invalidParams.Add(request.NewErrParamMinLen("TestSpecArn", 32)) + } if s.Type == nil { invalidParams.Add(request.NewErrParamRequired("Type")) } @@ -13899,12 +14186,83 @@ func (s *ScheduleRunTest) SetTestPackageArn(v string) *ScheduleRunTest { return s } +// SetTestSpecArn sets the TestSpecArn field's value. +func (s *ScheduleRunTest) SetTestSpecArn(v string) *ScheduleRunTest { + s.TestSpecArn = &v + return s +} + // SetType sets the Type field's value. func (s *ScheduleRunTest) SetType(v string) *ScheduleRunTest { s.Type = &v return s } +type StopJobInput struct { + _ struct{} `type:"structure"` + + // Represents the Amazon Resource Name (ARN) of the Device Farm job you wish + // to stop. + // + // Arn is a required field + Arn *string `locationName:"arn" min:"32" type:"string" required:"true"` +} + +// String returns the string representation +func (s StopJobInput) String() string { + return awsutil.Prettify(s) +} + +// GoString returns the string representation +func (s StopJobInput) GoString() string { + return s.String() +} + +// Validate inspects the fields of the type to determine if they are valid. +func (s *StopJobInput) Validate() error { + invalidParams := request.ErrInvalidParams{Context: "StopJobInput"} + if s.Arn == nil { + invalidParams.Add(request.NewErrParamRequired("Arn")) + } + if s.Arn != nil && len(*s.Arn) < 32 { + invalidParams.Add(request.NewErrParamMinLen("Arn", 32)) + } + + if invalidParams.Len() > 0 { + return invalidParams + } + return nil +} + +// SetArn sets the Arn field's value. +func (s *StopJobInput) SetArn(v string) *StopJobInput { + s.Arn = &v + return s +} + +type StopJobOutput struct { + _ struct{} `type:"structure"` + + // The job that was stopped. + Job *Job `locationName:"job" type:"structure"` +} + +// String returns the string representation +func (s StopJobOutput) String() string { + return awsutil.Prettify(s) +} + +// GoString returns the string representation +func (s StopJobOutput) GoString() string { + return s.String() +} + +// SetJob sets the Job field's value. +func (s *StopJobOutput) SetJob(v *Job) *StopJobOutput { + s.Job = v + return s +} + // Represents the request to stop the remote access session. type StopRemoteAccessSessionInput struct { _ struct{} `type:"structure"` @@ -15020,6 +15378,99 @@ func (s *UpdateProjectOutput) SetProject(v *Project) *UpdateProjectOutput { return s } +type UpdateUploadInput struct { + _ struct{} `type:"structure"` + + // The Amazon Resource Name (ARN) of the uploaded test spec. + // + // Arn is a required field + Arn *string `locationName:"arn" min:"32" type:"string" required:"true"` + + // The upload's content type (for example, "application/x-yaml"). + ContentType *string `locationName:"contentType" type:"string"` + + // Set to true if the YAML file has changed and needs to be updated; otherwise, + // set to false. + EditContent *bool `locationName:"editContent" type:"boolean"` + + // The upload's test spec file name. The name should not contain the '/' character. + // The test spec file name must end with the .yaml or .yml file extension. + Name *string `locationName:"name" type:"string"` +} + +// String returns the string representation +func (s UpdateUploadInput) String() string { + return awsutil.Prettify(s) +} + +// GoString returns the string representation +func (s UpdateUploadInput) GoString() string { + return s.String() +} + +// Validate inspects the fields of the type to determine if they are valid. +func (s *UpdateUploadInput) Validate() error { + invalidParams := request.ErrInvalidParams{Context: "UpdateUploadInput"} + if s.Arn == nil { + invalidParams.Add(request.NewErrParamRequired("Arn")) + } + if s.Arn != nil && len(*s.Arn) < 32 { + invalidParams.Add(request.NewErrParamMinLen("Arn", 32)) + } + + if invalidParams.Len() > 0 { + return invalidParams + } + return nil +} + +// SetArn sets the Arn field's value. +func (s *UpdateUploadInput) SetArn(v string) *UpdateUploadInput { + s.Arn = &v + return s +} + +// SetContentType sets the ContentType field's value. +func (s *UpdateUploadInput) SetContentType(v string) *UpdateUploadInput { + s.ContentType = &v + return s +} + +// SetEditContent sets the EditContent field's value. +func (s *UpdateUploadInput) SetEditContent(v bool) *UpdateUploadInput { + s.EditContent = &v + return s +} + +// SetName sets the Name field's value. +func (s *UpdateUploadInput) SetName(v string) *UpdateUploadInput { + s.Name = &v + return s +} + +type UpdateUploadOutput struct { + _ struct{} `type:"structure"` + + // A test spec uploaded to Device Farm. + Upload *Upload `locationName:"upload" type:"structure"` +} + +// String returns the string representation +func (s UpdateUploadOutput) String() string { + return awsutil.Prettify(s) +} + +// GoString returns the string representation +func (s UpdateUploadOutput) GoString() string { + return s.String() +} + +// SetUpload sets the Upload field's value. +func (s *UpdateUploadOutput) SetUpload(v *Upload) *UpdateUploadOutput { + s.Upload = v + return s +} + type UpdateVPCEConfigurationInput struct { _ struct{} `type:"structure"` @@ -15131,6 +15582,13 @@ type Upload struct { // The upload's ARN. Arn *string `locationName:"arn" min:"32" type:"string"` + // The upload's category. Allowed values include: + // + // * CURATED: An upload managed by AWS Device Farm. + // + // * PRIVATE: An upload managed by the AWS Device Farm customer. + Category *string `locationName:"category" type:"string" enum:"UploadCategory"` + // The upload's content type (for example, "application/octet-stream"). ContentType *string `locationName:"contentType" type:"string"` @@ -15222,6 +15680,12 @@ func (s *Upload) SetArn(v string) *Upload { return s } +// SetCategory sets the Category field's value. +func (s *Upload) SetCategory(v string) *Upload { + s.Category = &v + return s +} + // SetContentType sets the ContentType field's value. func (s *Upload) SetContentType(v string) *Upload { s.ContentType = &v @@ -15425,6 +15889,9 @@ const ( // ArtifactTypeCustomerArtifactLog is a ArtifactType enum value ArtifactTypeCustomerArtifactLog = "CUSTOMER_ARTIFACT_LOG" + + // ArtifactTypeTestspecOutput is a ArtifactType enum value + ArtifactTypeTestspecOutput = "TESTSPEC_OUTPUT" ) const ( @@ -15736,6 +16203,14 @@ const ( TestTypeRemoteAccessReplay = "REMOTE_ACCESS_REPLAY" ) +const ( + // UploadCategoryCurated is a UploadCategory enum value + UploadCategoryCurated = "CURATED" + + // UploadCategoryPrivate is a UploadCategory enum value + UploadCategoryPrivate = "PRIVATE" +) + const ( // UploadStatusInitialized is a UploadStatus enum value UploadStatusInitialized = "INITIALIZED" @@ -15798,4 +16273,28 @@ const ( // UploadTypeXctestUiTestPackage is a UploadType enum value UploadTypeXctestUiTestPackage = "XCTEST_UI_TEST_PACKAGE" + + // UploadTypeAppiumJavaJunitTestSpec is a UploadType enum value + UploadTypeAppiumJavaJunitTestSpec = "APPIUM_JAVA_JUNIT_TEST_SPEC" + + // UploadTypeAppiumJavaTestngTestSpec is a UploadType enum value + UploadTypeAppiumJavaTestngTestSpec = "APPIUM_JAVA_TESTNG_TEST_SPEC" + + // UploadTypeAppiumPythonTestSpec is a UploadType enum value + UploadTypeAppiumPythonTestSpec = "APPIUM_PYTHON_TEST_SPEC" + + // UploadTypeAppiumWebJavaJunitTestSpec is a UploadType enum value + UploadTypeAppiumWebJavaJunitTestSpec = "APPIUM_WEB_JAVA_JUNIT_TEST_SPEC" + + // UploadTypeAppiumWebJavaTestngTestSpec is a UploadType enum value + UploadTypeAppiumWebJavaTestngTestSpec = "APPIUM_WEB_JAVA_TESTNG_TEST_SPEC" + + // UploadTypeAppiumWebPythonTestSpec is a UploadType enum value + UploadTypeAppiumWebPythonTestSpec = "APPIUM_WEB_PYTHON_TEST_SPEC" + + // UploadTypeInstrumentationTestSpec is a UploadType enum value + UploadTypeInstrumentationTestSpec = "INSTRUMENTATION_TEST_SPEC" + + // UploadTypeXctestUiTestSpec is a UploadType enum value + UploadTypeXctestUiTestSpec = "XCTEST_UI_TEST_SPEC" ) diff --git a/vendor/github.com/aws/aws-sdk-go/service/directconnect/api.go b/vendor/github.com/aws/aws-sdk-go/service/directconnect/api.go index ca88ba0f0..779e14092 100644 --- a/vendor/github.com/aws/aws-sdk-go/service/directconnect/api.go +++ b/vendor/github.com/aws/aws-sdk-go/service/directconnect/api.go @@ -37,6 +37,8 @@ const opAllocateConnectionOnInterconnect = "AllocateConnectionOnInterconnect" // } // // See also, https://docs.aws.amazon.com/goto/WebAPI/directconnect-2012-10-25/AllocateConnectionOnInterconnect +// +// Deprecated: AllocateConnectionOnInterconnect has been deprecated func (c *DirectConnect) AllocateConnectionOnInterconnectRequest(input *AllocateConnectionOnInterconnectInput) (req *request.Request, output *Connection) { if c.Client.Config.Logger != nil { c.Client.Config.Logger.Log("This operation, AllocateConnectionOnInterconnect, has been deprecated") @@ -84,6 +86,8 @@ func (c *DirectConnect) AllocateConnectionOnInterconnectRequest(input *AllocateC // additional details about the cause. // // See also, https://docs.aws.amazon.com/goto/WebAPI/directconnect-2012-10-25/AllocateConnectionOnInterconnect +// +// Deprecated: AllocateConnectionOnInterconnect has been deprecated func (c *DirectConnect) AllocateConnectionOnInterconnect(input *AllocateConnectionOnInterconnectInput) (*Connection, error) { req, out := c.AllocateConnectionOnInterconnectRequest(input) return out, req.Send() @@ -98,6 +102,8 @@ func (c *DirectConnect) AllocateConnectionOnInterconnect(input *AllocateConnecti // the context is nil a panic will occur. In the future the SDK may create // sub-contexts for http.Requests. See https://golang.org/pkg/context/ // for more information on using Contexts. +// +// Deprecated: AllocateConnectionOnInterconnectWithContext has been deprecated func (c *DirectConnect) AllocateConnectionOnInterconnectWithContext(ctx aws.Context, input *AllocateConnectionOnInterconnectInput, opts ...request.Option) (*Connection, error) { req, out := c.AllocateConnectionOnInterconnectRequest(input) req.SetContext(ctx) @@ -2324,6 +2330,8 @@ const opDescribeConnectionLoa = "DescribeConnectionLoa" // } // // See also, https://docs.aws.amazon.com/goto/WebAPI/directconnect-2012-10-25/DescribeConnectionLoa +// +// Deprecated: DescribeConnectionLoa has been deprecated func (c *DirectConnect) DescribeConnectionLoaRequest(input *DescribeConnectionLoaInput) (req *request.Request, output *DescribeConnectionLoaOutput) { if c.Client.Config.Logger != nil { c.Client.Config.Logger.Log("This operation, DescribeConnectionLoa, has been deprecated") @@ -2372,6 +2380,8 @@ func (c *DirectConnect) DescribeConnectionLoaRequest(input *DescribeConnectionLo // additional details about the cause. // // See also, https://docs.aws.amazon.com/goto/WebAPI/directconnect-2012-10-25/DescribeConnectionLoa +// +// Deprecated: DescribeConnectionLoa has been deprecated func (c *DirectConnect) DescribeConnectionLoa(input *DescribeConnectionLoaInput) (*DescribeConnectionLoaOutput, error) { req, out := c.DescribeConnectionLoaRequest(input) return out, req.Send() @@ -2386,6 +2396,8 @@ func (c *DirectConnect) DescribeConnectionLoa(input *DescribeConnectionLoaInput) // the context is nil a panic will occur. In the future the SDK may create // sub-contexts for http.Requests. See https://golang.org/pkg/context/ // for more information on using Contexts. +// +// Deprecated: DescribeConnectionLoaWithContext has been deprecated func (c *DirectConnect) DescribeConnectionLoaWithContext(ctx aws.Context, input *DescribeConnectionLoaInput, opts ...request.Option) (*DescribeConnectionLoaOutput, error) { req, out := c.DescribeConnectionLoaRequest(input) req.SetContext(ctx) @@ -2505,6 +2517,8 @@ const opDescribeConnectionsOnInterconnect = "DescribeConnectionsOnInterconnect" // } // // See also, https://docs.aws.amazon.com/goto/WebAPI/directconnect-2012-10-25/DescribeConnectionsOnInterconnect +// +// Deprecated: DescribeConnectionsOnInterconnect has been deprecated func (c *DirectConnect) DescribeConnectionsOnInterconnectRequest(input *DescribeConnectionsOnInterconnectInput) (req *request.Request, output *Connections) { if c.Client.Config.Logger != nil { c.Client.Config.Logger.Log("This operation, DescribeConnectionsOnInterconnect, has been deprecated") @@ -2549,6 +2563,8 @@ func (c *DirectConnect) DescribeConnectionsOnInterconnectRequest(input *Describe // additional details about the cause. // // See also, https://docs.aws.amazon.com/goto/WebAPI/directconnect-2012-10-25/DescribeConnectionsOnInterconnect +// +// Deprecated: DescribeConnectionsOnInterconnect has been deprecated func (c *DirectConnect) DescribeConnectionsOnInterconnect(input *DescribeConnectionsOnInterconnectInput) (*Connections, error) { req, out := c.DescribeConnectionsOnInterconnectRequest(input) return out, req.Send() @@ -2563,6 +2579,8 @@ func (c *DirectConnect) DescribeConnectionsOnInterconnect(input *DescribeConnect // the context is nil a panic will occur. In the future the SDK may create // sub-contexts for http.Requests. See https://golang.org/pkg/context/ // for more information on using Contexts. +// +// Deprecated: DescribeConnectionsOnInterconnectWithContext has been deprecated func (c *DirectConnect) DescribeConnectionsOnInterconnectWithContext(ctx aws.Context, input *DescribeConnectionsOnInterconnectInput, opts ...request.Option) (*Connections, error) { req, out := c.DescribeConnectionsOnInterconnectRequest(input) req.SetContext(ctx) @@ -2951,6 +2969,8 @@ const opDescribeInterconnectLoa = "DescribeInterconnectLoa" // } // // See also, https://docs.aws.amazon.com/goto/WebAPI/directconnect-2012-10-25/DescribeInterconnectLoa +// +// Deprecated: DescribeInterconnectLoa has been deprecated func (c *DirectConnect) DescribeInterconnectLoaRequest(input *DescribeInterconnectLoaInput) (req *request.Request, output *DescribeInterconnectLoaOutput) { if c.Client.Config.Logger != nil { c.Client.Config.Logger.Log("This operation, DescribeInterconnectLoa, has been deprecated") @@ -2999,6 +3019,8 @@ func (c *DirectConnect) DescribeInterconnectLoaRequest(input *DescribeInterconne // additional details about the cause. // // See also, https://docs.aws.amazon.com/goto/WebAPI/directconnect-2012-10-25/DescribeInterconnectLoa +// +// Deprecated: DescribeInterconnectLoa has been deprecated func (c *DirectConnect) DescribeInterconnectLoa(input *DescribeInterconnectLoaInput) (*DescribeInterconnectLoaOutput, error) { req, out := c.DescribeInterconnectLoaRequest(input) return out, req.Send() @@ -3013,6 +3035,8 @@ func (c *DirectConnect) DescribeInterconnectLoa(input *DescribeInterconnectLoaIn // the context is nil a panic will occur. In the future the SDK may create // sub-contexts for http.Requests. See https://golang.org/pkg/context/ // for more information on using Contexts. +// +// Deprecated: DescribeInterconnectLoaWithContext has been deprecated func (c *DirectConnect) DescribeInterconnectLoaWithContext(ctx aws.Context, input *DescribeInterconnectLoaInput, opts ...request.Option) (*DescribeInterconnectLoaOutput, error) { req, out := c.DescribeInterconnectLoaRequest(input) req.SetContext(ctx) @@ -4605,6 +4629,9 @@ type BGPPeer struct { // Example: asdf34example AuthKey *string `locationName:"authKey" type:"string"` + // The Direct Connection endpoint which the BGP peer terminates on. + AwsDeviceV2 *string `locationName:"awsDeviceV2" type:"string"` + // The state of the BGP peer. // // * Verifying: The BGP peering addresses or ASN require validation before @@ -4625,6 +4652,9 @@ type BGPPeer struct { // // * Up: The BGP peer is established. // + // A state of up does not indicate the state of the routing function. Ensure + // that you are receiving routes over the BGP session. + // // * Down: The BGP peer is down. BgpStatus *string `locationName:"bgpStatus" type:"string" enum:"BGPStatus"` @@ -4668,6 +4698,12 @@ func (s *BGPPeer) SetAuthKey(v string) *BGPPeer { return s } +// SetAwsDeviceV2 sets the AwsDeviceV2 field's value. +func (s *BGPPeer) SetAwsDeviceV2(v string) *BGPPeer { + s.AwsDeviceV2 = &v + return s +} + // SetBgpPeerState sets the BgpPeerState field's value. func (s *BGPPeer) SetBgpPeerState(v string) *BGPPeer { s.BgpPeerState = &v @@ -4997,8 +5033,13 @@ func (s *ConfirmPublicVirtualInterfaceOutput) SetVirtualInterfaceState(v string) type Connection struct { _ struct{} `type:"structure"` + // Deprecated in favor of awsDeviceV2. + // // The Direct Connection endpoint which the physical connection terminates on. - AwsDevice *string `locationName:"awsDevice" type:"string"` + AwsDevice *string `locationName:"awsDevice" deprecated:"true" type:"string"` + + // The Direct Connection endpoint which the physical connection terminates on. + AwsDeviceV2 *string `locationName:"awsDeviceV2" type:"string"` // Bandwidth of the connection. // @@ -5096,6 +5137,12 @@ func (s *Connection) SetAwsDevice(v string) *Connection { return s } +// SetAwsDeviceV2 sets the AwsDeviceV2 field's value. +func (s *Connection) SetAwsDeviceV2(v string) *Connection { + s.AwsDeviceV2 = &v + return s +} + // SetBandwidth sets the Bandwidth field's value. func (s *Connection) SetBandwidth(v string) *Connection { s.Bandwidth = &v @@ -7633,8 +7680,13 @@ func (s *GatewayAttachment) SetVirtualInterfaceRegion(v string) *GatewayAttachme type Interconnect struct { _ struct{} `type:"structure"` + // Deprecated in favor of awsDeviceV2. + // // The Direct Connection endpoint which the physical connection terminates on. - AwsDevice *string `locationName:"awsDevice" type:"string"` + AwsDevice *string `locationName:"awsDevice" deprecated:"true" type:"string"` + + // The Direct Connection endpoint which the physical connection terminates on. + AwsDeviceV2 *string `locationName:"awsDeviceV2" type:"string"` // Bandwidth of the connection. // @@ -7710,6 +7762,12 @@ func (s *Interconnect) SetAwsDevice(v string) *Interconnect { return s } +// SetAwsDeviceV2 sets the AwsDeviceV2 field's value. +func (s *Interconnect) SetAwsDeviceV2(v string) *Interconnect { + s.AwsDeviceV2 = &v + return s +} + // SetBandwidth sets the Bandwidth field's value. func (s *Interconnect) SetBandwidth(v string) *Interconnect { s.Bandwidth = &v @@ -7771,8 +7829,13 @@ type Lag struct { // This is intended for use by AWS Direct Connect partners only. AllowsHostedConnections *bool `locationName:"allowsHostedConnections" type:"boolean"` + // Deprecated in favor of awsDeviceV2. + // // The AWS Direct Connection endpoint that hosts the LAG. - AwsDevice *string `locationName:"awsDevice" type:"string"` + AwsDevice *string `locationName:"awsDevice" deprecated:"true" type:"string"` + + // The AWS Direct Connection endpoint that hosts the LAG. + AwsDeviceV2 *string `locationName:"awsDeviceV2" type:"string"` // A list of connections bundled by this LAG. Connections []*Connection `locationName:"connections" type:"list"` @@ -7858,6 +7921,12 @@ func (s *Lag) SetAwsDevice(v string) *Lag { return s } +// SetAwsDeviceV2 sets the AwsDeviceV2 field's value. +func (s *Lag) SetAwsDeviceV2(v string) *Lag { + s.AwsDeviceV2 = &v + return s +} + // SetConnections sets the Connections field's value. func (s *Lag) SetConnections(v []*Connection) *Lag { s.Connections = v @@ -7968,6 +8037,13 @@ type Location struct { // The name of the AWS Direct Connect location. The name includes the colocation // partner name and the physical site of the lit building. LocationName *string `locationName:"locationName" type:"string"` + + // The AWS region where the AWS Direct connect location is located. + // + // Example: us-east-1 + // + // Default: None + Region *string `locationName:"region" type:"string"` } // String returns the string representation @@ -7992,6 +8068,12 @@ func (s *Location) SetLocationName(v string) *Location { return s } +// SetRegion sets the Region field's value. +func (s *Location) SetRegion(v string) *Location { + s.Region = &v + return s +} + // A structure containing information about a new BGP peer. type NewBGPPeer struct { _ struct{} `type:"structure"` @@ -8997,6 +9079,9 @@ type VirtualInterface struct { // Example: asdf34example AuthKey *string `locationName:"authKey" type:"string"` + // The Direct Connection endpoint which the virtual interface terminates on. + AwsDeviceV2 *string `locationName:"awsDeviceV2" type:"string"` + // A list of the BGP peers configured on this virtual interface. BgpPeers []*BGPPeer `locationName:"bgpPeers" type:"list"` @@ -9031,6 +9116,13 @@ type VirtualInterface struct { // The AWS account that will own the new virtual interface. OwnerAccount *string `locationName:"ownerAccount" type:"string"` + // The AWS region where the virtual interface is located. + // + // Example: us-east-1 + // + // Default: None + Region *string `locationName:"region" type:"string"` + // A list of routes to be advertised to the AWS network in this region (public // virtual interface). RouteFilterPrefixes []*RouteFilterPrefix `locationName:"routeFilterPrefixes" type:"list"` @@ -9135,6 +9227,12 @@ func (s *VirtualInterface) SetAuthKey(v string) *VirtualInterface { return s } +// SetAwsDeviceV2 sets the AwsDeviceV2 field's value. +func (s *VirtualInterface) SetAwsDeviceV2(v string) *VirtualInterface { + s.AwsDeviceV2 = &v + return s +} + // SetBgpPeers sets the BgpPeers field's value. func (s *VirtualInterface) SetBgpPeers(v []*BGPPeer) *VirtualInterface { s.BgpPeers = v @@ -9177,6 +9275,12 @@ func (s *VirtualInterface) SetOwnerAccount(v string) *VirtualInterface { return s } +// SetRegion sets the Region field's value. +func (s *VirtualInterface) SetRegion(v string) *VirtualInterface { + s.Region = &v + return s +} + // SetRouteFilterPrefixes sets the RouteFilterPrefixes field's value. func (s *VirtualInterface) SetRouteFilterPrefixes(v []*RouteFilterPrefix) *VirtualInterface { s.RouteFilterPrefixes = v @@ -9267,6 +9371,9 @@ const ( // // * Up: The BGP peer is established. // +// A state of up does not indicate the state of the routing function. Ensure +// that you are receiving routes over the BGP session. +// // * Down: The BGP peer is down. const ( // BGPStatusUp is a BGPStatus enum value diff --git a/vendor/github.com/aws/aws-sdk-go/service/directoryservice/api.go b/vendor/github.com/aws/aws-sdk-go/service/directoryservice/api.go index 77c69861b..5febece49 100644 --- a/vendor/github.com/aws/aws-sdk-go/service/directoryservice/api.go +++ b/vendor/github.com/aws/aws-sdk-go/service/directoryservice/api.go @@ -11,6 +11,98 @@ import ( "github.com/aws/aws-sdk-go/aws/request" ) +const opAcceptSharedDirectory = "AcceptSharedDirectory" + +// AcceptSharedDirectoryRequest generates a "aws/request.Request" representing the +// client's request for the AcceptSharedDirectory operation. The "output" return +// value will be populated with the request's response once the request completes +// successfuly. +// +// Use "Send" method on the returned Request to send the API call to the service. +// the "output" return value is not valid until after Send returns without error. +// +// See AcceptSharedDirectory for more information on using the AcceptSharedDirectory +// API call, and error handling. +// +// This method is useful when you want to inject custom logic or configuration +// into the SDK's request lifecycle. Such as custom headers, or retry logic. +// +// +// // Example sending a request using the AcceptSharedDirectoryRequest method. +// req, resp := client.AcceptSharedDirectoryRequest(params) +// +// err := req.Send() +// if err == nil { // resp is now filled +// fmt.Println(resp) +// } +// +// See also, https://docs.aws.amazon.com/goto/WebAPI/ds-2015-04-16/AcceptSharedDirectory +func (c *DirectoryService) AcceptSharedDirectoryRequest(input *AcceptSharedDirectoryInput) (req *request.Request, output *AcceptSharedDirectoryOutput) { + op := &request.Operation{ + Name: opAcceptSharedDirectory, + HTTPMethod: "POST", + HTTPPath: "/", + } + + if input == nil { + input = &AcceptSharedDirectoryInput{} + } + + output = &AcceptSharedDirectoryOutput{} + req = c.newRequest(op, input, output) + return +} + +// AcceptSharedDirectory API operation for AWS Directory Service. +// +// Accepts a directory sharing request that was sent from the directory owner +// account. +// +// Returns awserr.Error for service API and SDK errors. Use runtime type assertions +// with awserr.Error's Code and Message methods to get detailed information about +// the error. +// +// See the AWS API reference guide for AWS Directory Service's +// API operation AcceptSharedDirectory for usage and error information. +// +// Returned Error Codes: +// * ErrCodeInvalidParameterException "InvalidParameterException" +// One or more parameters are not valid. +// +// * ErrCodeEntityDoesNotExistException "EntityDoesNotExistException" +// The specified entity could not be found. +// +// * ErrCodeDirectoryAlreadySharedException "DirectoryAlreadySharedException" +// The specified directory has already been shared with this AWS account. +// +// * ErrCodeClientException "ClientException" +// A client exception has occurred. +// +// * ErrCodeServiceException "ServiceException" +// An exception has occurred in AWS Directory Service. +// +// See also, https://docs.aws.amazon.com/goto/WebAPI/ds-2015-04-16/AcceptSharedDirectory +func (c *DirectoryService) AcceptSharedDirectory(input *AcceptSharedDirectoryInput) (*AcceptSharedDirectoryOutput, error) { + req, out := c.AcceptSharedDirectoryRequest(input) + return out, req.Send() +} + +// AcceptSharedDirectoryWithContext is the same as AcceptSharedDirectory with the addition of +// the ability to pass a context and additional request options. +// +// See AcceptSharedDirectory for details on how to use this API operation. +// +// The context must be non-nil and will be used for request cancellation. If +// the context is nil a panic will occur. In the future the SDK may create +// sub-contexts for http.Requests. See https://golang.org/pkg/context/ +// for more information on using Contexts. +func (c *DirectoryService) AcceptSharedDirectoryWithContext(ctx aws.Context, input *AcceptSharedDirectoryInput, opts ...request.Option) (*AcceptSharedDirectoryOutput, error) { + req, out := c.AcceptSharedDirectoryRequest(input) + req.SetContext(ctx) + req.ApplyOptions(opts...) + return out, req.Send() +} + const opAddIpRoutes = "AddIpRoutes" // AddIpRoutesRequest generates a "aws/request.Request" representing the @@ -785,6 +877,101 @@ func (c *DirectoryService) CreateDirectoryWithContext(ctx aws.Context, input *Cr return out, req.Send() } +const opCreateLogSubscription = "CreateLogSubscription" + +// CreateLogSubscriptionRequest generates a "aws/request.Request" representing the +// client's request for the CreateLogSubscription operation. The "output" return +// value will be populated with the request's response once the request completes +// successfuly. +// +// Use "Send" method on the returned Request to send the API call to the service. +// the "output" return value is not valid until after Send returns without error. +// +// See CreateLogSubscription for more information on using the CreateLogSubscription +// API call, and error handling. +// +// This method is useful when you want to inject custom logic or configuration +// into the SDK's request lifecycle. Such as custom headers, or retry logic. +// +// +// // Example sending a request using the CreateLogSubscriptionRequest method. +// req, resp := client.CreateLogSubscriptionRequest(params) +// +// err := req.Send() +// if err == nil { // resp is now filled +// fmt.Println(resp) +// } +// +// See also, https://docs.aws.amazon.com/goto/WebAPI/ds-2015-04-16/CreateLogSubscription +func (c *DirectoryService) CreateLogSubscriptionRequest(input *CreateLogSubscriptionInput) (req *request.Request, output *CreateLogSubscriptionOutput) { + op := &request.Operation{ + Name: opCreateLogSubscription, + HTTPMethod: "POST", + HTTPPath: "/", + } + + if input == nil { + input = &CreateLogSubscriptionInput{} + } + + output = &CreateLogSubscriptionOutput{} + req = c.newRequest(op, input, output) + return +} + +// CreateLogSubscription API operation for AWS Directory Service. +// +// Creates a subscription to forward real time Directory Service domain controller +// security logs to the specified CloudWatch log group in your AWS account. +// +// Returns awserr.Error for service API and SDK errors. Use runtime type assertions +// with awserr.Error's Code and Message methods to get detailed information about +// the error. +// +// See the AWS API reference guide for AWS Directory Service's +// API operation CreateLogSubscription for usage and error information. +// +// Returned Error Codes: +// * ErrCodeEntityAlreadyExistsException "EntityAlreadyExistsException" +// The specified entity already exists. +// +// * ErrCodeEntityDoesNotExistException "EntityDoesNotExistException" +// The specified entity could not be found. +// +// * ErrCodeUnsupportedOperationException "UnsupportedOperationException" +// The operation is not supported. +// +// * ErrCodeInsufficientPermissionsException "InsufficientPermissionsException" +// The account does not have sufficient permission to perform the operation. +// +// * ErrCodeClientException "ClientException" +// A client exception has occurred. +// +// * ErrCodeServiceException "ServiceException" +// An exception has occurred in AWS Directory Service. +// +// See also, https://docs.aws.amazon.com/goto/WebAPI/ds-2015-04-16/CreateLogSubscription +func (c *DirectoryService) CreateLogSubscription(input *CreateLogSubscriptionInput) (*CreateLogSubscriptionOutput, error) { + req, out := c.CreateLogSubscriptionRequest(input) + return out, req.Send() +} + +// CreateLogSubscriptionWithContext is the same as CreateLogSubscription with the addition of +// the ability to pass a context and additional request options. +// +// See CreateLogSubscription for details on how to use this API operation. +// +// The context must be non-nil and will be used for request cancellation. If +// the context is nil a panic will occur. In the future the SDK may create +// sub-contexts for http.Requests. See https://golang.org/pkg/context/ +// for more information on using Contexts. +func (c *DirectoryService) CreateLogSubscriptionWithContext(ctx aws.Context, input *CreateLogSubscriptionInput, opts ...request.Option) (*CreateLogSubscriptionOutput, error) { + req, out := c.CreateLogSubscriptionRequest(input) + req.SetContext(ctx) + req.ApplyOptions(opts...) + return out, req.Send() +} + const opCreateMicrosoftAD = "CreateMicrosoftAD" // CreateMicrosoftADRequest generates a "aws/request.Request" representing the @@ -1263,6 +1450,94 @@ func (c *DirectoryService) DeleteDirectoryWithContext(ctx aws.Context, input *De return out, req.Send() } +const opDeleteLogSubscription = "DeleteLogSubscription" + +// DeleteLogSubscriptionRequest generates a "aws/request.Request" representing the +// client's request for the DeleteLogSubscription operation. The "output" return +// value will be populated with the request's response once the request completes +// successfuly. +// +// Use "Send" method on the returned Request to send the API call to the service. +// the "output" return value is not valid until after Send returns without error. +// +// See DeleteLogSubscription for more information on using the DeleteLogSubscription +// API call, and error handling. +// +// This method is useful when you want to inject custom logic or configuration +// into the SDK's request lifecycle. Such as custom headers, or retry logic. +// +// +// // Example sending a request using the DeleteLogSubscriptionRequest method. +// req, resp := client.DeleteLogSubscriptionRequest(params) +// +// err := req.Send() +// if err == nil { // resp is now filled +// fmt.Println(resp) +// } +// +// See also, https://docs.aws.amazon.com/goto/WebAPI/ds-2015-04-16/DeleteLogSubscription +func (c *DirectoryService) DeleteLogSubscriptionRequest(input *DeleteLogSubscriptionInput) (req *request.Request, output *DeleteLogSubscriptionOutput) { + op := &request.Operation{ + Name: opDeleteLogSubscription, + HTTPMethod: "POST", + HTTPPath: "/", + } + + if input == nil { + input = &DeleteLogSubscriptionInput{} + } + + output = &DeleteLogSubscriptionOutput{} + req = c.newRequest(op, input, output) + return +} + +// DeleteLogSubscription API operation for AWS Directory Service. +// +// Deletes the specified log subscription. +// +// Returns awserr.Error for service API and SDK errors. Use runtime type assertions +// with awserr.Error's Code and Message methods to get detailed information about +// the error. +// +// See the AWS API reference guide for AWS Directory Service's +// API operation DeleteLogSubscription for usage and error information. +// +// Returned Error Codes: +// * ErrCodeEntityDoesNotExistException "EntityDoesNotExistException" +// The specified entity could not be found. +// +// * ErrCodeUnsupportedOperationException "UnsupportedOperationException" +// The operation is not supported. +// +// * ErrCodeClientException "ClientException" +// A client exception has occurred. +// +// * ErrCodeServiceException "ServiceException" +// An exception has occurred in AWS Directory Service. +// +// See also, https://docs.aws.amazon.com/goto/WebAPI/ds-2015-04-16/DeleteLogSubscription +func (c *DirectoryService) DeleteLogSubscription(input *DeleteLogSubscriptionInput) (*DeleteLogSubscriptionOutput, error) { + req, out := c.DeleteLogSubscriptionRequest(input) + return out, req.Send() +} + +// DeleteLogSubscriptionWithContext is the same as DeleteLogSubscription with the addition of +// the ability to pass a context and additional request options. +// +// See DeleteLogSubscription for details on how to use this API operation. +// +// The context must be non-nil and will be used for request cancellation. If +// the context is nil a panic will occur. In the future the SDK may create +// sub-contexts for http.Requests. See https://golang.org/pkg/context/ +// for more information on using Contexts. +func (c *DirectoryService) DeleteLogSubscriptionWithContext(ctx aws.Context, input *DeleteLogSubscriptionInput, opts ...request.Option) (*DeleteLogSubscriptionOutput, error) { + req, out := c.DeleteLogSubscriptionRequest(input) + req.SetContext(ctx) + req.ApplyOptions(opts...) + return out, req.Send() +} + const opDeleteSnapshot = "DeleteSnapshot" // DeleteSnapshotRequest generates a "aws/request.Request" representing the @@ -1972,6 +2247,100 @@ func (c *DirectoryService) DescribeEventTopicsWithContext(ctx aws.Context, input return out, req.Send() } +const opDescribeSharedDirectories = "DescribeSharedDirectories" + +// DescribeSharedDirectoriesRequest generates a "aws/request.Request" representing the +// client's request for the DescribeSharedDirectories operation. The "output" return +// value will be populated with the request's response once the request completes +// successfuly. +// +// Use "Send" method on the returned Request to send the API call to the service. +// the "output" return value is not valid until after Send returns without error. +// +// See DescribeSharedDirectories for more information on using the DescribeSharedDirectories +// API call, and error handling. +// +// This method is useful when you want to inject custom logic or configuration +// into the SDK's request lifecycle. Such as custom headers, or retry logic. +// +// +// // Example sending a request using the DescribeSharedDirectoriesRequest method. +// req, resp := client.DescribeSharedDirectoriesRequest(params) +// +// err := req.Send() +// if err == nil { // resp is now filled +// fmt.Println(resp) +// } +// +// See also, https://docs.aws.amazon.com/goto/WebAPI/ds-2015-04-16/DescribeSharedDirectories +func (c *DirectoryService) DescribeSharedDirectoriesRequest(input *DescribeSharedDirectoriesInput) (req *request.Request, output *DescribeSharedDirectoriesOutput) { + op := &request.Operation{ + Name: opDescribeSharedDirectories, + HTTPMethod: "POST", + HTTPPath: "/", + } + + if input == nil { + input = &DescribeSharedDirectoriesInput{} + } + + output = &DescribeSharedDirectoriesOutput{} + req = c.newRequest(op, input, output) + return +} + +// DescribeSharedDirectories API operation for AWS Directory Service. +// +// Returns the shared directories in your account. +// +// Returns awserr.Error for service API and SDK errors. Use runtime type assertions +// with awserr.Error's Code and Message methods to get detailed information about +// the error. +// +// See the AWS API reference guide for AWS Directory Service's +// API operation DescribeSharedDirectories for usage and error information. +// +// Returned Error Codes: +// * ErrCodeEntityDoesNotExistException "EntityDoesNotExistException" +// The specified entity could not be found. +// +// * ErrCodeInvalidNextTokenException "InvalidNextTokenException" +// The NextToken value is not valid. +// +// * ErrCodeInvalidParameterException "InvalidParameterException" +// One or more parameters are not valid. +// +// * ErrCodeUnsupportedOperationException "UnsupportedOperationException" +// The operation is not supported. +// +// * ErrCodeClientException "ClientException" +// A client exception has occurred. +// +// * ErrCodeServiceException "ServiceException" +// An exception has occurred in AWS Directory Service. +// +// See also, https://docs.aws.amazon.com/goto/WebAPI/ds-2015-04-16/DescribeSharedDirectories +func (c *DirectoryService) DescribeSharedDirectories(input *DescribeSharedDirectoriesInput) (*DescribeSharedDirectoriesOutput, error) { + req, out := c.DescribeSharedDirectoriesRequest(input) + return out, req.Send() +} + +// DescribeSharedDirectoriesWithContext is the same as DescribeSharedDirectories with the addition of +// the ability to pass a context and additional request options. +// +// See DescribeSharedDirectories for details on how to use this API operation. +// +// The context must be non-nil and will be used for request cancellation. If +// the context is nil a panic will occur. In the future the SDK may create +// sub-contexts for http.Requests. See https://golang.org/pkg/context/ +// for more information on using Contexts. +func (c *DirectoryService) DescribeSharedDirectoriesWithContext(ctx aws.Context, input *DescribeSharedDirectoriesInput, opts ...request.Option) (*DescribeSharedDirectoriesOutput, error) { + req, out := c.DescribeSharedDirectoriesRequest(input) + req.SetContext(ctx) + req.ApplyOptions(opts...) + return out, req.Send() +} + const opDescribeSnapshots = "DescribeSnapshots" // DescribeSnapshotsRequest generates a "aws/request.Request" representing the @@ -2212,7 +2581,8 @@ func (c *DirectoryService) DisableRadiusRequest(input *DisableRadiusInput) (req // DisableRadius API operation for AWS Directory Service. // // Disables multi-factor authentication (MFA) with the Remote Authentication -// Dial In User Service (RADIUS) server for an AD Connector directory. +// Dial In User Service (RADIUS) server for an AD Connector or Microsoft AD +// directory. // // Returns awserr.Error for service API and SDK errors. Use runtime type assertions // with awserr.Error's Code and Message methods to get detailed information about @@ -2389,7 +2759,8 @@ func (c *DirectoryService) EnableRadiusRequest(input *EnableRadiusInput) (req *r // EnableRadius API operation for AWS Directory Service. // // Enables multi-factor authentication (MFA) with the Remote Authentication -// Dial In User Service (RADIUS) server for an AD Connector directory. +// Dial In User Service (RADIUS) server for an AD Connector or Microsoft AD +// directory. // // Returns awserr.Error for service API and SDK errors. Use runtime type assertions // with awserr.Error's Code and Message methods to get detailed information about @@ -2788,6 +3159,94 @@ func (c *DirectoryService) ListIpRoutesWithContext(ctx aws.Context, input *ListI return out, req.Send() } +const opListLogSubscriptions = "ListLogSubscriptions" + +// ListLogSubscriptionsRequest generates a "aws/request.Request" representing the +// client's request for the ListLogSubscriptions operation. The "output" return +// value will be populated with the request's response once the request completes +// successfuly. +// +// Use "Send" method on the returned Request to send the API call to the service. +// the "output" return value is not valid until after Send returns without error. +// +// See ListLogSubscriptions for more information on using the ListLogSubscriptions +// API call, and error handling. +// +// This method is useful when you want to inject custom logic or configuration +// into the SDK's request lifecycle. Such as custom headers, or retry logic. +// +// +// // Example sending a request using the ListLogSubscriptionsRequest method. +// req, resp := client.ListLogSubscriptionsRequest(params) +// +// err := req.Send() +// if err == nil { // resp is now filled +// fmt.Println(resp) +// } +// +// See also, https://docs.aws.amazon.com/goto/WebAPI/ds-2015-04-16/ListLogSubscriptions +func (c *DirectoryService) ListLogSubscriptionsRequest(input *ListLogSubscriptionsInput) (req *request.Request, output *ListLogSubscriptionsOutput) { + op := &request.Operation{ + Name: opListLogSubscriptions, + HTTPMethod: "POST", + HTTPPath: "/", + } + + if input == nil { + input = &ListLogSubscriptionsInput{} + } + + output = &ListLogSubscriptionsOutput{} + req = c.newRequest(op, input, output) + return +} + +// ListLogSubscriptions API operation for AWS Directory Service. +// +// Lists the active log subscriptions for the AWS account. +// +// Returns awserr.Error for service API and SDK errors. Use runtime type assertions +// with awserr.Error's Code and Message methods to get detailed information about +// the error. +// +// See the AWS API reference guide for AWS Directory Service's +// API operation ListLogSubscriptions for usage and error information. +// +// Returned Error Codes: +// * ErrCodeEntityDoesNotExistException "EntityDoesNotExistException" +// The specified entity could not be found. +// +// * ErrCodeInvalidNextTokenException "InvalidNextTokenException" +// The NextToken value is not valid. +// +// * ErrCodeClientException "ClientException" +// A client exception has occurred. +// +// * ErrCodeServiceException "ServiceException" +// An exception has occurred in AWS Directory Service. +// +// See also, https://docs.aws.amazon.com/goto/WebAPI/ds-2015-04-16/ListLogSubscriptions +func (c *DirectoryService) ListLogSubscriptions(input *ListLogSubscriptionsInput) (*ListLogSubscriptionsOutput, error) { + req, out := c.ListLogSubscriptionsRequest(input) + return out, req.Send() +} + +// ListLogSubscriptionsWithContext is the same as ListLogSubscriptions with the addition of +// the ability to pass a context and additional request options. +// +// See ListLogSubscriptions for details on how to use this API operation. +// +// The context must be non-nil and will be used for request cancellation. If +// the context is nil a panic will occur. In the future the SDK may create +// sub-contexts for http.Requests. See https://golang.org/pkg/context/ +// for more information on using Contexts. +func (c *DirectoryService) ListLogSubscriptionsWithContext(ctx aws.Context, input *ListLogSubscriptionsInput, opts ...request.Option) (*ListLogSubscriptionsOutput, error) { + req, out := c.ListLogSubscriptionsRequest(input) + req.SetContext(ctx) + req.ApplyOptions(opts...) + return out, req.Send() +} + const opListSchemaExtensions = "ListSchemaExtensions" // ListSchemaExtensionsRequest generates a "aws/request.Request" representing the @@ -3060,6 +3519,98 @@ func (c *DirectoryService) RegisterEventTopicWithContext(ctx aws.Context, input return out, req.Send() } +const opRejectSharedDirectory = "RejectSharedDirectory" + +// RejectSharedDirectoryRequest generates a "aws/request.Request" representing the +// client's request for the RejectSharedDirectory operation. The "output" return +// value will be populated with the request's response once the request completes +// successfuly. +// +// Use "Send" method on the returned Request to send the API call to the service. +// the "output" return value is not valid until after Send returns without error. +// +// See RejectSharedDirectory for more information on using the RejectSharedDirectory +// API call, and error handling. +// +// This method is useful when you want to inject custom logic or configuration +// into the SDK's request lifecycle. Such as custom headers, or retry logic. +// +// +// // Example sending a request using the RejectSharedDirectoryRequest method. +// req, resp := client.RejectSharedDirectoryRequest(params) +// +// err := req.Send() +// if err == nil { // resp is now filled +// fmt.Println(resp) +// } +// +// See also, https://docs.aws.amazon.com/goto/WebAPI/ds-2015-04-16/RejectSharedDirectory +func (c *DirectoryService) RejectSharedDirectoryRequest(input *RejectSharedDirectoryInput) (req *request.Request, output *RejectSharedDirectoryOutput) { + op := &request.Operation{ + Name: opRejectSharedDirectory, + HTTPMethod: "POST", + HTTPPath: "/", + } + + if input == nil { + input = &RejectSharedDirectoryInput{} + } + + output = &RejectSharedDirectoryOutput{} + req = c.newRequest(op, input, output) + return +} + +// RejectSharedDirectory API operation for AWS Directory Service. +// +// Rejects a directory sharing request that was sent from the directory owner +// account. +// +// Returns awserr.Error for service API and SDK errors. Use runtime type assertions +// with awserr.Error's Code and Message methods to get detailed information about +// the error. +// +// See the AWS API reference guide for AWS Directory Service's +// API operation RejectSharedDirectory for usage and error information. +// +// Returned Error Codes: +// * ErrCodeInvalidParameterException "InvalidParameterException" +// One or more parameters are not valid. +// +// * ErrCodeEntityDoesNotExistException "EntityDoesNotExistException" +// The specified entity could not be found. +// +// * ErrCodeDirectoryAlreadySharedException "DirectoryAlreadySharedException" +// The specified directory has already been shared with this AWS account. +// +// * ErrCodeClientException "ClientException" +// A client exception has occurred. +// +// * ErrCodeServiceException "ServiceException" +// An exception has occurred in AWS Directory Service. +// +// See also, https://docs.aws.amazon.com/goto/WebAPI/ds-2015-04-16/RejectSharedDirectory +func (c *DirectoryService) RejectSharedDirectory(input *RejectSharedDirectoryInput) (*RejectSharedDirectoryOutput, error) { + req, out := c.RejectSharedDirectoryRequest(input) + return out, req.Send() +} + +// RejectSharedDirectoryWithContext is the same as RejectSharedDirectory with the addition of +// the ability to pass a context and additional request options. +// +// See RejectSharedDirectory for details on how to use this API operation. +// +// The context must be non-nil and will be used for request cancellation. If +// the context is nil a panic will occur. In the future the SDK may create +// sub-contexts for http.Requests. See https://golang.org/pkg/context/ +// for more information on using Contexts. +func (c *DirectoryService) RejectSharedDirectoryWithContext(ctx aws.Context, input *RejectSharedDirectoryInput, opts ...request.Option) (*RejectSharedDirectoryOutput, error) { + req, out := c.RejectSharedDirectoryRequest(input) + req.SetContext(ctx) + req.ApplyOptions(opts...) + return out, req.Send() +} + const opRemoveIpRoutes = "RemoveIpRoutes" // RemoveIpRoutesRequest generates a "aws/request.Request" representing the @@ -3434,6 +3985,130 @@ func (c *DirectoryService) RestoreFromSnapshotWithContext(ctx aws.Context, input return out, req.Send() } +const opShareDirectory = "ShareDirectory" + +// ShareDirectoryRequest generates a "aws/request.Request" representing the +// client's request for the ShareDirectory operation. The "output" return +// value will be populated with the request's response once the request completes +// successfuly. +// +// Use "Send" method on the returned Request to send the API call to the service. +// the "output" return value is not valid until after Send returns without error. +// +// See ShareDirectory for more information on using the ShareDirectory +// API call, and error handling. +// +// This method is useful when you want to inject custom logic or configuration +// into the SDK's request lifecycle. Such as custom headers, or retry logic. +// +// +// // Example sending a request using the ShareDirectoryRequest method. +// req, resp := client.ShareDirectoryRequest(params) +// +// err := req.Send() +// if err == nil { // resp is now filled +// fmt.Println(resp) +// } +// +// See also, https://docs.aws.amazon.com/goto/WebAPI/ds-2015-04-16/ShareDirectory +func (c *DirectoryService) ShareDirectoryRequest(input *ShareDirectoryInput) (req *request.Request, output *ShareDirectoryOutput) { + op := &request.Operation{ + Name: opShareDirectory, + HTTPMethod: "POST", + HTTPPath: "/", + } + + if input == nil { + input = &ShareDirectoryInput{} + } + + output = &ShareDirectoryOutput{} + req = c.newRequest(op, input, output) + return +} + +// ShareDirectory API operation for AWS Directory Service. +// +// Shares a specified directory (DirectoryId) in your AWS account (directory +// owner) with another AWS account (directory consumer). With this operation +// you can use your directory from any AWS account and from any Amazon VPC within +// an AWS Region. +// +// When you share your AWS Managed Microsoft AD directory, AWS Directory Service +// creates a shared directory in the directory consumer account. This shared +// directory contains the metadata to provide access to the directory within +// the directory owner account. The shared directory is visible in all VPCs +// in the directory consumer account. +// +// The ShareMethod parameter determines whether the specified directory can +// be shared between AWS accounts inside the same AWS organization (ORGANIZATIONS). +// It also determines whether you can share the directory with any other AWS +// account either inside or outside of the organization (HANDSHAKE). +// +// The ShareNotes parameter is only used when HANDSHAKE is called, which sends +// a directory sharing request to the directory consumer. +// +// Returns awserr.Error for service API and SDK errors. Use runtime type assertions +// with awserr.Error's Code and Message methods to get detailed information about +// the error. +// +// See the AWS API reference guide for AWS Directory Service's +// API operation ShareDirectory for usage and error information. +// +// Returned Error Codes: +// * ErrCodeDirectoryAlreadySharedException "DirectoryAlreadySharedException" +// The specified directory has already been shared with this AWS account. +// +// * ErrCodeEntityDoesNotExistException "EntityDoesNotExistException" +// The specified entity could not be found. +// +// * ErrCodeInvalidTargetException "InvalidTargetException" +// The specified shared target is not valid. +// +// * ErrCodeInvalidParameterException "InvalidParameterException" +// One or more parameters are not valid. +// +// * ErrCodeClientException "ClientException" +// A client exception has occurred. +// +// * ErrCodeShareLimitExceededException "ShareLimitExceededException" +// The maximum number of AWS accounts that you can share with this directory +// has been reached. +// +// * ErrCodeOrganizationsException "OrganizationsException" +// Exception encountered while trying to access your AWS organization. +// +// * ErrCodeAccessDeniedException "AccessDeniedException" +// You do not have sufficient access to perform this action. +// +// * ErrCodeUnsupportedOperationException "UnsupportedOperationException" +// The operation is not supported. +// +// * ErrCodeServiceException "ServiceException" +// An exception has occurred in AWS Directory Service. +// +// See also, https://docs.aws.amazon.com/goto/WebAPI/ds-2015-04-16/ShareDirectory +func (c *DirectoryService) ShareDirectory(input *ShareDirectoryInput) (*ShareDirectoryOutput, error) { + req, out := c.ShareDirectoryRequest(input) + return out, req.Send() +} + +// ShareDirectoryWithContext is the same as ShareDirectory with the addition of +// the ability to pass a context and additional request options. +// +// See ShareDirectory for details on how to use this API operation. +// +// The context must be non-nil and will be used for request cancellation. If +// the context is nil a panic will occur. In the future the SDK may create +// sub-contexts for http.Requests. See https://golang.org/pkg/context/ +// for more information on using Contexts. +func (c *DirectoryService) ShareDirectoryWithContext(ctx aws.Context, input *ShareDirectoryInput, opts ...request.Option) (*ShareDirectoryOutput, error) { + req, out := c.ShareDirectoryRequest(input) + req.SetContext(ctx) + req.ApplyOptions(opts...) + return out, req.Send() +} + const opStartSchemaExtension = "StartSchemaExtension" // StartSchemaExtensionRequest generates a "aws/request.Request" representing the @@ -3530,6 +4205,97 @@ func (c *DirectoryService) StartSchemaExtensionWithContext(ctx aws.Context, inpu return out, req.Send() } +const opUnshareDirectory = "UnshareDirectory" + +// UnshareDirectoryRequest generates a "aws/request.Request" representing the +// client's request for the UnshareDirectory operation. The "output" return +// value will be populated with the request's response once the request completes +// successfuly. +// +// Use "Send" method on the returned Request to send the API call to the service. +// the "output" return value is not valid until after Send returns without error. +// +// See UnshareDirectory for more information on using the UnshareDirectory +// API call, and error handling. +// +// This method is useful when you want to inject custom logic or configuration +// into the SDK's request lifecycle. Such as custom headers, or retry logic. +// +// +// // Example sending a request using the UnshareDirectoryRequest method. +// req, resp := client.UnshareDirectoryRequest(params) +// +// err := req.Send() +// if err == nil { // resp is now filled +// fmt.Println(resp) +// } +// +// See also, https://docs.aws.amazon.com/goto/WebAPI/ds-2015-04-16/UnshareDirectory +func (c *DirectoryService) UnshareDirectoryRequest(input *UnshareDirectoryInput) (req *request.Request, output *UnshareDirectoryOutput) { + op := &request.Operation{ + Name: opUnshareDirectory, + HTTPMethod: "POST", + HTTPPath: "/", + } + + if input == nil { + input = &UnshareDirectoryInput{} + } + + output = &UnshareDirectoryOutput{} + req = c.newRequest(op, input, output) + return +} + +// UnshareDirectory API operation for AWS Directory Service. +// +// Stops the directory sharing between the directory owner and consumer accounts. +// +// Returns awserr.Error for service API and SDK errors. Use runtime type assertions +// with awserr.Error's Code and Message methods to get detailed information about +// the error. +// +// See the AWS API reference guide for AWS Directory Service's +// API operation UnshareDirectory for usage and error information. +// +// Returned Error Codes: +// * ErrCodeEntityDoesNotExistException "EntityDoesNotExistException" +// The specified entity could not be found. +// +// * ErrCodeInvalidTargetException "InvalidTargetException" +// The specified shared target is not valid. +// +// * ErrCodeDirectoryNotSharedException "DirectoryNotSharedException" +// The specified directory has not been shared with this AWS account. +// +// * ErrCodeClientException "ClientException" +// A client exception has occurred. +// +// * ErrCodeServiceException "ServiceException" +// An exception has occurred in AWS Directory Service. +// +// See also, https://docs.aws.amazon.com/goto/WebAPI/ds-2015-04-16/UnshareDirectory +func (c *DirectoryService) UnshareDirectory(input *UnshareDirectoryInput) (*UnshareDirectoryOutput, error) { + req, out := c.UnshareDirectoryRequest(input) + return out, req.Send() +} + +// UnshareDirectoryWithContext is the same as UnshareDirectory with the addition of +// the ability to pass a context and additional request options. +// +// See UnshareDirectory for details on how to use this API operation. +// +// The context must be non-nil and will be used for request cancellation. If +// the context is nil a panic will occur. In the future the SDK may create +// sub-contexts for http.Requests. See https://golang.org/pkg/context/ +// for more information on using Contexts. +func (c *DirectoryService) UnshareDirectoryWithContext(ctx aws.Context, input *UnshareDirectoryInput, opts ...request.Option) (*UnshareDirectoryOutput, error) { + req, out := c.UnshareDirectoryRequest(input) + req.SetContext(ctx) + req.ApplyOptions(opts...) + return out, req.Send() +} + const opUpdateConditionalForwarder = "UpdateConditionalForwarder" // UpdateConditionalForwarderRequest generates a "aws/request.Request" representing the @@ -3772,7 +4538,7 @@ func (c *DirectoryService) UpdateRadiusRequest(input *UpdateRadiusInput) (req *r // UpdateRadius API operation for AWS Directory Service. // // Updates the Remote Authentication Dial In User Service (RADIUS) server information -// for an AD Connector directory. +// for an AD Connector or Microsoft AD directory. // // Returns awserr.Error for service API and SDK errors. Use runtime type assertions // with awserr.Error's Code and Message methods to get detailed information about @@ -3911,6 +4677,68 @@ func (c *DirectoryService) VerifyTrustWithContext(ctx aws.Context, input *Verify return out, req.Send() } +type AcceptSharedDirectoryInput struct { + _ struct{} `type:"structure"` + + // Identifier of the shared directory in the directory consumer account. This + // identifier is different for each directory owner account. + // + // SharedDirectoryId is a required field + SharedDirectoryId *string `type:"string" required:"true"` +} + +// String returns the string representation +func (s AcceptSharedDirectoryInput) String() string { + return awsutil.Prettify(s) +} + +// GoString returns the string representation +func (s AcceptSharedDirectoryInput) GoString() string { + return s.String() +} + +// Validate inspects the fields of the type to determine if they are valid. +func (s *AcceptSharedDirectoryInput) Validate() error { + invalidParams := request.ErrInvalidParams{Context: "AcceptSharedDirectoryInput"} + if s.SharedDirectoryId == nil { + invalidParams.Add(request.NewErrParamRequired("SharedDirectoryId")) + } + + if invalidParams.Len() > 0 { + return invalidParams + } + return nil +} + +// SetSharedDirectoryId sets the SharedDirectoryId field's value. +func (s *AcceptSharedDirectoryInput) SetSharedDirectoryId(v string) *AcceptSharedDirectoryInput { + s.SharedDirectoryId = &v + return s +} + +type AcceptSharedDirectoryOutput struct { + _ struct{} `type:"structure"` + + // The shared directory in the directory consumer account. + SharedDirectory *SharedDirectory `type:"structure"` +} + +// String returns the string representation +func (s AcceptSharedDirectoryOutput) String() string { + return awsutil.Prettify(s) +} + +// GoString returns the string representation +func (s AcceptSharedDirectoryOutput) GoString() string { + return s.String() +} + +// SetSharedDirectory sets the SharedDirectory field's value. +func (s *AcceptSharedDirectoryOutput) SetSharedDirectory(v *SharedDirectory) *AcceptSharedDirectoryOutput { + s.SharedDirectory = v + return s +} + type AddIpRoutesInput struct { _ struct{} `type:"structure"` @@ -4322,7 +5150,7 @@ type ConnectDirectoryInput struct { // A textual description for the directory. Description *string `type:"string"` - // The fully-qualified name of the on-premises directory, such as corp.example.com. + // The fully qualified name of the on-premises directory, such as corp.example.com. // // Name is a required field Name *string `type:"string" required:"true"` @@ -4763,7 +5591,7 @@ type CreateDirectoryInput struct { Name *string `type:"string" required:"true"` // The password for the directory administrator. The directory creation process - // creates a directory administrator account with the username Administrator + // creates a directory administrator account with the user name Administrator // and this password. // // Password is a required field @@ -4876,6 +5704,77 @@ func (s *CreateDirectoryOutput) SetDirectoryId(v string) *CreateDirectoryOutput return s } +type CreateLogSubscriptionInput struct { + _ struct{} `type:"structure"` + + // Identifier (ID) of the directory to which you want to subscribe and receive + // real-time logs to your specified CloudWatch log group. + // + // DirectoryId is a required field + DirectoryId *string `type:"string" required:"true"` + + // The name of the CloudWatch log group where the real-time domain controller + // logs are forwarded. + // + // LogGroupName is a required field + LogGroupName *string `min:"1" type:"string" required:"true"` +} + +// String returns the string representation +func (s CreateLogSubscriptionInput) String() string { + return awsutil.Prettify(s) +} + +// GoString returns the string representation +func (s CreateLogSubscriptionInput) GoString() string { + return s.String() +} + +// Validate inspects the fields of the type to determine if they are valid. +func (s *CreateLogSubscriptionInput) Validate() error { + invalidParams := request.ErrInvalidParams{Context: "CreateLogSubscriptionInput"} + if s.DirectoryId == nil { + invalidParams.Add(request.NewErrParamRequired("DirectoryId")) + } + if s.LogGroupName == nil { + invalidParams.Add(request.NewErrParamRequired("LogGroupName")) + } + if s.LogGroupName != nil && len(*s.LogGroupName) < 1 { + invalidParams.Add(request.NewErrParamMinLen("LogGroupName", 1)) + } + + if invalidParams.Len() > 0 { + return invalidParams + } + return nil +} + +// SetDirectoryId sets the DirectoryId field's value. +func (s *CreateLogSubscriptionInput) SetDirectoryId(v string) *CreateLogSubscriptionInput { + s.DirectoryId = &v + return s +} + +// SetLogGroupName sets the LogGroupName field's value. +func (s *CreateLogSubscriptionInput) SetLogGroupName(v string) *CreateLogSubscriptionInput { + s.LogGroupName = &v + return s +} + +type CreateLogSubscriptionOutput struct { + _ struct{} `type:"structure"` +} + +// String returns the string representation +func (s CreateLogSubscriptionOutput) String() string { + return awsutil.Prettify(s) +} + +// GoString returns the string representation +func (s CreateLogSubscriptionOutput) GoString() string { + return s.String() +} + // Creates a Microsoft AD in the AWS cloud. type CreateMicrosoftADInput struct { _ struct{} `type:"structure"` @@ -5345,6 +6244,58 @@ func (s *DeleteDirectoryOutput) SetDirectoryId(v string) *DeleteDirectoryOutput return s } +type DeleteLogSubscriptionInput struct { + _ struct{} `type:"structure"` + + // Identifier (ID) of the directory whose log subscription you want to delete. + // + // DirectoryId is a required field + DirectoryId *string `type:"string" required:"true"` +} + +// String returns the string representation +func (s DeleteLogSubscriptionInput) String() string { + return awsutil.Prettify(s) +} + +// GoString returns the string representation +func (s DeleteLogSubscriptionInput) GoString() string { + return s.String() +} + +// Validate inspects the fields of the type to determine if they are valid. +func (s *DeleteLogSubscriptionInput) Validate() error { + invalidParams := request.ErrInvalidParams{Context: "DeleteLogSubscriptionInput"} + if s.DirectoryId == nil { + invalidParams.Add(request.NewErrParamRequired("DirectoryId")) + } + + if invalidParams.Len() > 0 { + return invalidParams + } + return nil +} + +// SetDirectoryId sets the DirectoryId field's value. +func (s *DeleteLogSubscriptionInput) SetDirectoryId(v string) *DeleteLogSubscriptionInput { + s.DirectoryId = &v + return s +} + +type DeleteLogSubscriptionOutput struct { + _ struct{} `type:"structure"` +} + +// String returns the string representation +func (s DeleteLogSubscriptionOutput) String() string { + return awsutil.Prettify(s) +} + +// GoString returns the string representation +func (s DeleteLogSubscriptionOutput) GoString() string { + return s.String() +} + // Contains the inputs for the DeleteSnapshot operation. type DeleteSnapshotInput struct { _ struct{} `type:"structure"` @@ -5878,6 +6829,106 @@ func (s *DescribeEventTopicsOutput) SetEventTopics(v []*EventTopic) *DescribeEve return s } +type DescribeSharedDirectoriesInput struct { + _ struct{} `type:"structure"` + + // The number of shared directories to return in the response object. + Limit *int64 `type:"integer"` + + // The DescribeSharedDirectoriesResult.NextToken value from a previous call + // to DescribeSharedDirectories. Pass null if this is the first call. + NextToken *string `type:"string"` + + // Returns the identifier of the directory in the directory owner account. + // + // OwnerDirectoryId is a required field + OwnerDirectoryId *string `type:"string" required:"true"` + + // A list of identifiers of all shared directories in your account. + SharedDirectoryIds []*string `type:"list"` +} + +// String returns the string representation +func (s DescribeSharedDirectoriesInput) String() string { + return awsutil.Prettify(s) +} + +// GoString returns the string representation +func (s DescribeSharedDirectoriesInput) GoString() string { + return s.String() +} + +// Validate inspects the fields of the type to determine if they are valid. +func (s *DescribeSharedDirectoriesInput) Validate() error { + invalidParams := request.ErrInvalidParams{Context: "DescribeSharedDirectoriesInput"} + if s.OwnerDirectoryId == nil { + invalidParams.Add(request.NewErrParamRequired("OwnerDirectoryId")) + } + + if invalidParams.Len() > 0 { + return invalidParams + } + return nil +} + +// SetLimit sets the Limit field's value. +func (s *DescribeSharedDirectoriesInput) SetLimit(v int64) *DescribeSharedDirectoriesInput { + s.Limit = &v + return s +} + +// SetNextToken sets the NextToken field's value. +func (s *DescribeSharedDirectoriesInput) SetNextToken(v string) *DescribeSharedDirectoriesInput { + s.NextToken = &v + return s +} + +// SetOwnerDirectoryId sets the OwnerDirectoryId field's value. +func (s *DescribeSharedDirectoriesInput) SetOwnerDirectoryId(v string) *DescribeSharedDirectoriesInput { + s.OwnerDirectoryId = &v + return s +} + +// SetSharedDirectoryIds sets the SharedDirectoryIds field's value. +func (s *DescribeSharedDirectoriesInput) SetSharedDirectoryIds(v []*string) *DescribeSharedDirectoriesInput { + s.SharedDirectoryIds = v + return s +} + +type DescribeSharedDirectoriesOutput struct { + _ struct{} `type:"structure"` + + // If not null, token that indicates that more results are available. Pass this + // value for the NextToken parameter in a subsequent call to DescribeSharedDirectories + // to retrieve the next set of items. + NextToken *string `type:"string"` + + // A list of all shared directories in your account. + SharedDirectories []*SharedDirectory `type:"list"` +} + +// String returns the string representation +func (s DescribeSharedDirectoriesOutput) String() string { + return awsutil.Prettify(s) +} + +// GoString returns the string representation +func (s DescribeSharedDirectoriesOutput) GoString() string { + return s.String() +} + +// SetNextToken sets the NextToken field's value. +func (s *DescribeSharedDirectoriesOutput) SetNextToken(v string) *DescribeSharedDirectoriesOutput { + s.NextToken = &v + return s +} + +// SetSharedDirectories sets the SharedDirectories field's value. +func (s *DescribeSharedDirectoriesOutput) SetSharedDirectories(v []*SharedDirectory) *DescribeSharedDirectoriesOutput { + s.SharedDirectories = v + return s +} + // Contains the inputs for the DescribeSnapshots operation. type DescribeSnapshotsInput struct { _ struct{} `type:"structure"` @@ -6081,8 +7132,8 @@ type DirectoryConnectSettings struct { // CustomerDnsIps is a required field CustomerDnsIps []*string `type:"list" required:"true"` - // The username of an account in the on-premises directory that is used to connect - // to the directory. This account must have the following privileges: + // The user name of an account in the on-premises directory that is used to + // connect to the directory. This account must have the following permissions: // // * Read users and groups // @@ -6173,7 +7224,7 @@ type DirectoryConnectSettingsDescription struct { // The IP addresses of the AD Connector servers. ConnectIps []*string `type:"list"` - // The username of the service account in the on-premises directory. + // The user name of the service account in the on-premises directory. CustomerUserName *string `min:"1" type:"string"` // The security group identifier for the AD Connector directory. @@ -6273,9 +7324,12 @@ type DirectoryDescription struct { // Specifies when the directory was created. LaunchTime *time.Time `type:"timestamp"` - // The fully-qualified name of the directory. + // The fully qualified name of the directory. Name *string `type:"string"` + // Describes the AWS Managed Microsoft AD directory in the directory owner account. + OwnerDirectoryDescription *OwnerDirectoryDescription `type:"structure"` + // A RadiusSettings object that contains information about the RADIUS server // configured for this directory. RadiusSettings *RadiusSettings `type:"structure"` @@ -6283,13 +7337,26 @@ type DirectoryDescription struct { // The status of the RADIUS MFA server connection. RadiusStatus *string `type:"string" enum:"RadiusStatus"` + // The method used when sharing a directory to determine whether the directory + // should be shared within your AWS organization (ORGANIZATIONS) or with any + // AWS account by sending a shared directory request (HANDSHAKE). + ShareMethod *string `type:"string" enum:"ShareMethod"` + + // A directory share request that is sent by the directory owner to the directory + // consumer. The request includes a typed message to help the directory consumer + // administrator determine whether to approve or reject the share invitation. + ShareNotes *string `type:"string"` + + // Current directory status of the shared AWS Managed Microsoft AD directory. + ShareStatus *string `type:"string" enum:"ShareStatus"` + // The short name of the directory. ShortName *string `type:"string"` // The directory size. Size *string `type:"string" enum:"DirectorySize"` - // Indicates if single-sign on is enabled for the directory. For more information, + // Indicates if single sign-on is enabled for the directory. For more information, // see EnableSso and DisableSso. SsoEnabled *bool `type:"boolean"` @@ -6381,6 +7448,12 @@ func (s *DirectoryDescription) SetName(v string) *DirectoryDescription { return s } +// SetOwnerDirectoryDescription sets the OwnerDirectoryDescription field's value. +func (s *DirectoryDescription) SetOwnerDirectoryDescription(v *OwnerDirectoryDescription) *DirectoryDescription { + s.OwnerDirectoryDescription = v + return s +} + // SetRadiusSettings sets the RadiusSettings field's value. func (s *DirectoryDescription) SetRadiusSettings(v *RadiusSettings) *DirectoryDescription { s.RadiusSettings = v @@ -6393,6 +7466,24 @@ func (s *DirectoryDescription) SetRadiusStatus(v string) *DirectoryDescription { return s } +// SetShareMethod sets the ShareMethod field's value. +func (s *DirectoryDescription) SetShareMethod(v string) *DirectoryDescription { + s.ShareMethod = &v + return s +} + +// SetShareNotes sets the ShareNotes field's value. +func (s *DirectoryDescription) SetShareNotes(v string) *DirectoryDescription { + s.ShareNotes = &v + return s +} + +// SetShareStatus sets the ShareStatus field's value. +func (s *DirectoryDescription) SetShareStatus(v string) *DirectoryDescription { + s.ShareStatus = &v + return s +} + // SetShortName sets the ShortName field's value. func (s *DirectoryDescription) SetShortName(v string) *DirectoryDescription { s.ShortName = &v @@ -7413,6 +8504,82 @@ func (s *ListIpRoutesOutput) SetNextToken(v string) *ListIpRoutesOutput { return s } +type ListLogSubscriptionsInput struct { + _ struct{} `type:"structure"` + + // If a DirectoryID is provided, lists only the log subscription associated + // with that directory. If no DirectoryId is provided, lists all log subscriptions + // associated with your AWS account. If there are no log subscriptions for the + // AWS account or the directory, an empty list will be returned. + DirectoryId *string `type:"string"` + + // The maximum number of items returned. + Limit *int64 `type:"integer"` + + // The token for the next set of items to return. + NextToken *string `type:"string"` +} + +// String returns the string representation +func (s ListLogSubscriptionsInput) String() string { + return awsutil.Prettify(s) +} + +// GoString returns the string representation +func (s ListLogSubscriptionsInput) GoString() string { + return s.String() +} + +// SetDirectoryId sets the DirectoryId field's value. +func (s *ListLogSubscriptionsInput) SetDirectoryId(v string) *ListLogSubscriptionsInput { + s.DirectoryId = &v + return s +} + +// SetLimit sets the Limit field's value. +func (s *ListLogSubscriptionsInput) SetLimit(v int64) *ListLogSubscriptionsInput { + s.Limit = &v + return s +} + +// SetNextToken sets the NextToken field's value. +func (s *ListLogSubscriptionsInput) SetNextToken(v string) *ListLogSubscriptionsInput { + s.NextToken = &v + return s +} + +type ListLogSubscriptionsOutput struct { + _ struct{} `type:"structure"` + + // A list of active LogSubscription objects for calling the AWS account. + LogSubscriptions []*LogSubscription `type:"list"` + + // The token for the next set of items to return. + NextToken *string `type:"string"` +} + +// String returns the string representation +func (s ListLogSubscriptionsOutput) String() string { + return awsutil.Prettify(s) +} + +// GoString returns the string representation +func (s ListLogSubscriptionsOutput) GoString() string { + return s.String() +} + +// SetLogSubscriptions sets the LogSubscriptions field's value. +func (s *ListLogSubscriptionsOutput) SetLogSubscriptions(v []*LogSubscription) *ListLogSubscriptionsOutput { + s.LogSubscriptions = v + return s +} + +// SetNextToken sets the NextToken field's value. +func (s *ListLogSubscriptionsOutput) SetNextToken(v string) *ListLogSubscriptionsOutput { + s.NextToken = &v + return s +} + type ListSchemaExtensionsInput struct { _ struct{} `type:"structure"` @@ -7593,6 +8760,121 @@ func (s *ListTagsForResourceOutput) SetTags(v []*Tag) *ListTagsForResourceOutput return s } +// Represents a log subscription, which tracks real-time data from a chosen +// log group to a specified destination. +type LogSubscription struct { + _ struct{} `type:"structure"` + + // Identifier (ID) of the directory that you want to associate with the log + // subscription. + DirectoryId *string `type:"string"` + + // The name of the log group. + LogGroupName *string `min:"1" type:"string"` + + // The date and time that the log subscription was created. + SubscriptionCreatedDateTime *time.Time `type:"timestamp"` +} + +// String returns the string representation +func (s LogSubscription) String() string { + return awsutil.Prettify(s) +} + +// GoString returns the string representation +func (s LogSubscription) GoString() string { + return s.String() +} + +// SetDirectoryId sets the DirectoryId field's value. +func (s *LogSubscription) SetDirectoryId(v string) *LogSubscription { + s.DirectoryId = &v + return s +} + +// SetLogGroupName sets the LogGroupName field's value. +func (s *LogSubscription) SetLogGroupName(v string) *LogSubscription { + s.LogGroupName = &v + return s +} + +// SetSubscriptionCreatedDateTime sets the SubscriptionCreatedDateTime field's value. +func (s *LogSubscription) SetSubscriptionCreatedDateTime(v time.Time) *LogSubscription { + s.SubscriptionCreatedDateTime = &v + return s +} + +// Describes the directory owner account details that have been shared to the +// directory consumer account. +type OwnerDirectoryDescription struct { + _ struct{} `type:"structure"` + + // Identifier of the directory owner account. + AccountId *string `type:"string"` + + // Identifier of the AWS Managed Microsoft AD directory in the directory owner + // account. + DirectoryId *string `type:"string"` + + // IP address of the directory’s domain controllers. + DnsIpAddrs []*string `type:"list"` + + // A RadiusSettings object that contains information about the RADIUS server. + RadiusSettings *RadiusSettings `type:"structure"` + + // Information about the status of the RADIUS server. + RadiusStatus *string `type:"string" enum:"RadiusStatus"` + + // Information about the VPC settings for the directory. + VpcSettings *DirectoryVpcSettingsDescription `type:"structure"` +} + +// String returns the string representation +func (s OwnerDirectoryDescription) String() string { + return awsutil.Prettify(s) +} + +// GoString returns the string representation +func (s OwnerDirectoryDescription) GoString() string { + return s.String() +} + +// SetAccountId sets the AccountId field's value. +func (s *OwnerDirectoryDescription) SetAccountId(v string) *OwnerDirectoryDescription { + s.AccountId = &v + return s +} + +// SetDirectoryId sets the DirectoryId field's value. +func (s *OwnerDirectoryDescription) SetDirectoryId(v string) *OwnerDirectoryDescription { + s.DirectoryId = &v + return s +} + +// SetDnsIpAddrs sets the DnsIpAddrs field's value. +func (s *OwnerDirectoryDescription) SetDnsIpAddrs(v []*string) *OwnerDirectoryDescription { + s.DnsIpAddrs = v + return s +} + +// SetRadiusSettings sets the RadiusSettings field's value. +func (s *OwnerDirectoryDescription) SetRadiusSettings(v *RadiusSettings) *OwnerDirectoryDescription { + s.RadiusSettings = v + return s +} + +// SetRadiusStatus sets the RadiusStatus field's value. +func (s *OwnerDirectoryDescription) SetRadiusStatus(v string) *OwnerDirectoryDescription { + s.RadiusStatus = &v + return s +} + +// SetVpcSettings sets the VpcSettings field's value. +func (s *OwnerDirectoryDescription) SetVpcSettings(v *DirectoryVpcSettingsDescription) *OwnerDirectoryDescription { + s.VpcSettings = v + return s +} + // Contains information about a Remote Authentication Dial In User Service (RADIUS) // server. type RadiusSettings struct { @@ -7620,7 +8902,7 @@ type RadiusSettings struct { // The amount of time, in seconds, to wait for the RADIUS server to respond. RadiusTimeout *int64 `min:"1" type:"integer"` - // Not currently used. + // Required for enabling RADIUS on the directory. SharedSecret *string `min:"8" type:"string"` // Not currently used. @@ -7779,6 +9061,68 @@ func (s RegisterEventTopicOutput) GoString() string { return s.String() } +type RejectSharedDirectoryInput struct { + _ struct{} `type:"structure"` + + // Identifier of the shared directory in the directory consumer account. This + // identifier is different for each directory owner account. + // + // SharedDirectoryId is a required field + SharedDirectoryId *string `type:"string" required:"true"` +} + +// String returns the string representation +func (s RejectSharedDirectoryInput) String() string { + return awsutil.Prettify(s) +} + +// GoString returns the string representation +func (s RejectSharedDirectoryInput) GoString() string { + return s.String() +} + +// Validate inspects the fields of the type to determine if they are valid. +func (s *RejectSharedDirectoryInput) Validate() error { + invalidParams := request.ErrInvalidParams{Context: "RejectSharedDirectoryInput"} + if s.SharedDirectoryId == nil { + invalidParams.Add(request.NewErrParamRequired("SharedDirectoryId")) + } + + if invalidParams.Len() > 0 { + return invalidParams + } + return nil +} + +// SetSharedDirectoryId sets the SharedDirectoryId field's value. +func (s *RejectSharedDirectoryInput) SetSharedDirectoryId(v string) *RejectSharedDirectoryInput { + s.SharedDirectoryId = &v + return s +} + +type RejectSharedDirectoryOutput struct { + _ struct{} `type:"structure"` + + // Identifier of the shared directory in the directory consumer account. + SharedDirectoryId *string `type:"string"` +} + +// String returns the string representation +func (s RejectSharedDirectoryOutput) String() string { + return awsutil.Prettify(s) +} + +// GoString returns the string representation +func (s RejectSharedDirectoryOutput) GoString() string { + return s.String() +} + +// SetSharedDirectoryId sets the SharedDirectoryId field's value. +func (s *RejectSharedDirectoryOutput) SetSharedDirectoryId(v string) *RejectSharedDirectoryOutput { + s.SharedDirectoryId = &v + return s +} + type RemoveIpRoutesInput struct { _ struct{} `type:"structure"` @@ -7925,7 +9269,7 @@ type ResetUserPasswordInput struct { // NewPassword is a required field NewPassword *string `min:"1" type:"string" required:"true"` - // The username of the user whose password will be reset. + // The user name of the user whose password will be reset. // // UserName is a required field UserName *string `min:"1" type:"string" required:"true"` @@ -8131,6 +9475,276 @@ func (s *SchemaExtensionInfo) SetStartDateTime(v time.Time) *SchemaExtensionInfo return s } +type ShareDirectoryInput struct { + _ struct{} `type:"structure"` + + // Identifier of the AWS Managed Microsoft AD directory that you want to share + // with other AWS accounts. + // + // DirectoryId is a required field + DirectoryId *string `type:"string" required:"true"` + + // The method used when sharing a directory to determine whether the directory + // should be shared within your AWS organization (ORGANIZATIONS) or with any + // AWS account by sending a directory sharing request (HANDSHAKE). + // + // ShareMethod is a required field + ShareMethod *string `type:"string" required:"true" enum:"ShareMethod"` + + // A directory share request that is sent by the directory owner to the directory + // consumer. The request includes a typed message to help the directory consumer + // administrator determine whether to approve or reject the share invitation. + ShareNotes *string `type:"string"` + + // Identifier for the directory consumer account with whom the directory is + // to be shared. + // + // ShareTarget is a required field + ShareTarget *ShareTarget `type:"structure" required:"true"` +} + +// String returns the string representation +func (s ShareDirectoryInput) String() string { + return awsutil.Prettify(s) +} + +// GoString returns the string representation +func (s ShareDirectoryInput) GoString() string { + return s.String() +} + +// Validate inspects the fields of the type to determine if they are valid. +func (s *ShareDirectoryInput) Validate() error { + invalidParams := request.ErrInvalidParams{Context: "ShareDirectoryInput"} + if s.DirectoryId == nil { + invalidParams.Add(request.NewErrParamRequired("DirectoryId")) + } + if s.ShareMethod == nil { + invalidParams.Add(request.NewErrParamRequired("ShareMethod")) + } + if s.ShareTarget == nil { + invalidParams.Add(request.NewErrParamRequired("ShareTarget")) + } + if s.ShareTarget != nil { + if err := s.ShareTarget.Validate(); err != nil { + invalidParams.AddNested("ShareTarget", err.(request.ErrInvalidParams)) + } + } + + if invalidParams.Len() > 0 { + return invalidParams + } + return nil +} + +// SetDirectoryId sets the DirectoryId field's value. +func (s *ShareDirectoryInput) SetDirectoryId(v string) *ShareDirectoryInput { + s.DirectoryId = &v + return s +} + +// SetShareMethod sets the ShareMethod field's value. +func (s *ShareDirectoryInput) SetShareMethod(v string) *ShareDirectoryInput { + s.ShareMethod = &v + return s +} + +// SetShareNotes sets the ShareNotes field's value. +func (s *ShareDirectoryInput) SetShareNotes(v string) *ShareDirectoryInput { + s.ShareNotes = &v + return s +} + +// SetShareTarget sets the ShareTarget field's value. +func (s *ShareDirectoryInput) SetShareTarget(v *ShareTarget) *ShareDirectoryInput { + s.ShareTarget = v + return s +} + +type ShareDirectoryOutput struct { + _ struct{} `type:"structure"` + + // Identifier of the directory that is stored in the directory consumer account + // that is shared from the specified directory (DirectoryId). + SharedDirectoryId *string `type:"string"` +} + +// String returns the string representation +func (s ShareDirectoryOutput) String() string { + return awsutil.Prettify(s) +} + +// GoString returns the string representation +func (s ShareDirectoryOutput) GoString() string { + return s.String() +} + +// SetSharedDirectoryId sets the SharedDirectoryId field's value. +func (s *ShareDirectoryOutput) SetSharedDirectoryId(v string) *ShareDirectoryOutput { + s.SharedDirectoryId = &v + return s +} + +// Identifier that contains details about the directory consumer account. +type ShareTarget struct { + _ struct{} `type:"structure"` + + // Identifier of the directory consumer account. + // + // Id is a required field + Id *string `min:"1" type:"string" required:"true"` + + // Type of identifier to be used in the Id field. + // + // Type is a required field + Type *string `type:"string" required:"true" enum:"TargetType"` +} + +// String returns the string representation +func (s ShareTarget) String() string { + return awsutil.Prettify(s) +} + +// GoString returns the string representation +func (s ShareTarget) GoString() string { + return s.String() +} + +// Validate inspects the fields of the type to determine if they are valid. +func (s *ShareTarget) Validate() error { + invalidParams := request.ErrInvalidParams{Context: "ShareTarget"} + if s.Id == nil { + invalidParams.Add(request.NewErrParamRequired("Id")) + } + if s.Id != nil && len(*s.Id) < 1 { + invalidParams.Add(request.NewErrParamMinLen("Id", 1)) + } + if s.Type == nil { + invalidParams.Add(request.NewErrParamRequired("Type")) + } + + if invalidParams.Len() > 0 { + return invalidParams + } + return nil +} + +// SetId sets the Id field's value. +func (s *ShareTarget) SetId(v string) *ShareTarget { + s.Id = &v + return s +} + +// SetType sets the Type field's value. +func (s *ShareTarget) SetType(v string) *ShareTarget { + s.Type = &v + return s +} + +// Details about the shared directory in the directory owner account for which +// the share request in the directory consumer account has been accepted. +type SharedDirectory struct { + _ struct{} `type:"structure"` + + // The date and time that the shared directory was created. + CreatedDateTime *time.Time `type:"timestamp"` + + // The date and time that the shared directory was last updated. + LastUpdatedDateTime *time.Time `type:"timestamp"` + + // Identifier of the directory owner account, which contains the directory that + // has been shared to the consumer account. + OwnerAccountId *string `type:"string"` + + // Identifier of the directory in the directory owner account. + OwnerDirectoryId *string `type:"string"` + + // The method used when sharing a directory to determine whether the directory + // should be shared within your AWS organization (ORGANIZATIONS) or with any + // AWS account by sending a shared directory request (HANDSHAKE). + ShareMethod *string `type:"string" enum:"ShareMethod"` + + // A directory share request that is sent by the directory owner to the directory + // consumer. The request includes a typed message to help the directory consumer + // administrator determine whether to approve or reject the share invitation. + ShareNotes *string `type:"string"` + + // Current directory status of the shared AWS Managed Microsoft AD directory. + ShareStatus *string `type:"string" enum:"ShareStatus"` + + // Identifier of the directory consumer account that has access to the shared + // directory (OwnerDirectoryId) in the directory owner account. + SharedAccountId *string `type:"string"` + + // Identifier of the shared directory in the directory consumer account. This + // identifier is different for each directory owner account. + SharedDirectoryId *string `type:"string"` +} + +// String returns the string representation +func (s SharedDirectory) String() string { + return awsutil.Prettify(s) +} + +// GoString returns the string representation +func (s SharedDirectory) GoString() string { + return s.String() +} + +// SetCreatedDateTime sets the CreatedDateTime field's value. +func (s *SharedDirectory) SetCreatedDateTime(v time.Time) *SharedDirectory { + s.CreatedDateTime = &v + return s +} + +// SetLastUpdatedDateTime sets the LastUpdatedDateTime field's value. +func (s *SharedDirectory) SetLastUpdatedDateTime(v time.Time) *SharedDirectory { + s.LastUpdatedDateTime = &v + return s +} + +// SetOwnerAccountId sets the OwnerAccountId field's value. +func (s *SharedDirectory) SetOwnerAccountId(v string) *SharedDirectory { + s.OwnerAccountId = &v + return s +} + +// SetOwnerDirectoryId sets the OwnerDirectoryId field's value. +func (s *SharedDirectory) SetOwnerDirectoryId(v string) *SharedDirectory { + s.OwnerDirectoryId = &v + return s +} + +// SetShareMethod sets the ShareMethod field's value. +func (s *SharedDirectory) SetShareMethod(v string) *SharedDirectory { + s.ShareMethod = &v + return s +} + +// SetShareNotes sets the ShareNotes field's value. +func (s *SharedDirectory) SetShareNotes(v string) *SharedDirectory { + s.ShareNotes = &v + return s +} + +// SetShareStatus sets the ShareStatus field's value. +func (s *SharedDirectory) SetShareStatus(v string) *SharedDirectory { + s.ShareStatus = &v + return s +} + +// SetSharedAccountId sets the SharedAccountId field's value. +func (s *SharedDirectory) SetSharedAccountId(v string) *SharedDirectory { + s.SharedAccountId = &v + return s +} + +// SetSharedDirectoryId sets the SharedDirectoryId field's value. +func (s *SharedDirectory) SetSharedDirectoryId(v string) *SharedDirectory { + s.SharedDirectoryId = &v + return s +} + // Describes a directory snapshot. type Snapshot struct { _ struct{} `type:"structure"` @@ -8519,6 +10133,146 @@ func (s *Trust) SetTrustType(v string) *Trust { return s } +type UnshareDirectoryInput struct { + _ struct{} `type:"structure"` + + // The identifier of the AWS Managed Microsoft AD directory that you want to + // stop sharing. + // + // DirectoryId is a required field + DirectoryId *string `type:"string" required:"true"` + + // Identifier for the directory consumer account with whom the directory has + // to be unshared. + // + // UnshareTarget is a required field + UnshareTarget *UnshareTarget `type:"structure" required:"true"` +} + +// String returns the string representation +func (s UnshareDirectoryInput) String() string { + return awsutil.Prettify(s) +} + +// GoString returns the string representation +func (s UnshareDirectoryInput) GoString() string { + return s.String() +} + +// Validate inspects the fields of the type to determine if they are valid. +func (s *UnshareDirectoryInput) Validate() error { + invalidParams := request.ErrInvalidParams{Context: "UnshareDirectoryInput"} + if s.DirectoryId == nil { + invalidParams.Add(request.NewErrParamRequired("DirectoryId")) + } + if s.UnshareTarget == nil { + invalidParams.Add(request.NewErrParamRequired("UnshareTarget")) + } + if s.UnshareTarget != nil { + if err := s.UnshareTarget.Validate(); err != nil { + invalidParams.AddNested("UnshareTarget", err.(request.ErrInvalidParams)) + } + } + + if invalidParams.Len() > 0 { + return invalidParams + } + return nil +} + +// SetDirectoryId sets the DirectoryId field's value. +func (s *UnshareDirectoryInput) SetDirectoryId(v string) *UnshareDirectoryInput { + s.DirectoryId = &v + return s +} + +// SetUnshareTarget sets the UnshareTarget field's value. +func (s *UnshareDirectoryInput) SetUnshareTarget(v *UnshareTarget) *UnshareDirectoryInput { + s.UnshareTarget = v + return s +} + +type UnshareDirectoryOutput struct { + _ struct{} `type:"structure"` + + // Identifier of the directory stored in the directory consumer account that + // is to be unshared from the specified directory (DirectoryId). + SharedDirectoryId *string `type:"string"` +} + +// String returns the string representation +func (s UnshareDirectoryOutput) String() string { + return awsutil.Prettify(s) +} + +// GoString returns the string representation +func (s UnshareDirectoryOutput) GoString() string { + return s.String() +} + +// SetSharedDirectoryId sets the SharedDirectoryId field's value. +func (s *UnshareDirectoryOutput) SetSharedDirectoryId(v string) *UnshareDirectoryOutput { + s.SharedDirectoryId = &v + return s +} + +// Identifier that contains details about the directory consumer account with +// whom the directory is being unshared. +type UnshareTarget struct { + _ struct{} `type:"structure"` + + // Identifier of the directory consumer account. + // + // Id is a required field + Id *string `min:"1" type:"string" required:"true"` + + // Type of identifier to be used in the Id field. + // + // Type is a required field + Type *string `type:"string" required:"true" enum:"TargetType"` +} + +// String returns the string representation +func (s UnshareTarget) String() string { + return awsutil.Prettify(s) +} + +// GoString returns the string representation +func (s UnshareTarget) GoString() string { + return s.String() +} + +// Validate inspects the fields of the type to determine if they are valid. +func (s *UnshareTarget) Validate() error { + invalidParams := request.ErrInvalidParams{Context: "UnshareTarget"} + if s.Id == nil { + invalidParams.Add(request.NewErrParamRequired("Id")) + } + if s.Id != nil && len(*s.Id) < 1 { + invalidParams.Add(request.NewErrParamMinLen("Id", 1)) + } + if s.Type == nil { + invalidParams.Add(request.NewErrParamRequired("Type")) + } + + if invalidParams.Len() > 0 { + return invalidParams + } + return nil +} + +// SetId sets the Id field's value. +func (s *UnshareTarget) SetId(v string) *UnshareTarget { + s.Id = &v + return s +} + +// SetType sets the Type field's value. +func (s *UnshareTarget) SetType(v string) *UnshareTarget { + s.Type = &v + return s +} + // Updates a conditional forwarder. type UpdateConditionalForwarderInput struct { _ struct{} `type:"structure"` @@ -8871,6 +10625,9 @@ const ( // DirectoryTypeMicrosoftAd is a DirectoryType enum value DirectoryTypeMicrosoftAd = "MicrosoftAD" + + // DirectoryTypeSharedMicrosoftAd is a DirectoryType enum value + DirectoryTypeSharedMicrosoftAd = "SharedMicrosoftAD" ) const ( @@ -8975,6 +10732,43 @@ const ( SchemaExtensionStatusCompleted = "Completed" ) +const ( + // ShareMethodOrganizations is a ShareMethod enum value + ShareMethodOrganizations = "ORGANIZATIONS" + + // ShareMethodHandshake is a ShareMethod enum value + ShareMethodHandshake = "HANDSHAKE" +) + +const ( + // ShareStatusShared is a ShareStatus enum value + ShareStatusShared = "Shared" + + // ShareStatusPendingAcceptance is a ShareStatus enum value + ShareStatusPendingAcceptance = "PendingAcceptance" + + // ShareStatusRejected is a ShareStatus enum value + ShareStatusRejected = "Rejected" + + // ShareStatusRejecting is a ShareStatus enum value + ShareStatusRejecting = "Rejecting" + + // ShareStatusRejectFailed is a ShareStatus enum value + ShareStatusRejectFailed = "RejectFailed" + + // ShareStatusSharing is a ShareStatus enum value + ShareStatusSharing = "Sharing" + + // ShareStatusShareFailed is a ShareStatus enum value + ShareStatusShareFailed = "ShareFailed" + + // ShareStatusDeleted is a ShareStatus enum value + ShareStatusDeleted = "Deleted" + + // ShareStatusDeleting is a ShareStatus enum value + ShareStatusDeleting = "Deleting" +) + const ( // SnapshotStatusCreating is a SnapshotStatus enum value SnapshotStatusCreating = "Creating" @@ -8994,6 +10788,11 @@ const ( SnapshotTypeManual = "Manual" ) +const ( + // TargetTypeAccount is a TargetType enum value + TargetTypeAccount = "ACCOUNT" +) + const ( // TopicStatusRegistered is a TopicStatus enum value TopicStatusRegistered = "Registered" diff --git a/vendor/github.com/aws/aws-sdk-go/service/directoryservice/errors.go b/vendor/github.com/aws/aws-sdk-go/service/directoryservice/errors.go index 85d831364..b5bdd25a1 100644 --- a/vendor/github.com/aws/aws-sdk-go/service/directoryservice/errors.go +++ b/vendor/github.com/aws/aws-sdk-go/service/directoryservice/errors.go @@ -4,6 +4,12 @@ package directoryservice const ( + // ErrCodeAccessDeniedException for service response error code + // "AccessDeniedException". + // + // You do not have sufficient access to perform this action. + ErrCodeAccessDeniedException = "AccessDeniedException" + // ErrCodeAuthenticationFailedException for service response error code // "AuthenticationFailedException". // @@ -16,6 +22,12 @@ const ( // A client exception has occurred. ErrCodeClientException = "ClientException" + // ErrCodeDirectoryAlreadySharedException for service response error code + // "DirectoryAlreadySharedException". + // + // The specified directory has already been shared with this AWS account. + ErrCodeDirectoryAlreadySharedException = "DirectoryAlreadySharedException" + // ErrCodeDirectoryLimitExceededException for service response error code // "DirectoryLimitExceededException". // @@ -24,6 +36,12 @@ const ( // the region. ErrCodeDirectoryLimitExceededException = "DirectoryLimitExceededException" + // ErrCodeDirectoryNotSharedException for service response error code + // "DirectoryNotSharedException". + // + // The specified directory has not been shared with this AWS account. + ErrCodeDirectoryNotSharedException = "DirectoryNotSharedException" + // ErrCodeDirectoryUnavailableException for service response error code // "DirectoryUnavailableException". // @@ -74,6 +92,12 @@ const ( // requirements defined in your directory. ErrCodeInvalidPasswordException = "InvalidPasswordException" + // ErrCodeInvalidTargetException for service response error code + // "InvalidTargetException". + // + // The specified shared target is not valid. + ErrCodeInvalidTargetException = "InvalidTargetException" + // ErrCodeIpRouteLimitExceededException for service response error code // "IpRouteLimitExceededException". // @@ -81,12 +105,25 @@ const ( // is 100 IP address blocks. ErrCodeIpRouteLimitExceededException = "IpRouteLimitExceededException" + // ErrCodeOrganizationsException for service response error code + // "OrganizationsException". + // + // Exception encountered while trying to access your AWS organization. + ErrCodeOrganizationsException = "OrganizationsException" + // ErrCodeServiceException for service response error code // "ServiceException". // // An exception has occurred in AWS Directory Service. ErrCodeServiceException = "ServiceException" + // ErrCodeShareLimitExceededException for service response error code + // "ShareLimitExceededException". + // + // The maximum number of AWS accounts that you can share with this directory + // has been reached. + ErrCodeShareLimitExceededException = "ShareLimitExceededException" + // ErrCodeSnapshotLimitExceededException for service response error code // "SnapshotLimitExceededException". // diff --git a/vendor/github.com/aws/aws-sdk-go/service/dynamodb/api.go b/vendor/github.com/aws/aws-sdk-go/service/dynamodb/api.go index d3fa4f9a7..332b76dd4 100644 --- a/vendor/github.com/aws/aws-sdk-go/service/dynamodb/api.go +++ b/vendor/github.com/aws/aws-sdk-go/service/dynamodb/api.go @@ -1260,6 +1260,78 @@ func (c *DynamoDB) DescribeContinuousBackupsWithContext(ctx aws.Context, input * return out, req.Send() } +const opDescribeEndpoints = "DescribeEndpoints" + +// DescribeEndpointsRequest generates a "aws/request.Request" representing the +// client's request for the DescribeEndpoints operation. The "output" return +// value will be populated with the request's response once the request completes +// successfuly. +// +// Use "Send" method on the returned Request to send the API call to the service. +// the "output" return value is not valid until after Send returns without error. +// +// See DescribeEndpoints for more information on using the DescribeEndpoints +// API call, and error handling. +// +// This method is useful when you want to inject custom logic or configuration +// into the SDK's request lifecycle. Such as custom headers, or retry logic. +// +// +// // Example sending a request using the DescribeEndpointsRequest method. +// req, resp := client.DescribeEndpointsRequest(params) +// +// err := req.Send() +// if err == nil { // resp is now filled +// fmt.Println(resp) +// } +// +// See also, https://docs.aws.amazon.com/goto/WebAPI/dynamodb-2012-08-10/DescribeEndpoints +func (c *DynamoDB) DescribeEndpointsRequest(input *DescribeEndpointsInput) (req *request.Request, output *DescribeEndpointsOutput) { + op := &request.Operation{ + Name: opDescribeEndpoints, + HTTPMethod: "POST", + HTTPPath: "/", + } + + if input == nil { + input = &DescribeEndpointsInput{} + } + + output = &DescribeEndpointsOutput{} + req = c.newRequest(op, input, output) + return +} + +// DescribeEndpoints API operation for Amazon DynamoDB. +// +// Returns awserr.Error for service API and SDK errors. Use runtime type assertions +// with awserr.Error's Code and Message methods to get detailed information about +// the error. +// +// See the AWS API reference guide for Amazon DynamoDB's +// API operation DescribeEndpoints for usage and error information. +// See also, https://docs.aws.amazon.com/goto/WebAPI/dynamodb-2012-08-10/DescribeEndpoints +func (c *DynamoDB) DescribeEndpoints(input *DescribeEndpointsInput) (*DescribeEndpointsOutput, error) { + req, out := c.DescribeEndpointsRequest(input) + return out, req.Send() +} + +// DescribeEndpointsWithContext is the same as DescribeEndpoints with the addition of +// the ability to pass a context and additional request options. +// +// See DescribeEndpoints for details on how to use this API operation. +// +// The context must be non-nil and will be used for request cancellation. If +// the context is nil a panic will occur. In the future the SDK may create +// sub-contexts for http.Requests. See https://golang.org/pkg/context/ +// for more information on using Contexts. +func (c *DynamoDB) DescribeEndpointsWithContext(ctx aws.Context, input *DescribeEndpointsInput, opts ...request.Option) (*DescribeEndpointsOutput, error) { + req, out := c.DescribeEndpointsRequest(input) + req.SetContext(ctx) + req.ApplyOptions(opts...) + return out, req.Send() +} + const opDescribeGlobalTable = "DescribeGlobalTable" // DescribeGlobalTableRequest generates a "aws/request.Request" representing the @@ -4191,6 +4263,394 @@ func (s *AttributeValueUpdate) SetValue(v *AttributeValue) *AttributeValueUpdate return s } +// Represents the properties of the scaling policy. +type AutoScalingPolicyDescription struct { + _ struct{} `type:"structure"` + + // The name of the scaling policy. + PolicyName *string `min:"1" type:"string"` + + // Represents a target tracking scaling policy configuration. + TargetTrackingScalingPolicyConfiguration *AutoScalingTargetTrackingScalingPolicyConfigurationDescription `type:"structure"` +} + +// String returns the string representation +func (s AutoScalingPolicyDescription) String() string { + return awsutil.Prettify(s) +} + +// GoString returns the string representation +func (s AutoScalingPolicyDescription) GoString() string { + return s.String() +} + +// SetPolicyName sets the PolicyName field's value. +func (s *AutoScalingPolicyDescription) SetPolicyName(v string) *AutoScalingPolicyDescription { + s.PolicyName = &v + return s +} + +// SetTargetTrackingScalingPolicyConfiguration sets the TargetTrackingScalingPolicyConfiguration field's value. +func (s *AutoScalingPolicyDescription) SetTargetTrackingScalingPolicyConfiguration(v *AutoScalingTargetTrackingScalingPolicyConfigurationDescription) *AutoScalingPolicyDescription { + s.TargetTrackingScalingPolicyConfiguration = v + return s +} + +// Represents the autoscaling policy to be modified. +type AutoScalingPolicyUpdate struct { + _ struct{} `type:"structure"` + + // The name of the scaling policy. + PolicyName *string `min:"1" type:"string"` + + // Represents a target tracking scaling policy configuration. + // + // TargetTrackingScalingPolicyConfiguration is a required field + TargetTrackingScalingPolicyConfiguration *AutoScalingTargetTrackingScalingPolicyConfigurationUpdate `type:"structure" required:"true"` +} + +// String returns the string representation +func (s AutoScalingPolicyUpdate) String() string { + return awsutil.Prettify(s) +} + +// GoString returns the string representation +func (s AutoScalingPolicyUpdate) GoString() string { + return s.String() +} + +// Validate inspects the fields of the type to determine if they are valid. +func (s *AutoScalingPolicyUpdate) Validate() error { + invalidParams := request.ErrInvalidParams{Context: "AutoScalingPolicyUpdate"} + if s.PolicyName != nil && len(*s.PolicyName) < 1 { + invalidParams.Add(request.NewErrParamMinLen("PolicyName", 1)) + } + if s.TargetTrackingScalingPolicyConfiguration == nil { + invalidParams.Add(request.NewErrParamRequired("TargetTrackingScalingPolicyConfiguration")) + } + if s.TargetTrackingScalingPolicyConfiguration != nil { + if err := s.TargetTrackingScalingPolicyConfiguration.Validate(); err != nil { + invalidParams.AddNested("TargetTrackingScalingPolicyConfiguration", err.(request.ErrInvalidParams)) + } + } + + if invalidParams.Len() > 0 { + return invalidParams + } + return nil +} + +// SetPolicyName sets the PolicyName field's value. +func (s *AutoScalingPolicyUpdate) SetPolicyName(v string) *AutoScalingPolicyUpdate { + s.PolicyName = &v + return s +} + +// SetTargetTrackingScalingPolicyConfiguration sets the TargetTrackingScalingPolicyConfiguration field's value. +func (s *AutoScalingPolicyUpdate) SetTargetTrackingScalingPolicyConfiguration(v *AutoScalingTargetTrackingScalingPolicyConfigurationUpdate) *AutoScalingPolicyUpdate { + s.TargetTrackingScalingPolicyConfiguration = v + return s +} + +// Represents the autoscaling settings for a global table or global secondary +// index. +type AutoScalingSettingsDescription struct { + _ struct{} `type:"structure"` + + // Disabled autoscaling for this global table or global secondary index. + AutoScalingDisabled *bool `type:"boolean"` + + // Role ARN used for configuring autoScaling policy. + AutoScalingRoleArn *string `type:"string"` + + // The maximum capacity units that a global table or global secondary index + // should be scaled up to. + MaximumUnits *int64 `min:"1" type:"long"` + + // The minimum capacity units that a global table or global secondary index + // should be scaled down to. + MinimumUnits *int64 `min:"1" type:"long"` + + // Information about the scaling policies. + ScalingPolicies []*AutoScalingPolicyDescription `type:"list"` +} + +// String returns the string representation +func (s AutoScalingSettingsDescription) String() string { + return awsutil.Prettify(s) +} + +// GoString returns the string representation +func (s AutoScalingSettingsDescription) GoString() string { + return s.String() +} + +// SetAutoScalingDisabled sets the AutoScalingDisabled field's value. +func (s *AutoScalingSettingsDescription) SetAutoScalingDisabled(v bool) *AutoScalingSettingsDescription { + s.AutoScalingDisabled = &v + return s +} + +// SetAutoScalingRoleArn sets the AutoScalingRoleArn field's value. +func (s *AutoScalingSettingsDescription) SetAutoScalingRoleArn(v string) *AutoScalingSettingsDescription { + s.AutoScalingRoleArn = &v + return s +} + +// SetMaximumUnits sets the MaximumUnits field's value. +func (s *AutoScalingSettingsDescription) SetMaximumUnits(v int64) *AutoScalingSettingsDescription { + s.MaximumUnits = &v + return s +} + +// SetMinimumUnits sets the MinimumUnits field's value. +func (s *AutoScalingSettingsDescription) SetMinimumUnits(v int64) *AutoScalingSettingsDescription { + s.MinimumUnits = &v + return s +} + +// SetScalingPolicies sets the ScalingPolicies field's value. +func (s *AutoScalingSettingsDescription) SetScalingPolicies(v []*AutoScalingPolicyDescription) *AutoScalingSettingsDescription { + s.ScalingPolicies = v + return s +} + +// Represents the autoscaling settings to be modified for a global table or +// global secondary index. +type AutoScalingSettingsUpdate struct { + _ struct{} `type:"structure"` + + // Disabled autoscaling for this global table or global secondary index. + AutoScalingDisabled *bool `type:"boolean"` + + // Role ARN used for configuring autoscaling policy. + AutoScalingRoleArn *string `min:"1" type:"string"` + + // The maximum capacity units that a global table or global secondary index + // should be scaled up to. + MaximumUnits *int64 `min:"1" type:"long"` + + // The minimum capacity units that a global table or global secondary index + // should be scaled down to. + MinimumUnits *int64 `min:"1" type:"long"` + + // The scaling policy to apply for scaling target global table or global secondary + // index capacity units. + ScalingPolicyUpdate *AutoScalingPolicyUpdate `type:"structure"` +} + +// String returns the string representation +func (s AutoScalingSettingsUpdate) String() string { + return awsutil.Prettify(s) +} + +// GoString returns the string representation +func (s AutoScalingSettingsUpdate) GoString() string { + return s.String() +} + +// Validate inspects the fields of the type to determine if they are valid. +func (s *AutoScalingSettingsUpdate) Validate() error { + invalidParams := request.ErrInvalidParams{Context: "AutoScalingSettingsUpdate"} + if s.AutoScalingRoleArn != nil && len(*s.AutoScalingRoleArn) < 1 { + invalidParams.Add(request.NewErrParamMinLen("AutoScalingRoleArn", 1)) + } + if s.MaximumUnits != nil && *s.MaximumUnits < 1 { + invalidParams.Add(request.NewErrParamMinValue("MaximumUnits", 1)) + } + if s.MinimumUnits != nil && *s.MinimumUnits < 1 { + invalidParams.Add(request.NewErrParamMinValue("MinimumUnits", 1)) + } + if s.ScalingPolicyUpdate != nil { + if err := s.ScalingPolicyUpdate.Validate(); err != nil { + invalidParams.AddNested("ScalingPolicyUpdate", err.(request.ErrInvalidParams)) + } + } + + if invalidParams.Len() > 0 { + return invalidParams + } + return nil +} + +// SetAutoScalingDisabled sets the AutoScalingDisabled field's value. +func (s *AutoScalingSettingsUpdate) SetAutoScalingDisabled(v bool) *AutoScalingSettingsUpdate { + s.AutoScalingDisabled = &v + return s +} + +// SetAutoScalingRoleArn sets the AutoScalingRoleArn field's value. +func (s *AutoScalingSettingsUpdate) SetAutoScalingRoleArn(v string) *AutoScalingSettingsUpdate { + s.AutoScalingRoleArn = &v + return s +} + +// SetMaximumUnits sets the MaximumUnits field's value. +func (s *AutoScalingSettingsUpdate) SetMaximumUnits(v int64) *AutoScalingSettingsUpdate { + s.MaximumUnits = &v + return s +} + +// SetMinimumUnits sets the MinimumUnits field's value. +func (s *AutoScalingSettingsUpdate) SetMinimumUnits(v int64) *AutoScalingSettingsUpdate { + s.MinimumUnits = &v + return s +} + +// SetScalingPolicyUpdate sets the ScalingPolicyUpdate field's value. +func (s *AutoScalingSettingsUpdate) SetScalingPolicyUpdate(v *AutoScalingPolicyUpdate) *AutoScalingSettingsUpdate { + s.ScalingPolicyUpdate = v + return s +} + +// Represents the properties of a target tracking scaling policy. +type AutoScalingTargetTrackingScalingPolicyConfigurationDescription struct { + _ struct{} `type:"structure"` + + // Indicates whether scale in by the target tracking policy is disabled. If + // the value is true, scale in is disabled and the target tracking policy won't + // remove capacity from the scalable resource. Otherwise, scale in is enabled + // and the target tracking policy can remove capacity from the scalable resource. + // The default value is false. + DisableScaleIn *bool `type:"boolean"` + + // The amount of time, in seconds, after a scale in activity completes before + // another scale in activity can start. The cooldown period is used to block + // subsequent scale in requests until it has expired. You should scale in conservatively + // to protect your application's availability. However, if another alarm triggers + // a scale out policy during the cooldown period after a scale-in, application + // autoscaling scales out your scalable target immediately. + ScaleInCooldown *int64 `type:"integer"` + + // The amount of time, in seconds, after a scale out activity completes before + // another scale out activity can start. While the cooldown period is in effect, + // the capacity that has been added by the previous scale out event that initiated + // the cooldown is calculated as part of the desired capacity for the next scale + // out. You should continuously (but not excessively) scale out. + ScaleOutCooldown *int64 `type:"integer"` + + // The target value for the metric. The range is 8.515920e-109 to 1.174271e+108 + // (Base 10) or 2e-360 to 2e360 (Base 2). + // + // TargetValue is a required field + TargetValue *float64 `type:"double" required:"true"` +} + +// String returns the string representation +func (s AutoScalingTargetTrackingScalingPolicyConfigurationDescription) String() string { + return awsutil.Prettify(s) +} + +// GoString returns the string representation +func (s AutoScalingTargetTrackingScalingPolicyConfigurationDescription) GoString() string { + return s.String() +} + +// SetDisableScaleIn sets the DisableScaleIn field's value. +func (s *AutoScalingTargetTrackingScalingPolicyConfigurationDescription) SetDisableScaleIn(v bool) *AutoScalingTargetTrackingScalingPolicyConfigurationDescription { + s.DisableScaleIn = &v + return s +} + +// SetScaleInCooldown sets the ScaleInCooldown field's value. +func (s *AutoScalingTargetTrackingScalingPolicyConfigurationDescription) SetScaleInCooldown(v int64) *AutoScalingTargetTrackingScalingPolicyConfigurationDescription { + s.ScaleInCooldown = &v + return s +} + +// SetScaleOutCooldown sets the ScaleOutCooldown field's value. +func (s *AutoScalingTargetTrackingScalingPolicyConfigurationDescription) SetScaleOutCooldown(v int64) *AutoScalingTargetTrackingScalingPolicyConfigurationDescription { + s.ScaleOutCooldown = &v + return s +} + +// SetTargetValue sets the TargetValue field's value. +func (s *AutoScalingTargetTrackingScalingPolicyConfigurationDescription) SetTargetValue(v float64) *AutoScalingTargetTrackingScalingPolicyConfigurationDescription { + s.TargetValue = &v + return s +} + +// Represents the settings of a target tracking scaling policy that will be +// modified. +type AutoScalingTargetTrackingScalingPolicyConfigurationUpdate struct { + _ struct{} `type:"structure"` + + // Indicates whether scale in by the target tracking policy is disabled. If + // the value is true, scale in is disabled and the target tracking policy won't + // remove capacity from the scalable resource. Otherwise, scale in is enabled + // and the target tracking policy can remove capacity from the scalable resource. + // The default value is false. + DisableScaleIn *bool `type:"boolean"` + + // The amount of time, in seconds, after a scale in activity completes before + // another scale in activity can start. The cooldown period is used to block + // subsequent scale in requests until it has expired. You should scale in conservatively + // to protect your application's availability. However, if another alarm triggers + // a scale out policy during the cooldown period after a scale-in, application + // autoscaling scales out your scalable target immediately. + ScaleInCooldown *int64 `type:"integer"` + + // The amount of time, in seconds, after a scale out activity completes before + // another scale out activity can start. While the cooldown period is in effect, + // the capacity that has been added by the previous scale out event that initiated + // the cooldown is calculated as part of the desired capacity for the next scale + // out. You should continuously (but not excessively) scale out. + ScaleOutCooldown *int64 `type:"integer"` + + // The target value for the metric. The range is 8.515920e-109 to 1.174271e+108 + // (Base 10) or 2e-360 to 2e360 (Base 2). + // + // TargetValue is a required field + TargetValue *float64 `type:"double" required:"true"` +} + +// String returns the string representation +func (s AutoScalingTargetTrackingScalingPolicyConfigurationUpdate) String() string { + return awsutil.Prettify(s) +} + +// GoString returns the string representation +func (s AutoScalingTargetTrackingScalingPolicyConfigurationUpdate) GoString() string { + return s.String() +} + +// Validate inspects the fields of the type to determine if they are valid. +func (s *AutoScalingTargetTrackingScalingPolicyConfigurationUpdate) Validate() error { + invalidParams := request.ErrInvalidParams{Context: "AutoScalingTargetTrackingScalingPolicyConfigurationUpdate"} + if s.TargetValue == nil { + invalidParams.Add(request.NewErrParamRequired("TargetValue")) + } + + if invalidParams.Len() > 0 { + return invalidParams + } + return nil +} + +// SetDisableScaleIn sets the DisableScaleIn field's value. +func (s *AutoScalingTargetTrackingScalingPolicyConfigurationUpdate) SetDisableScaleIn(v bool) *AutoScalingTargetTrackingScalingPolicyConfigurationUpdate { + s.DisableScaleIn = &v + return s +} + +// SetScaleInCooldown sets the ScaleInCooldown field's value. +func (s *AutoScalingTargetTrackingScalingPolicyConfigurationUpdate) SetScaleInCooldown(v int64) *AutoScalingTargetTrackingScalingPolicyConfigurationUpdate { + s.ScaleInCooldown = &v + return s +} + +// SetScaleOutCooldown sets the ScaleOutCooldown field's value. +func (s *AutoScalingTargetTrackingScalingPolicyConfigurationUpdate) SetScaleOutCooldown(v int64) *AutoScalingTargetTrackingScalingPolicyConfigurationUpdate { + s.ScaleOutCooldown = &v + return s +} + +// SetTargetValue sets the TargetValue field's value. +func (s *AutoScalingTargetTrackingScalingPolicyConfigurationUpdate) SetTargetValue(v float64) *AutoScalingTargetTrackingScalingPolicyConfigurationUpdate { + s.TargetValue = &v + return s +} + // Contains the description of the backup created for the table. type BackupDescription struct { _ struct{} `type:"structure"` @@ -4248,6 +4708,10 @@ type BackupDetails struct { // BackupCreationDateTime is a required field BackupCreationDateTime *time.Time `type:"timestamp" required:"true"` + // Time at which the automatic on-demand backup created by DynamoDB will expire. + // This SYSTEM on-demand backup expires automatically 35 days after its creation. + BackupExpiryDateTime *time.Time `type:"timestamp"` + // Name of the requested backup. // // BackupName is a required field @@ -4260,6 +4724,15 @@ type BackupDetails struct { // // BackupStatus is a required field BackupStatus *string `type:"string" required:"true" enum:"BackupStatus"` + + // BackupType: + // + // * USER - On-demand backup created by you. + // + // * SYSTEM - On-demand backup automatically created by DynamoDB. + // + // BackupType is a required field + BackupType *string `type:"string" required:"true" enum:"BackupType"` } // String returns the string representation @@ -4284,6 +4757,12 @@ func (s *BackupDetails) SetBackupCreationDateTime(v time.Time) *BackupDetails { return s } +// SetBackupExpiryDateTime sets the BackupExpiryDateTime field's value. +func (s *BackupDetails) SetBackupExpiryDateTime(v time.Time) *BackupDetails { + s.BackupExpiryDateTime = &v + return s +} + // SetBackupName sets the BackupName field's value. func (s *BackupDetails) SetBackupName(v string) *BackupDetails { s.BackupName = &v @@ -4302,6 +4781,12 @@ func (s *BackupDetails) SetBackupStatus(v string) *BackupDetails { return s } +// SetBackupType sets the BackupType field's value. +func (s *BackupDetails) SetBackupType(v string) *BackupDetails { + s.BackupType = &v + return s +} + // Contains details for the backup. type BackupSummary struct { _ struct{} `type:"structure"` @@ -4312,6 +4797,10 @@ type BackupSummary struct { // Time at which the backup was created. BackupCreationDateTime *time.Time `type:"timestamp"` + // Time at which the automatic on-demand backup created by DynamoDB will expire. + // This SYSTEM on-demand backup expires automatically 35 days after its creation. + BackupExpiryDateTime *time.Time `type:"timestamp"` + // Name of the specified backup. BackupName *string `min:"3" type:"string"` @@ -4321,6 +4810,13 @@ type BackupSummary struct { // Backup can be in one of the following states: CREATING, ACTIVE, DELETED. BackupStatus *string `type:"string" enum:"BackupStatus"` + // BackupType: + // + // * USER - On-demand backup created by you. + // + // * SYSTEM - On-demand backup automatically created by DynamoDB. + BackupType *string `type:"string" enum:"BackupType"` + // ARN associated with the table. TableArn *string `type:"string"` @@ -4353,6 +4849,12 @@ func (s *BackupSummary) SetBackupCreationDateTime(v time.Time) *BackupSummary { return s } +// SetBackupExpiryDateTime sets the BackupExpiryDateTime field's value. +func (s *BackupSummary) SetBackupExpiryDateTime(v time.Time) *BackupSummary { + s.BackupExpiryDateTime = &v + return s +} + // SetBackupName sets the BackupName field's value. func (s *BackupSummary) SetBackupName(v string) *BackupSummary { s.BackupName = &v @@ -4371,6 +4873,12 @@ func (s *BackupSummary) SetBackupStatus(v string) *BackupSummary { return s } +// SetBackupType sets the BackupType field's value. +func (s *BackupSummary) SetBackupType(v string) *BackupSummary { + s.BackupType = &v + return s +} + // SetTableArn sets the TableArn field's value. func (s *BackupSummary) SetTableArn(v string) *BackupSummary { s.TableArn = &v @@ -5000,7 +5508,7 @@ func (s *ConsumedCapacity) SetTableName(v string) *ConsumedCapacity { type ContinuousBackupsDescription struct { _ struct{} `type:"structure"` - // ContinuousBackupsStatus can be one of the following states : ENABLED, DISABLED + // ContinuousBackupsStatus can be one of the following states: ENABLED, DISABLED // // ContinuousBackupsStatus is a required field ContinuousBackupsStatus *string `type:"string" required:"true" enum:"ContinuousBackupsStatus"` @@ -5572,11 +6080,6 @@ func (s *CreateTableInput) Validate() error { invalidParams.AddNested("ProvisionedThroughput", err.(request.ErrInvalidParams)) } } - if s.SSESpecification != nil { - if err := s.SSESpecification.Validate(); err != nil { - invalidParams.AddNested("SSESpecification", err.(request.ErrInvalidParams)) - } - } if invalidParams.Len() > 0 { return invalidParams @@ -6325,6 +6828,43 @@ func (s *DescribeContinuousBackupsOutput) SetContinuousBackupsDescription(v *Con return s } +type DescribeEndpointsInput struct { + _ struct{} `type:"structure"` +} + +// String returns the string representation +func (s DescribeEndpointsInput) String() string { + return awsutil.Prettify(s) +} + +// GoString returns the string representation +func (s DescribeEndpointsInput) GoString() string { + return s.String() +} + +type DescribeEndpointsOutput struct { + _ struct{} `type:"structure"` + + // Endpoints is a required field + Endpoints []*Endpoint `type:"list" required:"true"` +} + +// String returns the string representation +func (s DescribeEndpointsOutput) String() string { + return awsutil.Prettify(s) +} + +// GoString returns the string representation +func (s DescribeEndpointsOutput) GoString() string { + return s.String() +} + +// SetEndpoints sets the Endpoints field's value. +func (s *DescribeEndpointsOutput) SetEndpoints(v []*Endpoint) *DescribeEndpointsOutput { + s.Endpoints = v + return s +} + type DescribeGlobalTableInput struct { _ struct{} `type:"structure"` @@ -6664,6 +7204,38 @@ func (s *DescribeTimeToLiveOutput) SetTimeToLiveDescription(v *TimeToLiveDescrip return s } +type Endpoint struct { + _ struct{} `type:"structure"` + + // Address is a required field + Address *string `type:"string" required:"true"` + + // CachePeriodInMinutes is a required field + CachePeriodInMinutes *int64 `type:"long" required:"true"` +} + +// String returns the string representation +func (s Endpoint) String() string { + return awsutil.Prettify(s) +} + +// GoString returns the string representation +func (s Endpoint) GoString() string { + return s.String() +} + +// SetAddress sets the Address field's value. +func (s *Endpoint) SetAddress(v string) *Endpoint { + s.Address = &v + return s +} + +// SetCachePeriodInMinutes sets the CachePeriodInMinutes field's value. +func (s *Endpoint) SetCachePeriodInMinutes(v int64) *Endpoint { + s.CachePeriodInMinutes = &v + return s +} + // Represents a condition to be compared with an attribute value. This condition // can be used with DeleteItem, PutItem or UpdateItem operations; if the comparison // evaluates to true, the operation succeeds; if not, the operation fails. You @@ -7556,6 +8128,10 @@ type GlobalTableGlobalSecondaryIndexSettingsUpdate struct { // IndexName is a required field IndexName *string `min:"3" type:"string" required:"true"` + // AutoScaling settings for managing a global secondary index's write capacity + // units. + ProvisionedWriteCapacityAutoScalingSettingsUpdate *AutoScalingSettingsUpdate `type:"structure"` + // The maximum number of writes consumed per second before DynamoDB returns // a ThrottlingException. ProvisionedWriteCapacityUnits *int64 `min:"1" type:"long"` @@ -7583,6 +8159,11 @@ func (s *GlobalTableGlobalSecondaryIndexSettingsUpdate) Validate() error { if s.ProvisionedWriteCapacityUnits != nil && *s.ProvisionedWriteCapacityUnits < 1 { invalidParams.Add(request.NewErrParamMinValue("ProvisionedWriteCapacityUnits", 1)) } + if s.ProvisionedWriteCapacityAutoScalingSettingsUpdate != nil { + if err := s.ProvisionedWriteCapacityAutoScalingSettingsUpdate.Validate(); err != nil { + invalidParams.AddNested("ProvisionedWriteCapacityAutoScalingSettingsUpdate", err.(request.ErrInvalidParams)) + } + } if invalidParams.Len() > 0 { return invalidParams @@ -7596,6 +8177,12 @@ func (s *GlobalTableGlobalSecondaryIndexSettingsUpdate) SetIndexName(v string) * return s } +// SetProvisionedWriteCapacityAutoScalingSettingsUpdate sets the ProvisionedWriteCapacityAutoScalingSettingsUpdate field's value. +func (s *GlobalTableGlobalSecondaryIndexSettingsUpdate) SetProvisionedWriteCapacityAutoScalingSettingsUpdate(v *AutoScalingSettingsUpdate) *GlobalTableGlobalSecondaryIndexSettingsUpdate { + s.ProvisionedWriteCapacityAutoScalingSettingsUpdate = v + return s +} + // SetProvisionedWriteCapacityUnits sets the ProvisionedWriteCapacityUnits field's value. func (s *GlobalTableGlobalSecondaryIndexSettingsUpdate) SetProvisionedWriteCapacityUnits(v int64) *GlobalTableGlobalSecondaryIndexSettingsUpdate { s.ProvisionedWriteCapacityUnits = &v @@ -7863,6 +8450,17 @@ func (s *KeysAndAttributes) SetProjectionExpression(v string) *KeysAndAttributes type ListBackupsInput struct { _ struct{} `type:"structure"` + // The backups from the table specified by BackupType are listed. + // + // Where BackupType can be: + // + // * USER - On-demand backup created by you. + // + // * SYSTEM - On-demand backup automatically created by DynamoDB. + // + // * ALL - All types of on-demand backups (USER and SYSTEM). + BackupType *string `type:"string" enum:"BackupTypeFilter"` + // LastEvaluatedBackupArn is the ARN of the backup last evaluated when the current // page of results was returned, inclusive of the current page of results. This // value may be specified as the ExclusiveStartBackupArn of a new ListBackups @@ -7912,6 +8510,12 @@ func (s *ListBackupsInput) Validate() error { return nil } +// SetBackupType sets the BackupType field's value. +func (s *ListBackupsInput) SetBackupType(v string) *ListBackupsInput { + s.BackupType = &v + return s +} + // SetExclusiveStartBackupArn sets the ExclusiveStartBackupArn field's value. func (s *ListBackupsInput) SetExclusiveStartBackupArn(v string) *ListBackupsInput { s.ExclusiveStartBackupArn = &v @@ -9745,10 +10349,18 @@ type ReplicaGlobalSecondaryIndexSettingsDescription struct { // * ACTIVE - The global secondary index is ready for use. IndexStatus *string `type:"string" enum:"IndexStatus"` + // Autoscaling settings for a global secondary index replica's read capacity + // units. + ProvisionedReadCapacityAutoScalingSettings *AutoScalingSettingsDescription `type:"structure"` + // The maximum number of strongly consistent reads consumed per second before // DynamoDB returns a ThrottlingException. ProvisionedReadCapacityUnits *int64 `min:"1" type:"long"` + // AutoScaling settings for a global secondary index replica's write capacity + // units. + ProvisionedWriteCapacityAutoScalingSettings *AutoScalingSettingsDescription `type:"structure"` + // The maximum number of writes consumed per second before DynamoDB returns // a ThrottlingException. ProvisionedWriteCapacityUnits *int64 `min:"1" type:"long"` @@ -9776,12 +10388,24 @@ func (s *ReplicaGlobalSecondaryIndexSettingsDescription) SetIndexStatus(v string return s } +// SetProvisionedReadCapacityAutoScalingSettings sets the ProvisionedReadCapacityAutoScalingSettings field's value. +func (s *ReplicaGlobalSecondaryIndexSettingsDescription) SetProvisionedReadCapacityAutoScalingSettings(v *AutoScalingSettingsDescription) *ReplicaGlobalSecondaryIndexSettingsDescription { + s.ProvisionedReadCapacityAutoScalingSettings = v + return s +} + // SetProvisionedReadCapacityUnits sets the ProvisionedReadCapacityUnits field's value. func (s *ReplicaGlobalSecondaryIndexSettingsDescription) SetProvisionedReadCapacityUnits(v int64) *ReplicaGlobalSecondaryIndexSettingsDescription { s.ProvisionedReadCapacityUnits = &v return s } +// SetProvisionedWriteCapacityAutoScalingSettings sets the ProvisionedWriteCapacityAutoScalingSettings field's value. +func (s *ReplicaGlobalSecondaryIndexSettingsDescription) SetProvisionedWriteCapacityAutoScalingSettings(v *AutoScalingSettingsDescription) *ReplicaGlobalSecondaryIndexSettingsDescription { + s.ProvisionedWriteCapacityAutoScalingSettings = v + return s +} + // SetProvisionedWriteCapacityUnits sets the ProvisionedWriteCapacityUnits field's value. func (s *ReplicaGlobalSecondaryIndexSettingsDescription) SetProvisionedWriteCapacityUnits(v int64) *ReplicaGlobalSecondaryIndexSettingsDescription { s.ProvisionedWriteCapacityUnits = &v @@ -9799,6 +10423,10 @@ type ReplicaGlobalSecondaryIndexSettingsUpdate struct { // IndexName is a required field IndexName *string `min:"3" type:"string" required:"true"` + // Autoscaling settings for managing a global secondary index replica's read + // capacity units. + ProvisionedReadCapacityAutoScalingSettingsUpdate *AutoScalingSettingsUpdate `type:"structure"` + // The maximum number of strongly consistent reads consumed per second before // DynamoDB returns a ThrottlingException. ProvisionedReadCapacityUnits *int64 `min:"1" type:"long"` @@ -9826,6 +10454,11 @@ func (s *ReplicaGlobalSecondaryIndexSettingsUpdate) Validate() error { if s.ProvisionedReadCapacityUnits != nil && *s.ProvisionedReadCapacityUnits < 1 { invalidParams.Add(request.NewErrParamMinValue("ProvisionedReadCapacityUnits", 1)) } + if s.ProvisionedReadCapacityAutoScalingSettingsUpdate != nil { + if err := s.ProvisionedReadCapacityAutoScalingSettingsUpdate.Validate(); err != nil { + invalidParams.AddNested("ProvisionedReadCapacityAutoScalingSettingsUpdate", err.(request.ErrInvalidParams)) + } + } if invalidParams.Len() > 0 { return invalidParams @@ -9839,6 +10472,12 @@ func (s *ReplicaGlobalSecondaryIndexSettingsUpdate) SetIndexName(v string) *Repl return s } +// SetProvisionedReadCapacityAutoScalingSettingsUpdate sets the ProvisionedReadCapacityAutoScalingSettingsUpdate field's value. +func (s *ReplicaGlobalSecondaryIndexSettingsUpdate) SetProvisionedReadCapacityAutoScalingSettingsUpdate(v *AutoScalingSettingsUpdate) *ReplicaGlobalSecondaryIndexSettingsUpdate { + s.ProvisionedReadCapacityAutoScalingSettingsUpdate = v + return s +} + // SetProvisionedReadCapacityUnits sets the ProvisionedReadCapacityUnits field's value. func (s *ReplicaGlobalSecondaryIndexSettingsUpdate) SetProvisionedReadCapacityUnits(v int64) *ReplicaGlobalSecondaryIndexSettingsUpdate { s.ProvisionedReadCapacityUnits = &v @@ -9857,12 +10496,18 @@ type ReplicaSettingsDescription struct { // Replica global secondary index settings for the global table. ReplicaGlobalSecondaryIndexSettings []*ReplicaGlobalSecondaryIndexSettingsDescription `type:"list"` + // Autoscaling settings for a global table replica's read capacity units. + ReplicaProvisionedReadCapacityAutoScalingSettings *AutoScalingSettingsDescription `type:"structure"` + // The maximum number of strongly consistent reads consumed per second before // DynamoDB returns a ThrottlingException. For more information, see Specifying // Read and Write Requirements (http://docs.aws.amazon.com/amazondynamodb/latest/developerguide/WorkingWithTables.html#ProvisionedThroughput) // in the Amazon DynamoDB Developer Guide. ReplicaProvisionedReadCapacityUnits *int64 `min:"1" type:"long"` + // AutoScaling settings for a global table replica's write capacity units. + ReplicaProvisionedWriteCapacityAutoScalingSettings *AutoScalingSettingsDescription `type:"structure"` + // The maximum number of writes consumed per second before DynamoDB returns // a ThrottlingException. For more information, see Specifying Read and Write // Requirements (http://docs.aws.amazon.com/amazondynamodb/latest/developerguide/WorkingWithTables.html#ProvisionedThroughput) @@ -9903,12 +10548,24 @@ func (s *ReplicaSettingsDescription) SetReplicaGlobalSecondaryIndexSettings(v [] return s } +// SetReplicaProvisionedReadCapacityAutoScalingSettings sets the ReplicaProvisionedReadCapacityAutoScalingSettings field's value. +func (s *ReplicaSettingsDescription) SetReplicaProvisionedReadCapacityAutoScalingSettings(v *AutoScalingSettingsDescription) *ReplicaSettingsDescription { + s.ReplicaProvisionedReadCapacityAutoScalingSettings = v + return s +} + // SetReplicaProvisionedReadCapacityUnits sets the ReplicaProvisionedReadCapacityUnits field's value. func (s *ReplicaSettingsDescription) SetReplicaProvisionedReadCapacityUnits(v int64) *ReplicaSettingsDescription { s.ReplicaProvisionedReadCapacityUnits = &v return s } +// SetReplicaProvisionedWriteCapacityAutoScalingSettings sets the ReplicaProvisionedWriteCapacityAutoScalingSettings field's value. +func (s *ReplicaSettingsDescription) SetReplicaProvisionedWriteCapacityAutoScalingSettings(v *AutoScalingSettingsDescription) *ReplicaSettingsDescription { + s.ReplicaProvisionedWriteCapacityAutoScalingSettings = v + return s +} + // SetReplicaProvisionedWriteCapacityUnits sets the ReplicaProvisionedWriteCapacityUnits field's value. func (s *ReplicaSettingsDescription) SetReplicaProvisionedWriteCapacityUnits(v int64) *ReplicaSettingsDescription { s.ReplicaProvisionedWriteCapacityUnits = &v @@ -9934,6 +10591,10 @@ type ReplicaSettingsUpdate struct { // will be modified. ReplicaGlobalSecondaryIndexSettingsUpdate []*ReplicaGlobalSecondaryIndexSettingsUpdate `min:"1" type:"list"` + // Autoscaling settings for managing a global table replica's read capacity + // units. + ReplicaProvisionedReadCapacityAutoScalingSettingsUpdate *AutoScalingSettingsUpdate `type:"structure"` + // The maximum number of strongly consistent reads consumed per second before // DynamoDB returns a ThrottlingException. For more information, see Specifying // Read and Write Requirements (http://docs.aws.amazon.com/amazondynamodb/latest/developerguide/WorkingWithTables.html#ProvisionedThroughput) @@ -9973,6 +10634,11 @@ func (s *ReplicaSettingsUpdate) Validate() error { } } } + if s.ReplicaProvisionedReadCapacityAutoScalingSettingsUpdate != nil { + if err := s.ReplicaProvisionedReadCapacityAutoScalingSettingsUpdate.Validate(); err != nil { + invalidParams.AddNested("ReplicaProvisionedReadCapacityAutoScalingSettingsUpdate", err.(request.ErrInvalidParams)) + } + } if invalidParams.Len() > 0 { return invalidParams @@ -9992,6 +10658,12 @@ func (s *ReplicaSettingsUpdate) SetReplicaGlobalSecondaryIndexSettingsUpdate(v [ return s } +// SetReplicaProvisionedReadCapacityAutoScalingSettingsUpdate sets the ReplicaProvisionedReadCapacityAutoScalingSettingsUpdate field's value. +func (s *ReplicaSettingsUpdate) SetReplicaProvisionedReadCapacityAutoScalingSettingsUpdate(v *AutoScalingSettingsUpdate) *ReplicaSettingsUpdate { + s.ReplicaProvisionedReadCapacityAutoScalingSettingsUpdate = v + return s +} + // SetReplicaProvisionedReadCapacityUnits sets the ReplicaProvisionedReadCapacityUnits field's value. func (s *ReplicaSettingsUpdate) SetReplicaProvisionedReadCapacityUnits(v int64) *ReplicaSettingsUpdate { s.ReplicaProvisionedReadCapacityUnits = &v @@ -10316,6 +10988,8 @@ type SSEDescription struct { // * DISABLING - Server-side encryption is being disabled. // // * DISABLED - Server-side encryption is disabled. + // + // * UPDATING - Server-side encryption is being updated. Status *string `type:"string" enum:"SSEStatus"` } @@ -10353,9 +11027,21 @@ type SSESpecification struct { // Indicates whether server-side encryption is enabled (true) or disabled (false) // on the table. + Enabled *bool `type:"boolean"` + + // The KMS Master Key (CMK) which should be used for the KMS encryption. To + // specify a CMK, use its key ID, Amazon Resource Name (ARN), alias name, or + // alias ARN. Note that you should only provide this parameter if the key is + // different from the default DynamoDB KMS Master Key alias/aws/dynamodb. + KMSMasterKeyId *string `type:"string"` + + // Server-side encryption type: // - // Enabled is a required field - Enabled *bool `type:"boolean" required:"true"` + // * AES256 - Server-side encryption which uses the AES256 algorithm. + // + // * KMS - Server-side encryption which uses AWS Key Management Service. + // (default) + SSEType *string `type:"string" enum:"SSEType"` } // String returns the string representation @@ -10368,25 +11054,24 @@ func (s SSESpecification) GoString() string { return s.String() } -// Validate inspects the fields of the type to determine if they are valid. -func (s *SSESpecification) Validate() error { - invalidParams := request.ErrInvalidParams{Context: "SSESpecification"} - if s.Enabled == nil { - invalidParams.Add(request.NewErrParamRequired("Enabled")) - } - - if invalidParams.Len() > 0 { - return invalidParams - } - return nil -} - // SetEnabled sets the Enabled field's value. func (s *SSESpecification) SetEnabled(v bool) *SSESpecification { s.Enabled = &v return s } +// SetKMSMasterKeyId sets the KMSMasterKeyId field's value. +func (s *SSESpecification) SetKMSMasterKeyId(v string) *SSESpecification { + s.KMSMasterKeyId = &v + return s +} + +// SetSSEType sets the SSEType field's value. +func (s *SSESpecification) SetSSEType(v string) *SSESpecification { + s.SSEType = &v + return s +} + // Represents the input of a Scan operation. type ScanInput struct { _ struct{} `type:"structure"` @@ -11955,6 +12640,10 @@ type UpdateGlobalTableSettingsInput struct { // GlobalTableName is a required field GlobalTableName *string `min:"3" type:"string" required:"true"` + // AutoScaling settings for managing provisioned write capacity for the global + // table. + GlobalTableProvisionedWriteCapacityAutoScalingSettingsUpdate *AutoScalingSettingsUpdate `type:"structure"` + // The maximum number of writes consumed per second before DynamoDB returns // a ThrottlingException. GlobalTableProvisionedWriteCapacityUnits *int64 `min:"1" type:"long"` @@ -12001,6 +12690,11 @@ func (s *UpdateGlobalTableSettingsInput) Validate() error { } } } + if s.GlobalTableProvisionedWriteCapacityAutoScalingSettingsUpdate != nil { + if err := s.GlobalTableProvisionedWriteCapacityAutoScalingSettingsUpdate.Validate(); err != nil { + invalidParams.AddNested("GlobalTableProvisionedWriteCapacityAutoScalingSettingsUpdate", err.(request.ErrInvalidParams)) + } + } if s.ReplicaSettingsUpdate != nil { for i, v := range s.ReplicaSettingsUpdate { if v == nil { @@ -12030,6 +12724,12 @@ func (s *UpdateGlobalTableSettingsInput) SetGlobalTableName(v string) *UpdateGlo return s } +// SetGlobalTableProvisionedWriteCapacityAutoScalingSettingsUpdate sets the GlobalTableProvisionedWriteCapacityAutoScalingSettingsUpdate field's value. +func (s *UpdateGlobalTableSettingsInput) SetGlobalTableProvisionedWriteCapacityAutoScalingSettingsUpdate(v *AutoScalingSettingsUpdate) *UpdateGlobalTableSettingsInput { + s.GlobalTableProvisionedWriteCapacityAutoScalingSettingsUpdate = v + return s +} + // SetGlobalTableProvisionedWriteCapacityUnits sets the GlobalTableProvisionedWriteCapacityUnits field's value. func (s *UpdateGlobalTableSettingsInput) SetGlobalTableProvisionedWriteCapacityUnits(v int64) *UpdateGlobalTableSettingsInput { s.GlobalTableProvisionedWriteCapacityUnits = &v @@ -12506,6 +13206,9 @@ type UpdateTableInput struct { // The new provisioned throughput settings for the specified table or index. ProvisionedThroughput *ProvisionedThroughput `type:"structure"` + // The new server-side encryption settings for the specified table. + SSESpecification *SSESpecification `type:"structure"` + // Represents the DynamoDB Streams configuration for the table. // // You will receive a ResourceInUseException if you attempt to enable a stream @@ -12588,6 +13291,12 @@ func (s *UpdateTableInput) SetProvisionedThroughput(v *ProvisionedThroughput) *U return s } +// SetSSESpecification sets the SSESpecification field's value. +func (s *UpdateTableInput) SetSSESpecification(v *SSESpecification) *UpdateTableInput { + s.SSESpecification = v + return s +} + // SetStreamSpecification sets the StreamSpecification field's value. func (s *UpdateTableInput) SetStreamSpecification(v *StreamSpecification) *UpdateTableInput { s.StreamSpecification = v @@ -12767,6 +13476,25 @@ const ( BackupStatusAvailable = "AVAILABLE" ) +const ( + // BackupTypeUser is a BackupType enum value + BackupTypeUser = "USER" + + // BackupTypeSystem is a BackupType enum value + BackupTypeSystem = "SYSTEM" +) + +const ( + // BackupTypeFilterUser is a BackupTypeFilter enum value + BackupTypeFilterUser = "USER" + + // BackupTypeFilterSystem is a BackupTypeFilter enum value + BackupTypeFilterSystem = "SYSTEM" + + // BackupTypeFilterAll is a BackupTypeFilter enum value + BackupTypeFilterAll = "ALL" +) + const ( // ComparisonOperatorEq is a ComparisonOperator enum value ComparisonOperatorEq = "EQ" @@ -12956,6 +13684,9 @@ const ( // SSEStatusDisabled is a SSEStatus enum value SSEStatusDisabled = "DISABLED" + + // SSEStatusUpdating is a SSEStatus enum value + SSEStatusUpdating = "UPDATING" ) const ( diff --git a/vendor/github.com/aws/aws-sdk-go/service/ec2/api.go b/vendor/github.com/aws/aws-sdk-go/service/ec2/api.go index 9a758173d..5e18932db 100644 --- a/vendor/github.com/aws/aws-sdk-go/service/ec2/api.go +++ b/vendor/github.com/aws/aws-sdk-go/service/ec2/api.go @@ -287,17 +287,21 @@ func (c *EC2) AllocateAddressRequest(input *AllocateAddressInput) (req *request. // AllocateAddress API operation for Amazon Elastic Compute Cloud. // -// Allocates an Elastic IP address. +// Allocates an Elastic IP address to your AWS account. After you allocate the +// Elastic IP address you can associate it with an instance or network interface. +// After you release an Elastic IP address, it is released to the IP address +// pool and can be allocated to a different AWS account. +// +// [EC2-VPC] If you release an Elastic IP address, you might be able to recover +// it. You cannot recover an Elastic IP address that you released after it is +// allocated to another AWS account. You cannot recover an Elastic IP address +// for EC2-Classic. To attempt to recover an Elastic IP address that you released, +// specify it in this operation. // // An Elastic IP address is for use either in the EC2-Classic platform or in // a VPC. By default, you can allocate 5 Elastic IP addresses for EC2-Classic // per region and 5 Elastic IP addresses for EC2-VPC per region. // -// If you release an Elastic IP address for use in a VPC, you might be able -// to recover it. To recover an Elastic IP address that you released, specify -// it in the Address parameter. Note that you cannot recover an Elastic IP address -// that you released after it is allocated to another AWS account. -// // For more information, see Elastic IP Addresses (http://docs.aws.amazon.com/AWSEC2/latest/UserGuide/elastic-ip-addresses-eip.html) // in the Amazon Elastic Compute Cloud User Guide. // @@ -616,6 +620,7 @@ func (c *EC2) AssociateAddressRequest(input *AssociateAddressInput) (req *reques // AssociateAddress API operation for Amazon Elastic Compute Cloud. // // Associates an Elastic IP address with an instance or a network interface. +// Before you can use an Elastic IP address, you must allocate it to your account. // // An Elastic IP address is for use in either the EC2-Classic platform or in // a VPC. For more information, see Elastic IP Addresses (http://docs.aws.amazon.com/AWSEC2/latest/UserGuide/elastic-ip-addresses-eip.html) @@ -880,7 +885,7 @@ func (c *EC2) AssociateRouteTableRequest(input *AssociateRouteTableInput) (req * // an association ID, which you need in order to disassociate the route table // from the subnet later. A route table can be associated with multiple subnets. // -// For more information about route tables, see Route Tables (http://docs.aws.amazon.com/AmazonVPC/latest/UserGuide/VPC_Route_Tables.html) +// For more information, see Route Tables (http://docs.aws.amazon.com/AmazonVPC/latest/UserGuide/VPC_Route_Tables.html) // in the Amazon Virtual Private Cloud User Guide. // // Returns awserr.Error for service API and SDK errors. Use runtime type assertions @@ -1198,8 +1203,8 @@ func (c *EC2) AttachInternetGatewayRequest(input *AttachInternetGatewayInput) (r // AttachInternetGateway API operation for Amazon Elastic Compute Cloud. // -// Attaches an Internet gateway to a VPC, enabling connectivity between the -// Internet and the VPC. For more information about your VPC and Internet gateway, +// Attaches an internet gateway to a VPC, enabling connectivity between the +// internet and the VPC. For more information about your VPC and internet gateway, // see the Amazon Virtual Private Cloud User Guide (http://docs.aws.amazon.com/AmazonVPC/latest/UserGuide/). // // Returns awserr.Error for service API and SDK errors. Use runtime type assertions @@ -1722,8 +1727,6 @@ func (c *EC2) BundleInstanceRequest(input *BundleInstanceInput) (req *request.Re // This action is not applicable for Linux/Unix instances or Windows instances // that are backed by Amazon EBS. // -// For more information, see Creating an Instance Store-Backed Windows AMI (http://docs.aws.amazon.com/AWSEC2/latest/WindowsGuide/Creating_InstanceStoreBacked_WinAMI.html). -// // Returns awserr.Error for service API and SDK errors. Use runtime type assertions // with awserr.Error's Code and Message methods to get detailed information about // the error. @@ -2496,6 +2499,11 @@ func (c *EC2) CopyImageRequest(input *CopyImageInput) (req *request.Request, out // region. You specify the destination region by using its endpoint when making // the request. // +// Copies of encrypted backing snapshots for the AMI are encrypted. Copies of +// unencrypted backing snapshots remain unencrypted, unless you set Encrypted +// during the copy operation. You cannot create an unencrypted copy of an encrypted +// backing snapshot. +// // For more information about the prerequisites and limits when copying an AMI, // see Copying an AMI (http://docs.aws.amazon.com/AWSEC2/latest/UserGuide/CopyingAMIs.html) // in the Amazon Elastic Compute Cloud User Guide. @@ -2847,12 +2855,12 @@ func (c *EC2) CreateDefaultVpcRequest(input *CreateDefaultVpcInput) (req *reques // in the Amazon Virtual Private Cloud User Guide. You cannot specify the components // of the default VPC yourself. // -// You can create a default VPC if you deleted your previous default VPC. You -// cannot have more than one default VPC per region. +// If you deleted your previous default VPC, you can create a default VPC. You +// cannot have more than one default VPC per Region. // // If your account supports EC2-Classic, you cannot use this action to create -// a default VPC in a region that supports EC2-Classic. If you want a default -// VPC in a region that supports EC2-Classic, see "I really want a default VPC +// a default VPC in a Region that supports EC2-Classic. If you want a default +// VPC in a Region that supports EC2-Classic, see "I really want a default VPC // for my existing EC2 account. Is that possible?" in the Default VPCs FAQ (http://aws.amazon.com/vpc/faqs/#Default_VPCs). // // Returns awserr.Error for service API and SDK errors. Use runtime type assertions @@ -2936,9 +2944,9 @@ func (c *EC2) CreateDhcpOptionsRequest(input *CreateDhcpOptionsInput) (req *requ // * domain-name-servers - The IP addresses of up to four domain name servers, // or AmazonProvidedDNS. The default DHCP option set specifies AmazonProvidedDNS. // If specifying more than one domain name server, specify the IP addresses -// in a single parameter, separated by commas. If you want your instance -// to receive a custom DNS hostname as specified in domain-name, you must -// set domain-name-servers to a custom DNS server. +// in a single parameter, separated by commas. ITo have your instance to +// receive a custom DNS hostname as specified in domain-name, you must set +// domain-name-servers to a custom DNS server. // // * domain-name - If you're using AmazonProvidedDNS in us-east-1, specify // ec2.internal. If you're using AmazonProvidedDNS in another region, specify @@ -2962,10 +2970,9 @@ func (c *EC2) CreateDhcpOptionsRequest(input *CreateDhcpOptionsInput) (req *requ // // Your VPC automatically starts out with a set of DHCP options that includes // only a DNS server that we provide (AmazonProvidedDNS). If you create a set -// of options, and if your VPC has an Internet gateway, make sure to set the +// of options, and if your VPC has an internet gateway, make sure to set the // domain-name-servers option either to AmazonProvidedDNS or to a domain name -// server of your choice. For more information about DHCP options, see DHCP -// Options Sets (http://docs.aws.amazon.com/AmazonVPC/latest/UserGuide/VPC_DHCP_Options.html) +// server of your choice. For more information, see DHCP Options Sets (http://docs.aws.amazon.com/AmazonVPC/latest/UserGuide/VPC_DHCP_Options.html) // in the Amazon Virtual Private Cloud User Guide. // // Returns awserr.Error for service API and SDK errors. Use runtime type assertions @@ -3040,9 +3047,9 @@ func (c *EC2) CreateEgressOnlyInternetGatewayRequest(input *CreateEgressOnlyInte // CreateEgressOnlyInternetGateway API operation for Amazon Elastic Compute Cloud. // -// [IPv6 only] Creates an egress-only Internet gateway for your VPC. An egress-only -// Internet gateway is used to enable outbound communication over IPv6 from -// instances in your VPC to the Internet, and prevents hosts outside of your +// [IPv6 only] Creates an egress-only internet gateway for your VPC. An egress-only +// internet gateway is used to enable outbound communication over IPv6 from +// instances in your VPC to the internet, and prevents hosts outside of your // VPC from initiating an IPv6 connection with your instance. // // Returns awserr.Error for service API and SDK errors. Use runtime type assertions @@ -3197,16 +3204,19 @@ func (c *EC2) CreateFlowLogsRequest(input *CreateFlowLogsInput) (req *request.Re // CreateFlowLogs API operation for Amazon Elastic Compute Cloud. // -// Creates one or more flow logs to capture IP traffic for a specific network -// interface, subnet, or VPC. Flow logs are delivered to a specified log group -// in Amazon CloudWatch Logs. If you specify a VPC or subnet in the request, -// a log stream is created in CloudWatch Logs for each network interface in -// the subnet or VPC. Log streams can include information about accepted and -// rejected traffic to a network interface. You can view the data in your log -// streams using Amazon CloudWatch Logs. +// Creates one or more flow logs to capture information about IP traffic for +// a specific network interface, subnet, or VPC. // -// In your request, you must also specify an IAM role that has permission to -// publish logs to CloudWatch Logs. +// Flow log data for a monitored network interface is recorded as flow log records, +// which are log events consisting of fields that describe the traffic flow. +// For more information, see Flow Log Records (http://docs.aws.amazon.com/AmazonVPC/latest/UserGuide/flow-logs.html#flow-log-records) +// in the Amazon Virtual Private Cloud User Guide. +// +// When publishing to CloudWatch Logs, flow log records are published to a log +// group, and each network interface has a unique log stream in the log group. +// When publishing to Amazon S3, flow log records for all of the monitored network +// interfaces are published to a single log file object that is stored in the +// specified bucket. // // For more information, see VPC Flow Logs (http://docs.aws.amazon.com/AmazonVPC/latest/UserGuide/flow-logs.html) // in the Amazon Virtual Private Cloud User Guide. @@ -3526,10 +3536,10 @@ func (c *EC2) CreateInternetGatewayRequest(input *CreateInternetGatewayInput) (r // CreateInternetGateway API operation for Amazon Elastic Compute Cloud. // -// Creates an Internet gateway for use with a VPC. After creating the Internet +// Creates an internet gateway for use with a VPC. After creating the internet // gateway, you attach it to a VPC using AttachInternetGateway. // -// For more information about your VPC and Internet gateway, see the Amazon +// For more information about your VPC and internet gateway, see the Amazon // Virtual Private Cloud User Guide (http://docs.aws.amazon.com/AmazonVPC/latest/UserGuide/). // // Returns awserr.Error for service API and SDK errors. Use runtime type assertions @@ -3927,7 +3937,7 @@ func (c *EC2) CreateNetworkAclRequest(input *CreateNetworkAclInput) (req *reques // Creates a network ACL in a VPC. Network ACLs provide an optional layer of // security (in addition to security groups) for the instances in your VPC. // -// For more information about network ACLs, see Network ACLs (http://docs.aws.amazon.com/AmazonVPC/latest/UserGuide/VPC_ACLs.html) +// For more information, see Network ACLs (http://docs.aws.amazon.com/AmazonVPC/latest/UserGuide/VPC_ACLs.html) // in the Amazon Virtual Private Cloud User Guide. // // Returns awserr.Error for service API and SDK errors. Use runtime type assertions @@ -4433,9 +4443,9 @@ func (c *EC2) CreateRouteRequest(input *CreateRouteInput) (req *request.Request, // // Creates a route in a route table within a VPC. // -// You must specify one of the following targets: Internet gateway or virtual +// You must specify one of the following targets: internet gateway or virtual // private gateway, NAT instance, NAT gateway, VPC peering connection, network -// interface, or egress-only Internet gateway. +// interface, or egress-only internet gateway. // // When determining how to route traffic, we use the route with the most specific // match. For example, traffic is destined for the IPv4 address 192.0.2.3, and @@ -4527,7 +4537,7 @@ func (c *EC2) CreateRouteTableRequest(input *CreateRouteTableInput) (req *reques // Creates a route table for the specified VPC. After you create a route table, // you can add routes and associate the table with a subnet. // -// For more information about route tables, see Route Tables (http://docs.aws.amazon.com/AmazonVPC/latest/UserGuide/VPC_Route_Tables.html) +// For more information, see Route Tables (http://docs.aws.amazon.com/AmazonVPC/latest/UserGuide/VPC_Route_Tables.html) // in the Amazon Virtual Private Cloud User Guide. // // Returns awserr.Error for service API and SDK errors. Use runtime type assertions @@ -4886,13 +4896,13 @@ func (c *EC2) CreateSubnetRequest(input *CreateSubnetInput) (req *request.Reques // // Creates a subnet in an existing VPC. // -// When you create each subnet, you provide the VPC ID and the IPv4 CIDR block -// you want for the subnet. After you create a subnet, you can't change its -// CIDR block. The size of the subnet's IPv4 CIDR block can be the same as a -// VPC's IPv4 CIDR block, or a subset of a VPC's IPv4 CIDR block. If you create -// more than one subnet in a VPC, the subnets' CIDR blocks must not overlap. -// The smallest IPv4 subnet (and VPC) you can create uses a /28 netmask (16 -// IPv4 addresses), and the largest uses a /16 netmask (65,536 IPv4 addresses). +// When you create each subnet, you provide the VPC ID and IPv4 CIDR block for +// the subnet. After you create a subnet, you can't change its CIDR block. The +// size of the subnet's IPv4 CIDR block can be the same as a VPC's IPv4 CIDR +// block, or a subset of a VPC's IPv4 CIDR block. If you create more than one +// subnet in a VPC, the subnets' CIDR blocks must not overlap. The smallest +// IPv4 subnet (and VPC) you can create uses a /28 netmask (16 IPv4 addresses), +// and the largest uses a /16 netmask (65,536 IPv4 addresses). // // If you've associated an IPv6 CIDR block with your VPC, you can create a subnet // with an IPv6 CIDR block that uses a /64 prefix length. @@ -5163,8 +5173,8 @@ func (c *EC2) CreateVpcRequest(input *CreateVpcInput) (req *request.Request, out // // Creates a VPC with the specified IPv4 CIDR block. The smallest VPC you can // create uses a /28 netmask (16 IPv4 addresses), and the largest uses a /16 -// netmask (65,536 IPv4 addresses). To help you decide how big to make your -// VPC, see Your VPC and Subnets (http://docs.aws.amazon.com/AmazonVPC/latest/UserGuide/VPC_Subnets.html) +// netmask (65,536 IPv4 addresses). For more information about how large to +// make your VPC, see Your VPC and Subnets (http://docs.aws.amazon.com/AmazonVPC/latest/UserGuide/VPC_Subnets.html) // in the Amazon Virtual Private Cloud User Guide. // // You can optionally request an Amazon-provided IPv6 CIDR block for the VPC. @@ -5172,8 +5182,8 @@ func (c *EC2) CreateVpcRequest(input *CreateVpcInput) (req *request.Request, out // pool of IPv6 addresses. You cannot choose the IPv6 range for your VPC. // // By default, each instance you launch in the VPC has the default DHCP options, -// which includes only a default DNS server that we provide (AmazonProvidedDNS). -// For more information about DHCP options, see DHCP Options Sets (http://docs.aws.amazon.com/AmazonVPC/latest/UserGuide/VPC_DHCP_Options.html) +// which include only a default DNS server that we provide (AmazonProvidedDNS). +// For more information, see DHCP Options Sets (http://docs.aws.amazon.com/AmazonVPC/latest/UserGuide/VPC_DHCP_Options.html) // in the Amazon Virtual Private Cloud User Guide. // // You can specify the instance tenancy value for the VPC when you create it. @@ -5506,7 +5516,7 @@ func (c *EC2) CreateVpcPeeringConnectionRequest(input *CreateVpcPeeringConnectio // // Requests a VPC peering connection between two VPCs: a requester VPC that // you own and an accepter VPC with which to create the connection. The accepter -// VPC can belong to another AWS account and can be in a different region to +// VPC can belong to another AWS account and can be in a different Region to // the requester VPC. The requester VPC and accepter VPC cannot have overlapping // CIDR blocks. // @@ -6004,7 +6014,7 @@ func (c *EC2) DeleteEgressOnlyInternetGatewayRequest(input *DeleteEgressOnlyInte // DeleteEgressOnlyInternetGateway API operation for Amazon Elastic Compute Cloud. // -// Deletes an egress-only Internet gateway. +// Deletes an egress-only internet gateway. // // Returns awserr.Error for service API and SDK errors. Use runtime type assertions // with awserr.Error's Code and Message methods to get detailed information about @@ -6308,7 +6318,7 @@ func (c *EC2) DeleteInternetGatewayRequest(input *DeleteInternetGatewayInput) (r // DeleteInternetGateway API operation for Amazon Elastic Compute Cloud. // -// Deletes the specified Internet gateway. You must detach the Internet gateway +// Deletes the specified internet gateway. You must detach the internet gateway // from the VPC before you can delete it. // // Returns awserr.Error for service API and SDK errors. Use runtime type assertions @@ -8846,7 +8856,7 @@ func (c *EC2) DescribeClassicLinkInstancesRequest(input *DescribeClassicLinkInst // // Describes one or more of your linked EC2-Classic instances. This request // only returns information about EC2-Classic instances linked to a VPC through -// ClassicLink; you cannot use this request to return information about other +// ClassicLink. You cannot use this request to return information about other // instances. // // Returns awserr.Error for service API and SDK errors. Use runtime type assertions @@ -9079,7 +9089,7 @@ func (c *EC2) DescribeDhcpOptionsRequest(input *DescribeDhcpOptionsInput) (req * // // Describes one or more of your DHCP options sets. // -// For more information about DHCP options sets, see DHCP Options Sets (http://docs.aws.amazon.com/AmazonVPC/latest/UserGuide/VPC_DHCP_Options.html) +// For more information, see DHCP Options Sets (http://docs.aws.amazon.com/AmazonVPC/latest/UserGuide/VPC_DHCP_Options.html) // in the Amazon Virtual Private Cloud User Guide. // // Returns awserr.Error for service API and SDK errors. Use runtime type assertions @@ -9154,7 +9164,7 @@ func (c *EC2) DescribeEgressOnlyInternetGatewaysRequest(input *DescribeEgressOnl // DescribeEgressOnlyInternetGateways API operation for Amazon Elastic Compute Cloud. // -// Describes one or more of your egress-only Internet gateways. +// Describes one or more of your egress-only internet gateways. // // Returns awserr.Error for service API and SDK errors. Use runtime type assertions // with awserr.Error's Code and Message methods to get detailed information about @@ -9825,14 +9835,14 @@ func (c *EC2) DescribeHostReservationOfferingsRequest(input *DescribeHostReserva // DescribeHostReservationOfferings API operation for Amazon Elastic Compute Cloud. // -// Describes the Dedicated Host Reservations that are available to purchase. +// Describes the Dedicated Host reservations that are available to purchase. // -// The results describe all the Dedicated Host Reservation offerings, including +// The results describe all the Dedicated Host reservation offerings, including // offerings that may not match the instance family and region of your Dedicated -// Hosts. When purchasing an offering, ensure that the the instance family and -// region of the offering matches that of the Dedicated Host/s it will be associated -// with. For an overview of supported instance types, see Dedicated Hosts Overview -// (http://docs.aws.amazon.com/AWSEC2/latest/UserGuide/dedicated-hosts-overview.html) +// Hosts. When purchasing an offering, ensure that the instance family and Region +// of the offering matches that of the Dedicated Hosts with which it is to be +// associated. For more information about supported instance types, see Dedicated +// Hosts Overview (http://docs.aws.amazon.com/AWSEC2/latest/UserGuide/dedicated-hosts-overview.html) // in the Amazon Elastic Compute Cloud User Guide. // // Returns awserr.Error for service API and SDK errors. Use runtime type assertions @@ -9907,8 +9917,7 @@ func (c *EC2) DescribeHostReservationsRequest(input *DescribeHostReservationsInp // DescribeHostReservations API operation for Amazon Elastic Compute Cloud. // -// Describes Dedicated Host Reservations which are associated with Dedicated -// Hosts in your account. +// Describes reservations that are associated with Dedicated Hosts in your account. // // Returns awserr.Error for service API and SDK errors. Use runtime type assertions // with awserr.Error's Code and Message methods to get detailed information about @@ -9986,7 +9995,7 @@ func (c *EC2) DescribeHostsRequest(input *DescribeHostsInput) (req *request.Requ // // The results describe only the Dedicated Hosts in the region you're currently // using. All listed instances consume capacity on your Dedicated Host. Dedicated -// Hosts that have recently been released will be listed with the state released. +// Hosts that have recently been released are listed with the state released. // // Returns awserr.Error for service API and SDK errors. Use runtime type assertions // with awserr.Error's Code and Message methods to get detailed information about @@ -10698,14 +10707,19 @@ func (c *EC2) DescribeInstanceCreditSpecificationsRequest(input *DescribeInstanc // DescribeInstanceCreditSpecifications API operation for Amazon Elastic Compute Cloud. // -// Describes the credit option for CPU usage of one or more of your T2 instances. -// The credit options are standard and unlimited. +// Describes the credit option for CPU usage of one or more of your T2 or T3 +// instances. The credit options are standard and unlimited. // -// If you do not specify an instance ID, Amazon EC2 returns only the T2 instances -// with the unlimited credit option. If you specify one or more instance IDs, -// Amazon EC2 returns the credit option (standard or unlimited) of those instances. -// If you specify an instance ID that is not valid, such as an instance that -// is not a T2 instance, an error is returned. +// If you do not specify an instance ID, Amazon EC2 returns T2 and T3 instances +// with the unlimited credit option, as well as instances that were previously +// configured as T2 or T3 with the unlimited credit option. For example, if +// you resize a T2 instance, while it is configured as unlimited, to an M4 instance, +// Amazon EC2 returns the M4 instance. +// +// If you specify one or more instance IDs, Amazon EC2 returns the credit option +// (standard or unlimited) of those instances. If you specify an instance ID +// that is not valid, such as an instance that is not a T2 or T3 instance, an +// error is returned. // // Recently terminated instances might appear in the returned results. This // interval is usually less than one hour. @@ -10715,7 +10729,7 @@ func (c *EC2) DescribeInstanceCreditSpecificationsRequest(input *DescribeInstanc // all, the call fails. If you specify only instance IDs in an unaffected zone, // the call works normally. // -// For more information, see T2 Instances (http://docs.aws.amazon.com/AWSEC2/latest/UserGuide/t2-instances.html) +// For more information, see Burstable Performance Instances (http://docs.aws.amazon.com/AWSEC2/latest/UserGuide/burstable-performance-instances.html) // in the Amazon Elastic Compute Cloud User Guide. // // Returns awserr.Error for service API and SDK errors. Use runtime type assertions @@ -11086,7 +11100,7 @@ func (c *EC2) DescribeInternetGatewaysRequest(input *DescribeInternetGatewaysInp // DescribeInternetGateways API operation for Amazon Elastic Compute Cloud. // -// Describes one or more of your Internet gateways. +// Describes one or more of your internet gateways. // // Returns awserr.Error for service API and SDK errors. Use runtime type assertions // with awserr.Error's Code and Message methods to get detailed information about @@ -11468,7 +11482,7 @@ func (c *EC2) DescribeNatGatewaysRequest(input *DescribeNatGatewaysInput) (req * // DescribeNatGateways API operation for Amazon Elastic Compute Cloud. // -// Describes one or more of the your NAT gateways. +// Describes one or more of your NAT gateways. // // Returns awserr.Error for service API and SDK errors. Use runtime type assertions // with awserr.Error's Code and Message methods to get detailed information about @@ -11594,7 +11608,7 @@ func (c *EC2) DescribeNetworkAclsRequest(input *DescribeNetworkAclsInput) (req * // // Describes one or more of your network ACLs. // -// For more information about network ACLs, see Network ACLs (http://docs.aws.amazon.com/AmazonVPC/latest/UserGuide/VPC_ACLs.html) +// For more information, see Network ACLs (http://docs.aws.amazon.com/AmazonVPC/latest/UserGuide/VPC_ACLs.html) // in the Amazon Virtual Private Cloud User Guide. // // Returns awserr.Error for service API and SDK errors. Use runtime type assertions @@ -11805,6 +11819,12 @@ func (c *EC2) DescribeNetworkInterfacesRequest(input *DescribeNetworkInterfacesI Name: opDescribeNetworkInterfaces, HTTPMethod: "POST", HTTPPath: "/", + Paginator: &request.Paginator{ + InputTokens: []string{"NextToken"}, + OutputTokens: []string{"NextToken"}, + LimitToken: "MaxResults", + TruncationToken: "", + }, } if input == nil { @@ -11848,6 +11868,56 @@ func (c *EC2) DescribeNetworkInterfacesWithContext(ctx aws.Context, input *Descr return out, req.Send() } +// DescribeNetworkInterfacesPages iterates over the pages of a DescribeNetworkInterfaces operation, +// calling the "fn" function with the response data for each page. To stop +// iterating, return false from the fn function. +// +// See DescribeNetworkInterfaces method for more information on how to use this operation. +// +// Note: This operation can generate multiple requests to a service. +// +// // Example iterating over at most 3 pages of a DescribeNetworkInterfaces operation. +// pageNum := 0 +// err := client.DescribeNetworkInterfacesPages(params, +// func(page *DescribeNetworkInterfacesOutput, lastPage bool) bool { +// pageNum++ +// fmt.Println(page) +// return pageNum <= 3 +// }) +// +func (c *EC2) DescribeNetworkInterfacesPages(input *DescribeNetworkInterfacesInput, fn func(*DescribeNetworkInterfacesOutput, bool) bool) error { + return c.DescribeNetworkInterfacesPagesWithContext(aws.BackgroundContext(), input, fn) +} + +// DescribeNetworkInterfacesPagesWithContext same as DescribeNetworkInterfacesPages except +// it takes a Context and allows setting request options on the pages. +// +// The context must be non-nil and will be used for request cancellation. If +// the context is nil a panic will occur. In the future the SDK may create +// sub-contexts for http.Requests. See https://golang.org/pkg/context/ +// for more information on using Contexts. +func (c *EC2) DescribeNetworkInterfacesPagesWithContext(ctx aws.Context, input *DescribeNetworkInterfacesInput, fn func(*DescribeNetworkInterfacesOutput, bool) bool, opts ...request.Option) error { + p := request.Pagination{ + NewRequest: func() (*request.Request, error) { + var inCpy *DescribeNetworkInterfacesInput + if input != nil { + tmp := *input + inCpy = &tmp + } + req, _ := c.DescribeNetworkInterfacesRequest(inCpy) + req.SetContext(ctx) + req.ApplyOptions(opts...) + return req, nil + }, + } + + cont := true + for p.Next() && cont { + cont = fn(p.Page().(*DescribeNetworkInterfacesOutput), !p.HasNextPage()) + } + return p.Err() +} + const opDescribePlacementGroups = "DescribePlacementGroups" // DescribePlacementGroupsRequest generates a "aws/request.Request" representing the @@ -12668,7 +12738,7 @@ func (c *EC2) DescribeRouteTablesRequest(input *DescribeRouteTablesInput) (req * // with the main route table. This command does not return the subnet ID for // implicit associations. // -// For more information about route tables, see Route Tables (http://docs.aws.amazon.com/AmazonVPC/latest/UserGuide/VPC_Route_Tables.html) +// For more information, see Route Tables (http://docs.aws.amazon.com/AmazonVPC/latest/UserGuide/VPC_Route_Tables.html) // in the Amazon Virtual Private Cloud User Guide. // // Returns awserr.Error for service API and SDK errors. Use runtime type assertions @@ -13969,7 +14039,7 @@ func (c *EC2) DescribeSubnetsRequest(input *DescribeSubnetsInput) (req *request. // // Describes one or more of your subnets. // -// For more information about subnets, see Your VPC and Subnets (http://docs.aws.amazon.com/AmazonVPC/latest/UserGuide/VPC_Subnets.html) +// For more information, see Your VPC and Subnets (http://docs.aws.amazon.com/AmazonVPC/latest/UserGuide/VPC_Subnets.html) // in the Amazon Virtual Private Cloud User Guide. // // Returns awserr.Error for service API and SDK errors. Use runtime type assertions @@ -15705,8 +15775,8 @@ func (c *EC2) DetachInternetGatewayRequest(input *DetachInternetGatewayInput) (r // DetachInternetGateway API operation for Amazon Elastic Compute Cloud. // -// Detaches an Internet gateway from a VPC, disabling connectivity between the -// Internet and the VPC. The VPC must not contain any running instances with +// Detaches an internet gateway from a VPC, disabling connectivity between the +// internet and the VPC. The VPC must not contain any running instances with // Elastic IP addresses or public IPv4 addresses. // // Returns awserr.Error for service API and SDK errors. Use runtime type assertions @@ -16181,8 +16251,8 @@ func (c *EC2) DisableVpcClassicLinkDnsSupportRequest(input *DisableVpcClassicLin // // Disables ClassicLink DNS support for a VPC. If disabled, DNS hostnames resolve // to public IP addresses when addressed between a linked EC2-Classic instance -// and instances in the VPC to which it's linked. For more information about -// ClassicLink, see ClassicLink (http://docs.aws.amazon.com/AWSEC2/latest/UserGuide/vpc-classiclink.html) +// and instances in the VPC to which it's linked. For more information, see +// ClassicLink (http://docs.aws.amazon.com/AWSEC2/latest/UserGuide/vpc-classiclink.html) // in the Amazon Elastic Compute Cloud User Guide. // // Returns awserr.Error for service API and SDK errors. Use runtime type assertions @@ -16810,7 +16880,7 @@ func (c *EC2) EnableVpcClassicLinkRequest(input *EnableVpcClassicLinkInput) (req // // Enables a VPC for ClassicLink. You can then link EC2-Classic instances to // your ClassicLink-enabled VPC to allow communication over private IP addresses. -// You cannot enable your VPC for ClassicLink if any of your VPC's route tables +// You cannot enable your VPC for ClassicLink if any of your VPC route tables // have existing routes for address ranges within the 10.0.0.0/8 IP address // range, excluding local routes for VPCs in the 10.0.0.0/16 and 10.1.0.0/16 // IP address ranges. For more information, see ClassicLink (http://docs.aws.amazon.com/AWSEC2/latest/UserGuide/vpc-classiclink.html) @@ -16892,8 +16962,8 @@ func (c *EC2) EnableVpcClassicLinkDnsSupportRequest(input *EnableVpcClassicLinkD // the DNS hostname of a linked EC2-Classic instance resolves to its private // IP address when addressed from an instance in the VPC to which it's linked. // Similarly, the DNS hostname of an instance in a VPC resolves to its private -// IP address when addressed from a linked EC2-Classic instance. For more information -// about ClassicLink, see ClassicLink (http://docs.aws.amazon.com/AWSEC2/latest/UserGuide/vpc-classiclink.html) +// IP address when addressed from a linked EC2-Classic instance. For more information, +// see ClassicLink (http://docs.aws.amazon.com/AWSEC2/latest/UserGuide/vpc-classiclink.html) // in the Amazon Elastic Compute Cloud User Guide. // // Returns awserr.Error for service API and SDK errors. Use runtime type assertions @@ -16971,20 +17041,20 @@ func (c *EC2) GetConsoleOutputRequest(input *GetConsoleOutputInput) (req *reques // Gets the console output for the specified instance. For Linux instances, // the instance console output displays the exact console output that would // normally be displayed on a physical monitor attached to a computer. For Windows -// instances, the instance console output includes output from the EC2Config -// service. -// -// GetConsoleOutput returns up to 64 KB of console output shortly after it's -// generated by the instance. +// instances, the instance console output includes the last three system event +// log errors. // // By default, the console output returns buffered information that was posted // shortly after an instance transition state (start, stop, reboot, or terminate). // This information is available for at least one hour after the most recent -// post. +// post. Only the most recent 64 KB of console output is available. // // You can optionally retrieve the latest serial console output at any time -// during the instance lifecycle. This option is only supported on C5, M5, and -// i3.metal instances. +// during the instance lifecycle. This option is supported on instance types +// that use the Nitro hypervisor. +// +// For more information, see Instance Console Output (http://docs.aws.amazon.com/AWSEC2/latest/UserGuide/instance-console.html#instance-console-console-output) +// in the Amazon Elastic Compute Cloud User Guide. // // Returns awserr.Error for service API and SDK errors. Use runtime type assertions // with awserr.Error's Code and Message methods to get detailed information about @@ -17997,12 +18067,12 @@ func (c *EC2) ModifyHostsRequest(input *ModifyHostsInput) (req *request.Request, // ModifyHosts API operation for Amazon Elastic Compute Cloud. // // Modify the auto-placement setting of a Dedicated Host. When auto-placement -// is enabled, AWS will place instances that you launch with a tenancy of host, -// but without targeting a specific host ID, onto any available Dedicated Host -// in your account which has auto-placement enabled. When auto-placement is -// disabled, you need to provide a host ID if you want the instance to launch -// onto a specific host. If no host ID is provided, the instance will be launched -// onto a suitable host which has auto-placement enabled. +// is enabled, any instances that you launch with a tenancy of host but without +// a specific host ID are placed onto any available Dedicated Host in your account +// that has auto-placement enabled. When auto-placement is disabled, you need +// to provide a host ID to have the instance launch onto a specific host. If +// no host ID is provided, the instance is launched onto a suitable host with +// auto-placement enabled. // // Returns awserr.Error for service API and SDK errors. Use runtime type assertions // with awserr.Error's Code and Message methods to get detailed information about @@ -18444,10 +18514,10 @@ func (c *EC2) ModifyInstanceCreditSpecificationRequest(input *ModifyInstanceCred // ModifyInstanceCreditSpecification API operation for Amazon Elastic Compute Cloud. // -// Modifies the credit option for CPU usage on a running or stopped T2 instance. -// The credit options are standard and unlimited. +// Modifies the credit option for CPU usage on a running or stopped T2 or T3 +// instance. The credit options are standard and unlimited. // -// For more information, see T2 Instances (http://docs.aws.amazon.com/AWSEC2/latest/UserGuide/t2-instances.html) +// For more information, see Burstable Performance Instances (http://docs.aws.amazon.com/AWSEC2/latest/UserGuide/burstable-performance-instances.html) // in the Amazon Elastic Compute Cloud User Guide. // // Returns awserr.Error for service API and SDK errors. Use runtime type assertions @@ -19610,6 +19680,11 @@ func (c *EC2) ModifyVpcEndpointServicePermissionsRequest(input *ModifyVpcEndpoin // You can add or remove permissions for service consumers (IAM users, IAM roles, // and AWS accounts) to connect to your endpoint service. // +// If you grant permissions to all principals, the service is public. Any users +// who know the name of a public service can send a request to attach an endpoint. +// If the service does not require manual approval, attachments are automatically +// approved. +// // Returns awserr.Error for service API and SDK errors. Use runtime type assertions // with awserr.Error's Code and Message methods to get detailed information about // the error. @@ -19783,7 +19858,7 @@ func (c *EC2) ModifyVpcTenancyRequest(input *ModifyVpcTenancyInput) (req *reques // into the VPC have a tenancy of default, unless you specify otherwise during // launch. The tenancy of any existing instances in the VPC is not affected. // -// For more information about Dedicated Instances, see Dedicated Instances (http://docs.aws.amazon.com/AWSEC2/latest/UserGuide/dedicated-instance.html) +// For more information, see Dedicated Instances (http://docs.aws.amazon.com/AWSEC2/latest/UserGuide/dedicated-instance.html) // in the Amazon Elastic Compute Cloud User Guide. // // Returns awserr.Error for service API and SDK errors. Use runtime type assertions @@ -20366,10 +20441,13 @@ func (c *EC2) RegisterImageRequest(input *RegisterImageInput) (req *request.Requ // Some Linux distributions, such as Red Hat Enterprise Linux (RHEL) and SUSE // Linux Enterprise Server (SLES), use the EC2 billing product code associated // with an AMI to verify the subscription status for package updates. Creating -// an AMI from an EBS snapshot does not maintain this billing code, and subsequent -// instances launched from such an AMI will not be able to connect to package -// update infrastructure. To create an AMI that must retain billing codes, see -// CreateImage. +// an AMI from an EBS snapshot does not maintain this billing code, and instances +// launched from such an AMI are not able to connect to package update infrastructure. +// If you purchase a Reserved Instance offering for one of these Linux distributions +// and launch instances using an AMI that does not contain the required billing +// code, your Reserved Instance is not applied to these instances. +// +// To create an AMI for operating systems that require a billing code, see CreateImage. // // If needed, you can deregister an AMI at any time. Any modifications you make // to an AMI backed by an instance store volume invalidates its registration. @@ -20697,15 +20775,14 @@ func (c *EC2) ReleaseHostsRequest(input *ReleaseHostsInput) (req *request.Reques // When you no longer want to use an On-Demand Dedicated Host it can be released. // On-Demand billing is stopped and the host goes into released state. The host // ID of Dedicated Hosts that have been released can no longer be specified -// in another request, e.g., ModifyHosts. You must stop or terminate all instances -// on a host before it can be released. +// in another request, for example, to modify the host. You must stop or terminate +// all instances on a host before it can be released. // -// When Dedicated Hosts are released, it make take some time for them to stop +// When Dedicated Hosts are released, it may take some time for them to stop // counting toward your limit and you may receive capacity errors when trying -// to allocate new Dedicated hosts. Try waiting a few minutes, and then try -// again. +// to allocate new Dedicated Hosts. Wait a few minutes and then try again. // -// Released hosts will still appear in a DescribeHosts response. +// Released hosts still appear in a DescribeHosts response. // // Returns awserr.Error for service API and SDK errors. Use runtime type assertions // with awserr.Error's Code and Message methods to get detailed information about @@ -20860,7 +20937,7 @@ func (c *EC2) ReplaceNetworkAclAssociationRequest(input *ReplaceNetworkAclAssoci // // Changes which network ACL a subnet is associated with. By default when you // create a subnet, it's automatically associated with the default network ACL. -// For more information about network ACLs, see Network ACLs (http://docs.aws.amazon.com/AmazonVPC/latest/UserGuide/VPC_ACLs.html) +// For more information, see Network ACLs (http://docs.aws.amazon.com/AmazonVPC/latest/UserGuide/VPC_ACLs.html) // in the Amazon Virtual Private Cloud User Guide. // // This is an idempotent operation. @@ -20939,8 +21016,8 @@ func (c *EC2) ReplaceNetworkAclEntryRequest(input *ReplaceNetworkAclEntryInput) // ReplaceNetworkAclEntry API operation for Amazon Elastic Compute Cloud. // -// Replaces an entry (rule) in a network ACL. For more information about network -// ACLs, see Network ACLs (http://docs.aws.amazon.com/AmazonVPC/latest/UserGuide/VPC_ACLs.html) +// Replaces an entry (rule) in a network ACL. For more information, see Network +// ACLs (http://docs.aws.amazon.com/AmazonVPC/latest/UserGuide/VPC_ACLs.html) // in the Amazon Virtual Private Cloud User Guide. // // Returns awserr.Error for service API and SDK errors. Use runtime type assertions @@ -21018,11 +21095,11 @@ func (c *EC2) ReplaceRouteRequest(input *ReplaceRouteInput) (req *request.Reques // ReplaceRoute API operation for Amazon Elastic Compute Cloud. // // Replaces an existing route within a route table in a VPC. You must provide -// only one of the following: Internet gateway or virtual private gateway, NAT +// only one of the following: internet gateway or virtual private gateway, NAT // instance, NAT gateway, VPC peering connection, network interface, or egress-only -// Internet gateway. +// internet gateway. // -// For more information about route tables, see Route Tables (http://docs.aws.amazon.com/AmazonVPC/latest/UserGuide/VPC_Route_Tables.html) +// For more information, see Route Tables (http://docs.aws.amazon.com/AmazonVPC/latest/UserGuide/VPC_Route_Tables.html) // in the Amazon Virtual Private Cloud User Guide. // // Returns awserr.Error for service API and SDK errors. Use runtime type assertions @@ -23122,7 +23199,6 @@ func (s *AcceptVpcEndpointConnectionsOutput) SetUnsuccessful(v []*UnsuccessfulIt return s } -// Contains the parameters for AcceptVpcPeeringConnection. type AcceptVpcPeeringConnectionInput struct { _ struct{} `type:"structure"` @@ -23159,7 +23235,6 @@ func (s *AcceptVpcPeeringConnectionInput) SetVpcPeeringConnectionId(v string) *A return s } -// Contains the output of AcceptVpcPeeringConnection. type AcceptVpcPeeringConnectionOutput struct { _ struct{} `type:"structure"` @@ -23482,7 +23557,6 @@ func (s *AllocateAddressOutput) SetPublicIp(v string) *AllocateAddressOutput { return s } -// Contains the parameters for AllocateHosts. type AllocateHostsInput struct { _ struct{} `type:"structure"` @@ -23514,6 +23588,9 @@ type AllocateHostsInput struct { // // Quantity is a required field Quantity *int64 `locationName:"quantity" type:"integer" required:"true"` + + // The tags to apply to the Dedicated Host during creation. + TagSpecifications []*TagSpecification `locationName:"TagSpecification" locationNameList:"item" type:"list"` } // String returns the string representation @@ -23575,6 +23652,12 @@ func (s *AllocateHostsInput) SetQuantity(v int64) *AllocateHostsInput { return s } +// SetTagSpecifications sets the TagSpecifications field's value. +func (s *AllocateHostsInput) SetTagSpecifications(v []*TagSpecification) *AllocateHostsInput { + s.TagSpecifications = v + return s +} + // Contains the output of AllocateHosts. type AllocateHostsOutput struct { _ struct{} `type:"structure"` @@ -23928,7 +24011,6 @@ func (s *AssociateAddressOutput) SetAssociationId(v string) *AssociateAddressOut return s } -// Contains the parameters for AssociateDhcpOptions. type AssociateDhcpOptionsInput struct { _ struct{} `type:"structure"` @@ -24083,7 +24165,6 @@ func (s *AssociateIamInstanceProfileOutput) SetIamInstanceProfileAssociation(v * return s } -// Contains the parameters for AssociateRouteTable. type AssociateRouteTableInput struct { _ struct{} `type:"structure"` @@ -24148,11 +24229,11 @@ func (s *AssociateRouteTableInput) SetSubnetId(v string) *AssociateRouteTableInp return s } -// Contains the output of AssociateRouteTable. type AssociateRouteTableOutput struct { _ struct{} `type:"structure"` - // The route table association ID (needed to disassociate the route table). + // The route table association ID. This ID is required for disassociating the + // route table. AssociationId *string `locationName:"associationId" type:"string"` } @@ -24355,7 +24436,6 @@ func (s *AssociateVpcCidrBlockOutput) SetVpcId(v string) *AssociateVpcCidrBlockO return s } -// Contains the parameters for AttachClassicLinkVpc. type AttachClassicLinkVpcInput struct { _ struct{} `type:"structure"` @@ -24435,7 +24515,6 @@ func (s *AttachClassicLinkVpcInput) SetVpcId(v string) *AttachClassicLinkVpcInpu return s } -// Contains the output of AttachClassicLinkVpc. type AttachClassicLinkVpcOutput struct { _ struct{} `type:"structure"` @@ -24459,7 +24538,6 @@ func (s *AttachClassicLinkVpcOutput) SetReturn(v bool) *AttachClassicLinkVpcOutp return s } -// Contains the parameters for AttachInternetGateway. type AttachInternetGatewayInput struct { _ struct{} `type:"structure"` @@ -24469,7 +24547,7 @@ type AttachInternetGatewayInput struct { // it is UnauthorizedOperation. DryRun *bool `locationName:"dryRun" type:"boolean"` - // The ID of the Internet gateway. + // The ID of the internet gateway. // // InternetGatewayId is a required field InternetGatewayId *string `locationName:"internetGatewayId" type:"string" required:"true"` @@ -24858,7 +24936,6 @@ func (s *AttributeValue) SetValue(v string) *AttributeValue { return s } -// Contains the parameters for AuthorizeSecurityGroupEgress. type AuthorizeSecurityGroupEgressInput struct { _ struct{} `type:"structure"` @@ -24990,7 +25067,6 @@ func (s AuthorizeSecurityGroupEgressOutput) GoString() string { return s.String() } -// Contains the parameters for AuthorizeSecurityGroupIngress. type AuthorizeSecurityGroupIngressInput struct { _ struct{} `type:"structure"` @@ -25216,7 +25292,7 @@ func (s *AvailabilityZoneMessage) SetMessage(v string) *AvailabilityZoneMessage type AvailableCapacity struct { _ struct{} `type:"structure"` - // The total number of instances that the Dedicated Host supports. + // The total number of instances supported by the Dedicated Host. AvailableInstanceCapacity []*InstanceCapacity `locationName:"availableInstanceCapacity" locationNameList:"item" type:"list"` // The number of vCPUs available on the Dedicated Host. @@ -25285,10 +25361,13 @@ type BlockDeviceMapping struct { // The virtual device name (ephemeralN). Instance store volumes are numbered // starting from 0. An instance type with 2 available instance store volumes - // can specify mappings for ephemeral0 and ephemeral1.The number of available + // can specify mappings for ephemeral0 and ephemeral1. The number of available // instance store volumes depends on the instance type. After you connect to // the instance, you must mount the volume. // + // NVMe instance store volumes are automatically enumerated and assigned a device + // name. Including them in your block device mapping has no effect. + // // Constraints: For M3 instances, you must specify instance store volumes in // the block device mapping for the instance. When you launch an M3 instance, // we ignore any instance store volumes specified in the block device mapping @@ -26873,10 +26952,12 @@ type CopyImageInput struct { DryRun *bool `locationName:"dryRun" type:"boolean"` // Specifies whether the destination snapshots of the copied image should be - // encrypted. The default CMK for EBS is used unless a non-default AWS Key Management - // Service (AWS KMS) CMK is specified with KmsKeyId. For more information, see - // Amazon EBS Encryption (http://docs.aws.amazon.com/AWSEC2/latest/UserGuide/EBSEncryption.html) - // in the Amazon Elastic Compute Cloud User Guide. + // encrypted. You can encrypt a copy of an unencrypted snapshot, but you cannot + // create an unencrypted copy of an encrypted snapshot. The default CMK for + // EBS is used unless you specify a non-default AWS Key Management Service (AWS + // KMS) CMK using KmsKeyId. For more information, see Amazon EBS Encryption + // (http://docs.aws.amazon.com/AWSEC2/latest/UserGuide/EBSEncryption.html) in + // the Amazon Elastic Compute Cloud User Guide. Encrypted *bool `locationName:"encrypted" type:"boolean"` // An identifier for the AWS Key Management Service (AWS KMS) customer master @@ -27050,12 +27131,11 @@ type CopySnapshotInput struct { DryRun *bool `locationName:"dryRun" type:"boolean"` // Specifies whether the destination snapshot should be encrypted. You can encrypt - // a copy of an unencrypted snapshot using this flag, but you cannot use it - // to create an unencrypted copy from an encrypted snapshot. Your default CMK - // for EBS is used unless a non-default AWS Key Management Service (AWS KMS) - // CMK is specified with KmsKeyId. For more information, see Amazon EBS Encryption - // (http://docs.aws.amazon.com/AWSEC2/latest/UserGuide/EBSEncryption.html) in - // the Amazon Elastic Compute Cloud User Guide. + // a copy of an unencrypted snapshot, but you cannot use it to create an unencrypted + // copy of an encrypted snapshot. Your default CMK for EBS is used unless you + // specify a non-default AWS Key Management Service (AWS KMS) CMK using KmsKeyId. + // For more information, see Amazon EBS Encryption (http://docs.aws.amazon.com/AWSEC2/latest/UserGuide/EBSEncryption.html) + // in the Amazon Elastic Compute Cloud User Guide. Encrypted *bool `locationName:"encrypted" type:"boolean"` // An identifier for the AWS Key Management Service (AWS KMS) customer master @@ -27457,7 +27537,6 @@ func (s *CreateDefaultSubnetOutput) SetSubnet(v *Subnet) *CreateDefaultSubnetOut return s } -// Contains the parameters for CreateDefaultVpc. type CreateDefaultVpcInput struct { _ struct{} `type:"structure"` @@ -27484,7 +27563,6 @@ func (s *CreateDefaultVpcInput) SetDryRun(v bool) *CreateDefaultVpcInput { return s } -// Contains the output of CreateDefaultVpc. type CreateDefaultVpcOutput struct { _ struct{} `type:"structure"` @@ -27508,7 +27586,6 @@ func (s *CreateDefaultVpcOutput) SetVpc(v *Vpc) *CreateDefaultVpcOutput { return s } -// Contains the parameters for CreateDhcpOptions. type CreateDhcpOptionsInput struct { _ struct{} `type:"structure"` @@ -27559,7 +27636,6 @@ func (s *CreateDhcpOptionsInput) SetDryRun(v bool) *CreateDhcpOptionsInput { return s } -// Contains the output of CreateDhcpOptions. type CreateDhcpOptionsOutput struct { _ struct{} `type:"structure"` @@ -27586,8 +27662,8 @@ func (s *CreateDhcpOptionsOutput) SetDhcpOptions(v *DhcpOptions) *CreateDhcpOpti type CreateEgressOnlyInternetGatewayInput struct { _ struct{} `type:"structure"` - // Unique, case-sensitive identifier you provide to ensure the idempotency of - // the request. For more information, see How to Ensure Idempotency (http://docs.aws.amazon.com/AWSEC2/latest/UserGuide/Run_Instance_Idempotency.html). + // Unique, case-sensitive identifier that you provide to ensure the idempotency + // of the request. For more information, see How to Ensure Idempotency (http://docs.aws.amazon.com/AWSEC2/latest/UserGuide/Run_Instance_Idempotency.html). ClientToken *string `type:"string"` // Checks whether you have the required permissions for the action, without @@ -27596,7 +27672,7 @@ type CreateEgressOnlyInternetGatewayInput struct { // it is UnauthorizedOperation. DryRun *bool `type:"boolean"` - // The ID of the VPC for which to create the egress-only Internet gateway. + // The ID of the VPC for which to create the egress-only internet gateway. // // VpcId is a required field VpcId *string `type:"string" required:"true"` @@ -27646,11 +27722,11 @@ func (s *CreateEgressOnlyInternetGatewayInput) SetVpcId(v string) *CreateEgressO type CreateEgressOnlyInternetGatewayOutput struct { _ struct{} `type:"structure"` - // Unique, case-sensitive identifier you provide to ensure the idempotency of - // the request. + // Unique, case-sensitive identifier that you provide to ensure the idempotency + // of the request. ClientToken *string `locationName:"clientToken" type:"string"` - // Information about the egress-only Internet gateway. + // Information about the egress-only internet gateway. EgressOnlyInternetGateway *EgressOnlyInternetGateway `locationName:"egressOnlyInternetGateway" type:"structure"` } @@ -27699,11 +27775,13 @@ type CreateFleetInput struct { // LaunchTemplateConfigs is a required field LaunchTemplateConfigs []*FleetLaunchTemplateConfigRequest `locationNameList:"item" type:"list" required:"true"` + // The allocation strategy of On-Demand Instances in an EC2 Fleet. + OnDemandOptions *OnDemandOptionsRequest `type:"structure"` + // Indicates whether EC2 Fleet should replace unhealthy instances. ReplaceUnhealthyInstances *bool `type:"boolean"` - // Includes SpotAllocationStrategy and SpotInstanceInterruptionBehavior inside - // this structure. + // Describes the configuration of Spot Instances in an EC2 Fleet. SpotOptions *SpotOptionsRequest `type:"structure"` // The key-value pair for tagging the EC2 Fleet request on creation. The value @@ -27807,6 +27885,12 @@ func (s *CreateFleetInput) SetLaunchTemplateConfigs(v []*FleetLaunchTemplateConf return s } +// SetOnDemandOptions sets the OnDemandOptions field's value. +func (s *CreateFleetInput) SetOnDemandOptions(v *OnDemandOptionsRequest) *CreateFleetInput { + s.OnDemandOptions = v + return s +} + // SetReplaceUnhealthyInstances sets the ReplaceUnhealthyInstances field's value. func (s *CreateFleetInput) SetReplaceUnhealthyInstances(v bool) *CreateFleetInput { s.ReplaceUnhealthyInstances = &v @@ -27878,24 +27962,48 @@ func (s *CreateFleetOutput) SetFleetId(v string) *CreateFleetOutput { return s } -// Contains the parameters for CreateFlowLogs. type CreateFlowLogsInput struct { _ struct{} `type:"structure"` - // Unique, case-sensitive identifier you provide to ensure the idempotency of - // the request. For more information, see How to Ensure Idempotency (http://docs.aws.amazon.com/AWSEC2/latest/UserGuide/Run_Instance_Idempotency.html). + // Unique, case-sensitive identifier that you provide to ensure the idempotency + // of the request. For more information, see How to Ensure Idempotency (http://docs.aws.amazon.com/AWSEC2/latest/UserGuide/Run_Instance_Idempotency.html). ClientToken *string `type:"string"` - // The ARN for the IAM role that's used to post flow logs to a CloudWatch Logs - // log group. - // - // DeliverLogsPermissionArn is a required field - DeliverLogsPermissionArn *string `type:"string" required:"true"` + // The ARN for the IAM role that's used to post flow logs to a log group. + DeliverLogsPermissionArn *string `type:"string"` - // The name of the CloudWatch log group. + // Checks whether you have the required permissions for the action, without + // actually making the request, and provides an error response. If you have + // the required permissions, the error response is DryRunOperation. Otherwise, + // it is UnauthorizedOperation. + DryRun *bool `type:"boolean"` + + // Specifies the destination to which the flow log data is to be published. + // Flow log data can be published to an CloudWatch Logs log group or an Amazon + // S3 bucket. The value specified for this parameter depends on the value specified + // for LogDestinationType. // - // LogGroupName is a required field - LogGroupName *string `type:"string" required:"true"` + // If LogDestinationType is not specified or cloud-watch-logs, specify the Amazon + // Resource Name (ARN) of the CloudWatch Logs log group. + // + // If LogDestinationType is s3, specify the ARN of the Amazon S3 bucket. You + // can also specify a subfolder in the bucket. To specify a subfolder in the + // bucket, use the following ARN format: bucket_ARN/subfolder_name/. For example, + // to specify a subfolder named my-logs in a bucket named my-bucket, use the + // following ARN: arn:aws:s3:::my-bucket/my-logs/. You cannot use AWSLogs as + // a subfolder name. This is a reserved term. + LogDestination *string `type:"string"` + + // Specifies the type of destination to which the flow log data is to be published. + // Flow log data can be published to CloudWatch Logs or Amazon S3. To publish + // flow log data to CloudWatch Logs, specify cloud-watch-logs. To publish flow + // log data to Amazon S3, specify s3. + // + // Default: cloud-watch-logs + LogDestinationType *string `type:"string" enum:"LogDestinationType"` + + // The name of the log group. + LogGroupName *string `type:"string"` // One or more subnet, network interface, or VPC IDs. // @@ -27928,12 +28036,6 @@ func (s CreateFlowLogsInput) GoString() string { // Validate inspects the fields of the type to determine if they are valid. func (s *CreateFlowLogsInput) Validate() error { invalidParams := request.ErrInvalidParams{Context: "CreateFlowLogsInput"} - if s.DeliverLogsPermissionArn == nil { - invalidParams.Add(request.NewErrParamRequired("DeliverLogsPermissionArn")) - } - if s.LogGroupName == nil { - invalidParams.Add(request.NewErrParamRequired("LogGroupName")) - } if s.ResourceIds == nil { invalidParams.Add(request.NewErrParamRequired("ResourceIds")) } @@ -27962,6 +28064,24 @@ func (s *CreateFlowLogsInput) SetDeliverLogsPermissionArn(v string) *CreateFlowL return s } +// SetDryRun sets the DryRun field's value. +func (s *CreateFlowLogsInput) SetDryRun(v bool) *CreateFlowLogsInput { + s.DryRun = &v + return s +} + +// SetLogDestination sets the LogDestination field's value. +func (s *CreateFlowLogsInput) SetLogDestination(v string) *CreateFlowLogsInput { + s.LogDestination = &v + return s +} + +// SetLogDestinationType sets the LogDestinationType field's value. +func (s *CreateFlowLogsInput) SetLogDestinationType(v string) *CreateFlowLogsInput { + s.LogDestinationType = &v + return s +} + // SetLogGroupName sets the LogGroupName field's value. func (s *CreateFlowLogsInput) SetLogGroupName(v string) *CreateFlowLogsInput { s.LogGroupName = &v @@ -27986,12 +28106,11 @@ func (s *CreateFlowLogsInput) SetTrafficType(v string) *CreateFlowLogsInput { return s } -// Contains the output of CreateFlowLogs. type CreateFlowLogsOutput struct { _ struct{} `type:"structure"` - // Unique, case-sensitive identifier you provide to ensure the idempotency of - // the request. + // Unique, case-sensitive identifier that you provide to ensure the idempotency + // of the request. ClientToken *string `locationName:"clientToken" type:"string"` // The IDs of the flow logs. @@ -28153,7 +28272,9 @@ func (s *CreateFpgaImageOutput) SetFpgaImageId(v string) *CreateFpgaImageOutput type CreateImageInput struct { _ struct{} `type:"structure"` - // Information about one or more block device mappings. + // Information about one or more block device mappings. This parameter cannot + // be used to modify the encryption status of existing volumes or snapshots. + // To create an AMI with encrypted snapshots, use the CopyImage action. BlockDeviceMappings []*BlockDeviceMapping `locationName:"blockDeviceMapping" locationNameList:"BlockDeviceMapping" type:"list"` // A description for the new image. @@ -28363,7 +28484,6 @@ func (s *CreateInstanceExportTaskOutput) SetExportTask(v *ExportTask) *CreateIns return s } -// Contains the parameters for CreateInternetGateway. type CreateInternetGatewayInput struct { _ struct{} `type:"structure"` @@ -28390,11 +28510,10 @@ func (s *CreateInternetGatewayInput) SetDryRun(v bool) *CreateInternetGatewayInp return s } -// Contains the output of CreateInternetGateway. type CreateInternetGatewayOutput struct { _ struct{} `type:"structure"` - // Information about the Internet gateway. + // Information about the internet gateway. InternetGateway *InternetGateway `locationName:"internetGateway" type:"structure"` } @@ -28414,7 +28533,6 @@ func (s *CreateInternetGatewayOutput) SetInternetGateway(v *InternetGateway) *Cr return s } -// Contains the parameters for CreateKeyPair. type CreateKeyPairInput struct { _ struct{} `type:"structure"` @@ -28754,7 +28872,6 @@ func (s *CreateLaunchTemplateVersionOutput) SetLaunchTemplateVersion(v *LaunchTe return s } -// Contains the parameters for CreateNatGateway. type CreateNatGatewayInput struct { _ struct{} `type:"structure"` @@ -28765,8 +28882,8 @@ type CreateNatGatewayInput struct { // AllocationId is a required field AllocationId *string `type:"string" required:"true"` - // Unique, case-sensitive identifier you provide to ensure the idempotency of - // the request. For more information, see How to Ensure Idempotency (http://docs.aws.amazon.com/AWSEC2/latest/APIReference/Run_Instance_Idempotency.html). + // Unique, case-sensitive identifier that you provide to ensure the idempotency + // of the request. For more information, see How to Ensure Idempotency (http://docs.aws.amazon.com/AWSEC2/latest/APIReference/Run_Instance_Idempotency.html). // // Constraint: Maximum 64 ASCII characters. ClientToken *string `type:"string"` @@ -28821,7 +28938,6 @@ func (s *CreateNatGatewayInput) SetSubnetId(v string) *CreateNatGatewayInput { return s } -// Contains the output of CreateNatGateway. type CreateNatGatewayOutput struct { _ struct{} `type:"structure"` @@ -28855,7 +28971,6 @@ func (s *CreateNatGatewayOutput) SetNatGateway(v *NatGateway) *CreateNatGatewayO return s } -// Contains the parameters for CreateNetworkAclEntry. type CreateNetworkAclEntryInput struct { _ struct{} `type:"structure"` @@ -28891,11 +29006,11 @@ type CreateNetworkAclEntryInput struct { // The protocol. A value of -1 or all means all protocols. If you specify all, // -1, or a protocol number other than 6 (tcp), 17 (udp), or 1 (icmp), traffic - // on all ports is allowed, regardless of any ports or ICMP types or codes you - // specify. If you specify protocol 58 (ICMPv6) and specify an IPv4 CIDR block, - // traffic for all ICMP types and codes allowed, regardless of any that you - // specify. If you specify protocol 58 (ICMPv6) and specify an IPv6 CIDR block, - // you must specify an ICMP type and code. + // on all ports is allowed, regardless of any ports or ICMP types or codes that + // you specify. If you specify protocol 58 (ICMPv6) and specify an IPv4 CIDR + // block, traffic for all ICMP types and codes allowed, regardless of any that + // you specify. If you specify protocol 58 (ICMPv6) and specify an IPv6 CIDR + // block, you must specify an ICMP type and code. // // Protocol is a required field Protocol *string `locationName:"protocol" type:"string" required:"true"` @@ -29024,7 +29139,6 @@ func (s CreateNetworkAclEntryOutput) GoString() string { return s.String() } -// Contains the parameters for CreateNetworkAcl. type CreateNetworkAclInput struct { _ struct{} `type:"structure"` @@ -29075,7 +29189,6 @@ func (s *CreateNetworkAclInput) SetVpcId(v string) *CreateNetworkAclInput { return s } -// Contains the output of CreateNetworkAcl. type CreateNetworkAclOutput struct { _ struct{} `type:"structure"` @@ -29554,7 +29667,6 @@ func (s *CreateReservedInstancesListingOutput) SetReservedInstancesListings(v [] return s } -// Contains the parameters for CreateRoute. type CreateRouteInput struct { _ struct{} `type:"structure"` @@ -29572,10 +29684,10 @@ type CreateRouteInput struct { // it is UnauthorizedOperation. DryRun *bool `locationName:"dryRun" type:"boolean"` - // [IPv6 traffic only] The ID of an egress-only Internet gateway. + // [IPv6 traffic only] The ID of an egress-only internet gateway. EgressOnlyInternetGatewayId *string `locationName:"egressOnlyInternetGatewayId" type:"string"` - // The ID of an Internet gateway or virtual private gateway attached to your + // The ID of an internet gateway or virtual private gateway attached to your // VPC. GatewayId *string `locationName:"gatewayId" type:"string"` @@ -29681,7 +29793,6 @@ func (s *CreateRouteInput) SetVpcPeeringConnectionId(v string) *CreateRouteInput return s } -// Contains the output of CreateRoute. type CreateRouteOutput struct { _ struct{} `type:"structure"` @@ -29705,7 +29816,6 @@ func (s *CreateRouteOutput) SetReturn(v bool) *CreateRouteOutput { return s } -// Contains the parameters for CreateRouteTable. type CreateRouteTableInput struct { _ struct{} `type:"structure"` @@ -29756,7 +29866,6 @@ func (s *CreateRouteTableInput) SetVpcId(v string) *CreateRouteTableInput { return s } -// Contains the output of CreateRouteTable. type CreateRouteTableOutput struct { _ struct{} `type:"structure"` @@ -29780,7 +29889,6 @@ func (s *CreateRouteTableOutput) SetRouteTable(v *RouteTable) *CreateRouteTableO return s } -// Contains the parameters for CreateSecurityGroup. type CreateSecurityGroupInput struct { _ struct{} `type:"structure"` @@ -29866,7 +29974,6 @@ func (s *CreateSecurityGroupInput) SetVpcId(v string) *CreateSecurityGroupInput return s } -// Contains the output of CreateSecurityGroup. type CreateSecurityGroupOutput struct { _ struct{} `type:"structure"` @@ -30043,7 +30150,6 @@ func (s *CreateSpotDatafeedSubscriptionOutput) SetSpotDatafeedSubscription(v *Sp return s } -// Contains the parameters for CreateSubnet. type CreateSubnetInput struct { _ struct{} `type:"structure"` @@ -30130,7 +30236,6 @@ func (s *CreateSubnetInput) SetVpcId(v string) *CreateSubnetInput { return s } -// Contains the output of CreateSubnet. type CreateSubnetOutput struct { _ struct{} `type:"structure"` @@ -30154,7 +30259,6 @@ func (s *CreateSubnetOutput) SetSubnet(v *Subnet) *CreateSubnetOutput { return s } -// Contains the parameters for CreateTags. type CreateTagsInput struct { _ struct{} `type:"structure"` @@ -30628,7 +30732,7 @@ type CreateVpcEndpointInput struct { // true: enableDnsHostnames and enableDnsSupport. Use ModifyVpcAttribute to // set the VPC attributes. // - // Default: true + // Default: false PrivateDnsEnabled *bool `type:"boolean"` // (Gateway endpoint) One or more route table IDs. @@ -30883,7 +30987,6 @@ func (s *CreateVpcEndpointServiceConfigurationOutput) SetServiceConfiguration(v return s } -// Contains the parameters for CreateVpc. type CreateVpcInput struct { _ struct{} `type:"structure"` @@ -30963,7 +31066,6 @@ func (s *CreateVpcInput) SetInstanceTenancy(v string) *CreateVpcInput { return s } -// Contains the output of CreateVpc. type CreateVpcOutput struct { _ struct{} `type:"structure"` @@ -30987,7 +31089,6 @@ func (s *CreateVpcOutput) SetVpc(v *Vpc) *CreateVpcOutput { return s } -// Contains the parameters for CreateVpcPeeringConnection. type CreateVpcPeeringConnectionInput struct { _ struct{} `type:"structure"` @@ -31056,7 +31157,6 @@ func (s *CreateVpcPeeringConnectionInput) SetVpcId(v string) *CreateVpcPeeringCo return s } -// Contains the output of CreateVpcPeeringConnection. type CreateVpcPeeringConnectionOutput struct { _ struct{} `type:"structure"` @@ -31356,11 +31456,12 @@ func (s *CreateVpnGatewayOutput) SetVpnGateway(v *VpnGateway) *CreateVpnGatewayO return s } -// Describes the credit option for CPU usage of a T2 instance. +// Describes the credit option for CPU usage of a T2 or T3 instance. type CreditSpecification struct { _ struct{} `type:"structure"` - // The credit option for CPU usage of a T2 instance. + // The credit option for CPU usage of a T2 or T3 instance. Valid values are + // standard and unlimited. CpuCredits *string `locationName:"cpuCredits" type:"string"` } @@ -31380,12 +31481,12 @@ func (s *CreditSpecification) SetCpuCredits(v string) *CreditSpecification { return s } -// The credit option for CPU usage of a T2 instance. +// The credit option for CPU usage of a T2 or T3 instance. type CreditSpecificationRequest struct { _ struct{} `type:"structure"` - // The credit option for CPU usage of a T2 instance. Valid values are standard - // and unlimited. + // The credit option for CPU usage of a T2 or T3 instance. Valid values are + // standard and unlimited. // // CpuCredits is a required field CpuCredits *string `type:"string" required:"true"` @@ -31556,7 +31657,6 @@ func (s DeleteCustomerGatewayOutput) GoString() string { return s.String() } -// Contains the parameters for DeleteDhcpOptions. type DeleteDhcpOptionsInput struct { _ struct{} `type:"structure"` @@ -31630,7 +31730,7 @@ type DeleteEgressOnlyInternetGatewayInput struct { // it is UnauthorizedOperation. DryRun *bool `type:"boolean"` - // The ID of the egress-only Internet gateway. + // The ID of the egress-only internet gateway. // // EgressOnlyInternetGatewayId is a required field EgressOnlyInternetGatewayId *string `type:"string" required:"true"` @@ -31899,10 +31999,15 @@ func (s *DeleteFleetsOutput) SetUnsuccessfulFleetDeletions(v []*DeleteFleetError return s } -// Contains the parameters for DeleteFlowLogs. type DeleteFlowLogsInput struct { _ struct{} `type:"structure"` + // Checks whether you have the required permissions for the action, without + // actually making the request, and provides an error response. If you have + // the required permissions, the error response is DryRunOperation. Otherwise, + // it is UnauthorizedOperation. + DryRun *bool `type:"boolean"` + // One or more flow log IDs. // // FlowLogIds is a required field @@ -31932,13 +32037,18 @@ func (s *DeleteFlowLogsInput) Validate() error { return nil } +// SetDryRun sets the DryRun field's value. +func (s *DeleteFlowLogsInput) SetDryRun(v bool) *DeleteFlowLogsInput { + s.DryRun = &v + return s +} + // SetFlowLogIds sets the FlowLogIds field's value. func (s *DeleteFlowLogsInput) SetFlowLogIds(v []*string) *DeleteFlowLogsInput { s.FlowLogIds = v return s } -// Contains the output of DeleteFlowLogs. type DeleteFlowLogsOutput struct { _ struct{} `type:"structure"` @@ -32035,7 +32145,6 @@ func (s *DeleteFpgaImageOutput) SetReturn(v bool) *DeleteFpgaImageOutput { return s } -// Contains the parameters for DeleteInternetGateway. type DeleteInternetGatewayInput struct { _ struct{} `type:"structure"` @@ -32045,7 +32154,7 @@ type DeleteInternetGatewayInput struct { // it is UnauthorizedOperation. DryRun *bool `locationName:"dryRun" type:"boolean"` - // The ID of the Internet gateway. + // The ID of the internet gateway. // // InternetGatewayId is a required field InternetGatewayId *string `locationName:"internetGatewayId" type:"string" required:"true"` @@ -32100,7 +32209,6 @@ func (s DeleteInternetGatewayOutput) GoString() string { return s.String() } -// Contains the parameters for DeleteKeyPair. type DeleteKeyPairInput struct { _ struct{} `type:"structure"` @@ -32445,7 +32553,6 @@ func (s *DeleteLaunchTemplateVersionsResponseSuccessItem) SetVersionNumber(v int return s } -// Contains the parameters for DeleteNatGateway. type DeleteNatGatewayInput struct { _ struct{} `type:"structure"` @@ -32484,7 +32591,6 @@ func (s *DeleteNatGatewayInput) SetNatGatewayId(v string) *DeleteNatGatewayInput return s } -// Contains the output of DeleteNatGateway. type DeleteNatGatewayOutput struct { _ struct{} `type:"structure"` @@ -32508,7 +32614,6 @@ func (s *DeleteNatGatewayOutput) SetNatGatewayId(v string) *DeleteNatGatewayOutp return s } -// Contains the parameters for DeleteNetworkAclEntry. type DeleteNetworkAclEntryInput struct { _ struct{} `type:"structure"` @@ -32601,7 +32706,6 @@ func (s DeleteNetworkAclEntryOutput) GoString() string { return s.String() } -// Contains the parameters for DeleteNetworkAcl. type DeleteNetworkAclInput struct { _ struct{} `type:"structure"` @@ -32881,7 +32985,6 @@ func (s DeletePlacementGroupOutput) GoString() string { return s.String() } -// Contains the parameters for DeleteRoute. type DeleteRouteInput struct { _ struct{} `type:"structure"` @@ -32966,7 +33069,6 @@ func (s DeleteRouteOutput) GoString() string { return s.String() } -// Contains the parameters for DeleteRouteTable. type DeleteRouteTableInput struct { _ struct{} `type:"structure"` @@ -33031,7 +33133,6 @@ func (s DeleteRouteTableOutput) GoString() string { return s.String() } -// Contains the parameters for DeleteSecurityGroup. type DeleteSecurityGroupInput struct { _ struct{} `type:"structure"` @@ -33197,7 +33298,6 @@ func (s DeleteSpotDatafeedSubscriptionOutput) GoString() string { return s.String() } -// Contains the parameters for DeleteSubnet. type DeleteSubnetInput struct { _ struct{} `type:"structure"` @@ -33262,7 +33362,6 @@ func (s DeleteSubnetOutput) GoString() string { return s.String() } -// Contains the parameters for DeleteTags. type DeleteTagsInput struct { _ struct{} `type:"structure"` @@ -33629,7 +33728,6 @@ func (s *DeleteVpcEndpointsOutput) SetUnsuccessful(v []*UnsuccessfulItem) *Delet return s } -// Contains the parameters for DeleteVpc. type DeleteVpcInput struct { _ struct{} `type:"structure"` @@ -33694,7 +33792,6 @@ func (s DeleteVpcOutput) GoString() string { return s.String() } -// Contains the parameters for DeleteVpcPeeringConnection. type DeleteVpcPeeringConnectionInput struct { _ struct{} `type:"structure"` @@ -33745,7 +33842,6 @@ func (s *DeleteVpcPeeringConnectionInput) SetVpcPeeringConnectionId(v string) *D return s } -// Contains the output of DeleteVpcPeeringConnection. type DeleteVpcPeeringConnectionOutput struct { _ struct{} `type:"structure"` @@ -34128,10 +34224,11 @@ type DescribeAddressesInput struct { // // * public-ip - The Elastic IP address. // - // * tag:key=value - The key/value combination of a tag assigned to the resource. - // Specify the key of the tag in the filter name and the value of the tag - // in the filter value. For example, for the tag Purpose=X, specify tag:Purpose - // for the filter name and X for the filter value. + // * tag: - The key/value combination of a tag assigned to the resource. + // Use the tag key in the filter name and the tag value as the filter value. + // For example, to find all resources that have a tag with the key Owner + // and the value TeamA, specify tag:Owner for the filter name and TeamA for + // the filter value. // // * tag-key - The key of a tag assigned to the resource. Use this filter // to find all resources assigned a tag with a specific key, regardless of @@ -34434,7 +34531,6 @@ func (s *DescribeBundleTasksOutput) SetBundleTasks(v []*BundleTask) *DescribeBun return s } -// Contains the parameters for DescribeClassicLinkInstances. type DescribeClassicLinkInstancesInput struct { _ struct{} `type:"structure"` @@ -34451,13 +34547,19 @@ type DescribeClassicLinkInstancesInput struct { // // * instance-id - The ID of the instance. // - // * tag:key=value - The key/value combination of a tag assigned to the resource. + // * tag: - The key/value combination of a tag assigned to the resource. + // Use the tag key in the filter name and the tag value as the filter value. + // For example, to find all resources that have a tag with the key Owner + // and the value TeamA, specify tag:Owner for the filter name and TeamA for + // the filter value. // // * tag-key - The key of a tag assigned to the resource. Use this filter // to find all resources assigned a tag with a specific key, regardless of // the tag value. // - // * vpc-id - The ID of the VPC that the instance is linked to. + // * vpc-id - The ID of the VPC to which the instance is linked. + // + // vpc-id - The ID of the VPC that the instance is linked to. Filters []*Filter `locationName:"Filter" locationNameList:"Filter" type:"list"` // One or more instance IDs. Must be instances linked to a VPC through ClassicLink. @@ -34466,7 +34568,7 @@ type DescribeClassicLinkInstancesInput struct { // The maximum number of results to return for the request in a single page. // The remaining results of the initial request can be seen by sending another // request with the returned NextToken value. This value can be between 5 and - // 1000; if MaxResults is given a value larger than 1000, only 1000 results + // 1000. If MaxResults is given a value larger than 1000, only 1000 results // are returned. You cannot specify this parameter and the instance IDs parameter // in the same request. // @@ -34517,7 +34619,6 @@ func (s *DescribeClassicLinkInstancesInput) SetNextToken(v string) *DescribeClas return s } -// Contains the output of DescribeClassicLinkInstances. type DescribeClassicLinkInstancesOutput struct { _ struct{} `type:"structure"` @@ -34642,10 +34743,11 @@ type DescribeCustomerGatewaysInput struct { // * type - The type of customer gateway. Currently, the only supported type // is ipsec.1. // - // * tag:key=value - The key/value combination of a tag assigned to the resource. - // Specify the key of the tag in the filter name and the value of the tag - // in the filter value. For example, for the tag Purpose=X, specify tag:Purpose - // for the filter name and X for the filter value. + // * tag: - The key/value combination of a tag assigned to the resource. + // Use the tag key in the filter name and the tag value as the filter value. + // For example, to find all resources that have a tag with the key Owner + // and the value TeamA, specify tag:Owner for the filter name and TeamA for + // the filter value. // // * tag-key - The key of a tag assigned to the resource. Use this filter // to find all resources assigned a tag with a specific key, regardless of @@ -34705,7 +34807,6 @@ func (s *DescribeCustomerGatewaysOutput) SetCustomerGateways(v []*CustomerGatewa return s } -// Contains the parameters for DescribeDhcpOptions. type DescribeDhcpOptionsInput struct { _ struct{} `type:"structure"` @@ -34728,10 +34829,11 @@ type DescribeDhcpOptionsInput struct { // // * value - The value for one of the options. // - // * tag:key=value - The key/value combination of a tag assigned to the resource. - // Specify the key of the tag in the filter name and the value of the tag - // in the filter value. For example, for the tag Purpose=X, specify tag:Purpose - // for the filter name and X for the filter value. + // * tag: - The key/value combination of a tag assigned to the resource. + // Use the tag key in the filter name and the tag value as the filter value. + // For example, to find all resources that have a tag with the key Owner + // and the value TeamA, specify tag:Owner for the filter name and TeamA for + // the filter value. // // * tag-key - The key of a tag assigned to the resource. Use this filter // to find all resources assigned a tag with a specific key, regardless of @@ -34767,7 +34869,6 @@ func (s *DescribeDhcpOptionsInput) SetFilters(v []*Filter) *DescribeDhcpOptionsI return s } -// Contains the output of DescribeDhcpOptions. type DescribeDhcpOptionsOutput struct { _ struct{} `type:"structure"` @@ -34800,12 +34901,12 @@ type DescribeEgressOnlyInternetGatewaysInput struct { // it is UnauthorizedOperation. DryRun *bool `type:"boolean"` - // One or more egress-only Internet gateway IDs. + // One or more egress-only internet gateway IDs. EgressOnlyInternetGatewayIds []*string `locationName:"EgressOnlyInternetGatewayId" locationNameList:"item" type:"list"` // The maximum number of results to return for the request in a single page. // The remaining results can be seen by sending another request with the returned - // NextToken value. This value can be between 5 and 1000; if MaxResults is given + // NextToken value. This value can be between 5 and 1000. If MaxResults is given // a value larger than 1000, only 1000 results are returned. MaxResults *int64 `type:"integer"` @@ -34850,7 +34951,7 @@ func (s *DescribeEgressOnlyInternetGatewaysInput) SetNextToken(v string) *Descri type DescribeEgressOnlyInternetGatewaysOutput struct { _ struct{} `type:"structure"` - // Information about the egress-only Internet gateways. + // Information about the egress-only internet gateways. EgressOnlyInternetGateways []*EgressOnlyInternetGateway `locationName:"egressOnlyInternetGatewaySet" locationNameList:"item" type:"list"` // The token to use to retrieve the next page of results. @@ -35434,21 +35535,30 @@ func (s *DescribeFleetsOutput) SetNextToken(v string) *DescribeFleetsOutput { return s } -// Contains the parameters for DescribeFlowLogs. type DescribeFlowLogsInput struct { _ struct{} `type:"structure"` + // Checks whether you have the required permissions for the action, without + // actually making the request, and provides an error response. If you have + // the required permissions, the error response is DryRunOperation. Otherwise, + // it is UnauthorizedOperation. + DryRun *bool `type:"boolean"` + // One or more filters. // // * deliver-log-status - The status of the logs delivery (SUCCESS | FAILED). // + // * log-destination-type - The type of destination to which the flow log + // publishes data. Possible destination types include cloud-watch-logs and + // S3. + // // * flow-log-id - The ID of the flow log. // // * log-group-name - The name of the log group. // // * resource-id - The ID of the VPC, subnet, or network interface. // - // * traffic-type - The type of traffic (ACCEPT | REJECT | ALL) + // * traffic-type - The type of traffic (ACCEPT | REJECT | ALL). Filter []*Filter `locationNameList:"Filter" type:"list"` // One or more flow log IDs. @@ -35456,7 +35566,7 @@ type DescribeFlowLogsInput struct { // The maximum number of results to return for the request in a single page. // The remaining results can be seen by sending another request with the returned - // NextToken value. This value can be between 5 and 1000; if MaxResults is given + // NextToken value. This value can be between 5 and 1000. If MaxResults is given // a value larger than 1000, only 1000 results are returned. You cannot specify // this parameter and the flow log IDs parameter in the same request. MaxResults *int64 `type:"integer"` @@ -35475,6 +35585,12 @@ func (s DescribeFlowLogsInput) GoString() string { return s.String() } +// SetDryRun sets the DryRun field's value. +func (s *DescribeFlowLogsInput) SetDryRun(v bool) *DescribeFlowLogsInput { + s.DryRun = &v + return s +} + // SetFilter sets the Filter field's value. func (s *DescribeFlowLogsInput) SetFilter(v []*Filter) *DescribeFlowLogsInput { s.Filter = v @@ -35499,7 +35615,6 @@ func (s *DescribeFlowLogsInput) SetNextToken(v string) *DescribeFlowLogsInput { return s } -// Contains the output of DescribeFlowLogs. type DescribeFlowLogsOutput struct { _ struct{} `type:"structure"` @@ -35648,10 +35763,11 @@ type DescribeFpgaImagesInput struct { // // * state - The state of the AFI (pending | failed | available | unavailable). // - // * tag:key=value - The key/value combination of a tag assigned to the resource. - // Specify the key of the tag in the filter name and the value of the tag - // in the filter value. For example, for the tag Purpose=X, specify tag:Purpose - // for the filter name and X for the filter value. + // * tag: - The key/value combination of a tag assigned to the resource. + // Use the tag key in the filter name and the tag value as the filter value. + // For example, to find all resources that have a tag with the key Owner + // and the value TeamA, specify tag:Owner for the filter name and TeamA for + // the filter value. // // * tag-key - The key of a tag assigned to the resource. Use this filter // to find all resources assigned a tag with a specific key, regardless of @@ -35774,22 +35890,23 @@ type DescribeHostReservationOfferingsInput struct { // One or more filters. // - // * instance-family - The instance family of the offering (e.g., m4). + // * instance-family - The instance family of the offering (for example, + // m4). // // * payment-option - The payment option (NoUpfront | PartialUpfront | AllUpfront). Filter []*Filter `locationNameList:"Filter" type:"list"` - // This is the maximum duration of the reservation you'd like to purchase, specified - // in seconds. Reservations are available in one-year and three-year terms. - // The number of seconds specified must be the number of seconds in a year (365x24x60x60) + // This is the maximum duration of the reservation to purchase, specified in + // seconds. Reservations are available in one-year and three-year terms. The + // number of seconds specified must be the number of seconds in a year (365x24x60x60) // times one of the supported durations (1 or 3). For example, specify 94608000 // for three years. MaxDuration *int64 `type:"integer"` // The maximum number of results to return for the request in a single page. // The remaining results can be seen by sending another request with the returned - // nextToken value. This value can be between 5 and 500; if maxResults is given - // a larger value than 500, you will receive an error. + // nextToken value. This value can be between 5 and 500. If maxResults is given + // a larger value than 500, you receive an error. MaxResults *int64 `type:"integer"` // This is the minimum duration of the reservation you'd like to purchase, specified @@ -35890,7 +36007,7 @@ type DescribeHostReservationsInput struct { // One or more filters. // - // * instance-family - The instance family (e.g., m4). + // * instance-family - The instance family (for example, m4). // // * payment-option - The payment option (NoUpfront | PartialUpfront | AllUpfront). // @@ -35903,8 +36020,8 @@ type DescribeHostReservationsInput struct { // The maximum number of results to return for the request in a single page. // The remaining results can be seen by sending another request with the returned - // nextToken value. This value can be between 5 and 500; if maxResults is given - // a larger value than 500, you will receive an error. + // nextToken value. This value can be between 5 and 500. If maxResults is given + // a larger value than 500, you receive an error. MaxResults *int64 `type:"integer"` // The token to use to retrieve the next page of results. @@ -35978,7 +36095,6 @@ func (s *DescribeHostReservationsOutput) SetNextToken(v string) *DescribeHostRes return s } -// Contains the parameters for DescribeHosts. type DescribeHostsInput struct { _ struct{} `type:"structure"` @@ -35989,7 +36105,7 @@ type DescribeHostsInput struct { // // * availability-zone - The Availability Zone of the host. // - // * client-token - The idempotency token you provided when you allocated + // * client-token - The idempotency token that you provided when you allocated // the host. // // * host-reservation-id - The ID of the reservation assigned to this host. @@ -36010,9 +36126,9 @@ type DescribeHostsInput struct { // The maximum number of results to return for the request in a single page. // The remaining results can be seen by sending another request with the returned - // nextToken value. This value can be between 5 and 500; if maxResults is given - // a larger value than 500, you will receive an error. You cannot specify this - // parameter and the host IDs parameter in the same request. + // nextToken value. This value can be between 5 and 500. If maxResults is given + // a larger value than 500, you receive an error. You cannot specify this parameter + // and the host IDs parameter in the same request. MaxResults *int64 `locationName:"maxResults" type:"integer"` // The token to retrieve the next page of results. @@ -36053,7 +36169,6 @@ func (s *DescribeHostsInput) SetNextToken(v string) *DescribeHostsInput { return s } -// Contains the output of DescribeHosts. type DescribeHostsOutput struct { _ struct{} `type:"structure"` @@ -36562,10 +36677,11 @@ type DescribeImagesInput struct { // * sriov-net-support - A value of simple indicates that enhanced networking // with the Intel 82599 VF interface is enabled. // - // * tag:key=value - The key/value combination of a tag assigned to the resource. - // Specify the key of the tag in the filter name and the value of the tag - // in the filter value. For example, for the tag Purpose=X, specify tag:Purpose - // for the filter name and X for the filter value. + // * tag: - The key/value combination of a tag assigned to the resource. + // Use the tag key in the filter name and the tag value as the filter value. + // For example, to find all resources that have a tag with the key Owner + // and the value TeamA, specify tag:Owner for the filter name and TeamA for + // the filter value. // // * tag-key - The key of a tag assigned to the resource. Use this filter // to find all resources assigned a tag with a specific key, regardless of @@ -37201,7 +37317,7 @@ type DescribeInstanceStatusInput struct { // example, 2014-09-15T17:15:20.000Z). // // * instance-state-code - The code for the instance state, as a 16-bit unsigned - // integer. The high byte is an opaque internal value and should be ignored. + // integer. The high byte is used for internal purposes and should be ignored. // The low byte is set based on the state represented. The valid values are // 0 (pending), 16 (running), 32 (shutting-down), 48 (terminated), 64 (stopping), // and 80 (stopped). @@ -37385,7 +37501,7 @@ type DescribeInstancesInput struct { // Scheduled Instance (spot | scheduled). // // * instance-state-code - The state of the instance, as a 16-bit unsigned - // integer. The high byte is an opaque internal value and should be ignored. + // integer. The high byte is used for internal purposes and should be ignored. // The low byte is set based on the state represented. The valid values are: // 0 (pending), 16 (running), 32 (shutting-down), 48 (terminated), 64 (stopping), // and 80 (stopped). @@ -37552,14 +37668,15 @@ type DescribeInstancesInput struct { // // * subnet-id - The ID of the subnet for the instance. // - // * tag:key=value - The key/value combination of a tag assigned to the resource. - // Specify the key of the tag in the filter name and the value of the tag - // in the filter value. For example, for the tag Purpose=X, specify tag:Purpose - // for the filter name and X for the filter value. + // * tag: - The key/value combination of a tag assigned to the resource. + // Use the tag key in the filter name and the tag value as the filter value. + // For example, to find all resources that have a tag with the key Owner + // and the value TeamA, specify tag:Owner for the filter name and TeamA for + // the filter value. // // * tag-key - The key of a tag assigned to the resource. Use this filter - // to find all resources assigned a tag with a specific key, regardless of - // the tag value. + // to find all resources that have a tag with a specific key, regardless + // of the tag value. // // * tenancy - The tenancy of an instance (dedicated | default | host). // @@ -37658,7 +37775,6 @@ func (s *DescribeInstancesOutput) SetReservations(v []*Reservation) *DescribeIns return s } -// Contains the parameters for DescribeInternetGateways. type DescribeInternetGatewaysInput struct { _ struct{} `type:"structure"` @@ -37677,19 +37793,20 @@ type DescribeInternetGatewaysInput struct { // // * internet-gateway-id - The ID of the Internet gateway. // - // * tag:key=value - The key/value combination of a tag assigned to the resource. - // Specify the key of the tag in the filter name and the value of the tag - // in the filter value. For example, for the tag Purpose=X, specify tag:Purpose - // for the filter name and X for the filter value. + // * tag: - The key/value combination of a tag assigned to the resource. + // Use the tag key in the filter name and the tag value as the filter value. + // For example, to find all resources that have a tag with the key Owner + // and the value TeamA, specify tag:Owner for the filter name and TeamA for + // the filter value. // // * tag-key - The key of a tag assigned to the resource. Use this filter // to find all resources assigned a tag with a specific key, regardless of // the tag value. Filters []*Filter `locationName:"Filter" locationNameList:"Filter" type:"list"` - // One or more Internet gateway IDs. + // One or more internet gateway IDs. // - // Default: Describes all your Internet gateways. + // Default: Describes all your internet gateways. InternetGatewayIds []*string `locationName:"internetGatewayId" locationNameList:"item" type:"list"` } @@ -37721,11 +37838,10 @@ func (s *DescribeInternetGatewaysInput) SetInternetGatewayIds(v []*string) *Desc return s } -// Contains the output of DescribeInternetGateways. type DescribeInternetGatewaysOutput struct { _ struct{} `type:"structure"` - // Information about one or more Internet gateways. + // Information about one or more internet gateways. InternetGateways []*InternetGateway `locationName:"internetGatewaySet" locationNameList:"item" type:"list"` } @@ -37745,7 +37861,6 @@ func (s *DescribeInternetGatewaysOutput) SetInternetGateways(v []*InternetGatewa return s } -// Contains the parameters for DescribeKeyPairs. type DescribeKeyPairsInput struct { _ struct{} `type:"structure"` @@ -37796,7 +37911,6 @@ func (s *DescribeKeyPairsInput) SetKeyNames(v []*string) *DescribeKeyPairsInput return s } -// Contains the output of DescribeKeyPairs. type DescribeKeyPairsOutput struct { _ struct{} `type:"structure"` @@ -38001,10 +38115,11 @@ type DescribeLaunchTemplatesInput struct { // // * launch-template-name - The name of the launch template. // - // * tag:key=value - The key/value combination of a tag assigned to the resource. - // Specify the key of the tag in the filter name and the value of the tag - // in the filter value. For example, for the tag Purpose=X, specify tag:Purpose - // for the filter name and X for the filter value. + // * tag: - The key/value combination of a tag assigned to the resource. + // Use the tag key in the filter name and the tag value as the filter value. + // For example, to find all resources that have a tag with the key Owner + // and the value TeamA, specify tag:Owner for the filter name and TeamA for + // the filter value. // // * tag-key - The key of a tag assigned to the resource. Use this filter // to find all resources assigned a tag with a specific key, regardless of @@ -38210,7 +38325,6 @@ func (s *DescribeMovingAddressesOutput) SetNextToken(v string) *DescribeMovingAd return s } -// Contains the parameters for DescribeNatGateways. type DescribeNatGatewaysInput struct { _ struct{} `type:"structure"` @@ -38223,10 +38337,11 @@ type DescribeNatGatewaysInput struct { // // * subnet-id - The ID of the subnet in which the NAT gateway resides. // - // * tag:key=value - The key/value combination of a tag assigned to the resource. - // Specify the key of the tag in the filter name and the value of the tag - // in the filter value. For example, for the tag Purpose=X, specify tag:Purpose - // for the filter name and X for the filter value. + // * tag: - The key/value combination of a tag assigned to the resource. + // Use the tag key in the filter name and the tag value as the filter value. + // For example, to find all resources that have a tag with the key Owner + // and the value TeamA, specify tag:Owner for the filter name and TeamA for + // the filter value. // // * tag-key - The key of a tag assigned to the resource. Use this filter // to find all resources assigned a tag with a specific key, regardless of @@ -38284,7 +38399,6 @@ func (s *DescribeNatGatewaysInput) SetNextToken(v string) *DescribeNatGatewaysIn return s } -// Contains the output of DescribeNatGateways. type DescribeNatGatewaysOutput struct { _ struct{} `type:"structure"` @@ -38318,7 +38432,6 @@ func (s *DescribeNatGatewaysOutput) SetNextToken(v string) *DescribeNatGatewaysO return s } -// Contains the parameters for DescribeNetworkAcls. type DescribeNetworkAclsInput struct { _ struct{} `type:"structure"` @@ -38342,8 +38455,6 @@ type DescribeNetworkAclsInput struct { // // * entry.cidr - The IPv4 CIDR range specified in the entry. // - // * entry.egress - Indicates whether the entry applies to egress traffic. - // // * entry.icmp.code - The ICMP code specified in the entry, if any. // // * entry.icmp.type - The ICMP type specified in the entry, if any. @@ -38362,14 +38473,15 @@ type DescribeNetworkAclsInput struct { // * entry.rule-action - Allows or denies the matching traffic (allow | deny). // // * entry.rule-number - The number of an entry (in other words, rule) in - // the ACL's set of entries. + // the set of ACL entries. // // * network-acl-id - The ID of the network ACL. // - // * tag:key=value - The key/value combination of a tag assigned to the resource. - // Specify the key of the tag in the filter name and the value of the tag - // in the filter value. For example, for the tag Purpose=X, specify tag:Purpose - // for the filter name and X for the filter value. + // * tag: - The key/value combination of a tag assigned to the resource. + // Use the tag key in the filter name and the tag value as the filter value. + // For example, to find all resources that have a tag with the key Owner + // and the value TeamA, specify tag:Owner for the filter name and TeamA for + // the filter value. // // * tag-key - The key of a tag assigned to the resource. Use this filter // to find all resources assigned a tag with a specific key, regardless of @@ -38412,7 +38524,6 @@ func (s *DescribeNetworkAclsInput) SetNetworkAclIds(v []*string) *DescribeNetwor return s } -// Contains the output of DescribeNetworkAcls. type DescribeNetworkAclsOutput struct { _ struct{} `type:"structure"` @@ -38759,10 +38870,11 @@ type DescribeNetworkInterfacesInput struct { // // * subnet-id - The ID of the subnet for the network interface. // - // * tag:key=value - The key/value combination of a tag assigned to the resource. - // Specify the key of the tag in the filter name and the value of the tag - // in the filter value. For example, for the tag Purpose=X, specify tag:Purpose - // for the filter name and X for the filter value. + // * tag: - The key/value combination of a tag assigned to the resource. + // Use the tag key in the filter name and the tag value as the filter value. + // For example, to find all resources that have a tag with the key Owner + // and the value TeamA, specify tag:Owner for the filter name and TeamA for + // the filter value. // // * tag-key - The key of a tag assigned to the resource. Use this filter // to find all resources assigned a tag with a specific key, regardless of @@ -38771,10 +38883,18 @@ type DescribeNetworkInterfacesInput struct { // * vpc-id - The ID of the VPC for the network interface. Filters []*Filter `locationName:"filter" locationNameList:"Filter" type:"list"` + // The maximum number of items to return for this request. The request returns + // a token that you can specify in a subsequent call to get the next set of + // results. + MaxResults *int64 `type:"integer"` + // One or more network interface IDs. // // Default: Describes all your network interfaces. NetworkInterfaceIds []*string `locationName:"NetworkInterfaceId" locationNameList:"item" type:"list"` + + // The token to retrieve the next page of results. + NextToken *string `type:"string"` } // String returns the string representation @@ -38799,18 +38919,34 @@ func (s *DescribeNetworkInterfacesInput) SetFilters(v []*Filter) *DescribeNetwor return s } +// SetMaxResults sets the MaxResults field's value. +func (s *DescribeNetworkInterfacesInput) SetMaxResults(v int64) *DescribeNetworkInterfacesInput { + s.MaxResults = &v + return s +} + // SetNetworkInterfaceIds sets the NetworkInterfaceIds field's value. func (s *DescribeNetworkInterfacesInput) SetNetworkInterfaceIds(v []*string) *DescribeNetworkInterfacesInput { s.NetworkInterfaceIds = v return s } +// SetNextToken sets the NextToken field's value. +func (s *DescribeNetworkInterfacesInput) SetNextToken(v string) *DescribeNetworkInterfacesInput { + s.NextToken = &v + return s +} + // Contains the output of DescribeNetworkInterfaces. type DescribeNetworkInterfacesOutput struct { _ struct{} `type:"structure"` // Information about one or more network interfaces. NetworkInterfaces []*NetworkInterface `locationName:"networkInterfaceSet" locationNameList:"item" type:"list"` + + // The token to use to retrieve the next page of results. This value is null + // when there are no more results to return. + NextToken *string `locationName:"nextToken" type:"string"` } // String returns the string representation @@ -38829,6 +38965,12 @@ func (s *DescribeNetworkInterfacesOutput) SetNetworkInterfaces(v []*NetworkInter return s } +// SetNextToken sets the NextToken field's value. +func (s *DescribeNetworkInterfacesOutput) SetNextToken(v string) *DescribeNetworkInterfacesOutput { + s.NextToken = &v + return s +} + // Contains the parameters for DescribePlacementGroups. type DescribePlacementGroupsInput struct { _ struct{} `type:"structure"` @@ -38907,7 +39049,6 @@ func (s *DescribePlacementGroupsOutput) SetPlacementGroups(v []*PlacementGroup) return s } -// Contains the parameters for DescribePrefixLists. type DescribePrefixListsInput struct { _ struct{} `type:"structure"` @@ -38980,7 +39121,6 @@ func (s *DescribePrefixListsInput) SetPrefixListIds(v []*string) *DescribePrefix return s } -// Contains the output of DescribePrefixLists. type DescribePrefixListsOutput struct { _ struct{} `type:"structure"` @@ -39225,10 +39365,11 @@ type DescribeReservedInstancesInput struct { // * state - The state of the Reserved Instance (payment-pending | active // | payment-failed | retired). // - // * tag:key=value - The key/value combination of a tag assigned to the resource. - // Specify the key of the tag in the filter name and the value of the tag - // in the filter value. For example, for the tag Purpose=X, specify tag:Purpose - // for the filter name and X for the filter value. + // * tag: - The key/value combination of a tag assigned to the resource. + // Use the tag key in the filter name and the tag value as the filter value. + // For example, to find all resources that have a tag with the key Owner + // and the value TeamA, specify tag:Owner for the filter name and TeamA for + // the filter value. // // * tag-key - The key of a tag assigned to the resource. Use this filter // to find all resources assigned a tag with a specific key, regardless of @@ -39743,7 +39884,6 @@ func (s *DescribeReservedInstancesOutput) SetReservedInstances(v []*ReservedInst return s } -// Contains the parameters for DescribeRouteTables. type DescribeRouteTablesInput struct { _ struct{} `type:"structure"` @@ -39802,10 +39942,11 @@ type DescribeRouteTablesInput struct { // * route.vpc-peering-connection-id - The ID of a VPC peering connection // specified in a route in the table. // - // * tag:key=value - The key/value combination of a tag assigned to the resource. - // Specify the key of the tag in the filter name and the value of the tag - // in the filter value. For example, for the tag Purpose=X, specify tag:Purpose - // for the filter name and X for the filter value. + // * tag: - The key/value combination of a tag assigned to the resource. + // Use the tag key in the filter name and the tag value as the filter value. + // For example, to find all resources that have a tag with the key Owner + // and the value TeamA, specify tag:Owner for the filter name and TeamA for + // the filter value. // // * tag-key - The key of a tag assigned to the resource. Use this filter // to find all resources assigned a tag with a specific key, regardless of @@ -39814,6 +39955,14 @@ type DescribeRouteTablesInput struct { // * vpc-id - The ID of the VPC for the route table. Filters []*Filter `locationName:"Filter" locationNameList:"Filter" type:"list"` + // The maximum number of results to return in a single call. To retrieve the + // remaining results, make another call with the returned NextToken value. This + // value can be between 5 and 100. + MaxResults *int64 `type:"integer"` + + // The token to retrieve the next page of results. + NextToken *string `type:"string"` + // One or more route table IDs. // // Default: Describes all your route tables. @@ -39842,6 +39991,18 @@ func (s *DescribeRouteTablesInput) SetFilters(v []*Filter) *DescribeRouteTablesI return s } +// SetMaxResults sets the MaxResults field's value. +func (s *DescribeRouteTablesInput) SetMaxResults(v int64) *DescribeRouteTablesInput { + s.MaxResults = &v + return s +} + +// SetNextToken sets the NextToken field's value. +func (s *DescribeRouteTablesInput) SetNextToken(v string) *DescribeRouteTablesInput { + s.NextToken = &v + return s +} + // SetRouteTableIds sets the RouteTableIds field's value. func (s *DescribeRouteTablesInput) SetRouteTableIds(v []*string) *DescribeRouteTablesInput { s.RouteTableIds = v @@ -39852,6 +40013,10 @@ func (s *DescribeRouteTablesInput) SetRouteTableIds(v []*string) *DescribeRouteT type DescribeRouteTablesOutput struct { _ struct{} `type:"structure"` + // The token to use to retrieve the next page of results. This value is null + // when there are no more results to return. + NextToken *string `locationName:"nextToken" type:"string"` + // Information about one or more route tables. RouteTables []*RouteTable `locationName:"routeTableSet" locationNameList:"item" type:"list"` } @@ -39866,6 +40031,12 @@ func (s DescribeRouteTablesOutput) GoString() string { return s.String() } +// SetNextToken sets the NextToken field's value. +func (s *DescribeRouteTablesOutput) SetNextToken(v string) *DescribeRouteTablesOutput { + s.NextToken = &v + return s +} + // SetRouteTables sets the RouteTables field's value. func (s *DescribeRouteTablesOutput) SetRouteTables(v []*RouteTable) *DescribeRouteTablesOutput { s.RouteTables = v @@ -40154,7 +40325,7 @@ func (s *DescribeScheduledInstancesOutput) SetScheduledInstanceSet(v []*Schedule type DescribeSecurityGroupReferencesInput struct { _ struct{} `type:"structure"` - // Checks whether you have the required permissions for the operation, without + // Checks whether you have the required permissions for the action, without // actually making the request, and provides an error response. If you have // the required permissions, the error response is DryRunOperation. Otherwise, // it is UnauthorizedOperation. @@ -40224,7 +40395,6 @@ func (s *DescribeSecurityGroupReferencesOutput) SetSecurityGroupReferenceSet(v [ return s } -// Contains the parameters for DescribeSecurityGroups. type DescribeSecurityGroupsInput struct { _ struct{} `type:"structure"` @@ -40300,6 +40470,12 @@ type DescribeSecurityGroupsInput struct { // // * owner-id - The AWS account ID of the owner of the security group. // + // * tag: - The key/value combination of a tag assigned to the resource. + // Use the tag key in the filter name and the tag value as the filter value. + // For example, to find all resources that have a tag with the key Owner + // and the value TeamA, specify tag:Owner for the filter name and TeamA for + // the filter value. + // // * tag-key - The key of a tag assigned to the resource. Use this filter // to find all resources assigned a tag with a specific key, regardless of // the tag value. @@ -40377,7 +40553,6 @@ func (s *DescribeSecurityGroupsInput) SetNextToken(v string) *DescribeSecurityGr return s } -// Contains the output of DescribeSecurityGroups. type DescribeSecurityGroupsOutput struct { _ struct{} `type:"structure"` @@ -40547,10 +40722,11 @@ type DescribeSnapshotsInput struct { // // * status - The status of the snapshot (pending | completed | error). // - // * tag:key=value - The key/value combination of a tag assigned to the resource. - // Specify the key of the tag in the filter name and the value of the tag - // in the filter value. For example, for the tag Purpose=X, specify tag:Purpose - // for the filter name and X for the filter value. + // * tag: - The key/value combination of a tag assigned to the resource. + // Use the tag key in the filter name and the tag value as the filter value. + // For example, to find all resources that have a tag with the key Owner + // and the value TeamA, specify tag:Owner for the filter name and TeamA for + // the filter value. // // * tag-key - The key of a tag assigned to the resource. Use this filter // to find all resources assigned a tag with a specific key, regardless of @@ -41209,10 +41385,11 @@ type DescribeSpotInstanceRequestsInput struct { // * status-message - The message explaining the status of the Spot Instance // request. // - // * tag:key=value - The key/value combination of a tag assigned to the resource. - // Specify the key of the tag in the filter name and the value of the tag - // in the filter value. For example, for the tag Purpose=X, specify tag:Purpose - // for the filter name and X for the filter value. + // * tag: - The key/value combination of a tag assigned to the resource. + // Use the tag key in the filter name and the tag value as the filter value. + // For example, to find all resources that have a tag with the key Owner + // and the value TeamA, specify tag:Owner for the filter name and TeamA for + // the filter value. // // * tag-key - The key of a tag assigned to the resource. Use this filter // to find all resources assigned a tag with a specific key, regardless of @@ -41437,7 +41614,7 @@ func (s *DescribeSpotPriceHistoryOutput) SetSpotPriceHistory(v []*SpotPrice) *De type DescribeStaleSecurityGroupsInput struct { _ struct{} `type:"structure"` - // Checks whether you have the required permissions for the operation, without + // Checks whether you have the required permissions for the action, without // actually making the request, and provides an error response. If you have // the required permissions, the error response is DryRunOperation. Otherwise, // it is UnauthorizedOperation. @@ -41544,7 +41721,6 @@ func (s *DescribeStaleSecurityGroupsOutput) SetStaleSecurityGroupSet(v []*StaleS return s } -// Contains the parameters for DescribeSubnets. type DescribeSubnetsInput struct { _ struct{} `type:"structure"` @@ -41582,10 +41758,11 @@ type DescribeSubnetsInput struct { // // * subnet-id - The ID of the subnet. // - // * tag:key=value - The key/value combination of a tag assigned to the resource. - // Specify the key of the tag in the filter name and the value of the tag - // in the filter value. For example, for the tag Purpose=X, specify tag:Purpose - // for the filter name and X for the filter value. + // * tag: - The key/value combination of a tag assigned to the resource. + // Use the tag key in the filter name and the tag value as the filter value. + // For example, to find all resources that have a tag with the key Owner + // and the value TeamA, specify tag:Owner for the filter name and TeamA for + // the filter value. // // * tag-key - The key of a tag assigned to the resource. Use this filter // to find all resources assigned a tag with a specific key, regardless of @@ -41628,7 +41805,6 @@ func (s *DescribeSubnetsInput) SetSubnetIds(v []*string) *DescribeSubnetsInput { return s } -// Contains the output of DescribeSubnets. type DescribeSubnetsOutput struct { _ struct{} `type:"structure"` @@ -41652,7 +41828,6 @@ func (s *DescribeSubnetsOutput) SetSubnets(v []*Subnet) *DescribeSubnetsOutput { return s } -// Contains the parameters for DescribeTags. type DescribeTagsInput struct { _ struct{} `type:"structure"` @@ -41666,13 +41841,17 @@ type DescribeTagsInput struct { // // * key - The tag key. // - // * resource-id - The resource ID. + // * resource-id - The ID of the resource. // - // * resource-type - The resource type (customer-gateway | dhcp-options | - // elastic-ip | fleet | fpga-image | image | instance | internet-gateway - // | launch-template | natgateway | network-acl | network-interface | reserved-instances - // | route-table | security-group | snapshot | spot-instances-request | subnet - // | volume | vpc | vpc-peering-connection | vpn-connection | vpn-gateway). + // * resource-type - The resource type (customer-gateway | dedicated-host + // | dhcp-options | elastic-ip | fleet | fpga-image | image | instance | + // internet-gateway | launch-template | natgateway | network-acl | network-interface + // | reserved-instances | route-table | security-group | snapshot | spot-instances-request + // | subnet | volume | vpc | vpc-peering-connection | vpn-connection | vpn-gateway). + // + // * tag: - The key/value combination of the tag. For example, specify + // "tag:Owner" for the filter name and "TeamA" for the filter value to find + // resources with the tag "Owner=TeamA". // // * value - The tag value. Filters []*Filter `locationName:"Filter" locationNameList:"Filter" type:"list"` @@ -41720,15 +41899,14 @@ func (s *DescribeTagsInput) SetNextToken(v string) *DescribeTagsInput { return s } -// Contains the output of DescribeTags. type DescribeTagsOutput struct { _ struct{} `type:"structure"` // The token to use to retrieve the next page of results. This value is null - // when there are no more results to return.. + // when there are no more results to return. NextToken *string `locationName:"nextToken" type:"string"` - // A list of tags. + // The tags. Tags []*TagDescription `locationName:"tagSet" locationNameList:"item" type:"list"` } @@ -41759,7 +41937,9 @@ type DescribeVolumeAttributeInput struct { _ struct{} `type:"structure"` // The attribute of the volume. This parameter is required. - Attribute *string `type:"string" enum:"VolumeAttributeName"` + // + // Attribute is a required field + Attribute *string `type:"string" required:"true" enum:"VolumeAttributeName"` // Checks whether you have the required permissions for the action, without // actually making the request, and provides an error response. If you have @@ -41786,6 +41966,9 @@ func (s DescribeVolumeAttributeInput) GoString() string { // Validate inspects the fields of the type to determine if they are valid. func (s *DescribeVolumeAttributeInput) Validate() error { invalidParams := request.ErrInvalidParams{Context: "DescribeVolumeAttributeInput"} + if s.Attribute == nil { + invalidParams.Add(request.NewErrParamRequired("Attribute")) + } if s.VolumeId == nil { invalidParams.Add(request.NewErrParamRequired("VolumeId")) } @@ -42033,10 +42216,11 @@ type DescribeVolumesInput struct { // * status - The status of the volume (creating | available | in-use | deleting // | deleted | error). // - // * tag:key=value - The key/value combination of a tag assigned to the resource. - // Specify the key of the tag in the filter name and the value of the tag - // in the filter value. For example, for the tag Purpose=X, specify tag:Purpose - // for the filter name and X for the filter value. + // * tag: - The key/value combination of a tag assigned to the resource. + // Use the tag key in the filter name and the tag value as the filter value. + // For example, to find all resources that have a tag with the key Owner + // and the value TeamA, specify tag:Owner for the filter name and TeamA for + // the filter value. // // * tag-key - The key of a tag assigned to the resource. Use this filter // to find all resources assigned a tag with a specific key, regardless of @@ -42243,7 +42427,6 @@ func (s *DescribeVolumesOutput) SetVolumes(v []*Volume) *DescribeVolumesOutput { return s } -// Contains the parameters for DescribeVpcAttribute. type DescribeVpcAttributeInput struct { _ struct{} `type:"structure"` @@ -42308,7 +42491,6 @@ func (s *DescribeVpcAttributeInput) SetVpcId(v string) *DescribeVpcAttributeInpu return s } -// Contains the output of DescribeVpcAttribute. type DescribeVpcAttributeOutput struct { _ struct{} `type:"structure"` @@ -42354,7 +42536,6 @@ func (s *DescribeVpcAttributeOutput) SetVpcId(v string) *DescribeVpcAttributeOut return s } -// Contains the parameters for DescribeVpcClassicLinkDnsSupport. type DescribeVpcClassicLinkDnsSupportInput struct { _ struct{} `type:"structure"` @@ -42415,7 +42596,6 @@ func (s *DescribeVpcClassicLinkDnsSupportInput) SetVpcIds(v []*string) *Describe return s } -// Contains the output of DescribeVpcClassicLinkDnsSupport. type DescribeVpcClassicLinkDnsSupportOutput struct { _ struct{} `type:"structure"` @@ -42448,7 +42628,6 @@ func (s *DescribeVpcClassicLinkDnsSupportOutput) SetVpcs(v []*ClassicLinkDnsSupp return s } -// Contains the parameters for DescribeVpcClassicLink. type DescribeVpcClassicLinkInput struct { _ struct{} `type:"structure"` @@ -42463,10 +42642,11 @@ type DescribeVpcClassicLinkInput struct { // * is-classic-link-enabled - Whether the VPC is enabled for ClassicLink // (true | false). // - // * tag:key=value - The key/value combination of a tag assigned to the resource. - // Specify the key of the tag in the filter name and the value of the tag - // in the filter value. For example, for the tag Purpose=X, specify tag:Purpose - // for the filter name and X for the filter value. + // * tag: - The key/value combination of a tag assigned to the resource. + // Use the tag key in the filter name and the tag value as the filter value. + // For example, to find all resources that have a tag with the key Owner + // and the value TeamA, specify tag:Owner for the filter name and TeamA for + // the filter value. // // * tag-key - The key of a tag assigned to the resource. Use this filter // to find all resources assigned a tag with a specific key, regardless of @@ -42505,7 +42685,6 @@ func (s *DescribeVpcClassicLinkInput) SetVpcIds(v []*string) *DescribeVpcClassic return s } -// Contains the output of DescribeVpcClassicLink. type DescribeVpcClassicLinkOutput struct { _ struct{} `type:"structure"` @@ -43186,7 +43365,6 @@ func (s *DescribeVpcEndpointsOutput) SetVpcEndpoints(v []*VpcEndpoint) *Describe return s } -// Contains the parameters for DescribeVpcPeeringConnections. type DescribeVpcPeeringConnectionsInput struct { _ struct{} `type:"structure"` @@ -43221,10 +43399,11 @@ type DescribeVpcPeeringConnectionsInput struct { // * status-message - A message that provides more information about the // status of the VPC peering connection, if applicable. // - // * tag:key=value - The key/value combination of a tag assigned to the resource. - // Specify the key of the tag in the filter name and the value of the tag - // in the filter value. For example, for the tag Purpose=X, specify tag:Purpose - // for the filter name and X for the filter value. + // * tag: - The key/value combination of a tag assigned to the resource. + // Use the tag key in the filter name and the tag value as the filter value. + // For example, to find all resources that have a tag with the key Owner + // and the value TeamA, specify tag:Owner for the filter name and TeamA for + // the filter value. // // * tag-key - The key of a tag assigned to the resource. Use this filter // to find all resources assigned a tag with a specific key, regardless of @@ -43267,7 +43446,6 @@ func (s *DescribeVpcPeeringConnectionsInput) SetVpcPeeringConnectionIds(v []*str return s } -// Contains the output of DescribeVpcPeeringConnections. type DescribeVpcPeeringConnectionsOutput struct { _ struct{} `type:"structure"` @@ -43291,7 +43469,6 @@ func (s *DescribeVpcPeeringConnectionsOutput) SetVpcPeeringConnections(v []*VpcP return s } -// Contains the parameters for DescribeVpcs. type DescribeVpcsInput struct { _ struct{} `type:"structure"` @@ -43332,10 +43509,11 @@ type DescribeVpcsInput struct { // // * state - The state of the VPC (pending | available). // - // * tag:key=value - The key/value combination of a tag assigned to the resource. - // Specify the key of the tag in the filter name and the value of the tag - // in the filter value. For example, for the tag Purpose=X, specify tag:Purpose - // for the filter name and X for the filter value. + // * tag: - The key/value combination of a tag assigned to the resource. + // Use the tag key in the filter name and the tag value as the filter value. + // For example, to find all resources that have a tag with the key Owner + // and the value TeamA, specify tag:Owner for the filter name and TeamA for + // the filter value. // // * tag-key - The key of a tag assigned to the resource. Use this filter // to find all resources assigned a tag with a specific key, regardless of @@ -43378,7 +43556,6 @@ func (s *DescribeVpcsInput) SetVpcIds(v []*string) *DescribeVpcsInput { return s } -// Contains the output of DescribeVpcs. type DescribeVpcsOutput struct { _ struct{} `type:"structure"` @@ -43433,10 +43610,11 @@ type DescribeVpnConnectionsInput struct { // * bgp-asn - The BGP Autonomous System Number (ASN) associated with a BGP // device. // - // * tag:key=value - The key/value combination of a tag assigned to the resource. - // Specify the key of the tag in the filter name and the value of the tag - // in the filter value. For example, for the tag Purpose=X, specify tag:Purpose - // for the filter name and X for the filter value. + // * tag: - The key/value combination of a tag assigned to the resource. + // Use the tag key in the filter name and the tag value as the filter value. + // For example, to find all resources that have a tag with the key Owner + // and the value TeamA, specify tag:Owner for the filter name and TeamA for + // the filter value. // // * tag-key - The key of a tag assigned to the resource. Use this filter // to find all resources assigned a tag with a specific key, regardless of @@ -43535,10 +43713,11 @@ type DescribeVpnGatewaysInput struct { // * state - The state of the virtual private gateway (pending | available // | deleting | deleted). // - // * tag:key=value - The key/value combination of a tag assigned to the resource. - // Specify the key of the tag in the filter name and the value of the tag - // in the filter value. For example, for the tag Purpose=X, specify tag:Purpose - // for the filter name and X for the filter value. + // * tag: - The key/value combination of a tag assigned to the resource. + // Use the tag key in the filter name and the tag value as the filter value. + // For example, to find all resources that have a tag with the key Owner + // and the value TeamA, specify tag:Owner for the filter name and TeamA for + // the filter value. // // * tag-key - The key of a tag assigned to the resource. Use this filter // to find all resources assigned a tag with a specific key, regardless of @@ -43608,7 +43787,6 @@ func (s *DescribeVpnGatewaysOutput) SetVpnGateways(v []*VpnGateway) *DescribeVpn return s } -// Contains the parameters for DetachClassicLinkVpc. type DetachClassicLinkVpcInput struct { _ struct{} `type:"structure"` @@ -43673,7 +43851,6 @@ func (s *DetachClassicLinkVpcInput) SetVpcId(v string) *DetachClassicLinkVpcInpu return s } -// Contains the output of DetachClassicLinkVpc. type DetachClassicLinkVpcOutput struct { _ struct{} `type:"structure"` @@ -43697,7 +43874,6 @@ func (s *DetachClassicLinkVpcOutput) SetReturn(v bool) *DetachClassicLinkVpcOutp return s } -// Contains the parameters for DetachInternetGateway. type DetachInternetGatewayInput struct { _ struct{} `type:"structure"` @@ -43707,7 +43883,7 @@ type DetachInternetGatewayInput struct { // it is UnauthorizedOperation. DryRun *bool `locationName:"dryRun" type:"boolean"` - // The ID of the Internet gateway. + // The ID of the internet gateway. // // InternetGatewayId is a required field InternetGatewayId *string `locationName:"internetGatewayId" type:"string" required:"true"` @@ -44155,7 +44331,6 @@ func (s DisableVgwRoutePropagationOutput) GoString() string { return s.String() } -// Contains the parameters for DisableVpcClassicLinkDnsSupport. type DisableVpcClassicLinkDnsSupportInput struct { _ struct{} `type:"structure"` @@ -44179,7 +44354,6 @@ func (s *DisableVpcClassicLinkDnsSupportInput) SetVpcId(v string) *DisableVpcCla return s } -// Contains the output of DisableVpcClassicLinkDnsSupport. type DisableVpcClassicLinkDnsSupportOutput struct { _ struct{} `type:"structure"` @@ -44203,7 +44377,6 @@ func (s *DisableVpcClassicLinkDnsSupportOutput) SetReturn(v bool) *DisableVpcCla return s } -// Contains the parameters for DisableVpcClassicLink. type DisableVpcClassicLinkInput struct { _ struct{} `type:"structure"` @@ -44254,7 +44427,6 @@ func (s *DisableVpcClassicLinkInput) SetVpcId(v string) *DisableVpcClassicLinkIn return s } -// Contains the output of DisableVpcClassicLink. type DisableVpcClassicLinkOutput struct { _ struct{} `type:"structure"` @@ -44398,7 +44570,6 @@ func (s *DisassociateIamInstanceProfileOutput) SetIamInstanceProfileAssociation( return s } -// Contains the parameters for DisassociateRouteTable. type DisassociateRouteTableInput struct { _ struct{} `type:"structure"` @@ -44881,9 +45052,14 @@ type EbsBlockDevice struct { DeleteOnTermination *bool `locationName:"deleteOnTermination" type:"boolean"` // Indicates whether the EBS volume is encrypted. Encrypted volumes can only - // be attached to instances that support Amazon EBS encryption. If you are creating - // a volume from a snapshot, you can't specify an encryption value. This is - // because only blank volumes can be encrypted on creation. + // be attached to instances that support Amazon EBS encryption. + // + // If you are creating a volume from a snapshot, you cannot specify an encryption + // value. This is because only blank volumes can be encrypted on creation. If + // you are creating a snapshot from an existing EBS volume, you cannot specify + // an encryption value that differs from that of the EBS volume. We recommend + // that you omit the encryption value from the block device mappings when creating + // an image from an instance. Encrypted *bool `locationName:"encrypted" type:"boolean"` // The number of I/O operations per second (IOPS) that the volume supports. @@ -45068,14 +45244,14 @@ func (s *EbsInstanceBlockDeviceSpecification) SetVolumeId(v string) *EbsInstance return s } -// Describes an egress-only Internet gateway. +// Describes an egress-only internet gateway. type EgressOnlyInternetGateway struct { _ struct{} `type:"structure"` - // Information about the attachment of the egress-only Internet gateway. + // Information about the attachment of the egress-only internet gateway. Attachments []*InternetGatewayAttachment `locationName:"attachmentSet" locationNameList:"item" type:"list"` - // The ID of the egress-only Internet gateway. + // The ID of the egress-only internet gateway. EgressOnlyInternetGatewayId *string `locationName:"egressOnlyInternetGatewayId" type:"string"` } @@ -45440,7 +45616,6 @@ func (s EnableVolumeIOOutput) GoString() string { return s.String() } -// Contains the parameters for EnableVpcClassicLinkDnsSupport. type EnableVpcClassicLinkDnsSupportInput struct { _ struct{} `type:"structure"` @@ -45464,7 +45639,6 @@ func (s *EnableVpcClassicLinkDnsSupportInput) SetVpcId(v string) *EnableVpcClass return s } -// Contains the output of EnableVpcClassicLinkDnsSupport. type EnableVpcClassicLinkDnsSupportOutput struct { _ struct{} `type:"structure"` @@ -45488,7 +45662,6 @@ func (s *EnableVpcClassicLinkDnsSupportOutput) SetReturn(v bool) *EnableVpcClass return s } -// Contains the parameters for EnableVpcClassicLink. type EnableVpcClassicLinkInput struct { _ struct{} `type:"structure"` @@ -45539,7 +45712,6 @@ func (s *EnableVpcClassicLinkInput) SetVpcId(v string) *EnableVpcClassicLinkInpu return s } -// Contains the output of EnableVpcClassicLink. type EnableVpcClassicLinkOutput struct { _ struct{} `type:"structure"` @@ -45940,6 +46112,9 @@ type FleetData struct { // The launch template and overrides. LaunchTemplateConfigs []*FleetLaunchTemplateConfig `locationName:"launchTemplateConfigs" locationNameList:"item" type:"list"` + // The allocation strategy of On-Demand Instances in an EC2 Fleet. + OnDemandOptions *OnDemandOptions `locationName:"onDemandOptions" type:"structure"` + // Indicates whether EC2 Fleet should replace unhealthy instances. ReplaceUnhealthyInstances *bool `locationName:"replaceUnhealthyInstances" type:"boolean"` @@ -46044,6 +46219,12 @@ func (s *FleetData) SetLaunchTemplateConfigs(v []*FleetLaunchTemplateConfig) *Fl return s } +// SetOnDemandOptions sets the OnDemandOptions field's value. +func (s *FleetData) SetOnDemandOptions(v *OnDemandOptions) *FleetData { + s.OnDemandOptions = v + return s +} + // SetReplaceUnhealthyInstances sets the ReplaceUnhealthyInstances field's value. func (s *FleetData) SetReplaceUnhealthyInstances(v bool) *FleetData { s.ReplaceUnhealthyInstances = &v @@ -46189,6 +46370,14 @@ type FleetLaunchTemplateOverrides struct { // The maximum price per unit hour that you are willing to pay for a Spot Instance. MaxPrice *string `locationName:"maxPrice" type:"string"` + // The priority for the launch template override. If AllocationStrategy is set + // to prioritized, EC2 Fleet uses priority to determine which launch template + // override to use first in fulfilling On-Demand capacity. The highest priority + // is launched first. Valid values are whole numbers starting at 0. The lower + // the number, the higher the priority. If no number is set, the override has + // the lowest priority. + Priority *float64 `locationName:"priority" type:"double"` + // The ID of the subnet in which to launch the instances. SubnetId *string `locationName:"subnetId" type:"string"` @@ -46224,6 +46413,12 @@ func (s *FleetLaunchTemplateOverrides) SetMaxPrice(v string) *FleetLaunchTemplat return s } +// SetPriority sets the Priority field's value. +func (s *FleetLaunchTemplateOverrides) SetPriority(v float64) *FleetLaunchTemplateOverrides { + s.Priority = &v + return s +} + // SetSubnetId sets the SubnetId field's value. func (s *FleetLaunchTemplateOverrides) SetSubnetId(v string) *FleetLaunchTemplateOverrides { s.SubnetId = &v @@ -46249,6 +46444,14 @@ type FleetLaunchTemplateOverridesRequest struct { // The maximum price per unit hour that you are willing to pay for a Spot Instance. MaxPrice *string `type:"string"` + // The priority for the launch template override. If AllocationStrategy is set + // to prioritized, EC2 Fleet uses priority to determine which launch template + // override to use first in fulfilling On-Demand capacity. The highest priority + // is launched first. Valid values are whole numbers starting at 0. The lower + // the number, the higher the priority. If no number is set, the launch template + // override has the lowest priority. + Priority *float64 `type:"double"` + // The ID of the subnet in which to launch the instances. SubnetId *string `type:"string"` @@ -46284,6 +46487,12 @@ func (s *FleetLaunchTemplateOverridesRequest) SetMaxPrice(v string) *FleetLaunch return s } +// SetPriority sets the Priority field's value. +func (s *FleetLaunchTemplateOverridesRequest) SetPriority(v float64) *FleetLaunchTemplateOverridesRequest { + s.Priority = &v + return s +} + // SetSubnetId sets the SubnetId field's value. func (s *FleetLaunchTemplateOverridesRequest) SetSubnetId(v string) *FleetLaunchTemplateOverridesRequest { s.SubnetId = &v @@ -46308,8 +46517,7 @@ type FleetLaunchTemplateSpecification struct { // or a template ID. LaunchTemplateName *string `locationName:"launchTemplateName" min:"3" type:"string"` - // The version number. By default, the default version of the launch template - // is used. + // The version number of the launch template. You must specify a version number. Version *string `locationName:"version" type:"string"` } @@ -46418,11 +46626,11 @@ type FlowLog struct { CreationTime *time.Time `locationName:"creationTime" type:"timestamp"` // Information about the error that occurred. Rate limited indicates that CloudWatch - // logs throttling has been applied for one or more network interfaces, or that - // you've reached the limit on the number of CloudWatch Logs log groups that - // you can create. Access error indicates that the IAM role associated with - // the flow log does not have sufficient permissions to publish to CloudWatch - // Logs. Unknown error indicates an internal error. + // Logs throttling has been applied for one or more network interfaces, or that + // you've reached the limit on the number of log groups that you can create. + // Access error indicates that the IAM role associated with the flow log does + // not have sufficient permissions to publish to CloudWatch Logs. Unknown error + // indicates an internal error. DeliverLogsErrorMessage *string `locationName:"deliverLogsErrorMessage" type:"string"` // The ARN of the IAM role that posts logs to CloudWatch Logs. @@ -46437,6 +46645,18 @@ type FlowLog struct { // The status of the flow log (ACTIVE). FlowLogStatus *string `locationName:"flowLogStatus" type:"string"` + // Specifies the destination to which the flow log data is published. Flow log + // data can be published to an CloudWatch Logs log group or an Amazon S3 bucket. + // If the flow log publishes to CloudWatch Logs, this element indicates the + // Amazon Resource Name (ARN) of the CloudWatch Logs log group to which the + // data is published. If the flow log publishes to Amazon S3, this element indicates + // the ARN of the Amazon S3 bucket to which the data is published. + LogDestination *string `locationName:"logDestination" type:"string"` + + // Specifies the type of destination to which the flow log data is published. + // Flow log data can be published to CloudWatch Logs or Amazon S3. + LogDestinationType *string `locationName:"logDestinationType" type:"string" enum:"LogDestinationType"` + // The name of the flow log group. LogGroupName *string `locationName:"logGroupName" type:"string"` @@ -46493,6 +46713,18 @@ func (s *FlowLog) SetFlowLogStatus(v string) *FlowLog { return s } +// SetLogDestination sets the LogDestination field's value. +func (s *FlowLog) SetLogDestination(v string) *FlowLog { + s.LogDestination = &v + return s +} + +// SetLogDestinationType sets the LogDestinationType field's value. +func (s *FlowLog) SetLogDestinationType(v string) *FlowLog { + s.LogDestinationType = &v + return s +} + // SetLogGroupName sets the LogGroupName field's value. func (s *FlowLog) SetLogGroupName(v string) *FlowLog { s.LogGroupName = &v @@ -46956,8 +47188,7 @@ func (s *GetConsoleScreenshotOutput) SetInstanceId(v string) *GetConsoleScreensh type GetHostReservationPurchasePreviewInput struct { _ struct{} `type:"structure"` - // The ID/s of the Dedicated Host/s that the reservation will be associated - // with. + // The IDs of the Dedicated Hosts with which the reservation is associated. // // HostIdSet is a required field HostIdSet []*string `locationNameList:"item" type:"list" required:"true"` @@ -47013,7 +47244,7 @@ type GetHostReservationPurchasePreviewOutput struct { // are specified. At this time, the only supported currency is USD. CurrencyCode *string `locationName:"currencyCode" type:"string" enum:"CurrencyCodeValues"` - // The purchase information of the Dedicated Host Reservation and the Dedicated + // The purchase information of the Dedicated Host reservation and the Dedicated // Hosts associated with it. Purchase []*Purchase `locationName:"purchase" locationNameList:"item" type:"list"` @@ -47540,8 +47771,8 @@ type Host struct { // The number of new instances that can be launched onto the Dedicated Host. AvailableCapacity *AvailableCapacity `locationName:"availableCapacity" type:"structure"` - // Unique, case-sensitive identifier you provide to ensure idempotency of the - // request. For more information, see How to Ensure Idempotency (http://docs.aws.amazon.com/AWSEC2/latest/UserGuide/Run_Instance_Idempotency.html) + // Unique, case-sensitive identifier that you provide to ensure idempotency + // of the request. For more information, see How to Ensure Idempotency (http://docs.aws.amazon.com/AWSEC2/latest/UserGuide/Run_Instance_Idempotency.html) // in the Amazon Elastic Compute Cloud User Guide. ClientToken *string `locationName:"clientToken" type:"string"` @@ -49184,7 +49415,6 @@ func (s *ImportInstanceVolumeDetailItem) SetVolume(v *DiskImageVolumeDescription return s } -// Contains the parameters for ImportKeyPair. type ImportKeyPairInput struct { _ struct{} `type:"structure"` @@ -49252,7 +49482,6 @@ func (s *ImportKeyPairInput) SetPublicKeyMaterial(v []byte) *ImportKeyPairInput return s } -// Contains the output of ImportKeyPair. type ImportKeyPairOutput struct { _ struct{} `type:"structure"` @@ -50181,7 +50410,7 @@ func (s *InstanceCount) SetState(v string) *InstanceCount { return s } -// Describes the credit option for CPU usage of a T2 instance. +// Describes the credit option for CPU usage of a T2 or T3 instance. type InstanceCreditSpecification struct { _ struct{} `type:"structure"` @@ -50215,7 +50444,7 @@ func (s *InstanceCreditSpecification) SetInstanceId(v string) *InstanceCreditSpe return s } -// Describes the credit option for CPU usage of a T2 instance. +// Describes the credit option for CPU usage of a T2 or T3 instance. type InstanceCreditSpecificationRequest struct { _ struct{} `type:"structure"` @@ -50854,7 +51083,7 @@ func (s *InstancePrivateIpAddress) SetPrivateIpAddress(v string) *InstancePrivat type InstanceState struct { _ struct{} `type:"structure"` - // The low byte represents the state. The high byte is an opaque internal value + // The low byte represents the state. The high byte is used for internal purposes // and should be ignored. // // * 0 : pending @@ -51142,17 +51371,17 @@ func (s *InstanceStatusSummary) SetStatus(v string) *InstanceStatusSummary { return s } -// Describes an Internet gateway. +// Describes an internet gateway. type InternetGateway struct { _ struct{} `type:"structure"` - // Any VPCs attached to the Internet gateway. + // Any VPCs attached to the internet gateway. Attachments []*InternetGatewayAttachment `locationName:"attachmentSet" locationNameList:"item" type:"list"` - // The ID of the Internet gateway. + // The ID of the internet gateway. InternetGatewayId *string `locationName:"internetGatewayId" type:"string"` - // Any tags assigned to the Internet gateway. + // Any tags assigned to the internet gateway. Tags []*Tag `locationName:"tagSet" locationNameList:"item" type:"list"` } @@ -51184,12 +51413,12 @@ func (s *InternetGateway) SetTags(v []*Tag) *InternetGateway { return s } -// Describes the attachment of a VPC to an Internet gateway or an egress-only -// Internet gateway. +// Describes the attachment of a VPC to an internet gateway or an egress-only +// internet gateway. type InternetGatewayAttachment struct { _ struct{} `type:"structure"` - // The current state of the attachment. For an Internet gateway, the state is + // The current state of the attachment. For an internet gateway, the state is // available when attached to a VPC; otherwise, this value is not returned. State *string `locationName:"state" type:"string" enum:"AttachmentStatus"` @@ -51244,11 +51473,9 @@ type IpPermission struct { // [EC2-VPC only] One or more IPv6 ranges. Ipv6Ranges []*Ipv6Range `locationName:"ipv6Ranges" locationNameList:"item" type:"list"` - // (EC2-VPC only; valid for AuthorizeSecurityGroupEgress, RevokeSecurityGroupEgress - // and DescribeSecurityGroups only) One or more prefix list IDs for an AWS service. - // In an AuthorizeSecurityGroupEgress request, this is the AWS service that - // you want to access through a VPC endpoint from instances associated with - // the security group. + // [EC2-VPC only] One or more prefix list IDs for an AWS service. With AuthorizeSecurityGroupEgress, + // this is the AWS service that you want to access through a VPC endpoint from + // instances associated with the security group. PrefixListIds []*PrefixListId `locationName:"prefixListIds" locationNameList:"item" type:"list"` // The end of port range for the TCP and UDP protocols, or an ICMP/ICMPv6 code. @@ -52541,6 +52768,14 @@ type LaunchTemplateOverrides struct { // The instance type. InstanceType *string `locationName:"instanceType" type:"string" enum:"InstanceType"` + // The priority for the launch template override. If OnDemandAllocationStrategy + // is set to prioritized, Spot Fleet uses priority to determine which launch + // template override to use first in fulfilling On-Demand capacity. The highest + // priority is launched first. Valid values are whole numbers starting at 0. + // The lower the number, the higher the priority. If no number is set, the launch + // template override has the lowest priority. + Priority *float64 `locationName:"priority" type:"double"` + // The maximum price per unit hour that you are willing to pay for a Spot Instance. SpotPrice *string `locationName:"spotPrice" type:"string"` @@ -52573,6 +52808,12 @@ func (s *LaunchTemplateOverrides) SetInstanceType(v string) *LaunchTemplateOverr return s } +// SetPriority sets the Priority field's value. +func (s *LaunchTemplateOverrides) SetPriority(v float64) *LaunchTemplateOverrides { + s.Priority = &v + return s +} + // SetSpotPrice sets the SpotPrice field's value. func (s *LaunchTemplateOverrides) SetSpotPrice(v string) *LaunchTemplateOverrides { s.SpotPrice = &v @@ -53517,7 +53758,6 @@ func (s *ModifyFpgaImageAttributeOutput) SetFpgaImageAttribute(v *FpgaImageAttri return s } -// Contains the parameters for ModifyHosts. type ModifyHostsInput struct { _ struct{} `type:"structure"` @@ -53526,7 +53766,7 @@ type ModifyHostsInput struct { // AutoPlacement is a required field AutoPlacement *string `locationName:"autoPlacement" type:"string" required:"true" enum:"AutoPlacement"` - // The host IDs of the Dedicated Hosts you want to modify. + // The IDs of the Dedicated Hosts to modify. // // HostIds is a required field HostIds []*string `locationName:"hostId" locationNameList:"item" type:"list" required:"true"` @@ -53570,7 +53810,6 @@ func (s *ModifyHostsInput) SetHostIds(v []*string) *ModifyHostsInput { return s } -// Contains the output of ModifyHosts. type ModifyHostsOutput struct { _ struct{} `type:"structure"` @@ -54240,7 +54479,6 @@ func (s *ModifyInstanceCreditSpecificationOutput) SetUnsuccessfulInstanceCreditS return s } -// Contains the parameters for ModifyInstancePlacement. type ModifyInstancePlacementInput struct { _ struct{} `type:"structure"` @@ -54319,7 +54557,6 @@ func (s *ModifyInstancePlacementInput) SetTenancy(v string) *ModifyInstancePlace return s } -// Contains the output of ModifyInstancePlacement. type ModifyInstancePlacementOutput struct { _ struct{} `type:"structure"` @@ -54834,7 +55071,6 @@ func (s *ModifySpotFleetRequestOutput) SetReturn(v bool) *ModifySpotFleetRequest return s } -// Contains the parameters for ModifySubnetAttribute. type ModifySubnetAttributeInput struct { _ struct{} `type:"structure"` @@ -55100,7 +55336,6 @@ func (s *ModifyVolumeOutput) SetVolumeModification(v *VolumeModification) *Modif return s } -// Contains the parameters for ModifyVpcAttribute. type ModifyVpcAttributeInput struct { _ struct{} `type:"structure"` @@ -55115,8 +55350,8 @@ type ModifyVpcAttributeInput struct { // Indicates whether the DNS resolution is supported for the VPC. If enabled, // queries to the Amazon provided DNS server at the 169.254.169.253 IP address, // or the reserved IP address at the base of the VPC network range "plus two" - // will succeed. If disabled, the Amazon provided DNS service in the VPC that - // resolves public DNS hostnames to IP addresses is not enabled. + // succeed. If disabled, the Amazon provided DNS service in the VPC that resolves + // public DNS hostnames to IP addresses is not enabled. // // You cannot modify the DNS resolution and DNS hostnames attributes in the // same request. Use separate requests for each attribute. @@ -55540,8 +55775,9 @@ func (s *ModifyVpcEndpointServiceConfigurationOutput) SetReturn(v bool) *ModifyV type ModifyVpcEndpointServicePermissionsInput struct { _ struct{} `type:"structure"` - // One or more Amazon Resource Names (ARNs) of principals for which to allow - // permission. Specify * to allow all principals. + // The Amazon Resource Names (ARN) of one or more principals. Permissions are + // granted to the principals in this list. To grant permissions to all principals, + // specify an asterisk (*). AddAllowedPrincipals []*string `locationNameList:"item" type:"list"` // Checks whether you have the required permissions for the action, without @@ -55550,8 +55786,8 @@ type ModifyVpcEndpointServicePermissionsInput struct { // it is UnauthorizedOperation. DryRun *bool `type:"boolean"` - // One or more Amazon Resource Names (ARNs) of principals for which to remove - // permission. + // The Amazon Resource Names (ARN) of one or more principals. Permissions are + // revoked for principals in this list. RemoveAllowedPrincipals []*string `locationNameList:"item" type:"list"` // The ID of the service. @@ -55636,7 +55872,7 @@ type ModifyVpcPeeringConnectionOptionsInput struct { // The VPC peering connection options for the accepter VPC. AccepterPeeringConnectionOptions *PeeringConnectionOptionsRequest `type:"structure"` - // Checks whether you have the required permissions for the operation, without + // Checks whether you have the required permissions for the action, without // actually making the request, and provides an error response. If you have // the required permissions, the error response is DryRunOperation. Otherwise, // it is UnauthorizedOperation. @@ -55730,11 +55966,10 @@ func (s *ModifyVpcPeeringConnectionOptionsOutput) SetRequesterPeeringConnectionO return s } -// Contains the parameters for ModifyVpcTenancy. type ModifyVpcTenancyInput struct { _ struct{} `type:"structure"` - // Checks whether you have the required permissions for the operation, without + // Checks whether you have the required permissions for the action, without // actually making the request, and provides an error response. If you have // the required permissions, the error response is DryRunOperation. Otherwise, // it is UnauthorizedOperation. @@ -55795,7 +56030,6 @@ func (s *ModifyVpcTenancyInput) SetVpcId(v string) *ModifyVpcTenancyInput { return s } -// Contains the output of ModifyVpcTenancy. type ModifyVpcTenancyOutput struct { _ struct{} `type:"structure"` @@ -57020,6 +57254,64 @@ func (s *NewDhcpConfiguration) SetValues(v []*string) *NewDhcpConfiguration { return s } +// The allocation strategy of On-Demand Instances in an EC2 Fleet. +type OnDemandOptions struct { + _ struct{} `type:"structure"` + + // The order of the launch template overrides to use in fulfilling On-Demand + // capacity. If you specify lowest-price, EC2 Fleet uses price to determine + // the order, launching the lowest price first. If you specify prioritized, + // EC2 Fleet uses the priority that you assigned to each launch template override, + // launching the highest priority first. If you do not specify a value, EC2 + // Fleet defaults to lowest-price. + AllocationStrategy *string `locationName:"allocationStrategy" type:"string" enum:"FleetOnDemandAllocationStrategy"` +} + +// String returns the string representation +func (s OnDemandOptions) String() string { + return awsutil.Prettify(s) +} + +// GoString returns the string representation +func (s OnDemandOptions) GoString() string { + return s.String() +} + +// SetAllocationStrategy sets the AllocationStrategy field's value. +func (s *OnDemandOptions) SetAllocationStrategy(v string) *OnDemandOptions { + s.AllocationStrategy = &v + return s +} + +// The allocation strategy of On-Demand Instances in an EC2 Fleet. +type OnDemandOptionsRequest struct { + _ struct{} `type:"structure"` + + // The order of the launch template overrides to use in fulfilling On-Demand + // capacity. If you specify lowest-price, EC2 Fleet uses price to determine + // the order, launching the lowest price first. If you specify prioritized, + // EC2 Fleet uses the priority that you assigned to each launch template override, + // launching the highest priority first. If you do not specify a value, EC2 + // Fleet defaults to lowest-price. + AllocationStrategy *string `type:"string" enum:"FleetOnDemandAllocationStrategy"` +} + +// String returns the string representation +func (s OnDemandOptionsRequest) String() string { + return awsutil.Prettify(s) +} + +// GoString returns the string representation +func (s OnDemandOptionsRequest) GoString() string { + return s.String() +} + +// SetAllocationStrategy sets the AllocationStrategy field's value. +func (s *OnDemandOptionsRequest) SetAllocationStrategy(v string) *OnDemandOptionsRequest { + s.AllocationStrategy = &v + return s +} + // Describes the data that identifies an Amazon FPGA image (AFI) on the PCI // bus. type PciId struct { @@ -57081,11 +57373,11 @@ type PeeringConnectionOptions struct { AllowDnsResolutionFromRemoteVpc *bool `locationName:"allowDnsResolutionFromRemoteVpc" type:"boolean"` // If true, enables outbound communication from an EC2-Classic instance that's - // linked to a local VPC via ClassicLink to instances in a peer VPC. + // linked to a local VPC using ClassicLink to instances in a peer VPC. AllowEgressFromLocalClassicLinkToRemoteVpc *bool `locationName:"allowEgressFromLocalClassicLinkToRemoteVpc" type:"boolean"` // If true, enables outbound communication from instances in a local VPC to - // an EC2-Classic instance that's linked to a peer VPC via ClassicLink. + // an EC2-Classic instance that's linked to a peer VPC using ClassicLink. AllowEgressFromLocalVpcToRemoteClassicLink *bool `locationName:"allowEgressFromLocalVpcToRemoteClassicLink" type:"boolean"` } @@ -57126,11 +57418,11 @@ type PeeringConnectionOptionsRequest struct { AllowDnsResolutionFromRemoteVpc *bool `type:"boolean"` // If true, enables outbound communication from an EC2-Classic instance that's - // linked to a local VPC via ClassicLink to instances in a peer VPC. + // linked to a local VPC using ClassicLink to instances in a peer VPC. AllowEgressFromLocalClassicLinkToRemoteVpc *bool `type:"boolean"` // If true, enables outbound communication from instances in a local VPC to - // an EC2-Classic instance that's linked to a peer VPC via ClassicLink. + // an EC2-Classic instance that's linked to a peer VPC using ClassicLink. AllowEgressFromLocalVpcToRemoteClassicLink *bool `type:"boolean"` } @@ -57173,7 +57465,7 @@ type Placement struct { // The Availability Zone of the instance. AvailabilityZone *string `locationName:"availabilityZone" type:"string"` - // The name of the placement group the instance is in (for cluster compute instances). + // The name of the placement group the instance is in. GroupName *string `locationName:"groupName" type:"string"` // The ID of the Dedicated Host on which the instance resides. This parameter @@ -57352,7 +57644,7 @@ func (s *PrefixList) SetPrefixListName(v string) *PrefixList { return s } -// [EC2-VPC only] The ID of the prefix. +// Describes a prefix list ID. type PrefixListId struct { _ struct{} `type:"structure"` @@ -57632,7 +57924,7 @@ func (s *ProductCode) SetProductCodeType(v string) *ProductCode { type PropagatingVgw struct { _ struct{} `type:"structure"` - // The ID of the virtual private gateway (VGW). + // The ID of the virtual private gateway. GatewayId *string `locationName:"gatewayId" type:"string"` } @@ -57825,8 +58117,7 @@ type PurchaseHostReservationInput struct { // amounts are specified. At this time, the only supported currency is USD. CurrencyCode *string `type:"string" enum:"CurrencyCodeValues"` - // The ID/s of the Dedicated Host/s that the reservation will be associated - // with. + // The IDs of the Dedicated Hosts with which the reservation will be associated. // // HostIdSet is a required field HostIdSet []*string `locationNameList:"item" type:"list" required:"true"` @@ -57834,10 +58125,9 @@ type PurchaseHostReservationInput struct { // The specified limit is checked against the total upfront cost of the reservation // (calculated as the offering's upfront cost multiplied by the host count). // If the total upfront cost is greater than the specified price limit, the - // request will fail. This is used to ensure that the purchase does not exceed - // the expected upfront cost of the purchase. At this time, the only supported - // currency is USD. For example, to indicate a limit price of USD 100, specify - // 100.00. + // request fails. This is used to ensure that the purchase does not exceed the + // expected upfront cost of the purchase. At this time, the only supported currency + // is USD. For example, to indicate a limit price of USD 100, specify 100.00. LimitPrice *string `type:"string"` // The ID of the offering. @@ -57907,7 +58197,7 @@ type PurchaseHostReservationOutput struct { // Unique, case-sensitive identifier you provide to ensure idempotency of the // request. For more information, see How to Ensure Idempotency (http://docs.aws.amazon.com/AWSEC2/latest/UserGuide/Run_Instance_Idempotency.html) - // in the Amazon Elastic Compute Cloud User Guide + // in the Amazon Elastic Compute Cloud User Guide. ClientToken *string `locationName:"clientToken" type:"string"` // The currency in which the totalUpfrontPrice and totalHourlyPrice amounts @@ -57920,8 +58210,7 @@ type PurchaseHostReservationOutput struct { // The total hourly price of the reservation calculated per hour. TotalHourlyPrice *string `locationName:"totalHourlyPrice" type:"string"` - // The total amount that will be charged to your account when you purchase the - // reservation. + // The total amount charged to your account when you purchase the reservation. TotalUpfrontPrice *string `locationName:"totalUpfrontPrice" type:"string"` } @@ -58630,7 +58919,6 @@ func (s *RejectVpcEndpointConnectionsOutput) SetUnsuccessful(v []*UnsuccessfulIt return s } -// Contains the parameters for RejectVpcPeeringConnection. type RejectVpcPeeringConnectionInput struct { _ struct{} `type:"structure"` @@ -58681,7 +58969,6 @@ func (s *RejectVpcPeeringConnectionInput) SetVpcPeeringConnectionId(v string) *R return s } -// Contains the output of RejectVpcPeeringConnection. type RejectVpcPeeringConnectionOutput struct { _ struct{} `type:"structure"` @@ -58764,11 +59051,10 @@ func (s ReleaseAddressOutput) GoString() string { return s.String() } -// Contains the parameters for ReleaseHosts. type ReleaseHostsInput struct { _ struct{} `type:"structure"` - // The IDs of the Dedicated Hosts you want to release. + // The IDs of the Dedicated Hosts to release. // // HostIds is a required field HostIds []*string `locationName:"hostId" locationNameList:"item" type:"list" required:"true"` @@ -58803,7 +59089,6 @@ func (s *ReleaseHostsInput) SetHostIds(v []*string) *ReleaseHostsInput { return s } -// Contains the output of ReleaseHosts. type ReleaseHostsOutput struct { _ struct{} `type:"structure"` @@ -58912,7 +59197,6 @@ func (s *ReplaceIamInstanceProfileAssociationOutput) SetIamInstanceProfileAssoci return s } -// Contains the parameters for ReplaceNetworkAclAssociation. type ReplaceNetworkAclAssociationInput struct { _ struct{} `type:"structure"` @@ -58978,7 +59262,6 @@ func (s *ReplaceNetworkAclAssociationInput) SetNetworkAclId(v string) *ReplaceNe return s } -// Contains the output of ReplaceNetworkAclAssociation. type ReplaceNetworkAclAssociationOutput struct { _ struct{} `type:"structure"` @@ -59002,7 +59285,6 @@ func (s *ReplaceNetworkAclAssociationOutput) SetNewAssociationId(v string) *Repl return s } -// Contains the parameters for ReplaceNetworkAclEntry. type ReplaceNetworkAclEntryInput struct { _ struct{} `type:"structure"` @@ -59041,10 +59323,10 @@ type ReplaceNetworkAclEntryInput struct { // The IP protocol. You can specify all or -1 to mean all protocols. If you // specify all, -1, or a protocol number other than tcp, udp, or icmp, traffic // on all ports is allowed, regardless of any ports or ICMP types or codes you - // specify. If you specify protocol 58 (ICMPv6) and specify an IPv4 CIDR block, - // traffic for all ICMP types and codes allowed, regardless of any that you - // specify. If you specify protocol 58 (ICMPv6) and specify an IPv6 CIDR block, - // you must specify an ICMP type and code. + // that specify. If you specify protocol 58 (ICMPv6) and specify an IPv4 CIDR + // block, traffic for all ICMP types and codes allowed, regardless of any that + // you specify. If you specify protocol 58 (ICMPv6) and specify an IPv6 CIDR + // block, you must specify an ICMP type and code. // // Protocol is a required field Protocol *string `locationName:"protocol" type:"string" required:"true"` @@ -59169,16 +59451,15 @@ func (s ReplaceNetworkAclEntryOutput) GoString() string { return s.String() } -// Contains the parameters for ReplaceRoute. type ReplaceRouteInput struct { _ struct{} `type:"structure"` - // The IPv4 CIDR address block used for the destination match. The value you - // provide must match the CIDR of an existing route in the table. + // The IPv4 CIDR address block used for the destination match. The value that + // you provide must match the CIDR of an existing route in the table. DestinationCidrBlock *string `locationName:"destinationCidrBlock" type:"string"` - // The IPv6 CIDR address block used for the destination match. The value you - // provide must match the CIDR of an existing route in the table. + // The IPv6 CIDR address block used for the destination match. The value that + // you provide must match the CIDR of an existing route in the table. DestinationIpv6CidrBlock *string `locationName:"destinationIpv6CidrBlock" type:"string"` // Checks whether you have the required permissions for the action, without @@ -59187,10 +59468,10 @@ type ReplaceRouteInput struct { // it is UnauthorizedOperation. DryRun *bool `locationName:"dryRun" type:"boolean"` - // [IPv6 traffic only] The ID of an egress-only Internet gateway. + // [IPv6 traffic only] The ID of an egress-only internet gateway. EgressOnlyInternetGatewayId *string `locationName:"egressOnlyInternetGatewayId" type:"string"` - // The ID of an Internet gateway or virtual private gateway. + // The ID of an internet gateway or virtual private gateway. GatewayId *string `locationName:"gatewayId" type:"string"` // The ID of a NAT instance in your VPC. @@ -59308,7 +59589,6 @@ func (s ReplaceRouteOutput) GoString() string { return s.String() } -// Contains the parameters for ReplaceRouteTableAssociation. type ReplaceRouteTableAssociationInput struct { _ struct{} `type:"structure"` @@ -59373,7 +59653,6 @@ func (s *ReplaceRouteTableAssociationInput) SetRouteTableId(v string) *ReplaceRo return s } -// Contains the output of ReplaceRouteTableAssociation. type ReplaceRouteTableAssociationOutput struct { _ struct{} `type:"structure"` @@ -59556,7 +59835,8 @@ type RequestLaunchTemplateData struct { // in the Amazon Elastic Compute Cloud User Guide. CpuOptions *LaunchTemplateCpuOptionsRequest `type:"structure"` - // The credit option for CPU usage of the instance. Valid for T2 instances only. + // The credit option for CPU usage of the instance. Valid for T2 or T3 instances + // only. CreditSpecification *CreditSpecificationRequest `type:"structure"` // If set to true, you can't terminate the instance using the Amazon EC2 console, @@ -61845,7 +62125,6 @@ func (s *RestoreAddressToClassicOutput) SetStatus(v string) *RestoreAddressToCla return s } -// Contains the parameters for RevokeSecurityGroupEgress. type RevokeSecurityGroupEgressInput struct { _ struct{} `type:"structure"` @@ -61977,7 +62256,6 @@ func (s RevokeSecurityGroupEgressOutput) GoString() string { return s.String() } -// Contains the parameters for RevokeSecurityGroupIngress. type RevokeSecurityGroupIngressInput struct { _ struct{} `type:"structure"` @@ -62130,7 +62408,7 @@ type Route struct { // The prefix of the AWS service. DestinationPrefixListId *string `locationName:"destinationPrefixListId" type:"string"` - // The ID of the egress-only Internet gateway. + // The ID of the egress-only internet gateway. EgressOnlyInternetGatewayId *string `locationName:"egressOnlyInternetGatewayId" type:"string"` // The ID of a gateway attached to your VPC. @@ -62395,10 +62673,10 @@ type RunInstancesInput struct { // The credit option for CPU usage of the instance. Valid values are standard // and unlimited. To change this attribute after launch, use ModifyInstanceCreditSpecification. - // For more information, see T2 Instances (http://docs.aws.amazon.com/AWSEC2/latest/UserGuide/t2-instances.html) + // For more information, see Burstable Performance Instances (http://docs.aws.amazon.com/AWSEC2/latest/UserGuide/burstable-performance-instances.html) // in the Amazon Elastic Compute Cloud User Guide. // - // Default: standard + // Default: standard (T2 instances) or unlimited (T3 instances) CreditSpecification *CreditSpecificationRequest `type:"structure"` // If you set this parameter to true, you can't terminate the instance using @@ -62443,6 +62721,9 @@ type RunInstancesInput struct { InstanceInitiatedShutdownBehavior *string `locationName:"instanceInitiatedShutdownBehavior" type:"string" enum:"ShutdownBehavior"` // The market (purchasing) option for the instances. + // + // For RunInstances, persistent Spot Instance requests are only supported when + // InstanceInterruptionBehavior is set to either hibernate or stop. InstanceMarketOptions *InstanceMarketOptionsRequest `type:"structure"` // The instance type. For more information, see Instance Types (http://docs.aws.amazon.com/AWSEC2/latest/UserGuide/instance-types.html) @@ -65289,6 +65570,12 @@ type SpotFleetRequestConfigData struct { // The behavior when a Spot Instance is interrupted. The default is terminate. InstanceInterruptionBehavior *string `locationName:"instanceInterruptionBehavior" type:"string" enum:"InstanceInterruptionBehavior"` + // The number of Spot pools across which to allocate your target Spot capacity. + // Valid only when Spot AllocationStrategy is set to lowest-price. Spot Fleet + // selects the cheapest Spot pools and evenly allocates your target Spot capacity + // across the number of Spot pools that you specify. + InstancePoolsToUseCount *int64 `locationName:"instancePoolsToUseCount" type:"integer"` + // The launch specifications for the Spot Fleet request. LaunchSpecifications []*SpotFleetLaunchSpecification `locationName:"launchSpecifications" locationNameList:"item" type:"list"` @@ -65304,6 +65591,14 @@ type SpotFleetRequestConfigData struct { // HS1, M1, M2, M3, and T1. LoadBalancersConfig *LoadBalancersConfig `locationName:"loadBalancersConfig" type:"structure"` + // The order of the launch template overrides to use in fulfilling On-Demand + // capacity. If you specify lowestPrice, Spot Fleet uses price to determine + // the order, launching the lowest price first. If you specify prioritized, + // Spot Fleet uses the priority that you assign to each Spot Fleet launch template + // override, launching the highest priority first. If you do not specify a value, + // Spot Fleet defaults to lowestPrice. + OnDemandAllocationStrategy *string `locationName:"onDemandAllocationStrategy" type:"string" enum:"OnDemandAllocationStrategy"` + // The number of On-Demand units fulfilled by this request compared to the set // target On-Demand capacity. OnDemandFulfilledCapacity *float64 `locationName:"onDemandFulfilledCapacity" type:"double"` @@ -65431,6 +65726,12 @@ func (s *SpotFleetRequestConfigData) SetInstanceInterruptionBehavior(v string) * return s } +// SetInstancePoolsToUseCount sets the InstancePoolsToUseCount field's value. +func (s *SpotFleetRequestConfigData) SetInstancePoolsToUseCount(v int64) *SpotFleetRequestConfigData { + s.InstancePoolsToUseCount = &v + return s +} + // SetLaunchSpecifications sets the LaunchSpecifications field's value. func (s *SpotFleetRequestConfigData) SetLaunchSpecifications(v []*SpotFleetLaunchSpecification) *SpotFleetRequestConfigData { s.LaunchSpecifications = v @@ -65449,6 +65750,12 @@ func (s *SpotFleetRequestConfigData) SetLoadBalancersConfig(v *LoadBalancersConf return s } +// SetOnDemandAllocationStrategy sets the OnDemandAllocationStrategy field's value. +func (s *SpotFleetRequestConfigData) SetOnDemandAllocationStrategy(v string) *SpotFleetRequestConfigData { + s.OnDemandAllocationStrategy = &v + return s +} + // SetOnDemandFulfilledCapacity sets the OnDemandFulfilledCapacity field's value. func (s *SpotFleetRequestConfigData) SetOnDemandFulfilledCapacity(v float64) *SpotFleetRequestConfigData { s.OnDemandFulfilledCapacity = &v @@ -65829,7 +66136,9 @@ type SpotMarketOptions struct { // default is the On-Demand price. MaxPrice *string `type:"string"` - // The Spot Instance request type. + // The Spot Instance request type. For RunInstances, persistent Spot Instance + // requests are only supported when InstanceInterruptionBehavior is set to either + // hibernate or stop. SpotInstanceType *string `type:"string" enum:"SpotInstanceType"` // The end date of the request. For a one-time request, the request remains @@ -65885,11 +66194,17 @@ type SpotOptions struct { _ struct{} `type:"structure"` // Indicates how to allocate the target capacity across the Spot pools specified - // by the Spot Fleet request. The default is lowestPrice. + // by the Spot Fleet request. The default is lowest-price. AllocationStrategy *string `locationName:"allocationStrategy" type:"string" enum:"SpotAllocationStrategy"` // The behavior when a Spot Instance is interrupted. The default is terminate. InstanceInterruptionBehavior *string `locationName:"instanceInterruptionBehavior" type:"string" enum:"SpotInstanceInterruptionBehavior"` + + // The number of Spot pools across which to allocate your target Spot capacity. + // Valid only when AllocationStrategy is set to lowestPrice. EC2 Fleet selects + // the cheapest Spot pools and evenly allocates your target Spot capacity across + // the number of Spot pools that you specify. + InstancePoolsToUseCount *int64 `locationName:"instancePoolsToUseCount" type:"integer"` } // String returns the string representation @@ -65914,6 +66229,12 @@ func (s *SpotOptions) SetInstanceInterruptionBehavior(v string) *SpotOptions { return s } +// SetInstancePoolsToUseCount sets the InstancePoolsToUseCount field's value. +func (s *SpotOptions) SetInstancePoolsToUseCount(v int64) *SpotOptions { + s.InstancePoolsToUseCount = &v + return s +} + // Describes the configuration of Spot Instances in an EC2 Fleet request. type SpotOptionsRequest struct { _ struct{} `type:"structure"` @@ -65924,6 +66245,12 @@ type SpotOptionsRequest struct { // The behavior when a Spot Instance is interrupted. The default is terminate. InstanceInterruptionBehavior *string `type:"string" enum:"SpotInstanceInterruptionBehavior"` + + // The number of Spot pools across which to allocate your target Spot capacity. + // Valid only when Spot AllocationStrategy is set to lowest-price. EC2 Fleet + // selects the cheapest Spot pools and evenly allocates your target Spot capacity + // across the number of Spot pools that you specify. + InstancePoolsToUseCount *int64 `type:"integer"` } // String returns the string representation @@ -65948,6 +66275,12 @@ func (s *SpotOptionsRequest) SetInstanceInterruptionBehavior(v string) *SpotOpti return s } +// SetInstancePoolsToUseCount sets the InstancePoolsToUseCount field's value. +func (s *SpotOptionsRequest) SetInstancePoolsToUseCount(v int64) *SpotOptionsRequest { + s.InstancePoolsToUseCount = &v + return s +} + // Describes Spot Instance placement. type SpotPlacement struct { _ struct{} `type:"structure"` @@ -66511,8 +66844,8 @@ type Subnet struct { // The Availability Zone of the subnet. AvailabilityZone *string `locationName:"availabilityZone" type:"string"` - // The number of unused private IPv4 addresses in the subnet. Note that the - // IPv4 addresses for any stopped instances are considered unavailable. + // The number of unused private IPv4 addresses in the subnet. The IPv4 addresses + // for any stopped instances are considered unavailable. AvailableIpAddressCount *int64 `locationName:"availableIpAddressCount" type:"integer"` // The IPv4 CIDR block assigned to the subnet. @@ -66692,7 +67025,7 @@ func (s *SubnetIpv6CidrBlockAssociation) SetIpv6CidrBlockState(v *SubnetCidrBloc return s } -// Describes the T2 instance whose credit option for CPU usage was successfully +// Describes the T2 or T3 instance whose credit option for CPU usage was successfully // modified. type SuccessfulInstanceCreditSpecificationItem struct { _ struct{} `type:"structure"` @@ -66724,7 +67057,7 @@ type Tag struct { // The key of the tag. // // Constraints: Tag keys are case-sensitive and accept a maximum of 127 Unicode - // characters. May not begin with aws: + // characters. May not begin with aws:. Key *string `locationName:"key" type:"string"` // The value of the tag. @@ -66812,8 +67145,8 @@ type TagSpecification struct { _ struct{} `type:"structure"` // The type of resource to tag. Currently, the resource types that support tagging - // on creation are fleet, instance, snapshot, and volume. To tag a resource - // after it has been created, see CreateTags. + // on creation are fleet, dedicated-host, instance, snapshot, and volume. To + // tag a resource after it has been created, see CreateTags. ResourceType *string `locationName:"resourceType" type:"string" enum:"ResourceType"` // The tags to apply to the resource. @@ -67483,12 +67816,13 @@ func (s *UnmonitorInstancesOutput) SetInstanceMonitorings(v []*InstanceMonitorin return s } -// Describes the T2 instance whose credit option for CPU usage was not modified. +// Describes the T2 or T3 instance whose credit option for CPU usage was not +// modified. type UnsuccessfulInstanceCreditSpecificationItem struct { _ struct{} `type:"structure"` - // The applicable error for the T2 instance whose credit option for CPU usage - // was not modified. + // The applicable error for the T2 or T3 instance whose credit option for CPU + // usage was not modified. Error *UnsuccessfulInstanceCreditSpecificationItemError `locationName:"error" type:"structure"` // The ID of the instance. @@ -67517,8 +67851,8 @@ func (s *UnsuccessfulInstanceCreditSpecificationItem) SetInstanceId(v string) *U return s } -// Information about the error for the T2 instance whose credit option for CPU -// usage was not modified. +// Information about the error for the T2 or T3 instance whose credit option +// for CPU usage was not modified. type UnsuccessfulInstanceCreditSpecificationItemError struct { _ struct{} `type:"structure"` @@ -67624,7 +67958,6 @@ func (s *UnsuccessfulItemError) SetMessage(v string) *UnsuccessfulItemError { return s } -// Contains the parameters for UpdateSecurityGroupRuleDescriptionsEgress. type UpdateSecurityGroupRuleDescriptionsEgressInput struct { _ struct{} `type:"structure"` @@ -67696,7 +68029,6 @@ func (s *UpdateSecurityGroupRuleDescriptionsEgressInput) SetIpPermissions(v []*I return s } -// Contains the output of UpdateSecurityGroupRuleDescriptionsEgress. type UpdateSecurityGroupRuleDescriptionsEgressOutput struct { _ struct{} `type:"structure"` @@ -67720,7 +68052,6 @@ func (s *UpdateSecurityGroupRuleDescriptionsEgressOutput) SetReturn(v bool) *Upd return s } -// Contains the parameters for UpdateSecurityGroupRuleDescriptionsIngress. type UpdateSecurityGroupRuleDescriptionsIngressInput struct { _ struct{} `type:"structure"` @@ -67792,7 +68123,6 @@ func (s *UpdateSecurityGroupRuleDescriptionsIngressInput) SetIpPermissions(v []* return s } -// Contains the output of UpdateSecurityGroupRuleDescriptionsIngress. type UpdateSecurityGroupRuleDescriptionsIngressOutput struct { _ struct{} `type:"structure"` @@ -70120,6 +70450,14 @@ const ( FleetExcessCapacityTerminationPolicyTermination = "termination" ) +const ( + // FleetOnDemandAllocationStrategyLowestPrice is a FleetOnDemandAllocationStrategy enum value + FleetOnDemandAllocationStrategyLowestPrice = "lowest-price" + + // FleetOnDemandAllocationStrategyPrioritized is a FleetOnDemandAllocationStrategy enum value + FleetOnDemandAllocationStrategyPrioritized = "prioritized" +) + const ( // FleetStateCodeSubmitted is a FleetStateCode enum value FleetStateCodeSubmitted = "submitted" @@ -70398,6 +70736,27 @@ const ( // InstanceTypeT22xlarge is a InstanceType enum value InstanceTypeT22xlarge = "t2.2xlarge" + // InstanceTypeT3Nano is a InstanceType enum value + InstanceTypeT3Nano = "t3.nano" + + // InstanceTypeT3Micro is a InstanceType enum value + InstanceTypeT3Micro = "t3.micro" + + // InstanceTypeT3Small is a InstanceType enum value + InstanceTypeT3Small = "t3.small" + + // InstanceTypeT3Medium is a InstanceType enum value + InstanceTypeT3Medium = "t3.medium" + + // InstanceTypeT3Large is a InstanceType enum value + InstanceTypeT3Large = "t3.large" + + // InstanceTypeT3Xlarge is a InstanceType enum value + InstanceTypeT3Xlarge = "t3.xlarge" + + // InstanceTypeT32xlarge is a InstanceType enum value + InstanceTypeT32xlarge = "t3.2xlarge" + // InstanceTypeM1Small is a InstanceType enum value InstanceTypeM1Small = "m1.small" @@ -70485,6 +70844,60 @@ const ( // InstanceTypeR416xlarge is a InstanceType enum value InstanceTypeR416xlarge = "r4.16xlarge" + // InstanceTypeR5Large is a InstanceType enum value + InstanceTypeR5Large = "r5.large" + + // InstanceTypeR5Xlarge is a InstanceType enum value + InstanceTypeR5Xlarge = "r5.xlarge" + + // InstanceTypeR52xlarge is a InstanceType enum value + InstanceTypeR52xlarge = "r5.2xlarge" + + // InstanceTypeR54xlarge is a InstanceType enum value + InstanceTypeR54xlarge = "r5.4xlarge" + + // InstanceTypeR58xlarge is a InstanceType enum value + InstanceTypeR58xlarge = "r5.8xlarge" + + // InstanceTypeR512xlarge is a InstanceType enum value + InstanceTypeR512xlarge = "r5.12xlarge" + + // InstanceTypeR516xlarge is a InstanceType enum value + InstanceTypeR516xlarge = "r5.16xlarge" + + // InstanceTypeR524xlarge is a InstanceType enum value + InstanceTypeR524xlarge = "r5.24xlarge" + + // InstanceTypeR5Metal is a InstanceType enum value + InstanceTypeR5Metal = "r5.metal" + + // InstanceTypeR5dLarge is a InstanceType enum value + InstanceTypeR5dLarge = "r5d.large" + + // InstanceTypeR5dXlarge is a InstanceType enum value + InstanceTypeR5dXlarge = "r5d.xlarge" + + // InstanceTypeR5d2xlarge is a InstanceType enum value + InstanceTypeR5d2xlarge = "r5d.2xlarge" + + // InstanceTypeR5d4xlarge is a InstanceType enum value + InstanceTypeR5d4xlarge = "r5d.4xlarge" + + // InstanceTypeR5d8xlarge is a InstanceType enum value + InstanceTypeR5d8xlarge = "r5d.8xlarge" + + // InstanceTypeR5d12xlarge is a InstanceType enum value + InstanceTypeR5d12xlarge = "r5d.12xlarge" + + // InstanceTypeR5d16xlarge is a InstanceType enum value + InstanceTypeR5d16xlarge = "r5d.16xlarge" + + // InstanceTypeR5d24xlarge is a InstanceType enum value + InstanceTypeR5d24xlarge = "r5d.24xlarge" + + // InstanceTypeR5dMetal is a InstanceType enum value + InstanceTypeR5dMetal = "r5d.metal" + // InstanceTypeX116xlarge is a InstanceType enum value InstanceTypeX116xlarge = "x1.16xlarge" @@ -70677,6 +71090,9 @@ const ( // InstanceTypeF12xlarge is a InstanceType enum value InstanceTypeF12xlarge = "f1.2xlarge" + // InstanceTypeF14xlarge is a InstanceType enum value + InstanceTypeF14xlarge = "f1.4xlarge" + // InstanceTypeF116xlarge is a InstanceType enum value InstanceTypeF116xlarge = "f1.16xlarge" @@ -70727,6 +71143,33 @@ const ( // InstanceTypeH116xlarge is a InstanceType enum value InstanceTypeH116xlarge = "h1.16xlarge" + + // InstanceTypeZ1dLarge is a InstanceType enum value + InstanceTypeZ1dLarge = "z1d.large" + + // InstanceTypeZ1dXlarge is a InstanceType enum value + InstanceTypeZ1dXlarge = "z1d.xlarge" + + // InstanceTypeZ1d2xlarge is a InstanceType enum value + InstanceTypeZ1d2xlarge = "z1d.2xlarge" + + // InstanceTypeZ1d3xlarge is a InstanceType enum value + InstanceTypeZ1d3xlarge = "z1d.3xlarge" + + // InstanceTypeZ1d6xlarge is a InstanceType enum value + InstanceTypeZ1d6xlarge = "z1d.6xlarge" + + // InstanceTypeZ1d12xlarge is a InstanceType enum value + InstanceTypeZ1d12xlarge = "z1d.12xlarge" + + // InstanceTypeU6tb1Metal is a InstanceType enum value + InstanceTypeU6tb1Metal = "u-6tb1.metal" + + // InstanceTypeU9tb1Metal is a InstanceType enum value + InstanceTypeU9tb1Metal = "u-9tb1.metal" + + // InstanceTypeU12tb1Metal is a InstanceType enum value + InstanceTypeU12tb1Metal = "u-12tb1.metal" ) const ( @@ -70785,6 +71228,14 @@ const ( ListingStatusClosed = "closed" ) +const ( + // LogDestinationTypeCloudWatchLogs is a LogDestinationType enum value + LogDestinationTypeCloudWatchLogs = "cloud-watch-logs" + + // LogDestinationTypeS3 is a LogDestinationType enum value + LogDestinationTypeS3 = "s3" +) + const ( // MarketTypeSpot is a MarketType enum value MarketTypeSpot = "spot" @@ -70910,6 +71361,14 @@ const ( OfferingTypeValuesAllUpfront = "All Upfront" ) +const ( + // OnDemandAllocationStrategyLowestPrice is a OnDemandAllocationStrategy enum value + OnDemandAllocationStrategyLowestPrice = "lowestPrice" + + // OnDemandAllocationStrategyPrioritized is a OnDemandAllocationStrategy enum value + OnDemandAllocationStrategyPrioritized = "prioritized" +) + const ( // OperationTypeAdd is a OperationType enum value OperationTypeAdd = "add" @@ -71087,6 +71546,9 @@ const ( // ResourceTypeCustomerGateway is a ResourceType enum value ResourceTypeCustomerGateway = "customer-gateway" + // ResourceTypeDedicatedHost is a ResourceType enum value + ResourceTypeDedicatedHost = "dedicated-host" + // ResourceTypeDhcpOptions is a ResourceType enum value ResourceTypeDhcpOptions = "dhcp-options" diff --git a/vendor/github.com/aws/aws-sdk-go/service/ec2/doc.go b/vendor/github.com/aws/aws-sdk-go/service/ec2/doc.go index 909e05a14..c258e0e85 100644 --- a/vendor/github.com/aws/aws-sdk-go/service/ec2/doc.go +++ b/vendor/github.com/aws/aws-sdk-go/service/ec2/doc.go @@ -3,9 +3,22 @@ // Package ec2 provides the client and types for making API // requests to Amazon Elastic Compute Cloud. // -// Amazon Elastic Compute Cloud (Amazon EC2) provides resizable computing capacity -// in the AWS Cloud. Using Amazon EC2 eliminates the need to invest in hardware -// up front, so you can develop and deploy applications faster. +// Amazon Elastic Compute Cloud (Amazon EC2) provides secure and resizable computing +// capacity in the AWS cloud. Using Amazon EC2 eliminates the need to invest +// in hardware up front, so you can develop and deploy applications faster. +// +// To learn more about Amazon EC2, Amazon EBS, and Amazon VPC, see the following +// resources: +// +// * Amazon EC2 product page (http://aws.amazon.com/ec2) +// +// * Amazon EC2 documentation (http://aws.amazon.com/documentation/ec2) +// +// * Amazon EBS product page (http://aws.amazon.com/ebs) +// +// * Amazon VPC product page (http://aws.amazon.com/vpc) +// +// * Amazon VPC documentation (http://aws.amazon.com/documentation/vpc) // // See https://docs.aws.amazon.com/goto/WebAPI/ec2-2016-11-15 for more information on this service. // diff --git a/vendor/github.com/aws/aws-sdk-go/service/ecs/api.go b/vendor/github.com/aws/aws-sdk-go/service/ecs/api.go index 89acca2b3..5060627b0 100644 --- a/vendor/github.com/aws/aws-sdk-go/service/ecs/api.go +++ b/vendor/github.com/aws/aws-sdk-go/service/ecs/api.go @@ -248,7 +248,7 @@ func (c *ECS) CreateServiceRequest(input *CreateServiceInput) (req *request.Requ // The specified platform version does not exist. // // * ErrCodePlatformTaskDefinitionIncompatibilityException "PlatformTaskDefinitionIncompatibilityException" -// The specified platform version does not satisfy the task definition’s required +// The specified platform version does not satisfy the task definition's required // capabilities. // // * ErrCodeAccessDeniedException "AccessDeniedException" @@ -531,6 +531,9 @@ func (c *ECS) DeleteServiceRequest(input *DeleteServiceInput) (req *request.Requ // up and purged from Amazon ECS record keeping, and DescribeServices API operations // on those services return a ServiceNotFoundException error. // +// If you attempt to create a new service with the same name as an existing +// service in either ACTIVE or DRAINING status, you will receive an error. +// // Returns awserr.Error for service API and SDK errors. Use runtime type assertions // with awserr.Error's Code and Message methods to get detailed information about // the error. @@ -2572,7 +2575,7 @@ func (c *ECS) RegisterTaskDefinitionRequest(input *RegisterTaskDefinitionInput) // definition with the networkMode parameter. The available network modes correspond // to those described in Network settings (https://docs.docker.com/engine/reference/run/#/network-settings) // in the Docker run reference. If you specify the awsvpc network mode, the -// task is allocated an Elastic Network Interface, and you must specify a NetworkConfiguration +// task is allocated an elastic network interface, and you must specify a NetworkConfiguration // when you create a service or run a task with the task definition. For more // information, see Task Networking (http://docs.aws.amazon.com/AmazonECS/latest/developerguide/task-networking.html) // in the Amazon Elastic Container Service Developer Guide. @@ -2686,7 +2689,7 @@ func (c *ECS) RunTaskRequest(input *RunTaskInput) (req *request.Request, output // it. Run the DescribeTasks command using an exponential backoff algorithm // to ensure that you allow enough time for the previous command to propagate // through the system. To do this, run the DescribeTasks command repeatedly, -// starting with a couple of seconds of wait time, and increasing gradually +// starting with a couple of seconds of wait time and increasing gradually // up to five minutes of wait time. // // * Add wait time between subsequent commands, even if the DescribeTasks @@ -2725,7 +2728,7 @@ func (c *ECS) RunTaskRequest(input *RunTaskInput) (req *request.Request, output // The specified platform version does not exist. // // * ErrCodePlatformTaskDefinitionIncompatibilityException "PlatformTaskDefinitionIncompatibilityException" -// The specified platform version does not satisfy the task definition’s required +// The specified platform version does not satisfy the task definition's required // capabilities. // // * ErrCodeAccessDeniedException "AccessDeniedException" @@ -3549,7 +3552,7 @@ func (c *ECS) UpdateServiceRequest(input *UpdateServiceInput) (req *request.Requ // The specified platform version does not exist. // // * ErrCodePlatformTaskDefinitionIncompatibilityException "PlatformTaskDefinitionIncompatibilityException" -// The specified platform version does not satisfy the task definition’s required +// The specified platform version does not satisfy the task definition's required // capabilities. // // * ErrCodeAccessDeniedException "AccessDeniedException" @@ -3581,7 +3584,7 @@ func (c *ECS) UpdateServiceWithContext(ctx aws.Context, input *UpdateServiceInpu type Attachment struct { _ struct{} `type:"structure"` - // Details of the attachment. For Elastic Network Interfaces, this includes + // Details of the attachment. For elastic network interfaces, this includes // the network interface ID, the MAC address, the subnet ID, and the private // IPv4 address. Details []*KeyValuePair `locationName:"details" type:"list"` @@ -3764,16 +3767,21 @@ type AwsVpcConfiguration struct { _ struct{} `type:"structure"` // Whether the task's elastic network interface receives a public IP address. + // The default value is DISABLED. AssignPublicIp *string `locationName:"assignPublicIp" type:"string" enum:"AssignPublicIp"` // The security groups associated with the task or service. If you do not specify // a security group, the default security group for the VPC is used. There is // a limit of 5 security groups able to be specified per AwsVpcConfiguration. + // + // All specified security groups must be from the same VPC. SecurityGroups []*string `locationName:"securityGroups" type:"list"` - // The subnets associated with the task or service. There is a limit of 10 subnets + // The subnets associated with the task or service. There is a limit of 16 subnets // able to be specified per AwsVpcConfiguration. // + // All specified subnets must be from the same VPC. + // // Subnets is a required field Subnets []*string `locationName:"subnets" type:"list" required:"true"` } @@ -3831,7 +3839,7 @@ type Cluster struct { ActiveServicesCount *int64 `locationName:"activeServicesCount" type:"integer"` // The Amazon Resource Name (ARN) that identifies the cluster. The ARN contains - // the arn:aws:ecs namespace, followed by the region of the cluster, the AWS + // the arn:aws:ecs namespace, followed by the Region of the cluster, the AWS // account ID of the cluster owner, the cluster namespace, and then the cluster // name. For example, arn:aws:ecs:region:012345678910:cluster/test.. ClusterArn *string `locationName:"clusterArn" type:"string"` @@ -3842,7 +3850,8 @@ type Cluster struct { // The number of tasks in the cluster that are in the PENDING state. PendingTasksCount *int64 `locationName:"pendingTasksCount" type:"integer"` - // The number of container instances registered into the cluster. + // The number of container instances registered into the cluster. This includes + // container instances in both ACTIVE and DRAINING status. RegisteredContainerInstancesCount *int64 `locationName:"registeredContainerInstancesCount" type:"integer"` // The number of tasks in the cluster that are in the RUNNING state. @@ -4036,16 +4045,16 @@ type ContainerDefinition struct { _ struct{} `type:"structure"` // The command that is passed to the container. This parameter maps to Cmd in - // the Create a container (https://docs.docker.com/engine/reference/api/docker_remote_api_v1.27/#create-a-container) - // section of the Docker Remote API (https://docs.docker.com/engine/reference/api/docker_remote_api_v1.27/) + // the Create a container (https://docs.docker.com/engine/api/v1.35/#operation/ContainerCreate) + // section of the Docker Remote API (https://docs.docker.com/engine/api/v1.35/) // and the COMMAND parameter to docker run (https://docs.docker.com/engine/reference/run/). // For more information, see https://docs.docker.com/engine/reference/builder/#cmd // (https://docs.docker.com/engine/reference/builder/#cmd). Command []*string `locationName:"command" type:"list"` // The number of cpu units reserved for the container. This parameter maps to - // CpuShares in the Create a container (https://docs.docker.com/engine/reference/api/docker_remote_api_v1.27/#create-a-container) - // section of the Docker Remote API (https://docs.docker.com/engine/reference/api/docker_remote_api_v1.27/) + // CpuShares in the Create a container (https://docs.docker.com/engine/api/v1.35/#operation/ContainerCreate) + // section of the Docker Remote API (https://docs.docker.com/engine/api/v1.35/) // and the --cpu-shares option to docker run (https://docs.docker.com/engine/reference/run/). // // This field is optional for tasks using the Fargate launch type, and the only @@ -4100,31 +4109,31 @@ type ContainerDefinition struct { Cpu *int64 `locationName:"cpu" type:"integer"` // When this parameter is true, networking is disabled within the container. - // This parameter maps to NetworkDisabled in the Create a container (https://docs.docker.com/engine/reference/api/docker_remote_api_v1.27/#create-a-container) - // section of the Docker Remote API (https://docs.docker.com/engine/reference/api/docker_remote_api_v1.27/). + // This parameter maps to NetworkDisabled in the Create a container (https://docs.docker.com/engine/api/v1.35/#operation/ContainerCreate) + // section of the Docker Remote API (https://docs.docker.com/engine/api/v1.35/). // // This parameter is not supported for Windows containers. DisableNetworking *bool `locationName:"disableNetworking" type:"boolean"` // A list of DNS search domains that are presented to the container. This parameter - // maps to DnsSearch in the Create a container (https://docs.docker.com/engine/reference/api/docker_remote_api_v1.27/#create-a-container) - // section of the Docker Remote API (https://docs.docker.com/engine/reference/api/docker_remote_api_v1.27/) + // maps to DnsSearch in the Create a container (https://docs.docker.com/engine/api/v1.35/#operation/ContainerCreate) + // section of the Docker Remote API (https://docs.docker.com/engine/api/v1.35/) // and the --dns-search option to docker run (https://docs.docker.com/engine/reference/run/). // // This parameter is not supported for Windows containers. DnsSearchDomains []*string `locationName:"dnsSearchDomains" type:"list"` // A list of DNS servers that are presented to the container. This parameter - // maps to Dns in the Create a container (https://docs.docker.com/engine/reference/api/docker_remote_api_v1.27/#create-a-container) - // section of the Docker Remote API (https://docs.docker.com/engine/reference/api/docker_remote_api_v1.27/) + // maps to Dns in the Create a container (https://docs.docker.com/engine/api/v1.35/#operation/ContainerCreate) + // section of the Docker Remote API (https://docs.docker.com/engine/api/v1.35/) // and the --dns option to docker run (https://docs.docker.com/engine/reference/run/). // // This parameter is not supported for Windows containers. DnsServers []*string `locationName:"dnsServers" type:"list"` // A key/value map of labels to add to the container. This parameter maps to - // Labels in the Create a container (https://docs.docker.com/engine/reference/api/docker_remote_api_v1.27/#create-a-container) - // section of the Docker Remote API (https://docs.docker.com/engine/reference/api/docker_remote_api_v1.27/) + // Labels in the Create a container (https://docs.docker.com/engine/api/v1.35/#operation/ContainerCreate) + // section of the Docker Remote API (https://docs.docker.com/engine/api/v1.35/) // and the --label option to docker run (https://docs.docker.com/engine/reference/run/). // This parameter requires version 1.18 of the Docker Remote API or greater // on your container instance. To check the Docker Remote API version on your @@ -4136,8 +4145,8 @@ type ContainerDefinition struct { // security systems. This field is not valid for containers in tasks using the // Fargate launch type. // - // This parameter maps to SecurityOpt in the Create a container (https://docs.docker.com/engine/reference/api/docker_remote_api_v1.27/#create-a-container) - // section of the Docker Remote API (https://docs.docker.com/engine/reference/api/docker_remote_api_v1.27/) + // This parameter maps to SecurityOpt in the Create a container (https://docs.docker.com/engine/api/v1.35/#operation/ContainerCreate) + // section of the Docker Remote API (https://docs.docker.com/engine/api/v1.35/) // and the --security-opt option to docker run (https://docs.docker.com/engine/reference/run/). // // The Amazon ECS container agent running on a container instance must register @@ -4155,16 +4164,16 @@ type ContainerDefinition struct { // agent or enter your commands and arguments as command array items instead. // // The entry point that is passed to the container. This parameter maps to Entrypoint - // in the Create a container (https://docs.docker.com/engine/reference/api/docker_remote_api_v1.27/#create-a-container) - // section of the Docker Remote API (https://docs.docker.com/engine/reference/api/docker_remote_api_v1.27/) + // in the Create a container (https://docs.docker.com/engine/api/v1.35/#operation/ContainerCreate) + // section of the Docker Remote API (https://docs.docker.com/engine/api/v1.35/) // and the --entrypoint option to docker run (https://docs.docker.com/engine/reference/run/). // For more information, see https://docs.docker.com/engine/reference/builder/#entrypoint // (https://docs.docker.com/engine/reference/builder/#entrypoint). EntryPoint []*string `locationName:"entryPoint" type:"list"` // The environment variables to pass to a container. This parameter maps to - // Env in the Create a container (https://docs.docker.com/engine/reference/api/docker_remote_api_v1.27/#create-a-container) - // section of the Docker Remote API (https://docs.docker.com/engine/reference/api/docker_remote_api_v1.27/) + // Env in the Create a container (https://docs.docker.com/engine/api/v1.35/#operation/ContainerCreate) + // section of the Docker Remote API (https://docs.docker.com/engine/api/v1.35/) // and the --env option to docker run (https://docs.docker.com/engine/reference/run/). // // We do not recommend using plaintext environment variables for sensitive information, @@ -4187,23 +4196,23 @@ type ContainerDefinition struct { // A list of hostnames and IP address mappings to append to the /etc/hosts file // on the container. If using the Fargate launch type, this may be used to list - // non-Fargate hosts you want the container to talk to. This parameter maps - // to ExtraHosts in the Create a container (https://docs.docker.com/engine/reference/api/docker_remote_api_v1.27/#create-a-container) - // section of the Docker Remote API (https://docs.docker.com/engine/reference/api/docker_remote_api_v1.27/) + // non-Fargate hosts to which the container can talk. This parameter maps to + // ExtraHosts in the Create a container (https://docs.docker.com/engine/api/v1.35/#operation/ContainerCreate) + // section of the Docker Remote API (https://docs.docker.com/engine/api/v1.35/) // and the --add-host option to docker run (https://docs.docker.com/engine/reference/run/). // // This parameter is not supported for Windows containers. ExtraHosts []*HostEntry `locationName:"extraHosts" type:"list"` // The health check command and associated configuration parameters for the - // container. This parameter maps to HealthCheck in the Create a container (https://docs.docker.com/engine/reference/api/docker_remote_api_v1.27/#create-a-container) - // section of the Docker Remote API (https://docs.docker.com/engine/reference/api/docker_remote_api_v1.27/) + // container. This parameter maps to HealthCheck in the Create a container (https://docs.docker.com/engine/api/v1.35/#operation/ContainerCreate) + // section of the Docker Remote API (https://docs.docker.com/engine/api/v1.35/) // and the HEALTHCHECK parameter of docker run (https://docs.docker.com/engine/reference/run/). HealthCheck *HealthCheck `locationName:"healthCheck" type:"structure"` // The hostname to use for your container. This parameter maps to Hostname in - // the Create a container (https://docs.docker.com/engine/reference/api/docker_remote_api_v1.27/#create-a-container) - // section of the Docker Remote API (https://docs.docker.com/engine/reference/api/docker_remote_api_v1.27/) + // the Create a container (https://docs.docker.com/engine/api/v1.35/#operation/ContainerCreate) + // section of the Docker Remote API (https://docs.docker.com/engine/api/v1.35/) // and the --hostname option to docker run (https://docs.docker.com/engine/reference/run/). // // The hostname parameter is not supported if using the awsvpc networkMode. @@ -4215,9 +4224,9 @@ type ContainerDefinition struct { // repository-url/image@digest. Up to 255 letters (uppercase and lowercase), // numbers, hyphens, underscores, colons, periods, forward slashes, and number // signs are allowed. This parameter maps to Image in the Create a container - // (https://docs.docker.com/engine/reference/api/docker_remote_api_v1.27/#create-a-container) - // section of the Docker Remote API (https://docs.docker.com/engine/reference/api/docker_remote_api_v1.27/) - // and the IMAGE parameter of docker run (https://docs.docker.com/engine/reference/run/). + // (https://docs.docker.com/engine/api/v1.35/#operation/ContainerCreate) section + // of the Docker Remote API (https://docs.docker.com/engine/api/v1.35/) and + // the IMAGE parameter of docker run (https://docs.docker.com/engine/reference/run/). // // * When a new task starts, the Amazon ECS container agent pulls the latest // version of the specified image and tag for the container to use. However, @@ -4240,6 +4249,13 @@ type ContainerDefinition struct { // name (for example, quay.io/assemblyline/ubuntu). Image *string `locationName:"image" type:"string"` + // When this parameter is true, this allows you to deploy containerized applications + // that require stdin or a tty to be allocated. This parameter maps to OpenStdin + // in the Create a container (https://docs.docker.com/engine/api/v1.35/#operation/ContainerCreate) + // section of the Docker Remote API (https://docs.docker.com/engine/api/v1.35/) + // and the --interactive option to docker run (https://docs.docker.com/engine/reference/run/). + Interactive *bool `locationName:"interactive" type:"boolean"` + // The link parameter allows containers to communicate with each other without // the need for port mappings. Only supported if the network mode of a task // definition is set to bridge. The name:internalName construct is analogous @@ -4247,8 +4263,8 @@ type ContainerDefinition struct { // numbers, hyphens, and underscores are allowed. For more information about // linking Docker containers, go to https://docs.docker.com/engine/userguide/networking/default_network/dockerlinks/ // (https://docs.docker.com/engine/userguide/networking/default_network/dockerlinks/). - // This parameter maps to Links in the Create a container (https://docs.docker.com/engine/reference/api/docker_remote_api_v1.27/#create-a-container) - // section of the Docker Remote API (https://docs.docker.com/engine/reference/api/docker_remote_api_v1.27/) + // This parameter maps to Links in the Create a container (https://docs.docker.com/engine/api/v1.35/#operation/ContainerCreate) + // section of the Docker Remote API (https://docs.docker.com/engine/api/v1.35/) // and the --link option to docker run (https://docs.docker.com/engine/reference/commandline/run/). // // This parameter is not supported for Windows containers. @@ -4269,8 +4285,8 @@ type ContainerDefinition struct { // // If using the Fargate launch type, the only supported value is awslogs. // - // This parameter maps to LogConfig in the Create a container (https://docs.docker.com/engine/reference/api/docker_remote_api_v1.27/#create-a-container) - // section of the Docker Remote API (https://docs.docker.com/engine/reference/api/docker_remote_api_v1.27/) + // This parameter maps to LogConfig in the Create a container (https://docs.docker.com/engine/api/v1.35/#operation/ContainerCreate) + // section of the Docker Remote API (https://docs.docker.com/engine/api/v1.35/) // and the --log-driver option to docker run (https://docs.docker.com/engine/reference/run/). // By default, containers use the same logging driver that the Docker daemon // uses; however the container may use a different logging driver than the Docker @@ -4300,8 +4316,8 @@ type ContainerDefinition struct { // The hard limit (in MiB) of memory to present to the container. If your container // attempts to exceed the memory specified here, the container is killed. This - // parameter maps to Memory in the Create a container (https://docs.docker.com/engine/reference/api/docker_remote_api_v1.27/#create-a-container) - // section of the Docker Remote API (https://docs.docker.com/engine/reference/api/docker_remote_api_v1.27/) + // parameter maps to Memory in the Create a container (https://docs.docker.com/engine/api/v1.35/#operation/ContainerCreate) + // section of the Docker Remote API (https://docs.docker.com/engine/api/v1.35/) // and the --memory option to docker run (https://docs.docker.com/engine/reference/run/). // // If your containers are part of a task using the Fargate launch type, this @@ -4325,8 +4341,8 @@ type ContainerDefinition struct { // it needs to, up to either the hard limit specified with the memory parameter // (if applicable), or all of the available memory on the container instance, // whichever comes first. This parameter maps to MemoryReservation in the Create - // a container (https://docs.docker.com/engine/reference/api/docker_remote_api_v1.27/#create-a-container) - // section of the Docker Remote API (https://docs.docker.com/engine/reference/api/docker_remote_api_v1.27/) + // a container (https://docs.docker.com/engine/api/v1.35/#operation/ContainerCreate) + // section of the Docker Remote API (https://docs.docker.com/engine/api/v1.35/) // and the --memory-reservation option to docker run (https://docs.docker.com/engine/reference/run/). // // You must specify a non-zero integer for one or both of memory or memoryReservation @@ -4348,8 +4364,8 @@ type ContainerDefinition struct { // The mount points for data volumes in your container. // - // This parameter maps to Volumes in the Create a container (https://docs.docker.com/engine/reference/api/docker_remote_api_v1.27/#create-a-container) - // section of the Docker Remote API (https://docs.docker.com/engine/reference/api/docker_remote_api_v1.27/) + // This parameter maps to Volumes in the Create a container (https://docs.docker.com/engine/api/v1.35/#operation/ContainerCreate) + // section of the Docker Remote API (https://docs.docker.com/engine/api/v1.35/) // and the --volume option to docker run (https://docs.docker.com/engine/reference/run/). // // Windows containers can mount whole directories on the same drive as $env:ProgramData. @@ -4361,8 +4377,8 @@ type ContainerDefinition struct { // in a task definition, the name of one container can be entered in the links // of another container to connect the containers. Up to 255 letters (uppercase // and lowercase), numbers, hyphens, and underscores are allowed. This parameter - // maps to name in the Create a container (https://docs.docker.com/engine/reference/api/docker_remote_api_v1.27/#create-a-container) - // section of the Docker Remote API (https://docs.docker.com/engine/reference/api/docker_remote_api_v1.27/) + // maps to name in the Create a container (https://docs.docker.com/engine/api/v1.35/#operation/ContainerCreate) + // section of the Docker Remote API (https://docs.docker.com/engine/api/v1.35/) // and the --name option to docker run (https://docs.docker.com/engine/reference/run/). Name *string `locationName:"name" type:"string"` @@ -4377,8 +4393,8 @@ type ContainerDefinition struct { // There is no loopback for port mappings on Windows, so you cannot access a // container's mapped port from the host itself. // - // This parameter maps to PortBindings in the Create a container (https://docs.docker.com/engine/reference/api/docker_remote_api_v1.27/#create-a-container) - // section of the Docker Remote API (https://docs.docker.com/engine/reference/api/docker_remote_api_v1.27/) + // This parameter maps to PortBindings in the Create a container (https://docs.docker.com/engine/api/v1.35/#operation/ContainerCreate) + // section of the Docker Remote API (https://docs.docker.com/engine/api/v1.35/) // and the --publish option to docker run (https://docs.docker.com/engine/reference/run/). // If the network mode of a task definition is set to none, then you can't specify // port mappings. If the network mode of a task definition is set to host, then @@ -4387,32 +4403,52 @@ type ContainerDefinition struct { // // After a task reaches the RUNNING status, manual and automatic host and container // port assignments are visible in the Network Bindings section of a container - // description for a selected task in the Amazon ECS console, or the networkBindings - // section DescribeTasks responses. + // description for a selected task in the Amazon ECS console. The assignments + // are also visible in the networkBindings section DescribeTasks responses. PortMappings []*PortMapping `locationName:"portMappings" type:"list"` // When this parameter is true, the container is given elevated privileges on // the host container instance (similar to the root user). This parameter maps - // to Privileged in the Create a container (https://docs.docker.com/engine/reference/api/docker_remote_api_v1.27/#create-a-container) - // section of the Docker Remote API (https://docs.docker.com/engine/reference/api/docker_remote_api_v1.27/) + // to Privileged in the Create a container (https://docs.docker.com/engine/api/v1.35/#operation/ContainerCreate) + // section of the Docker Remote API (https://docs.docker.com/engine/api/v1.35/) // and the --privileged option to docker run (https://docs.docker.com/engine/reference/run/). // // This parameter is not supported for Windows containers or tasks using the // Fargate launch type. Privileged *bool `locationName:"privileged" type:"boolean"` + // When this parameter is true, a TTY is allocated. This parameter maps to Tty + // in the Create a container (https://docs.docker.com/engine/api/v1.35/#operation/ContainerCreate) + // section of the Docker Remote API (https://docs.docker.com/engine/api/v1.35/) + // and the --tty option to docker run (https://docs.docker.com/engine/reference/run/). + PseudoTerminal *bool `locationName:"pseudoTerminal" type:"boolean"` + // When this parameter is true, the container is given read-only access to its // root file system. This parameter maps to ReadonlyRootfs in the Create a container - // (https://docs.docker.com/engine/reference/api/docker_remote_api_v1.27/#create-a-container) - // section of the Docker Remote API (https://docs.docker.com/engine/reference/api/docker_remote_api_v1.27/) - // and the --read-only option to docker run. + // (https://docs.docker.com/engine/api/v1.35/#operation/ContainerCreate) section + // of the Docker Remote API (https://docs.docker.com/engine/api/v1.35/) and + // the --read-only option to docker run (https://docs.docker.com/engine/reference/run/). // // This parameter is not supported for Windows containers. ReadonlyRootFilesystem *bool `locationName:"readonlyRootFilesystem" type:"boolean"` + // The private repository authentication credentials to use. + RepositoryCredentials *RepositoryCredentials `locationName:"repositoryCredentials" type:"structure"` + + // A list of namespaced kernel parameters to set in the container. This parameter + // maps to Sysctls in the Create a container (https://docs.docker.com/engine/api/v1.35/#operation/ContainerCreate) + // section of the Docker Remote API (https://docs.docker.com/engine/api/v1.35/) + // and the --sysctl option to docker run (https://docs.docker.com/engine/reference/run/). + // + // It is not recommended that you specify network-related systemControls parameters + // for multiple containers in a single task that also uses either the awsvpc + // or host network modes. When you do, the container that is started last will + // determine which systemControls parameters take effect. + SystemControls []*SystemControl `locationName:"systemControls" type:"list"` + // A list of ulimits to set in the container. This parameter maps to Ulimits - // in the Create a container (https://docs.docker.com/engine/reference/api/docker_remote_api_v1.27/#create-a-container) - // section of the Docker Remote API (https://docs.docker.com/engine/reference/api/docker_remote_api_v1.27/) + // in the Create a container (https://docs.docker.com/engine/api/v1.35/#operation/ContainerCreate) + // section of the Docker Remote API (https://docs.docker.com/engine/api/v1.35/) // and the --ulimit option to docker run (https://docs.docker.com/engine/reference/run/). // Valid naming values are displayed in the Ulimit data type. This parameter // requires version 1.18 of the Docker Remote API or greater on your container @@ -4424,22 +4460,22 @@ type ContainerDefinition struct { Ulimits []*Ulimit `locationName:"ulimits" type:"list"` // The user name to use inside the container. This parameter maps to User in - // the Create a container (https://docs.docker.com/engine/reference/api/docker_remote_api_v1.27/#create-a-container) - // section of the Docker Remote API (https://docs.docker.com/engine/reference/api/docker_remote_api_v1.27/) + // the Create a container (https://docs.docker.com/engine/api/v1.35/#operation/ContainerCreate) + // section of the Docker Remote API (https://docs.docker.com/engine/api/v1.35/) // and the --user option to docker run (https://docs.docker.com/engine/reference/run/). // // This parameter is not supported for Windows containers. User *string `locationName:"user" type:"string"` // Data volumes to mount from another container. This parameter maps to VolumesFrom - // in the Create a container (https://docs.docker.com/engine/reference/api/docker_remote_api_v1.27/#create-a-container) - // section of the Docker Remote API (https://docs.docker.com/engine/reference/api/docker_remote_api_v1.27/) + // in the Create a container (https://docs.docker.com/engine/api/v1.35/#operation/ContainerCreate) + // section of the Docker Remote API (https://docs.docker.com/engine/api/v1.35/) // and the --volumes-from option to docker run (https://docs.docker.com/engine/reference/run/). VolumesFrom []*VolumeFrom `locationName:"volumesFrom" type:"list"` // The working directory in which to run commands inside the container. This - // parameter maps to WorkingDir in the Create a container (https://docs.docker.com/engine/reference/api/docker_remote_api_v1.27/#create-a-container) - // section of the Docker Remote API (https://docs.docker.com/engine/reference/api/docker_remote_api_v1.27/) + // parameter maps to WorkingDir in the Create a container (https://docs.docker.com/engine/api/v1.35/#operation/ContainerCreate) + // section of the Docker Remote API (https://docs.docker.com/engine/api/v1.35/) // and the --workdir option to docker run (https://docs.docker.com/engine/reference/run/). WorkingDirectory *string `locationName:"workingDirectory" type:"string"` } @@ -4482,6 +4518,11 @@ func (s *ContainerDefinition) Validate() error { invalidParams.AddNested("LogConfiguration", err.(request.ErrInvalidParams)) } } + if s.RepositoryCredentials != nil { + if err := s.RepositoryCredentials.Validate(); err != nil { + invalidParams.AddNested("RepositoryCredentials", err.(request.ErrInvalidParams)) + } + } if s.Ulimits != nil { for i, v := range s.Ulimits { if v == nil { @@ -4583,6 +4624,12 @@ func (s *ContainerDefinition) SetImage(v string) *ContainerDefinition { return s } +// SetInteractive sets the Interactive field's value. +func (s *ContainerDefinition) SetInteractive(v bool) *ContainerDefinition { + s.Interactive = &v + return s +} + // SetLinks sets the Links field's value. func (s *ContainerDefinition) SetLinks(v []*string) *ContainerDefinition { s.Links = v @@ -4637,12 +4684,30 @@ func (s *ContainerDefinition) SetPrivileged(v bool) *ContainerDefinition { return s } +// SetPseudoTerminal sets the PseudoTerminal field's value. +func (s *ContainerDefinition) SetPseudoTerminal(v bool) *ContainerDefinition { + s.PseudoTerminal = &v + return s +} + // SetReadonlyRootFilesystem sets the ReadonlyRootFilesystem field's value. func (s *ContainerDefinition) SetReadonlyRootFilesystem(v bool) *ContainerDefinition { s.ReadonlyRootFilesystem = &v return s } +// SetRepositoryCredentials sets the RepositoryCredentials field's value. +func (s *ContainerDefinition) SetRepositoryCredentials(v *RepositoryCredentials) *ContainerDefinition { + s.RepositoryCredentials = v + return s +} + +// SetSystemControls sets the SystemControls field's value. +func (s *ContainerDefinition) SetSystemControls(v []*SystemControl) *ContainerDefinition { + s.SystemControls = v + return s +} + // SetUlimits sets the Ulimits field's value. func (s *ContainerDefinition) SetUlimits(v []*Ulimit) *ContainerDefinition { s.Ulimits = v @@ -4673,15 +4738,15 @@ type ContainerInstance struct { _ struct{} `type:"structure"` // This parameter returns true if the agent is connected to Amazon ECS. Registered - // instances with an agent that may be unhealthy or stopped return false. Instances - // without a connected agent can't accept placement requests. + // instances with an agent that may be unhealthy or stopped return false. Only + // instances connected to an agent can accept placement requests. AgentConnected *bool `locationName:"agentConnected" type:"boolean"` // The status of the most recent agent update. If an update has never been requested, // this value is NULL. AgentUpdateStatus *string `locationName:"agentUpdateStatus" type:"string" enum:"AgentUpdateStatus"` - // The Elastic Network Interfaces associated with the container instance. + // The elastic network interfaces associated with the container instance. Attachments []*Attachment `locationName:"attachments" type:"list"` // The attributes set for the container instance, either by the Amazon ECS container @@ -4689,7 +4754,7 @@ type ContainerInstance struct { Attributes []*Attribute `locationName:"attributes" type:"list"` // The Amazon Resource Name (ARN) of the container instance. The ARN contains - // the arn:aws:ecs namespace, followed by the region of the container instance, + // the arn:aws:ecs namespace, followed by the Region of the container instance, // the AWS account ID of the container instance owner, the container-instance // namespace, and then the container instance ID. For example, arn:aws:ecs:region:aws_account_id:container-instance/container_instance_ID. ContainerInstanceArn *string `locationName:"containerInstanceArn" type:"string"` @@ -5055,7 +5120,7 @@ type CreateServiceInput struct { // has first started. This is only valid if your service is configured to use // a load balancer. If your service's tasks take a while to start and respond // to Elastic Load Balancing health checks, you can specify a health check grace - // period of up to 1,800 seconds during which the ECS service scheduler ignores + // period of up to 7,200 seconds during which the ECS service scheduler ignores // health check status. This grace period can prevent the ECS service scheduler // from marking tasks as unhealthy and stopping them before they have time to // come up. @@ -5154,13 +5219,13 @@ type CreateServiceInput struct { // The name of your service. Up to 255 letters (uppercase and lowercase), numbers, // hyphens, and underscores are allowed. Service names must be unique within // a cluster, but you can have similarly named services in multiple clusters - // within a region or across multiple regions. + // within a Region or across multiple Regions. // // ServiceName is a required field ServiceName *string `locationName:"serviceName" type:"string" required:"true"` - // The details of the service discovery registries you want to assign to this - // service. For more information, see Service Discovery (http://docs.aws.amazon.com/AmazonECS/latest/developerguide/service-discovery.html). + // The details of the service discovery registries to assign to this service. + // For more information, see Service Discovery (http://docs.aws.amazon.com/AmazonECS/latest/developerguide/service-discovery.html). // // Service discovery is supported for Fargate tasks if using platform version // v1.1.0 or later. For more information, see AWS Fargate Platform Versions @@ -5572,7 +5637,7 @@ type Deployment struct { LaunchType *string `locationName:"launchType" type:"string" enum:"LaunchType"` // The VPC subnet and security group configuration for tasks that receive their - // own Elastic Network Interface by using the awsvpc networking mode. + // own elastic network interface by using the awsvpc networking mode. NetworkConfiguration *NetworkConfiguration `locationName:"networkConfiguration" type:"structure"` // The number of tasks in the deployment that are in the PENDING status. @@ -5723,7 +5788,7 @@ type DeregisterContainerInstanceInput struct { Cluster *string `locationName:"cluster" type:"string"` // The container instance ID or full ARN of the container instance to deregister. - // The ARN contains the arn:aws:ecs namespace, followed by the region of the + // The ARN contains the arn:aws:ecs namespace, followed by the Region of the // container instance, the AWS account ID of the container instance owner, the // container-instance namespace, and then the container instance ID. For example, // arn:aws:ecs:region:aws_account_id:container-instance/container_instance_ID. @@ -6328,7 +6393,7 @@ type DiscoverPollEndpointInput struct { Cluster *string `locationName:"cluster" type:"string"` // The container instance ID or full ARN of the container instance. The ARN - // contains the arn:aws:ecs namespace, followed by the region of the container + // contains the arn:aws:ecs namespace, followed by the Region of the container // instance, the AWS account ID of the container instance owner, the container-instance // namespace, and then the container instance ID. For example, arn:aws:ecs:region:aws_account_id:container-instance/container_instance_ID. ContainerInstance *string `locationName:"containerInstance" type:"string"` @@ -6388,6 +6453,88 @@ func (s *DiscoverPollEndpointOutput) SetTelemetryEndpoint(v string) *DiscoverPol return s } +// This parameter is specified when using Docker volumes. Docker volumes are +// only supported when using the EC2 launch type. Windows containers only support +// the use of the local driver. To use bind mounts, specify a host instead. +type DockerVolumeConfiguration struct { + _ struct{} `type:"structure"` + + // If this value is true, the Docker volume is created if it does not already + // exist. + // + // This field is only used if the scope is shared. + Autoprovision *bool `locationName:"autoprovision" type:"boolean"` + + // The Docker volume driver to use. The driver value must match the driver name + // provided by Docker because it is used for task placement. If the driver was + // installed using the Docker plugin CLI, use docker plugin ls to retrieve the + // driver name from your container instance. If the driver was installed using + // another method, use Docker plugin discovery to retrieve the driver name. + // For more information, see Docker plugin discovery (https://docs.docker.com/engine/extend/plugin_api/#plugin-discovery). + // This parameter maps to Driver in the Create a volume (https://docs.docker.com/engine/api/v1.35/#operation/VolumeCreate) + // section of the Docker Remote API (https://docs.docker.com/engine/api/v1.35/) + // and the xxdriver option to docker volume create (https://docs.docker.com/engine/reference/commandline/volume_create/). + Driver *string `locationName:"driver" type:"string"` + + // A map of Docker driver specific options passed through. This parameter maps + // to DriverOpts in the Create a volume (https://docs.docker.com/engine/api/v1.35/#operation/VolumeCreate) + // section of the Docker Remote API (https://docs.docker.com/engine/api/v1.35/) + // and the xxopt option to docker volume create (https://docs.docker.com/engine/reference/commandline/volume_create/). + DriverOpts map[string]*string `locationName:"driverOpts" type:"map"` + + // Custom metadata to add to your Docker volume. This parameter maps to Labels + // in the Create a volume (https://docs.docker.com/engine/api/v1.35/#operation/VolumeCreate) + // section of the Docker Remote API (https://docs.docker.com/engine/api/v1.35/) + // and the xxlabel option to docker volume create (https://docs.docker.com/engine/reference/commandline/volume_create/). + Labels map[string]*string `locationName:"labels" type:"map"` + + // The scope for the Docker volume which determines it's lifecycle. Docker volumes + // that are scoped to a task are automatically provisioned when the task starts + // and destroyed when the task stops. Docker volumes that are scoped as shared + // persist after the task stops. + Scope *string `locationName:"scope" type:"string" enum:"Scope"` +} + +// String returns the string representation +func (s DockerVolumeConfiguration) String() string { + return awsutil.Prettify(s) +} + +// GoString returns the string representation +func (s DockerVolumeConfiguration) GoString() string { + return s.String() +} + +// SetAutoprovision sets the Autoprovision field's value. +func (s *DockerVolumeConfiguration) SetAutoprovision(v bool) *DockerVolumeConfiguration { + s.Autoprovision = &v + return s +} + +// SetDriver sets the Driver field's value. +func (s *DockerVolumeConfiguration) SetDriver(v string) *DockerVolumeConfiguration { + s.Driver = &v + return s +} + +// SetDriverOpts sets the DriverOpts field's value. +func (s *DockerVolumeConfiguration) SetDriverOpts(v map[string]*string) *DockerVolumeConfiguration { + s.DriverOpts = v + return s +} + +// SetLabels sets the Labels field's value. +func (s *DockerVolumeConfiguration) SetLabels(v map[string]*string) *DockerVolumeConfiguration { + s.Labels = v + return s +} + +// SetScope sets the Scope field's value. +func (s *DockerVolumeConfiguration) SetScope(v string) *DockerVolumeConfiguration { + s.Scope = &v + return s +} + // A failed resource. type Failure struct { _ struct{} `type:"structure"` @@ -6425,6 +6572,19 @@ func (s *Failure) SetReason(v string) *Failure { // that are specified in a container definition override any Docker health checks // that exist in the container image (such as those specified in a parent image // or from the image's Dockerfile). +// +// The following are notes about container health check support: +// +// * Container health checks require version 1.17.0 or greater of the Amazon +// ECS container agent. For more information, see Updating the Amazon ECS +// Container Agent (https://docs.aws.amazon.com/AmazonECS/latest/developerguide/ecs-agent-update.html). +// +// * Container health checks are supported for Fargate tasks if using platform +// version version 1.1.0 or greater. For more information, see AWS Fargate +// Platform Versions (https://docs.aws.amazon.com/AmazonECS/latest/developerguide/platform_versions.html). +// +// * Container health checks are not supported for tasks that are part of +// a service that is configured to use a Classic Load Balancer. type HealthCheck struct { _ struct{} `type:"structure"` @@ -6436,8 +6596,8 @@ type HealthCheck struct { // [ "CMD-SHELL", "curl -f http://localhost/ || exit 1" ] // // An exit code of 0 indicates success, and non-zero exit code indicates failure. - // For more information, see HealthCheck in the Create a container (https://docs.docker.com/engine/reference/api/docker_remote_api_v1.27/#create-a-container) - // section of the Docker Remote API (https://docs.docker.com/engine/reference/api/docker_remote_api_v1.27/). + // For more information, see HealthCheck in the Create a container (https://docs.docker.com/engine/api/v1.35/#operation/ContainerCreate) + // section of the Docker Remote API (https://docs.docker.com/engine/api/v1.35/). // // Command is a required field Command []*string `locationName:"command" type:"list" required:"true"` @@ -6448,7 +6608,7 @@ type HealthCheck struct { // The number of times to retry a failed health check before the container is // considered unhealthy. You may specify between 1 and 10 retries. The default - // value is 3 retries. + // value is 3. Retries *int64 `locationName:"retries" type:"integer"` // The optional grace period within which to provide containers time to bootstrap @@ -6463,7 +6623,7 @@ type HealthCheck struct { // The time period in seconds to wait for a health check to succeed before it // is considered a failure. You may specify between 2 and 60 seconds. The default - // value is 5 seconds. + // value is 5. Timeout *int64 `locationName:"timeout" type:"integer"` } @@ -6574,17 +6734,18 @@ func (s *HostEntry) SetIpAddress(v string) *HostEntry { return s } -// Details on a container instance host volume. +// Details on a container instance bind mount host volume. type HostVolumeProperties struct { _ struct{} `type:"structure"` - // The path on the host container instance that is presented to the container. - // If this parameter is empty, then the Docker daemon has assigned a host path - // for you. If the host parameter contains a sourcePath file location, then - // the data volume persists at the specified location on the host container - // instance until you delete it manually. If the sourcePath value does not exist - // on the host container instance, the Docker daemon creates it. If the location - // does exist, the contents of the source path folder are exported. + // When the host parameter is used, specify a sourcePath to declare the path + // on the host container instance that is presented to the container. If this + // parameter is empty, then the Docker daemon has assigned a host path for you. + // If the host parameter contains a sourcePath file location, then the data + // volume persists at the specified location on the host container instance + // until you delete it manually. If the sourcePath value does not exist on the + // host container instance, the Docker daemon creates it. If the location does + // exist, the contents of the source path folder are exported. // // If you are using the Fargate launch type, the sourcePath parameter is not // supported. @@ -6619,8 +6780,8 @@ type KernelCapabilities struct { // The Linux capabilities for the container that have been added to the default // configuration provided by Docker. This parameter maps to CapAdd in the Create - // a container (https://docs.docker.com/engine/reference/api/docker_remote_api_v1.27/#create-a-container) - // section of the Docker Remote API (https://docs.docker.com/engine/reference/api/docker_remote_api_v1.27/) + // a container (https://docs.docker.com/engine/api/v1.35/#operation/ContainerCreate) + // section of the Docker Remote API (https://docs.docker.com/engine/api/v1.35/) // and the --cap-add option to docker run (https://docs.docker.com/engine/reference/run/). // // If you are using tasks that use the Fargate launch type, the add parameter @@ -6638,8 +6799,8 @@ type KernelCapabilities struct { // The Linux capabilities for the container that have been removed from the // default configuration provided by Docker. This parameter maps to CapDrop - // in the Create a container (https://docs.docker.com/engine/reference/api/docker_remote_api_v1.27/#create-a-container) - // section of the Docker Remote API (https://docs.docker.com/engine/reference/api/docker_remote_api_v1.27/) + // in the Create a container (https://docs.docker.com/engine/api/v1.35/#operation/ContainerCreate) + // section of the Docker Remote API (https://docs.docker.com/engine/api/v1.35/) // and the --cap-drop option to docker run (https://docs.docker.com/engine/reference/run/). // // Valid values: "ALL" | "AUDIT_CONTROL" | "AUDIT_WRITE" | "BLOCK_SUSPEND" | @@ -6722,8 +6883,8 @@ type LinuxParameters struct { Capabilities *KernelCapabilities `locationName:"capabilities" type:"structure"` // Any host devices to expose to the container. This parameter maps to Devices - // in the Create a container (https://docs.docker.com/engine/reference/api/docker_remote_api_v1.27/#create-a-container) - // section of the Docker Remote API (https://docs.docker.com/engine/reference/api/docker_remote_api_v1.27/) + // in the Create a container (https://docs.docker.com/engine/api/v1.35/#operation/ContainerCreate) + // section of the Docker Remote API (https://docs.docker.com/engine/api/v1.35/) // and the --device option to docker run (https://docs.docker.com/engine/reference/run/). // // If you are using tasks that use the Fargate launch type, the devices parameter @@ -7160,7 +7321,7 @@ type ListServicesInput struct { // is assumed. Cluster *string `locationName:"cluster" type:"string"` - // The launch type for services you want to list. + // The launch type for the services to list. LaunchType *string `locationName:"launchType" type:"string" enum:"LaunchType"` // The maximum number of service results returned by ListServices in paginated @@ -7515,7 +7676,7 @@ type ListTasksInput struct { // a family limits the results to tasks that belong to that family. Family *string `locationName:"family" type:"string"` - // The launch type for services you want to list. + // The launch type for services to list. LaunchType *string `locationName:"launchType" type:"string" enum:"LaunchType"` // The maximum number of task results returned by ListTasks in paginated output. @@ -7793,7 +7954,8 @@ type MountPoint struct { // value is false. ReadOnly *bool `locationName:"readOnly" type:"boolean"` - // The name of the volume to mount. + // The name of the volume to mount. Must be a volume name referenced in the + // name parameter of task definition volume. SourceVolume *string `locationName:"sourceVolume" type:"string"` } @@ -7884,6 +8046,8 @@ type NetworkConfiguration struct { _ struct{} `type:"structure"` // The VPC subnets and security groups associated with a task. + // + // All specified subnets and security groups must be from the same VPC. AwsvpcConfiguration *AwsVpcConfiguration `locationName:"awsvpcConfiguration" type:"structure"` } @@ -7918,7 +8082,7 @@ func (s *NetworkConfiguration) SetAwsvpcConfiguration(v *AwsVpcConfiguration) *N return s } -// An object representing the Elastic Network Interface for tasks that use the +// An object representing the elastic network interface for tasks that use the // awsvpc network mode. type NetworkInterface struct { _ struct{} `type:"structure"` @@ -7967,9 +8131,9 @@ func (s *NetworkInterface) SetPrivateIpv4Address(v string) *NetworkInterface { type PlacementConstraint struct { _ struct{} `type:"structure"` - // A cluster query language expression to apply to the constraint. Note you - // cannot specify an expression if the constraint type is distinctInstance. - // For more information, see Cluster Query Language (http://docs.aws.amazon.com/AmazonECS/latest/developerguide/cluster-query-language.html) + // A cluster query language expression to apply to the constraint. You cannot + // specify an expression if the constraint type is distinctInstance. For more + // information, see Cluster Query Language (http://docs.aws.amazon.com/AmazonECS/latest/developerguide/cluster-query-language.html) // in the Amazon Elastic Container Service Developer Guide. Expression *string `locationName:"expression" type:"string"` @@ -8360,8 +8524,8 @@ type RegisterTaskDefinitionInput struct { // The number of CPU units used by the task. It can be expressed as an integer // using CPU units, for example 1024, or as a string using vCPUs, for example - // 1 vCPU or 1 vcpu, in a task definition but will be converted to an integer - // indicating the CPU units when the task definition is registered. + // 1 vCPU or 1 vcpu, in a task definition. String values are converted to an + // integer indicating the CPU units when the task definition is registered. // // Task-level CPU and memory parameters are ignored for Windows containers. // We recommend specifying container-level resources for Windows containers. @@ -8403,8 +8567,8 @@ type RegisterTaskDefinitionInput struct { // The amount of memory (in MiB) used by the task. It can be expressed as an // integer using MiB, for example 1024, or as a string using GB, for example - // 1GB or 1 GB, in a task definition but will be converted to an integer indicating - // the MiB when the task definition is registered. + // 1GB or 1 GB, in a task definition. String values are converted to an integer + // indicating the MiB when the task definition is registered. // // Task-level CPU and memory parameters are ignored for Windows containers. // We recommend specifying container-level resources for Windows containers. @@ -8603,6 +8767,46 @@ func (s *RegisterTaskDefinitionOutput) SetTaskDefinition(v *TaskDefinition) *Reg return s } +// The repository credentials for private registry authentication. +type RepositoryCredentials struct { + _ struct{} `type:"structure"` + + // The Amazon Resource Name (ARN) or name of the secret containing the private + // repository credentials. + // + // CredentialsParameter is a required field + CredentialsParameter *string `locationName:"credentialsParameter" type:"string" required:"true"` +} + +// String returns the string representation +func (s RepositoryCredentials) String() string { + return awsutil.Prettify(s) +} + +// GoString returns the string representation +func (s RepositoryCredentials) GoString() string { + return s.String() +} + +// Validate inspects the fields of the type to determine if they are valid. +func (s *RepositoryCredentials) Validate() error { + invalidParams := request.ErrInvalidParams{Context: "RepositoryCredentials"} + if s.CredentialsParameter == nil { + invalidParams.Add(request.NewErrParamRequired("CredentialsParameter")) + } + + if invalidParams.Len() > 0 { + return invalidParams + } + return nil +} + +// SetCredentialsParameter sets the CredentialsParameter field's value. +func (s *RepositoryCredentials) SetCredentialsParameter(v string) *RepositoryCredentials { + s.CredentialsParameter = &v + return s +} + // Describes the resources available for a container instance. type Resource struct { _ struct{} `type:"structure"` @@ -8919,7 +9123,7 @@ type Service struct { LoadBalancers []*LoadBalancer `locationName:"loadBalancers" type:"list"` // The VPC subnet and security group configuration for tasks that receive their - // own Elastic Network Interface by using the awsvpc networking mode. + // own elastic network interface by using the awsvpc networking mode. NetworkConfiguration *NetworkConfiguration `locationName:"networkConfiguration" type:"structure"` // The number of tasks in the cluster that are in the PENDING state. @@ -8962,14 +9166,14 @@ type Service struct { SchedulingStrategy *string `locationName:"schedulingStrategy" type:"string" enum:"SchedulingStrategy"` // The ARN that identifies the service. The ARN contains the arn:aws:ecs namespace, - // followed by the region of the service, the AWS account ID of the service + // followed by the Region of the service, the AWS account ID of the service // owner, the service namespace, and then the service name. For example, arn:aws:ecs:region:012345678910:service/my-service. ServiceArn *string `locationName:"serviceArn" type:"string"` // The name of your service. Up to 255 letters (uppercase and lowercase), numbers, // hyphens, and underscores are allowed. Service names must be unique within // a cluster, but you can have similarly named services in multiple clusters - // within a region or across multiple regions. + // within a Region or across multiple Regions. ServiceName *string `locationName:"serviceName" type:"string"` ServiceRegistries []*ServiceRegistry `locationName:"serviceRegistries" type:"list"` @@ -9190,7 +9394,7 @@ type ServiceRegistry struct { ContainerPort *int64 `locationName:"containerPort" type:"integer"` // The port value used if your service discovery service specified an SRV record. - // This field is required if both the awsvpc network mode and SRV records are + // This field may be used if both the awsvpc network mode and SRV records are // used. Port *int64 `locationName:"port" type:"integer"` @@ -9254,7 +9458,7 @@ type StartTaskInput struct { Group *string `locationName:"group" type:"string"` // The VPC subnet and security group configuration for tasks that receive their - // own Elastic Network Interface by using the awsvpc networking mode. + // own elastic network interface by using the awsvpc networking mode. NetworkConfiguration *NetworkConfiguration `locationName:"networkConfiguration" type:"structure"` // A list of container overrides in JSON format that specify the name of a container @@ -9717,11 +9921,52 @@ func (s *SubmitTaskStateChangeOutput) SetAcknowledgment(v string) *SubmitTaskSta return s } +// A list of namespaced kernel parameters to set in the container. This parameter +// maps to Sysctls in the Create a container (https://docs.docker.com/engine/api/v1.35/#operation/ContainerCreate) +// section of the Docker Remote API (https://docs.docker.com/engine/api/v1.35/) +// and the --sysctl option to docker run (https://docs.docker.com/engine/reference/run/). +// +// It is not recommended that you specify network-related systemControls parameters +// for multiple containers in a single task that also uses either the awsvpc +// or host network modes. When you do, the container that is started last will +// determine which systemControls parameters take effect. +type SystemControl struct { + _ struct{} `type:"structure"` + + // The namespaced kernel parameter to set a value for. + Namespace *string `locationName:"namespace" type:"string"` + + // The value for the namespaced kernel parameter specifed in namespace. + Value *string `locationName:"value" type:"string"` +} + +// String returns the string representation +func (s SystemControl) String() string { + return awsutil.Prettify(s) +} + +// GoString returns the string representation +func (s SystemControl) GoString() string { + return s.String() +} + +// SetNamespace sets the Namespace field's value. +func (s *SystemControl) SetNamespace(v string) *SystemControl { + s.Namespace = &v + return s +} + +// SetValue sets the Value field's value. +func (s *SystemControl) SetValue(v string) *SystemControl { + s.Value = &v + return s +} + // Details on a task in a cluster. type Task struct { _ struct{} `type:"structure"` - // The Elastic Network Adapter associated with the task if the task uses the + // The elastic network adapter associated with the task if the task uses the // awsvpc network mode. Attachments []*Attachment `locationName:"attachments" type:"list"` @@ -9742,8 +9987,8 @@ type Task struct { // The number of CPU units used by the task. It can be expressed as an integer // using CPU units, for example 1024, or as a string using vCPUs, for example - // 1 vCPU or 1 vcpu, in a task definition but is converted to an integer indicating - // the CPU units when the task definition is registered. + // 1 vCPU or 1 vcpu, in a task definition. String values are converted to an + // integer indicating the CPU units when the task definition is registered. // // If using the EC2 launch type, this field is optional. Supported values are // between 128 CPU units (0.125 vCPUs) and 10240 CPU units (10 vCPUs). @@ -9772,7 +10017,8 @@ type Task struct { // state). CreatedAt *time.Time `locationName:"createdAt" type:"timestamp"` - // The desired status of the task. + // The desired status of the task. For more information, see Task Lifecycle + // (https://docs.aws.amazon.com/AmazonECS/latest/developerguide/task_life_cycle.html). DesiredStatus *string `locationName:"desiredStatus" type:"string"` // The Unix time stamp for when the task execution stopped. @@ -9794,7 +10040,8 @@ type Task struct { // override any Docker health checks that exist in the container image. HealthStatus *string `locationName:"healthStatus" type:"string" enum:"HealthStatus"` - // The last known status of the task. + // The last known status of the task. For more information, see Task Lifecycle + // (https://docs.aws.amazon.com/AmazonECS/latest/developerguide/task_life_cycle.html). LastStatus *string `locationName:"lastStatus" type:"string"` // The launch type on which your task is running. @@ -9802,8 +10049,8 @@ type Task struct { // The amount of memory (in MiB) used by the task. It can be expressed as an // integer using MiB, for example 1024, or as a string using GB, for example - // 1GB or 1 GB, in a task definition but is converted to an integer indicating - // the MiB when the task definition is registered. + // 1GB or 1 GB, in a task definition. String values are converted to an integer + // indicating the MiB when the task definition is registered. // // If using the EC2 launch type, this field is optional. // @@ -9857,7 +10104,7 @@ type Task struct { // The reason the task was stopped. StoppedReason *string `locationName:"stoppedReason" type:"string"` - // The Unix time stamp for when the task will stop (transitions from the RUNNING + // The Unix time stamp for when the task stops (transitions from the RUNNING // state to STOPPED). StoppingAt *time.Time `locationName:"stoppingAt" type:"timestamp"` @@ -10386,7 +10633,7 @@ func (s *TaskOverride) SetTaskRoleArn(v string) *TaskOverride { type Tmpfs struct { _ struct{} `type:"structure"` - // The absolute file path where the tmpfs volume will be mounted. + // The absolute file path where the tmpfs volume is to be mounted. // // ContainerPath is a required field ContainerPath *string `locationName:"containerPath" type:"string" required:"true"` @@ -10398,6 +10645,7 @@ type Tmpfs struct { // "nomand" | "atime" | "noatime" | "diratime" | "nodiratime" | "bind" | "rbind" // | "unbindable" | "runbindable" | "private" | "rprivate" | "shared" | "rshared" // | "slave" | "rslave" | "relatime" | "norelatime" | "strictatime" | "nostrictatime" + // | "mode" | "uid" | "gid" | "nr_inodes" | "nr_blocks" | "mpol" MountOptions []*string `locationName:"mountOptions" type:"list"` // The size (in MiB) of the tmpfs volume. @@ -10731,7 +10979,7 @@ type UpdateServiceInput struct { // network configuration, this does not trigger a new service deployment. NetworkConfiguration *NetworkConfiguration `locationName:"networkConfiguration" type:"structure"` - // The platform version you want to update your service to run. + // The platform version that your service should run. PlatformVersion *string `locationName:"platformVersion" type:"string"` // The name of the service to update. @@ -10896,15 +11144,25 @@ func (s *VersionInfo) SetDockerVersion(v string) *VersionInfo { return s } -// A data volume used in a task definition. +// A data volume used in a task definition. For tasks that use a Docker volume, +// specify a DockerVolumeConfiguration. For tasks that use a bind mount host +// volume, specify a host and optional sourcePath. For more information, see +// Using Data Volumes in Tasks (http://docs.aws.amazon.com/AmazonECS/latest/developerguideusing_data_volumes.html). type Volume struct { _ struct{} `type:"structure"` - // The contents of the host parameter determine whether your data volume persists - // on the host container instance and where it is stored. If the host parameter - // is empty, then the Docker daemon assigns a host path for your data volume, - // but the data is not guaranteed to persist after the containers associated - // with it stop running. + // This parameter is specified when using Docker volumes. Docker volumes are + // only supported when using the EC2 launch type. Windows containers only support + // the use of the local driver. To use bind mounts, specify a host instead. + DockerVolumeConfiguration *DockerVolumeConfiguration `locationName:"dockerVolumeConfiguration" type:"structure"` + + // This parameter is specified when using bind mount host volumes. Bind mount + // host volumes are supported when using either the EC2 or Fargate launch types. + // The contents of the host parameter determine whether your bind mount host + // volume persists on the host container instance and where it is stored. If + // the host parameter is empty, then the Docker daemon assigns a host path for + // your data volume, but the data is not guaranteed to persist after the containers + // associated with it stop running. // // Windows containers can mount whole directories on the same drive as $env:ProgramData. // Windows containers cannot mount directories on a different drive, and mount @@ -10928,6 +11186,12 @@ func (s Volume) GoString() string { return s.String() } +// SetDockerVolumeConfiguration sets the DockerVolumeConfiguration field's value. +func (s *Volume) SetDockerVolumeConfiguration(v *DockerVolumeConfiguration) *Volume { + s.DockerVolumeConfiguration = v + return s +} + // SetHost sets the Host field's value. func (s *Volume) SetHost(v *HostVolumeProperties) *Volume { s.Host = v @@ -11138,6 +11402,14 @@ const ( SchedulingStrategyDaemon = "DAEMON" ) +const ( + // ScopeTask is a Scope enum value + ScopeTask = "task" + + // ScopeShared is a Scope enum value + ScopeShared = "shared" +) + const ( // SortOrderAsc is a SortOrder enum value SortOrderAsc = "ASC" diff --git a/vendor/github.com/aws/aws-sdk-go/service/ecs/errors.go b/vendor/github.com/aws/aws-sdk-go/service/ecs/errors.go index 619efc778..5091c3ff3 100644 --- a/vendor/github.com/aws/aws-sdk-go/service/ecs/errors.go +++ b/vendor/github.com/aws/aws-sdk-go/service/ecs/errors.go @@ -89,7 +89,7 @@ const ( // ErrCodePlatformTaskDefinitionIncompatibilityException for service response error code // "PlatformTaskDefinitionIncompatibilityException". // - // The specified platform version does not satisfy the task definition’s required + // The specified platform version does not satisfy the task definition's required // capabilities. ErrCodePlatformTaskDefinitionIncompatibilityException = "PlatformTaskDefinitionIncompatibilityException" diff --git a/vendor/github.com/aws/aws-sdk-go/service/efs/api.go b/vendor/github.com/aws/aws-sdk-go/service/efs/api.go index 5254d3fef..cc40d1691 100644 --- a/vendor/github.com/aws/aws-sdk-go/service/efs/api.go +++ b/vendor/github.com/aws/aws-sdk-go/service/efs/api.go @@ -39,7 +39,7 @@ const opCreateFileSystem = "CreateFileSystem" // } // // See also, https://docs.aws.amazon.com/goto/WebAPI/elasticfilesystem-2015-02-01/CreateFileSystem -func (c *EFS) CreateFileSystemRequest(input *CreateFileSystemInput) (req *request.Request, output *UpdateFileSystemOutput) { +func (c *EFS) CreateFileSystemRequest(input *CreateFileSystemInput) (req *request.Request, output *FileSystemDescription) { op := &request.Operation{ Name: opCreateFileSystem, HTTPMethod: "POST", @@ -50,7 +50,7 @@ func (c *EFS) CreateFileSystemRequest(input *CreateFileSystemInput) (req *reques input = &CreateFileSystemInput{} } - output = &UpdateFileSystemOutput{} + output = &FileSystemDescription{} req = c.newRequest(op, input, output) return } @@ -139,7 +139,7 @@ func (c *EFS) CreateFileSystemRequest(input *CreateFileSystemInput) (req *reques // be changed because the throughput limit of 1024 MiB/s has been reached. // // See also, https://docs.aws.amazon.com/goto/WebAPI/elasticfilesystem-2015-02-01/CreateFileSystem -func (c *EFS) CreateFileSystem(input *CreateFileSystemInput) (*UpdateFileSystemOutput, error) { +func (c *EFS) CreateFileSystem(input *CreateFileSystemInput) (*FileSystemDescription, error) { req, out := c.CreateFileSystemRequest(input) return out, req.Send() } @@ -153,7 +153,7 @@ func (c *EFS) CreateFileSystem(input *CreateFileSystemInput) (*UpdateFileSystemO // the context is nil a panic will occur. In the future the SDK may create // sub-contexts for http.Requests. See https://golang.org/pkg/context/ // for more information on using Contexts. -func (c *EFS) CreateFileSystemWithContext(ctx aws.Context, input *CreateFileSystemInput, opts ...request.Option) (*UpdateFileSystemOutput, error) { +func (c *EFS) CreateFileSystemWithContext(ctx aws.Context, input *CreateFileSystemInput, opts ...request.Option) (*FileSystemDescription, error) { req, out := c.CreateFileSystemRequest(input) req.SetContext(ctx) req.ApplyOptions(opts...) @@ -1931,7 +1931,7 @@ type DescribeFileSystemsOutput struct { _ struct{} `type:"structure"` // Array of file system descriptions. - FileSystems []*UpdateFileSystemOutput `type:"list"` + FileSystems []*FileSystemDescription `type:"list"` // Present if provided by caller in the request (String). Marker *string `type:"string"` @@ -1952,7 +1952,7 @@ func (s DescribeFileSystemsOutput) GoString() string { } // SetFileSystems sets the FileSystems field's value. -func (s *DescribeFileSystemsOutput) SetFileSystems(v []*UpdateFileSystemOutput) *DescribeFileSystemsOutput { +func (s *DescribeFileSystemsOutput) SetFileSystems(v []*FileSystemDescription) *DescribeFileSystemsOutput { s.FileSystems = v return s } @@ -2253,6 +2253,175 @@ func (s *DescribeTagsOutput) SetTags(v []*Tag) *DescribeTagsOutput { return s } +// Description of the file system. +type FileSystemDescription struct { + _ struct{} `type:"structure"` + + // Time that the file system was created, in seconds (since 1970-01-01T00:00:00Z). + // + // CreationTime is a required field + CreationTime *time.Time `type:"timestamp" required:"true"` + + // Opaque string specified in the request. + // + // CreationToken is a required field + CreationToken *string `min:"1" type:"string" required:"true"` + + // A Boolean value that, if true, indicates that the file system is encrypted. + Encrypted *bool `type:"boolean"` + + // ID of the file system, assigned by Amazon EFS. + // + // FileSystemId is a required field + FileSystemId *string `type:"string" required:"true"` + + // The ID of an AWS Key Management Service (AWS KMS) customer master key (CMK) + // that was used to protect the encrypted file system. + KmsKeyId *string `min:"1" type:"string"` + + // Lifecycle phase of the file system. + // + // LifeCycleState is a required field + LifeCycleState *string `type:"string" required:"true" enum:"LifeCycleState"` + + // You can add tags to a file system, including a Name tag. For more information, + // see CreateTags. If the file system has a Name tag, Amazon EFS returns the + // value in this field. + Name *string `type:"string"` + + // Current number of mount targets that the file system has. For more information, + // see CreateMountTarget. + // + // NumberOfMountTargets is a required field + NumberOfMountTargets *int64 `type:"integer" required:"true"` + + // AWS account that created the file system. If the file system was created + // by an IAM user, the parent account to which the user belongs is the owner. + // + // OwnerId is a required field + OwnerId *string `type:"string" required:"true"` + + // The PerformanceMode of the file system. + // + // PerformanceMode is a required field + PerformanceMode *string `type:"string" required:"true" enum:"PerformanceMode"` + + // The throughput, measured in MiB/s, that you want to provision for a file + // system. The limit on throughput is 1024 MiB/s. You can get these limits increased + // by contacting AWS Support. For more information, see Amazon EFS Limits That + // You Can Increase (http://docs.aws.amazon.com/efs/latest/ug/limits.html#soft-limits) + // in the Amazon EFS User Guide. + ProvisionedThroughputInMibps *float64 `type:"double"` + + // Latest known metered size (in bytes) of data stored in the file system, in + // its Value field, and the time at which that size was determined in its Timestamp + // field. The Timestamp value is the integer number of seconds since 1970-01-01T00:00:00Z. + // The SizeInBytes value doesn't represent the size of a consistent snapshot + // of the file system, but it is eventually consistent when there are no writes + // to the file system. That is, SizeInBytes represents actual size only if the + // file system is not modified for a period longer than a couple of hours. Otherwise, + // the value is not the exact size that the file system was at any point in + // time. + // + // SizeInBytes is a required field + SizeInBytes *FileSystemSize `type:"structure" required:"true"` + + // The throughput mode for a file system. There are two throughput modes to + // choose from for your file system: bursting and provisioned. You can decrease + // your file system's throughput in Provisioned Throughput mode or change between + // the throughput modes as long as it’s been more than 24 hours since the last + // decrease or throughput mode change. + ThroughputMode *string `type:"string" enum:"ThroughputMode"` +} + +// String returns the string representation +func (s FileSystemDescription) String() string { + return awsutil.Prettify(s) +} + +// GoString returns the string representation +func (s FileSystemDescription) GoString() string { + return s.String() +} + +// SetCreationTime sets the CreationTime field's value. +func (s *FileSystemDescription) SetCreationTime(v time.Time) *FileSystemDescription { + s.CreationTime = &v + return s +} + +// SetCreationToken sets the CreationToken field's value. +func (s *FileSystemDescription) SetCreationToken(v string) *FileSystemDescription { + s.CreationToken = &v + return s +} + +// SetEncrypted sets the Encrypted field's value. +func (s *FileSystemDescription) SetEncrypted(v bool) *FileSystemDescription { + s.Encrypted = &v + return s +} + +// SetFileSystemId sets the FileSystemId field's value. +func (s *FileSystemDescription) SetFileSystemId(v string) *FileSystemDescription { + s.FileSystemId = &v + return s +} + +// SetKmsKeyId sets the KmsKeyId field's value. +func (s *FileSystemDescription) SetKmsKeyId(v string) *FileSystemDescription { + s.KmsKeyId = &v + return s +} + +// SetLifeCycleState sets the LifeCycleState field's value. +func (s *FileSystemDescription) SetLifeCycleState(v string) *FileSystemDescription { + s.LifeCycleState = &v + return s +} + +// SetName sets the Name field's value. +func (s *FileSystemDescription) SetName(v string) *FileSystemDescription { + s.Name = &v + return s +} + +// SetNumberOfMountTargets sets the NumberOfMountTargets field's value. +func (s *FileSystemDescription) SetNumberOfMountTargets(v int64) *FileSystemDescription { + s.NumberOfMountTargets = &v + return s +} + +// SetOwnerId sets the OwnerId field's value. +func (s *FileSystemDescription) SetOwnerId(v string) *FileSystemDescription { + s.OwnerId = &v + return s +} + +// SetPerformanceMode sets the PerformanceMode field's value. +func (s *FileSystemDescription) SetPerformanceMode(v string) *FileSystemDescription { + s.PerformanceMode = &v + return s +} + +// SetProvisionedThroughputInMibps sets the ProvisionedThroughputInMibps field's value. +func (s *FileSystemDescription) SetProvisionedThroughputInMibps(v float64) *FileSystemDescription { + s.ProvisionedThroughputInMibps = &v + return s +} + +// SetSizeInBytes sets the SizeInBytes field's value. +func (s *FileSystemDescription) SetSizeInBytes(v *FileSystemSize) *FileSystemDescription { + s.SizeInBytes = v + return s +} + +// SetThroughputMode sets the ThroughputMode field's value. +func (s *FileSystemDescription) SetThroughputMode(v string) *FileSystemDescription { + s.ThroughputMode = &v + return s +} + // Latest known metered size (in bytes) of data stored in the file system, in // its Value field, and the time at which that size was determined in its Timestamp // field. Note that the value does not represent the size of a consistent snapshot diff --git a/vendor/github.com/aws/aws-sdk-go/service/eks/api.go b/vendor/github.com/aws/aws-sdk-go/service/eks/api.go index 4d76063f1..bb1cefd88 100644 --- a/vendor/github.com/aws/aws-sdk-go/service/eks/api.go +++ b/vendor/github.com/aws/aws-sdk-go/service/eks/api.go @@ -104,11 +104,11 @@ func (c *EKS) CreateClusterRequest(input *CreateClusterInput) (req *request.Requ // These errors are usually caused by a server-side issue. // // * ErrCodeServiceUnavailableException "ServiceUnavailableException" -// The service is unavailable, back off and retry the operation. +// The service is unavailable. Back off and retry the operation. // // * ErrCodeUnsupportedAvailabilityZoneException "UnsupportedAvailabilityZoneException" // At least one of your specified cluster subnets is in an Availability Zone -// that does not support Amazon EKS. The exception output will specify the supported +// that does not support Amazon EKS. The exception output specifies the supported // Availability Zones for your account, from which you can choose subnets for // your cluster. // @@ -200,7 +200,7 @@ func (c *EKS) DeleteClusterRequest(input *DeleteClusterInput) (req *request.Requ // // * ErrCodeResourceNotFoundException "ResourceNotFoundException" // The specified resource could not be found. You can view your available clusters -// with ListClusters. Amazon EKS clusters are region-specific. +// with ListClusters. Amazon EKS clusters are Region-specific. // // * ErrCodeClientException "ClientException" // These errors are usually caused by a client action, such as using an action @@ -211,7 +211,7 @@ func (c *EKS) DeleteClusterRequest(input *DeleteClusterInput) (req *request.Requ // These errors are usually caused by a server-side issue. // // * ErrCodeServiceUnavailableException "ServiceUnavailableException" -// The service is unavailable, back off and retry the operation. +// The service is unavailable. Back off and retry the operation. // // See also, https://docs.aws.amazon.com/goto/WebAPI/eks-2017-11-01/DeleteCluster func (c *EKS) DeleteCluster(input *DeleteClusterInput) (*DeleteClusterOutput, error) { @@ -299,7 +299,7 @@ func (c *EKS) DescribeClusterRequest(input *DescribeClusterInput) (req *request. // Returned Error Codes: // * ErrCodeResourceNotFoundException "ResourceNotFoundException" // The specified resource could not be found. You can view your available clusters -// with ListClusters. Amazon EKS clusters are region-specific. +// with ListClusters. Amazon EKS clusters are Region-specific. // // * ErrCodeClientException "ClientException" // These errors are usually caused by a client action, such as using an action @@ -310,7 +310,7 @@ func (c *EKS) DescribeClusterRequest(input *DescribeClusterInput) (req *request. // These errors are usually caused by a server-side issue. // // * ErrCodeServiceUnavailableException "ServiceUnavailableException" -// The service is unavailable, back off and retry the operation. +// The service is unavailable. Back off and retry the operation. // // See also, https://docs.aws.amazon.com/goto/WebAPI/eks-2017-11-01/DescribeCluster func (c *EKS) DescribeCluster(input *DescribeClusterInput) (*DescribeClusterOutput, error) { @@ -378,7 +378,7 @@ func (c *EKS) ListClustersRequest(input *ListClustersInput) (req *request.Reques // ListClusters API operation for Amazon Elastic Container Service for Kubernetes. // -// Lists the Amazon EKS clusters in your AWS account in the specified region. +// Lists the Amazon EKS clusters in your AWS account in the specified Region. // // Returns awserr.Error for service API and SDK errors. Use runtime type assertions // with awserr.Error's Code and Message methods to get detailed information about @@ -401,7 +401,7 @@ func (c *EKS) ListClustersRequest(input *ListClustersInput) (req *request.Reques // These errors are usually caused by a server-side issue. // // * ErrCodeServiceUnavailableException "ServiceUnavailableException" -// The service is unavailable, back off and retry the operation. +// The service is unavailable. Back off and retry the operation. // // See also, https://docs.aws.amazon.com/goto/WebAPI/eks-2017-11-01/ListClusters func (c *EKS) ListClusters(input *ListClustersInput) (*ListClustersOutput, error) { @@ -474,6 +474,11 @@ type Cluster struct { // The name of the cluster. Name *string `locationName:"name" type:"string"` + // The platform version of your Amazon EKS cluster. For more information, see + // Platform Versions (eks/latest/userguide/platform-versions.html) in the Amazon + // EKS User Guide. + PlatformVersion *string `locationName:"platformVersion" type:"string"` + // The VPC subnets and security groups used by the cluster control plane. Amazon // EKS VPC resources have specific requirements to work properly with Kubernetes. // For more information, see Cluster VPC Considerations (http://docs.aws.amazon.com/eks/latest/userguide/network_reqs.html) @@ -539,6 +544,12 @@ func (s *Cluster) SetName(v string) *Cluster { return s } +// SetPlatformVersion sets the PlatformVersion field's value. +func (s *Cluster) SetPlatformVersion(v string) *Cluster { + s.PlatformVersion = &v + return s +} + // SetResourcesVpcConfig sets the ResourcesVpcConfig field's value. func (s *Cluster) SetResourcesVpcConfig(v *VpcConfigResponse) *Cluster { s.ResourcesVpcConfig = v @@ -579,7 +590,9 @@ type CreateClusterInput struct { // EKS VPC resources have specific requirements to work properly with Kubernetes. // For more information, see Cluster VPC Considerations (http://docs.aws.amazon.com/eks/latest/userguide/network_reqs.html) // and Cluster Security Group Considerations (http://docs.aws.amazon.com/eks/latest/userguide/sec-group-reqs.html) - // in the Amazon EKS User Guide. + // in the Amazon EKS User Guide. You must specify at least two subnets. You + // may specify up to 5 security groups, but we recommend that you use a dedicated + // security group for your cluster control plane. // // ResourcesVpcConfig is a required field ResourcesVpcConfig *VpcConfigRequest `locationName:"resourcesVpcConfig" type:"structure" required:"true"` @@ -587,7 +600,7 @@ type CreateClusterInput struct { // The Amazon Resource Name (ARN) of the IAM role that provides permissions // for Amazon EKS to make calls to other AWS API operations on your behalf. // For more information, see Amazon EKS Service IAM Role (http://docs.aws.amazon.com/eks/latest/userguide/service_IAM_role.html) - // in the Amazon EKS User Guide + // in the Amazon EKS User Guide. // // RoleArn is a required field RoleArn *string `locationName:"roleArn" type:"string" required:"true"` @@ -869,7 +882,7 @@ func (s *ListClustersInput) SetNextToken(v string) *ListClustersInput { type ListClustersOutput struct { _ struct{} `type:"structure"` - // A list of all of the clusters for your account in the specified region. + // A list of all of the clusters for your account in the specified Region. Clusters []*string `locationName:"clusters" type:"list"` // The nextToken value to include in a future ListClusters request. When the diff --git a/vendor/github.com/aws/aws-sdk-go/service/eks/doc.go b/vendor/github.com/aws/aws-sdk-go/service/eks/doc.go index 9f819afc6..0f1941076 100644 --- a/vendor/github.com/aws/aws-sdk-go/service/eks/doc.go +++ b/vendor/github.com/aws/aws-sdk-go/service/eks/doc.go @@ -9,21 +9,7 @@ // an open-source system for automating the deployment, scaling, and management // of containerized applications. // -// Amazon EKS runs three Kubernetes control plane instances across three Availability -// Zones to ensure high availability. Amazon EKS automatically detects and replaces -// unhealthy control plane instances, and it provides automated version upgrades -// and patching for them. -// -// Amazon EKS is also integrated with many AWS services to provide scalability -// and security for your applications, including the following: -// -// * Elastic Load Balancing for load distribution -// -// * IAM for authentication -// -// * Amazon VPC for isolation -// -// Amazon EKS runs up to date versions of the open-source Kubernetes software, +// Amazon EKS runs up-to-date versions of the open-source Kubernetes software, // so you can use all the existing plugins and tooling from the Kubernetes community. // Applications running on Amazon EKS are fully compatible with applications // running on any standard Kubernetes environment, whether running in on-premises diff --git a/vendor/github.com/aws/aws-sdk-go/service/eks/errors.go b/vendor/github.com/aws/aws-sdk-go/service/eks/errors.go index 825e7d2db..98a2410c5 100644 --- a/vendor/github.com/aws/aws-sdk-go/service/eks/errors.go +++ b/vendor/github.com/aws/aws-sdk-go/service/eks/errors.go @@ -35,7 +35,7 @@ const ( // "ResourceNotFoundException". // // The specified resource could not be found. You can view your available clusters - // with ListClusters. Amazon EKS clusters are region-specific. + // with ListClusters. Amazon EKS clusters are Region-specific. ErrCodeResourceNotFoundException = "ResourceNotFoundException" // ErrCodeServerException for service response error code @@ -47,14 +47,14 @@ const ( // ErrCodeServiceUnavailableException for service response error code // "ServiceUnavailableException". // - // The service is unavailable, back off and retry the operation. + // The service is unavailable. Back off and retry the operation. ErrCodeServiceUnavailableException = "ServiceUnavailableException" // ErrCodeUnsupportedAvailabilityZoneException for service response error code // "UnsupportedAvailabilityZoneException". // // At least one of your specified cluster subnets is in an Availability Zone - // that does not support Amazon EKS. The exception output will specify the supported + // that does not support Amazon EKS. The exception output specifies the supported // Availability Zones for your account, from which you can choose subnets for // your cluster. ErrCodeUnsupportedAvailabilityZoneException = "UnsupportedAvailabilityZoneException" diff --git a/vendor/github.com/aws/aws-sdk-go/service/elasticache/api.go b/vendor/github.com/aws/aws-sdk-go/service/elasticache/api.go index 18d404a5c..7adb50822 100644 --- a/vendor/github.com/aws/aws-sdk-go/service/elasticache/api.go +++ b/vendor/github.com/aws/aws-sdk-go/service/elasticache/api.go @@ -3,6 +3,7 @@ package elasticache import ( + "fmt" "time" "github.com/aws/aws-sdk-go/aws" @@ -65,7 +66,7 @@ func (c *ElastiCache) AddTagsToResourceRequest(input *AddTagsToResourceInput) (r // by your tags. You can apply tags that represent business categories (such // as cost centers, application names, or owners) to organize your costs across // multiple services. For more information, see Using Cost Allocation Tags in -// Amazon ElastiCache (http://docs.aws.amazon.com/AmazonElastiCache/latest/UserGuide/Tagging.html) +// Amazon ElastiCache (http://docs.aws.amazon.com/AmazonElastiCache/latest/red-ug/Tagging.html) // in the ElastiCache User Guide. // // Returns awserr.Error for service API and SDK errors. Use runtime type assertions @@ -262,8 +263,8 @@ func (c *ElastiCache) CopySnapshotRequest(input *CopySnapshotInput) (req *reques // create their own Amazon S3 buckets and copy snapshots to it. To control access // to your snapshots, use an IAM policy to control who has the ability to use // the CopySnapshot operation. For more information about using IAM to control -// the use of ElastiCache operations, see Exporting Snapshots (http://docs.aws.amazon.com/AmazonElastiCache/latest/UserGuide/Snapshots.Exporting.html) -// and Authentication & Access Control (http://docs.aws.amazon.com/AmazonElastiCache/latest/UserGuide/IAM.html). +// the use of ElastiCache operations, see Exporting Snapshots (http://docs.aws.amazon.com/AmazonElastiCache/latest/red-ug/Snapshots.Exporting.html) +// and Authentication & Access Control (http://docs.aws.amazon.com/AmazonElastiCache/latest/red-ug/IAM.html). // // You could receive the following error messages. // @@ -272,19 +273,19 @@ func (c *ElastiCache) CopySnapshotRequest(input *CopySnapshotInput) (req *reques // * Error Message: The S3 bucket %s is outside of the region. // // Solution: Create an Amazon S3 bucket in the same region as your snapshot. -// For more information, see Step 1: Create an Amazon S3 Bucket (http://docs.aws.amazon.com/AmazonElastiCache/latest/UserGuide/Snapshots.Exporting.html#Snapshots.Exporting.CreateBucket) +// For more information, see Step 1: Create an Amazon S3 Bucket (http://docs.aws.amazon.com/AmazonElastiCache/latest/red-ug/Snapshots.Exporting.html#Snapshots.Exporting.CreateBucket) // in the ElastiCache User Guide. // // * Error Message: The S3 bucket %s does not exist. // // Solution: Create an Amazon S3 bucket in the same region as your snapshot. -// For more information, see Step 1: Create an Amazon S3 Bucket (http://docs.aws.amazon.com/AmazonElastiCache/latest/UserGuide/Snapshots.Exporting.html#Snapshots.Exporting.CreateBucket) +// For more information, see Step 1: Create an Amazon S3 Bucket (http://docs.aws.amazon.com/AmazonElastiCache/latest/red-ug/Snapshots.Exporting.html#Snapshots.Exporting.CreateBucket) // in the ElastiCache User Guide. // // * Error Message: The S3 bucket %s is not owned by the authenticated user. // // Solution: Create an Amazon S3 bucket in the same region as your snapshot. -// For more information, see Step 1: Create an Amazon S3 Bucket (http://docs.aws.amazon.com/AmazonElastiCache/latest/UserGuide/Snapshots.Exporting.html#Snapshots.Exporting.CreateBucket) +// For more information, see Step 1: Create an Amazon S3 Bucket (http://docs.aws.amazon.com/AmazonElastiCache/latest/red-ug/Snapshots.Exporting.html#Snapshots.Exporting.CreateBucket) // in the ElastiCache User Guide. // // * Error Message: The authenticated user does not have sufficient permissions @@ -303,21 +304,21 @@ func (c *ElastiCache) CopySnapshotRequest(input *CopySnapshotInput) (req *reques // on the S3 Bucket. // // Solution: Add List and Read permissions on the bucket. For more information, -// see Step 2: Grant ElastiCache Access to Your Amazon S3 Bucket (http://docs.aws.amazon.com/AmazonElastiCache/latest/UserGuide/Snapshots.Exporting.html#Snapshots.Exporting.GrantAccess) +// see Step 2: Grant ElastiCache Access to Your Amazon S3 Bucket (http://docs.aws.amazon.com/AmazonElastiCache/latest/red-ug/Snapshots.Exporting.html#Snapshots.Exporting.GrantAccess) // in the ElastiCache User Guide. // // * Error Message: ElastiCache has not been granted WRITE permissions %s // on the S3 Bucket. // // Solution: Add Upload/Delete permissions on the bucket. For more information, -// see Step 2: Grant ElastiCache Access to Your Amazon S3 Bucket (http://docs.aws.amazon.com/AmazonElastiCache/latest/UserGuide/Snapshots.Exporting.html#Snapshots.Exporting.GrantAccess) +// see Step 2: Grant ElastiCache Access to Your Amazon S3 Bucket (http://docs.aws.amazon.com/AmazonElastiCache/latest/red-ug/Snapshots.Exporting.html#Snapshots.Exporting.GrantAccess) // in the ElastiCache User Guide. // // * Error Message: ElastiCache has not been granted READ_ACP permissions // %s on the S3 Bucket. // // Solution: Add View Permissions on the bucket. For more information, see Step -// 2: Grant ElastiCache Access to Your Amazon S3 Bucket (http://docs.aws.amazon.com/AmazonElastiCache/latest/UserGuide/Snapshots.Exporting.html#Snapshots.Exporting.GrantAccess) +// 2: Grant ElastiCache Access to Your Amazon S3 Bucket (http://docs.aws.amazon.com/AmazonElastiCache/latest/red-ug/Snapshots.Exporting.html#Snapshots.Exporting.GrantAccess) // in the ElastiCache User Guide. // // Returns awserr.Error for service API and SDK errors. Use runtime type assertions @@ -417,9 +418,7 @@ func (c *ElastiCache) CreateCacheClusterRequest(input *CreateCacheClusterInput) // Creates a cluster. All nodes in the cluster run the same protocol-compliant // cache engine software, either Memcached or Redis. // -// Due to current limitations on Redis (cluster mode disabled), this operation -// or parameter is not supported on Redis (cluster mode enabled) replication -// groups. +// This operation is not supported for Redis (cluster mode enabled) clusters. // // Returns awserr.Error for service API and SDK errors. Use runtime type assertions // with awserr.Error's Code and Message methods to get detailed information about @@ -558,7 +557,7 @@ func (c *ElastiCache) CreateCacheParameterGroupRequest(input *CreateCacheParamet // * ModifyCacheParameterGroup (http://docs.aws.amazon.com/AmazonElastiCache/latest/APIReference/API_ModifyCacheParameterGroup.html) // in the ElastiCache API Reference. // -// * Parameters and Parameter Groups (http://docs.aws.amazon.com/AmazonElastiCache/latest/UserGuide/ParameterGroups.html) +// * Parameters and Parameter Groups (http://docs.aws.amazon.com/AmazonElastiCache/latest/red-ug/ParameterGroups.html) // in the ElastiCache User Guide. // // Returns awserr.Error for service API and SDK errors. Use runtime type assertions @@ -860,7 +859,7 @@ func (c *ElastiCache) CreateReplicationGroupRequest(input *CreateReplicationGrou // group after it has been created. However, if you need to increase or decrease // the number of node groups (console: shards), you can avail yourself of ElastiCache // for Redis' enhanced backup and restore. For more information, see Restoring -// From a Backup with Cluster Resizing (http://docs.aws.amazon.com/AmazonElastiCache/latest/UserGuide/backups-restoring.html) +// From a Backup with Cluster Resizing (http://docs.aws.amazon.com/AmazonElastiCache/latest/red-ug/backups-restoring.html) // in the ElastiCache User Guide. // // This operation is valid for Redis only. @@ -1066,6 +1065,126 @@ func (c *ElastiCache) CreateSnapshotWithContext(ctx aws.Context, input *CreateSn return out, req.Send() } +const opDecreaseReplicaCount = "DecreaseReplicaCount" + +// DecreaseReplicaCountRequest generates a "aws/request.Request" representing the +// client's request for the DecreaseReplicaCount operation. The "output" return +// value will be populated with the request's response once the request completes +// successfuly. +// +// Use "Send" method on the returned Request to send the API call to the service. +// the "output" return value is not valid until after Send returns without error. +// +// See DecreaseReplicaCount for more information on using the DecreaseReplicaCount +// API call, and error handling. +// +// This method is useful when you want to inject custom logic or configuration +// into the SDK's request lifecycle. Such as custom headers, or retry logic. +// +// +// // Example sending a request using the DecreaseReplicaCountRequest method. +// req, resp := client.DecreaseReplicaCountRequest(params) +// +// err := req.Send() +// if err == nil { // resp is now filled +// fmt.Println(resp) +// } +// +// See also, https://docs.aws.amazon.com/goto/WebAPI/elasticache-2015-02-02/DecreaseReplicaCount +func (c *ElastiCache) DecreaseReplicaCountRequest(input *DecreaseReplicaCountInput) (req *request.Request, output *DecreaseReplicaCountOutput) { + op := &request.Operation{ + Name: opDecreaseReplicaCount, + HTTPMethod: "POST", + HTTPPath: "/", + } + + if input == nil { + input = &DecreaseReplicaCountInput{} + } + + output = &DecreaseReplicaCountOutput{} + req = c.newRequest(op, input, output) + return +} + +// DecreaseReplicaCount API operation for Amazon ElastiCache. +// +// Dynamically decreases the number of replics in a Redis (cluster mode disabled) +// replication group or the number of replica nodes in one or more node groups +// (shards) of a Redis (cluster mode enabled) replication group. This operation +// is performed with no cluster down time. +// +// Returns awserr.Error for service API and SDK errors. Use runtime type assertions +// with awserr.Error's Code and Message methods to get detailed information about +// the error. +// +// See the AWS API reference guide for Amazon ElastiCache's +// API operation DecreaseReplicaCount for usage and error information. +// +// Returned Error Codes: +// * ErrCodeReplicationGroupNotFoundFault "ReplicationGroupNotFoundFault" +// The specified replication group does not exist. +// +// * ErrCodeInvalidReplicationGroupStateFault "InvalidReplicationGroupState" +// The requested replication group is not in the available state. +// +// * ErrCodeInvalidCacheClusterStateFault "InvalidCacheClusterState" +// The requested cluster is not in the available state. +// +// * ErrCodeInvalidVPCNetworkStateFault "InvalidVPCNetworkStateFault" +// The VPC network is in an invalid state. +// +// * ErrCodeInsufficientCacheClusterCapacityFault "InsufficientCacheClusterCapacity" +// The requested cache node type is not available in the specified Availability +// Zone. +// +// * ErrCodeClusterQuotaForCustomerExceededFault "ClusterQuotaForCustomerExceeded" +// The request cannot be processed because it would exceed the allowed number +// of clusters per customer. +// +// * ErrCodeNodeGroupsPerReplicationGroupQuotaExceededFault "NodeGroupsPerReplicationGroupQuotaExceeded" +// The request cannot be processed because it would exceed the maximum allowed +// number of node groups (shards) in a single replication group. The default +// maximum is 15 +// +// * ErrCodeNodeQuotaForCustomerExceededFault "NodeQuotaForCustomerExceeded" +// The request cannot be processed because it would exceed the allowed number +// of cache nodes per customer. +// +// * ErrCodeServiceLinkedRoleNotFoundFault "ServiceLinkedRoleNotFoundFault" +// The specified service linked role (SLR) was not found. +// +// * ErrCodeNoOperationFault "NoOperationFault" +// The operation was not performed because no changes were required. +// +// * ErrCodeInvalidParameterValueException "InvalidParameterValue" +// The value for a parameter is invalid. +// +// * ErrCodeInvalidParameterCombinationException "InvalidParameterCombination" +// Two or more incompatible parameters were specified. +// +// See also, https://docs.aws.amazon.com/goto/WebAPI/elasticache-2015-02-02/DecreaseReplicaCount +func (c *ElastiCache) DecreaseReplicaCount(input *DecreaseReplicaCountInput) (*DecreaseReplicaCountOutput, error) { + req, out := c.DecreaseReplicaCountRequest(input) + return out, req.Send() +} + +// DecreaseReplicaCountWithContext is the same as DecreaseReplicaCount with the addition of +// the ability to pass a context and additional request options. +// +// See DecreaseReplicaCount for details on how to use this API operation. +// +// The context must be non-nil and will be used for request cancellation. If +// the context is nil a panic will occur. In the future the SDK may create +// sub-contexts for http.Requests. See https://golang.org/pkg/context/ +// for more information on using Contexts. +func (c *ElastiCache) DecreaseReplicaCountWithContext(ctx aws.Context, input *DecreaseReplicaCountInput, opts ...request.Option) (*DecreaseReplicaCountOutput, error) { + req, out := c.DecreaseReplicaCountRequest(input) + req.SetContext(ctx) + req.ApplyOptions(opts...) + return out, req.Send() +} + const opDeleteCacheCluster = "DeleteCacheCluster" // DeleteCacheClusterRequest generates a "aws/request.Request" representing the @@ -1119,9 +1238,7 @@ func (c *ElastiCache) DeleteCacheClusterRequest(input *DeleteCacheClusterInput) // of a replication group or node group (shard) that has Multi-AZ mode enabled // or a cluster from a Redis (cluster mode enabled) replication group. // -// Due to current limitations on Redis (cluster mode disabled), this operation -// or parameter is not supported on Redis (cluster mode enabled) replication -// groups. +// This operation is not valid for Redis (cluster mode enabled) clusters. // // Returns awserr.Error for service API and SDK errors. Use runtime type assertions // with awserr.Error's Code and Message methods to get detailed information about @@ -3382,6 +3499,123 @@ func (c *ElastiCache) DescribeSnapshotsPagesWithContext(ctx aws.Context, input * return p.Err() } +const opIncreaseReplicaCount = "IncreaseReplicaCount" + +// IncreaseReplicaCountRequest generates a "aws/request.Request" representing the +// client's request for the IncreaseReplicaCount operation. The "output" return +// value will be populated with the request's response once the request completes +// successfuly. +// +// Use "Send" method on the returned Request to send the API call to the service. +// the "output" return value is not valid until after Send returns without error. +// +// See IncreaseReplicaCount for more information on using the IncreaseReplicaCount +// API call, and error handling. +// +// This method is useful when you want to inject custom logic or configuration +// into the SDK's request lifecycle. Such as custom headers, or retry logic. +// +// +// // Example sending a request using the IncreaseReplicaCountRequest method. +// req, resp := client.IncreaseReplicaCountRequest(params) +// +// err := req.Send() +// if err == nil { // resp is now filled +// fmt.Println(resp) +// } +// +// See also, https://docs.aws.amazon.com/goto/WebAPI/elasticache-2015-02-02/IncreaseReplicaCount +func (c *ElastiCache) IncreaseReplicaCountRequest(input *IncreaseReplicaCountInput) (req *request.Request, output *IncreaseReplicaCountOutput) { + op := &request.Operation{ + Name: opIncreaseReplicaCount, + HTTPMethod: "POST", + HTTPPath: "/", + } + + if input == nil { + input = &IncreaseReplicaCountInput{} + } + + output = &IncreaseReplicaCountOutput{} + req = c.newRequest(op, input, output) + return +} + +// IncreaseReplicaCount API operation for Amazon ElastiCache. +// +// Dynamically increases the number of replics in a Redis (cluster mode disabled) +// replication group or the number of replica nodes in one or more node groups +// (shards) of a Redis (cluster mode enabled) replication group. This operation +// is performed with no cluster down time. +// +// Returns awserr.Error for service API and SDK errors. Use runtime type assertions +// with awserr.Error's Code and Message methods to get detailed information about +// the error. +// +// See the AWS API reference guide for Amazon ElastiCache's +// API operation IncreaseReplicaCount for usage and error information. +// +// Returned Error Codes: +// * ErrCodeReplicationGroupNotFoundFault "ReplicationGroupNotFoundFault" +// The specified replication group does not exist. +// +// * ErrCodeInvalidReplicationGroupStateFault "InvalidReplicationGroupState" +// The requested replication group is not in the available state. +// +// * ErrCodeInvalidCacheClusterStateFault "InvalidCacheClusterState" +// The requested cluster is not in the available state. +// +// * ErrCodeInvalidVPCNetworkStateFault "InvalidVPCNetworkStateFault" +// The VPC network is in an invalid state. +// +// * ErrCodeInsufficientCacheClusterCapacityFault "InsufficientCacheClusterCapacity" +// The requested cache node type is not available in the specified Availability +// Zone. +// +// * ErrCodeClusterQuotaForCustomerExceededFault "ClusterQuotaForCustomerExceeded" +// The request cannot be processed because it would exceed the allowed number +// of clusters per customer. +// +// * ErrCodeNodeGroupsPerReplicationGroupQuotaExceededFault "NodeGroupsPerReplicationGroupQuotaExceeded" +// The request cannot be processed because it would exceed the maximum allowed +// number of node groups (shards) in a single replication group. The default +// maximum is 15 +// +// * ErrCodeNodeQuotaForCustomerExceededFault "NodeQuotaForCustomerExceeded" +// The request cannot be processed because it would exceed the allowed number +// of cache nodes per customer. +// +// * ErrCodeNoOperationFault "NoOperationFault" +// The operation was not performed because no changes were required. +// +// * ErrCodeInvalidParameterValueException "InvalidParameterValue" +// The value for a parameter is invalid. +// +// * ErrCodeInvalidParameterCombinationException "InvalidParameterCombination" +// Two or more incompatible parameters were specified. +// +// See also, https://docs.aws.amazon.com/goto/WebAPI/elasticache-2015-02-02/IncreaseReplicaCount +func (c *ElastiCache) IncreaseReplicaCount(input *IncreaseReplicaCountInput) (*IncreaseReplicaCountOutput, error) { + req, out := c.IncreaseReplicaCountRequest(input) + return out, req.Send() +} + +// IncreaseReplicaCountWithContext is the same as IncreaseReplicaCount with the addition of +// the ability to pass a context and additional request options. +// +// See IncreaseReplicaCount for details on how to use this API operation. +// +// The context must be non-nil and will be used for request cancellation. If +// the context is nil a panic will occur. In the future the SDK may create +// sub-contexts for http.Requests. See https://golang.org/pkg/context/ +// for more information on using Contexts. +func (c *ElastiCache) IncreaseReplicaCountWithContext(ctx aws.Context, input *IncreaseReplicaCountInput, opts ...request.Option) (*IncreaseReplicaCountOutput, error) { + req, out := c.IncreaseReplicaCountRequest(input) + req.SetContext(ctx) + req.ApplyOptions(opts...) + return out, req.Send() +} + const opListAllowedNodeTypeModifications = "ListAllowedNodeTypeModifications" // ListAllowedNodeTypeModificationsRequest generates a "aws/request.Request" representing the @@ -3524,9 +3758,11 @@ func (c *ElastiCache) ListTagsForResourceRequest(input *ListTagsForResourceInput // optional. You can use cost allocation tags to categorize and track your AWS // costs. // +// If the cluster is not in the available state, ListTagsForResource returns +// an error. +// // You can have a maximum of 50 cost allocation tags on an ElastiCache resource. -// For more information, see Using Cost Allocation Tags in Amazon ElastiCache -// (http://docs.aws.amazon.com/AmazonElastiCache/latest/UserGuide/BestPractices.html). +// For more information, see Monitoring Costs with Tags (http://docs.aws.amazon.com/AmazonElastiCache/latest/red-ug/Tagging.html). // // Returns awserr.Error for service API and SDK errors. Use runtime type assertions // with awserr.Error's Code and Message methods to get detailed information about @@ -3911,9 +4147,16 @@ func (c *ElastiCache) ModifyReplicationGroupRequest(input *ModifyReplicationGrou // // Modifies the settings for a replication group. // -// Due to current limitations on Redis (cluster mode disabled), this operation -// or parameter is not supported on Redis (cluster mode enabled) replication -// groups. +// For Redis (cluster mode enabled) clusters, this operation cannot be used +// to change a cluster's node type or engine version. For more information, +// see: +// +// * Scaling for Amazon ElastiCache for Redis—Redis (cluster mode enabled) +// (http://docs.aws.amazon.com/AmazonElastiCache/latest/red-ug/scaling-redis-cluster-mode-enabled.html) +// in the ElastiCache User Guide +// +// * ModifyReplicationGroupShardConfiguration (http://docs.aws.amazon.com/AmazonElastiCache/latest/APIReference/API_ModifyReplicationGroupShardConfiguration.html) +// in the ElastiCache API Reference // // This operation is valid for Redis only. // @@ -4035,14 +4278,8 @@ func (c *ElastiCache) ModifyReplicationGroupShardConfigurationRequest(input *Mod // ModifyReplicationGroupShardConfiguration API operation for Amazon ElastiCache. // -// Performs horizontal scaling on a Redis (cluster mode enabled) cluster with -// no downtime. Requires Redis engine version 3.2.10 or newer. For information -// on upgrading your engine to a newer version, see Upgrading Engine Versions -// (http://docs.aws.amazon.com/AmazonElastiCache/latest/UserGuide/VersionManagement.html) -// in the Amazon ElastiCache User Guide. -// -// For more information on ElastiCache for Redis online horizontal scaling, -// see ElastiCache for Redis Horizontal Scaling (http://docs.aws.amazon.com/AmazonElastiCache/latest/UserGuide/redis-cluster-resharding-online.html) +// Modifies a replication group's shards (node groups) by allowing you to add +// shards, remove shards, or rebalance the keyspaces among exisiting shards. // // Returns awserr.Error for service API and SDK errors. Use runtime type assertions // with awserr.Error's Code and Message methods to get detailed information about @@ -4256,7 +4493,7 @@ func (c *ElastiCache) RebootCacheClusterRequest(input *RebootCacheClusterInput) // enabled) clusters. // // If you make changes to parameters that require a Redis (cluster mode enabled) -// cluster reboot for the changes to be applied, see Rebooting a Cluster (http://docs.aws.amazon.com/AmazonElastiCache/latest/UserGuide/Clusters.Rebooting.htm) +// cluster reboot for the changes to be applied, see Rebooting a Cluster (http://docs.aws.amazon.com/AmazonElastiCache/latest/red-ug/Clusters.Rebooting.html) // for an alternate process. // // Returns awserr.Error for service API and SDK errors. Use runtime type assertions @@ -4650,13 +4887,13 @@ func (c *ElastiCache) TestFailoverRequest(input *TestFailoverInput) (req *reques // // For more information see: // -// Viewing ElastiCache Events (http://docs.aws.amazon.com/AmazonElastiCache/latest/UserGuide/ECEvents.Viewing.html) +// Viewing ElastiCache Events (http://docs.aws.amazon.com/AmazonElastiCache/latest/red-ug/ECEvents.Viewing.html) // in the ElastiCache User Guide // // DescribeEvents (http://docs.aws.amazon.com/AmazonElastiCache/latest/APIReference/API_DescribeEvents.html) // in the ElastiCache API Reference // -// Also see, Testing Multi-AZ with Automatic Failover (http://docs.aws.amazon.com/AmazonElastiCache/latest/UserGuide/AutoFailover.html#auto-failover-test) +// Also see, Testing Multi-AZ with Automatic Failover (http://docs.aws.amazon.com/AmazonElastiCache/latest/red-ug/AutoFailover.html#auto-failover-test) // in the ElastiCache User Guide. // // Returns awserr.Error for service API and SDK errors. Use runtime type assertions @@ -4685,6 +4922,7 @@ func (c *ElastiCache) TestFailoverRequest(input *TestFailoverInput) (req *reques // The specified replication group does not exist. // // * ErrCodeTestFailoverNotAvailableFault "TestFailoverNotAvailableFault" +// The TestFailover action is not available. // // * ErrCodeInvalidParameterValueException "InvalidParameterValue" // The value for a parameter is invalid. @@ -4907,6 +5145,9 @@ type CacheCluster struct { // is created. To enable at-rest encryption on a cluster you must set AtRestEncryptionEnabled // to true when you create a cluster. // + // Required: Only available when creating a replication group in an Amazon VPC + // using redis version 3.2.6 or 4.x. + // // Default: false AtRestEncryptionEnabled *bool `type:"boolean"` @@ -4966,6 +5207,9 @@ type CacheCluster struct { // R3 node types:cache.r3.large, cache.r3.xlarge, cache.r3.2xlarge, cache.r3.4xlarge, // cache.r3.8xlarge // + // R4 node types;cache.r4.large, cache.r4.xlarge, cache.r4.2xlarge, cache.r4.4xlarge, + // cache.r4.8xlarge, cache.r4.16xlarge + // // Previous generation: (not recommended) // // M2 node types:cache.m2.xlarge, cache.m2.2xlarge, cache.m2.4xlarge @@ -4984,10 +5228,13 @@ type CacheCluster struct { // * Redis Append-only files (AOF) functionality is not supported for T1 // or T2 instances. // - // For a complete listing of node types and specifications, see Amazon ElastiCache - // Product Features and Details (http://aws.amazon.com/elasticache/details) - // and either Cache Node Type-Specific Parameters for Memcached (http://docs.aws.amazon.com/AmazonElastiCache/latest/UserGuide/CacheParameterGroups.Memcached.html#ParameterGroups.Memcached.NodeSpecific) - // or Cache Node Type-Specific Parameters for Redis (http://docs.aws.amazon.com/AmazonElastiCache/latest/UserGuide/CacheParameterGroups.Redis.html#ParameterGroups.Redis.NodeSpecific). + // For a complete listing of node types and specifications, see: + // + // * Amazon ElastiCache Product Features and Details (http://aws.amazon.com/elasticache/details) + // + // * Cache Node Type-Specific Parameters for Memcached (http://docs.aws.amazon.com/AmazonElastiCache/latest/mem-ug/ParameterGroups.Memcached.html#ParameterGroups.Memcached.NodeSpecific) + // + // * Cache Node Type-Specific Parameters for Redis (http://docs.aws.amazon.com/AmazonElastiCache/latest/red-ug/ParameterGroups.Redis.html#ParameterGroups.Redis.NodeSpecific) CacheNodeType *string `type:"string"` // A list of cache nodes that are members of the cluster. @@ -5088,6 +5335,9 @@ type CacheCluster struct { // is created. To enable in-transit encryption on a cluster you must set TransitEncryptionEnabled // to true when you create a cluster. // + // Required: Only available when creating a replication group in an Amazon VPC + // using redis version 3.2.6 or 4.x. + // // Default: false TransitEncryptionEnabled *bool `type:"boolean"` } @@ -5264,7 +5514,7 @@ type CacheEngineVersion struct { // The name of the cache parameter group family associated with this cache engine. // - // Valid values are: memcached1.4 | redis2.6 | redis2.8 | redis3.2 + // Valid values are: memcached1.4 | redis2.6 | redis2.8 | redis3.2 | redis4.0 CacheParameterGroupFamily *string `type:"string"` // The name of the cache engine. @@ -5352,6 +5602,9 @@ func (s *CacheEngineVersion) SetEngineVersion(v string) *CacheEngineVersion { // R3 node types:cache.r3.large, cache.r3.xlarge, cache.r3.2xlarge, cache.r3.4xlarge, // cache.r3.8xlarge // +// R4 node types;cache.r4.large, cache.r4.xlarge, cache.r4.2xlarge, cache.r4.4xlarge, +// cache.r4.8xlarge, cache.r4.16xlarge +// // Previous generation: (not recommended) // // M2 node types:cache.m2.xlarge, cache.m2.2xlarge, cache.m2.4xlarge @@ -5370,10 +5623,13 @@ func (s *CacheEngineVersion) SetEngineVersion(v string) *CacheEngineVersion { // * Redis Append-only files (AOF) functionality is not supported for T1 // or T2 instances. // -// For a complete listing of node types and specifications, see Amazon ElastiCache -// Product Features and Details (http://aws.amazon.com/elasticache/details) -// and either Cache Node Type-Specific Parameters for Memcached (http://docs.aws.amazon.com/AmazonElastiCache/latest/UserGuide/CacheParameterGroups.Memcached.html#ParameterGroups.Memcached.NodeSpecific) -// or Cache Node Type-Specific Parameters for Redis (http://docs.aws.amazon.com/AmazonElastiCache/latest/UserGuide/CacheParameterGroups.Redis.html#ParameterGroups.Redis.NodeSpecific). +// For a complete listing of node types and specifications, see: +// +// * Amazon ElastiCache Product Features and Details (http://aws.amazon.com/elasticache/details) +// +// * Cache Node Type-Specific Parameters for Memcached (http://docs.aws.amazon.com/AmazonElastiCache/latest/mem-ug/ParameterGroups.Memcached.html#ParameterGroups.Memcached.NodeSpecific) +// +// * Cache Node Type-Specific Parameters for Redis (http://docs.aws.amazon.com/AmazonElastiCache/latest/red-ug/ParameterGroups.Redis.html#ParameterGroups.Redis.NodeSpecific) type CacheNode struct { _ struct{} `type:"structure"` @@ -5469,7 +5725,7 @@ type CacheNodeTypeSpecificParameter struct { // Indicates whether a change to the parameter is applied immediately or requires // a reboot for the change to be applied. You can force a reboot or wait until // the next maintenance window's reboot. For more information, see Rebooting - // a Cluster (http://docs.aws.amazon.com/AmazonElastiCache/latest/UserGuide/Clusters.Rebooting.html). + // a Cluster (http://docs.aws.amazon.com/AmazonElastiCache/latest/red-ug/Clusters.Rebooting.html). ChangeType *string `type:"string" enum:"ChangeType"` // The valid data type for the parameter. @@ -5597,7 +5853,7 @@ type CacheParameterGroup struct { // The name of the cache parameter group family that this cache parameter group // is compatible with. // - // Valid values are: memcached1.4 | redis2.6 | redis2.8 | redis3.2 + // Valid values are: memcached1.4 | redis2.6 | redis2.8 | redis3.2 | redis4.0 CacheParameterGroupFamily *string `type:"string"` // The name of the cache parameter group. @@ -5855,6 +6111,93 @@ func (s *CacheSubnetGroup) SetVpcId(v string) *CacheSubnetGroup { return s } +// Node group (shard) configuration options when adding or removing replicas. +// Each node group (shard) configuration has the following members: NodeGroupId, +// NewReplicaCount, and PreferredAvailabilityZones. +type ConfigureShard struct { + _ struct{} `type:"structure"` + + // The number of replicas you want in this node group at the end of this operation. + // The maximum value for NewReplicaCount is 5. The minimum value depends upon + // the type of Redis replication group you are working with. + // + // The minimum number of replicas in a shard or replication group is: + // + // * Redis (cluster mode disabled) + // + // If Multi-AZ with Automatic Failover is enabled: 1 + // + // If Multi-AZ with Automatic Failover is not enable: 0 + // + // * Redis (cluster mode enabled): 0 (though you will not be able to failover + // to a replica if your primary node fails) + // + // NewReplicaCount is a required field + NewReplicaCount *int64 `type:"integer" required:"true"` + + // The 4-digit id for the node group you are configuring. For Redis (cluster + // mode disabled) replication groups, the node group id is always 0001. To find + // a Redis (cluster mode enabled)'s node group's (shard's) id, see Finding a + // Shard's Id (http://docs.aws.amazon.com/AmazonElastiCache/latest/red-ug/shard-find-id.html). + // + // NodeGroupId is a required field + NodeGroupId *string `min:"1" type:"string" required:"true"` + + // A list of PreferredAvailabilityZone strings that specify which availability + // zones the replication group's nodes are to be in. The nummber of PreferredAvailabilityZone + // values must equal the value of NewReplicaCount plus 1 to account for the + // primary node. If this member of ReplicaConfiguration is omitted, ElastiCache + // for Redis selects the availability zone for each of the replicas. + PreferredAvailabilityZones []*string `locationNameList:"PreferredAvailabilityZone" type:"list"` +} + +// String returns the string representation +func (s ConfigureShard) String() string { + return awsutil.Prettify(s) +} + +// GoString returns the string representation +func (s ConfigureShard) GoString() string { + return s.String() +} + +// Validate inspects the fields of the type to determine if they are valid. +func (s *ConfigureShard) Validate() error { + invalidParams := request.ErrInvalidParams{Context: "ConfigureShard"} + if s.NewReplicaCount == nil { + invalidParams.Add(request.NewErrParamRequired("NewReplicaCount")) + } + if s.NodeGroupId == nil { + invalidParams.Add(request.NewErrParamRequired("NodeGroupId")) + } + if s.NodeGroupId != nil && len(*s.NodeGroupId) < 1 { + invalidParams.Add(request.NewErrParamMinLen("NodeGroupId", 1)) + } + + if invalidParams.Len() > 0 { + return invalidParams + } + return nil +} + +// SetNewReplicaCount sets the NewReplicaCount field's value. +func (s *ConfigureShard) SetNewReplicaCount(v int64) *ConfigureShard { + s.NewReplicaCount = &v + return s +} + +// SetNodeGroupId sets the NodeGroupId field's value. +func (s *ConfigureShard) SetNodeGroupId(v string) *ConfigureShard { + s.NodeGroupId = &v + return s +} + +// SetPreferredAvailabilityZones sets the PreferredAvailabilityZones field's value. +func (s *ConfigureShard) SetPreferredAvailabilityZones(v []*string) *ConfigureShard { + s.PreferredAvailabilityZones = v + return s +} + // Represents the input of a CopySnapshotMessage operation. type CopySnapshotInput struct { _ struct{} `type:"structure"` @@ -5869,10 +6212,10 @@ type CopySnapshotInput struct { // // When using this parameter to export a snapshot, be sure Amazon ElastiCache // has the needed permissions to this S3 bucket. For more information, see Step - // 2: Grant ElastiCache Access to Your Amazon S3 Bucket (http://docs.aws.amazon.com/AmazonElastiCache/latest/UserGuide/Snapshots.Exporting.html#Snapshots.Exporting.GrantAccess) + // 2: Grant ElastiCache Access to Your Amazon S3 Bucket (http://docs.aws.amazon.com/AmazonElastiCache/latest/red-ug/Snapshots.Exporting.html#Snapshots.Exporting.GrantAccess) // in the Amazon ElastiCache User Guide. // - // For more information, see Exporting a Snapshot (http://docs.aws.amazon.com/AmazonElastiCache/latest/UserGuide/Snapshots.Exporting.html) + // For more information, see Exporting a Snapshot (http://docs.aws.amazon.com/AmazonElastiCache/latest/red-ug/Snapshots.Exporting.html) // in the Amazon ElastiCache User Guide. TargetBucket *string `type:"string"` @@ -5968,13 +6311,6 @@ type CreateCacheClusterInput struct { // Reserved parameter. The password used to access a password protected server. // - // This parameter is valid only if: - // - // * The parameter TransitEncryptionEnabled was set to true when the cluster - // was created. - // - // * The line requirepass was added to the database configuration file. - // // Password constraints: // // * Must be only printable ASCII characters. @@ -6040,6 +6376,9 @@ type CreateCacheClusterInput struct { // R3 node types:cache.r3.large, cache.r3.xlarge, cache.r3.2xlarge, cache.r3.4xlarge, // cache.r3.8xlarge // + // R4 node types;cache.r4.large, cache.r4.xlarge, cache.r4.2xlarge, cache.r4.4xlarge, + // cache.r4.8xlarge, cache.r4.16xlarge + // // Previous generation: (not recommended) // // M2 node types:cache.m2.xlarge, cache.m2.2xlarge, cache.m2.4xlarge @@ -6058,10 +6397,13 @@ type CreateCacheClusterInput struct { // * Redis Append-only files (AOF) functionality is not supported for T1 // or T2 instances. // - // For a complete listing of node types and specifications, see Amazon ElastiCache - // Product Features and Details (http://aws.amazon.com/elasticache/details) - // and either Cache Node Type-Specific Parameters for Memcached (http://docs.aws.amazon.com/AmazonElastiCache/latest/UserGuide/CacheParameterGroups.Memcached.html#ParameterGroups.Memcached.NodeSpecific) - // or Cache Node Type-Specific Parameters for Redis (http://docs.aws.amazon.com/AmazonElastiCache/latest/UserGuide/CacheParameterGroups.Redis.html#ParameterGroups.Redis.NodeSpecific). + // For a complete listing of node types and specifications, see: + // + // * Amazon ElastiCache Product Features and Details (http://aws.amazon.com/elasticache/details) + // + // * Cache Node Type-Specific Parameters for Memcached (http://docs.aws.amazon.com/AmazonElastiCache/latest/mem-ug/ParameterGroups.Memcached.html#ParameterGroups.Memcached.NodeSpecific) + // + // * Cache Node Type-Specific Parameters for Redis (http://docs.aws.amazon.com/AmazonElastiCache/latest/red-ug/ParameterGroups.Redis.html#ParameterGroups.Redis.NodeSpecific) CacheNodeType *string `type:"string"` // The name of the parameter group to associate with this cluster. If this argument @@ -6083,7 +6425,7 @@ type CreateCacheClusterInput struct { // // If you're going to launch your cluster in an Amazon VPC, you need to create // a subnet group before you start creating a cluster. For more information, - // see Subnets and Subnet Groups (http://docs.aws.amazon.com/AmazonElastiCache/latest/UserGuide/SubnetGroups.html). + // see Subnets and Subnet Groups (http://docs.aws.amazon.com/AmazonElastiCache/latest/red-ug/SubnetGroups.html). CacheSubnetGroupName *string `type:"string"` // The name of the cache engine to be used for this cluster. @@ -6096,7 +6438,7 @@ type CreateCacheClusterInput struct { // operation. // // Important: You can upgrade to a newer engine version (see Selecting a Cache - // Engine and Version (http://docs.aws.amazon.com/AmazonElastiCache/latest/UserGuide/SelectEngine.html#VersionManagement)), + // Engine and Version (http://docs.aws.amazon.com/AmazonElastiCache/latest/red-ug/SelectEngine.html#VersionManagement)), // but you cannot downgrade to an earlier engine version. If you want to use // an earlier engine version, you must delete the existing cluster or replication // group and create it anew with the earlier engine version. @@ -6175,10 +6517,6 @@ type CreateCacheClusterInput struct { // Example: sun:23:00-mon:01:30 PreferredMaintenanceWindow *string `type:"string"` - // Due to current limitations on Redis (cluster mode disabled), this operation - // or parameter is not supported on Redis (cluster mode enabled) replication - // groups. - // // The ID of the replication group to which this cluster should belong. If this // parameter is specified, the cluster is added to the specified replication // group as a read replica; otherwise, the cluster is a standalone primary that @@ -6220,7 +6558,7 @@ type CreateCacheClusterInput struct { // // This parameter is only valid if the Engine parameter is redis. // - // Default: 0 (i.e., automatic backups are disabled for this cluster). + // Default: 0 (i.e., automatic backups are disabled for this cache cluster). SnapshotRetentionLimit *int64 `type:"integer"` // The daily time range (in UTC) during which ElastiCache begins taking a daily @@ -6429,7 +6767,7 @@ type CreateCacheParameterGroupInput struct { // The name of the cache parameter group family that the cache parameter group // can be used with. // - // Valid values are: memcached1.4 | redis2.6 | redis2.8 | redis3.2 + // Valid values are: memcached1.4 | redis2.6 | redis2.8 | redis3.2 | redis4.0 // // CacheParameterGroupFamily is a required field CacheParameterGroupFamily *string `type:"string" required:"true"` @@ -6712,20 +7050,19 @@ type CreateReplicationGroupInput struct { // must set AtRestEncryptionEnabled to true when you create the replication // group. // - // This parameter is valid only if the Engine parameter is redis and the cluster - // is being created in an Amazon VPC. + // Required: Only available when creating a replication group in an Amazon VPC + // using redis version 3.2.6 or 4.x. // // Default: false AtRestEncryptionEnabled *bool `type:"boolean"` // Reserved parameter. The password used to access a password protected server. // - // This parameter is valid only if: + // AuthToken can be specified only on replication groups where TransitEncryptionEnabled + // is true. // - // * The parameter TransitEncryptionEnabled was set to true when the cluster - // was created. - // - // * The line requirepass was added to the database configuration file. + // For HIPAA compliance, you must specify TransitEncryptionEnabled as true, + // an AuthToken, and a CacheSubnetGroup. // // Password constraints: // @@ -6799,6 +7136,9 @@ type CreateReplicationGroupInput struct { // R3 node types:cache.r3.large, cache.r3.xlarge, cache.r3.2xlarge, cache.r3.4xlarge, // cache.r3.8xlarge // + // R4 node types;cache.r4.large, cache.r4.xlarge, cache.r4.2xlarge, cache.r4.4xlarge, + // cache.r4.8xlarge, cache.r4.16xlarge + // // Previous generation: (not recommended) // // M2 node types:cache.m2.xlarge, cache.m2.2xlarge, cache.m2.4xlarge @@ -6817,10 +7157,13 @@ type CreateReplicationGroupInput struct { // * Redis Append-only files (AOF) functionality is not supported for T1 // or T2 instances. // - // For a complete listing of node types and specifications, see Amazon ElastiCache - // Product Features and Details (http://aws.amazon.com/elasticache/details) - // and either Cache Node Type-Specific Parameters for Memcached (http://docs.aws.amazon.com/AmazonElastiCache/latest/UserGuide/CacheParameterGroups.Memcached.html#ParameterGroups.Memcached.NodeSpecific) - // or Cache Node Type-Specific Parameters for Redis (http://docs.aws.amazon.com/AmazonElastiCache/latest/UserGuide/CacheParameterGroups.Redis.html#ParameterGroups.Redis.NodeSpecific). + // For a complete listing of node types and specifications, see: + // + // * Amazon ElastiCache Product Features and Details (http://aws.amazon.com/elasticache/details) + // + // * Cache Node Type-Specific Parameters for Memcached (http://docs.aws.amazon.com/AmazonElastiCache/latest/mem-ug/ParameterGroups.Memcached.html#ParameterGroups.Memcached.NodeSpecific) + // + // * Cache Node Type-Specific Parameters for Redis (http://docs.aws.amazon.com/AmazonElastiCache/latest/red-ug/ParameterGroups.Redis.html#ParameterGroups.Redis.NodeSpecific) CacheNodeType *string `type:"string"` // The name of the parameter group to associate with this replication group. @@ -6843,7 +7186,7 @@ type CreateReplicationGroupInput struct { // // If you're going to launch your cluster in an Amazon VPC, you need to create // a subnet group before you start creating a cluster. For more information, - // see Subnets and Subnet Groups (http://docs.aws.amazon.com/AmazonElastiCache/latest/UserGuide/SubnetGroups.html). + // see Subnets and Subnet Groups (http://docs.aws.amazon.com/AmazonElastiCache/latest/red-ug/SubnetGroups.html). CacheSubnetGroupName *string `type:"string"` // The name of the cache engine to be used for the clusters in this replication @@ -6855,7 +7198,7 @@ type CreateReplicationGroupInput struct { // operation. // // Important: You can upgrade to a newer engine version (see Selecting a Cache - // Engine and Version (http://docs.aws.amazon.com/AmazonElastiCache/latest/UserGuide/SelectEngine.html#VersionManagement)) + // Engine and Version (http://docs.aws.amazon.com/AmazonElastiCache/latest/red-ug/SelectEngine.html#VersionManagement)) // in the ElastiCache User Guide, but you cannot downgrade to an earlier engine // version. If you want to use an earlier engine version, you must delete the // existing cluster or replication group and create it anew with the earlier @@ -6863,12 +7206,15 @@ type CreateReplicationGroupInput struct { EngineVersion *string `type:"string"` // A list of node group (shard) configuration options. Each node group (shard) - // configuration has the following: Slots, PrimaryAvailabilityZone, ReplicaAvailabilityZones, - // ReplicaCount. + // configuration has the following members: PrimaryAvailabilityZone, ReplicaAvailabilityZones, + // ReplicaCount, and Slots. // // If you're creating a Redis (cluster mode disabled) or a Redis (cluster mode // enabled) replication group, you can use this parameter to individually configure - // each node group (shard), or you can omit this parameter. + // each node group (shard), or you can omit this parameter. However, when seeding + // a Redis (cluster mode enabled) cluster from a S3 rdb file, you must configure + // each node group (shard) using this parameter because you must specify the + // slots for each node group. NodeGroupConfiguration []*NodeGroupConfiguration `locationNameList:"NodeGroupConfiguration" type:"list"` // The Amazon Resource Name (ARN) of the Amazon Simple Notification Service @@ -6887,7 +7233,7 @@ type CreateReplicationGroupInput struct { // (it will default to 1), or you can explicitly set it to a value between 2 // and 6. // - // The maximum permitted value for NumCacheClusters is 6 (primary plus 5 replicas). + // The maximum permitted value for NumCacheClusters is 6 (1 primary plus 5 replicas). NumCacheClusters *int64 `type:"integer"` // An optional parameter that specifies the number of node groups (shards) for @@ -7014,7 +7360,7 @@ type CreateReplicationGroupInput struct { SnapshotWindow *string `type:"string"` // A list of cost allocation tags to be added to this resource. A tag is a key-value - // pair. A tag key does not have to be accompanied by a tag value. + // pair. Tags []*Tag `locationNameList:"Tag" type:"list"` // A flag that enables in-transit encryption when set to true. @@ -7024,12 +7370,18 @@ type CreateReplicationGroupInput struct { // to true when you create a cluster. // // This parameter is valid only if the Engine parameter is redis, the EngineVersion - // parameter is 3.2.4 or later, and the cluster is being created in an Amazon + // parameter is 3.2.6 or 4.x, and the cluster is being created in an Amazon // VPC. // // If you enable in-transit encryption, you must also specify a value for CacheSubnetGroup. // + // Required: Only available when creating a replication group in an Amazon VPC + // using redis version 3.2.6 or 4.x. + // // Default: false + // + // For HIPAA compliance, you must specify TransitEncryptionEnabled as true, + // an AuthToken, and a CacheSubnetGroup. TransitEncryptionEnabled *bool `type:"boolean"` } @@ -7052,6 +7404,16 @@ func (s *CreateReplicationGroupInput) Validate() error { if s.ReplicationGroupId == nil { invalidParams.Add(request.NewErrParamRequired("ReplicationGroupId")) } + if s.NodeGroupConfiguration != nil { + for i, v := range s.NodeGroupConfiguration { + if v == nil { + continue + } + if err := v.Validate(); err != nil { + invalidParams.AddNested(fmt.Sprintf("%s[%v]", "NodeGroupConfiguration", i), err.(request.ErrInvalidParams)) + } + } + } if invalidParams.Len() > 0 { return invalidParams @@ -7333,6 +7695,137 @@ func (s *CreateSnapshotOutput) SetSnapshot(v *Snapshot) *CreateSnapshotOutput { return s } +type DecreaseReplicaCountInput struct { + _ struct{} `type:"structure"` + + // If True, the number of replica nodes is decreased immediately. If False, + // the number of replica nodes is decreased during the next maintenance window. + // + // ApplyImmediately is a required field + ApplyImmediately *bool `type:"boolean" required:"true"` + + // The number of read replica nodes you want at the completion of this operation. + // For Redis (cluster mode disabled) replication groups, this is the number + // of replica nodes in the replication group. For Redis (cluster mode enabled) + // replication groups, this is the number of replica nodes in each of the replication + // group's node groups. + // + // The minimum number of replicas in a shard or replication group is: + // + // * Redis (cluster mode disabled) + // + // If Multi-AZ with Automatic Failover is enabled: 1 + // + // If Multi-AZ with Automatic Failover is not enabled: 0 + // + // * Redis (cluster mode enabled): 0 (though you will not be able to failover + // to a replica if your primary node fails) + NewReplicaCount *int64 `type:"integer"` + + // A list of ConfigureShard objects that can be used to configure each shard + // in a Redis (cluster mode enabled) replication group. The ConfigureShard has + // three members: NewReplicaCount, NodeGroupId, and PreferredAvailabilityZones. + ReplicaConfiguration []*ConfigureShard `locationNameList:"ConfigureShard" type:"list"` + + // A list of the node ids to remove from the replication group or node group + // (shard). + ReplicasToRemove []*string `type:"list"` + + // The id of the replication group from which you want to remove replica nodes. + // + // ReplicationGroupId is a required field + ReplicationGroupId *string `type:"string" required:"true"` +} + +// String returns the string representation +func (s DecreaseReplicaCountInput) String() string { + return awsutil.Prettify(s) +} + +// GoString returns the string representation +func (s DecreaseReplicaCountInput) GoString() string { + return s.String() +} + +// Validate inspects the fields of the type to determine if they are valid. +func (s *DecreaseReplicaCountInput) Validate() error { + invalidParams := request.ErrInvalidParams{Context: "DecreaseReplicaCountInput"} + if s.ApplyImmediately == nil { + invalidParams.Add(request.NewErrParamRequired("ApplyImmediately")) + } + if s.ReplicationGroupId == nil { + invalidParams.Add(request.NewErrParamRequired("ReplicationGroupId")) + } + if s.ReplicaConfiguration != nil { + for i, v := range s.ReplicaConfiguration { + if v == nil { + continue + } + if err := v.Validate(); err != nil { + invalidParams.AddNested(fmt.Sprintf("%s[%v]", "ReplicaConfiguration", i), err.(request.ErrInvalidParams)) + } + } + } + + if invalidParams.Len() > 0 { + return invalidParams + } + return nil +} + +// SetApplyImmediately sets the ApplyImmediately field's value. +func (s *DecreaseReplicaCountInput) SetApplyImmediately(v bool) *DecreaseReplicaCountInput { + s.ApplyImmediately = &v + return s +} + +// SetNewReplicaCount sets the NewReplicaCount field's value. +func (s *DecreaseReplicaCountInput) SetNewReplicaCount(v int64) *DecreaseReplicaCountInput { + s.NewReplicaCount = &v + return s +} + +// SetReplicaConfiguration sets the ReplicaConfiguration field's value. +func (s *DecreaseReplicaCountInput) SetReplicaConfiguration(v []*ConfigureShard) *DecreaseReplicaCountInput { + s.ReplicaConfiguration = v + return s +} + +// SetReplicasToRemove sets the ReplicasToRemove field's value. +func (s *DecreaseReplicaCountInput) SetReplicasToRemove(v []*string) *DecreaseReplicaCountInput { + s.ReplicasToRemove = v + return s +} + +// SetReplicationGroupId sets the ReplicationGroupId field's value. +func (s *DecreaseReplicaCountInput) SetReplicationGroupId(v string) *DecreaseReplicaCountInput { + s.ReplicationGroupId = &v + return s +} + +type DecreaseReplicaCountOutput struct { + _ struct{} `type:"structure"` + + // Contains all of the attributes of a specific Redis replication group. + ReplicationGroup *ReplicationGroup `type:"structure"` +} + +// String returns the string representation +func (s DecreaseReplicaCountOutput) String() string { + return awsutil.Prettify(s) +} + +// GoString returns the string representation +func (s DecreaseReplicaCountOutput) GoString() string { + return s.String() +} + +// SetReplicationGroup sets the ReplicationGroup field's value. +func (s *DecreaseReplicaCountOutput) SetReplicationGroup(v *ReplicationGroup) *DecreaseReplicaCountOutput { + s.ReplicationGroup = v + return s +} + // Represents the input of a DeleteCacheCluster operation. type DeleteCacheClusterInput struct { _ struct{} `type:"structure"` @@ -7833,7 +8326,7 @@ type DescribeCacheEngineVersionsInput struct { // The name of a specific cache parameter group family to return details for. // - // Valid values are: memcached1.4 | redis2.6 | redis2.8 | redis3.2 + // Valid values are: memcached1.4 | redis2.6 | redis2.8 | redis3.2 | redis4.0 // // Constraints: // @@ -8328,7 +8821,7 @@ type DescribeEngineDefaultParametersInput struct { // The name of the cache parameter group family. // - // Valid values are: memcached1.4 | redis2.6 | redis2.8 | redis3.2 + // Valid values are: memcached1.4 | redis2.6 | redis2.8 | redis3.2 | redis4.0 // // CacheParameterGroupFamily is a required field CacheParameterGroupFamily *string `type:"string" required:"true"` @@ -8669,6 +9162,9 @@ type DescribeReservedCacheNodesInput struct { // R3 node types:cache.r3.large, cache.r3.xlarge, cache.r3.2xlarge, cache.r3.4xlarge, // cache.r3.8xlarge // + // R4 node types;cache.r4.large, cache.r4.xlarge, cache.r4.2xlarge, cache.r4.4xlarge, + // cache.r4.8xlarge, cache.r4.16xlarge + // // Previous generation: (not recommended) // // M2 node types:cache.m2.xlarge, cache.m2.2xlarge, cache.m2.4xlarge @@ -8687,10 +9183,13 @@ type DescribeReservedCacheNodesInput struct { // * Redis Append-only files (AOF) functionality is not supported for T1 // or T2 instances. // - // For a complete listing of node types and specifications, see Amazon ElastiCache - // Product Features and Details (http://aws.amazon.com/elasticache/details) - // and either Cache Node Type-Specific Parameters for Memcached (http://docs.aws.amazon.com/AmazonElastiCache/latest/UserGuide/CacheParameterGroups.Memcached.html#ParameterGroups.Memcached.NodeSpecific) - // or Cache Node Type-Specific Parameters for Redis (http://docs.aws.amazon.com/AmazonElastiCache/latest/UserGuide/CacheParameterGroups.Redis.html#ParameterGroups.Redis.NodeSpecific). + // For a complete listing of node types and specifications, see: + // + // * Amazon ElastiCache Product Features and Details (http://aws.amazon.com/elasticache/details) + // + // * Cache Node Type-Specific Parameters for Memcached (http://docs.aws.amazon.com/AmazonElastiCache/latest/mem-ug/ParameterGroups.Memcached.html#ParameterGroups.Memcached.NodeSpecific) + // + // * Cache Node Type-Specific Parameters for Redis (http://docs.aws.amazon.com/AmazonElastiCache/latest/red-ug/ParameterGroups.Redis.html#ParameterGroups.Redis.NodeSpecific) CacheNodeType *string `type:"string"` // The duration filter value, specified in years or seconds. Use this parameter @@ -8831,6 +9330,9 @@ type DescribeReservedCacheNodesOfferingsInput struct { // R3 node types:cache.r3.large, cache.r3.xlarge, cache.r3.2xlarge, cache.r3.4xlarge, // cache.r3.8xlarge // + // R4 node types;cache.r4.large, cache.r4.xlarge, cache.r4.2xlarge, cache.r4.4xlarge, + // cache.r4.8xlarge, cache.r4.16xlarge + // // Previous generation: (not recommended) // // M2 node types:cache.m2.xlarge, cache.m2.2xlarge, cache.m2.4xlarge @@ -8849,10 +9351,13 @@ type DescribeReservedCacheNodesOfferingsInput struct { // * Redis Append-only files (AOF) functionality is not supported for T1 // or T2 instances. // - // For a complete listing of node types and specifications, see Amazon ElastiCache - // Product Features and Details (http://aws.amazon.com/elasticache/details) - // and either Cache Node Type-Specific Parameters for Memcached (http://docs.aws.amazon.com/AmazonElastiCache/latest/UserGuide/CacheParameterGroups.Memcached.html#ParameterGroups.Memcached.NodeSpecific) - // or Cache Node Type-Specific Parameters for Redis (http://docs.aws.amazon.com/AmazonElastiCache/latest/UserGuide/CacheParameterGroups.Redis.html#ParameterGroups.Redis.NodeSpecific). + // For a complete listing of node types and specifications, see: + // + // * Amazon ElastiCache Product Features and Details (http://aws.amazon.com/elasticache/details) + // + // * Cache Node Type-Specific Parameters for Memcached (http://docs.aws.amazon.com/AmazonElastiCache/latest/mem-ug/ParameterGroups.Memcached.html#ParameterGroups.Memcached.NodeSpecific) + // + // * Cache Node Type-Specific Parameters for Redis (http://docs.aws.amazon.com/AmazonElastiCache/latest/red-ug/ParameterGroups.Redis.html#ParameterGroups.Redis.NodeSpecific) CacheNodeType *string `type:"string"` // Duration filter value, specified in years or seconds. Use this parameter @@ -9228,7 +9733,7 @@ type EngineDefaults struct { // Specifies the name of the cache parameter group family to which the engine // default parameters apply. // - // Valid values are: memcached1.4 | redis2.6 | redis2.8 | redis3.2 + // Valid values are: memcached1.4 | redis2.6 | redis2.8 | redis3.2 | redis4.0 CacheParameterGroupFamily *string `type:"string"` // Provides an identifier to allow retrieval of paginated results. @@ -9327,6 +9832,116 @@ func (s *Event) SetSourceType(v string) *Event { return s } +type IncreaseReplicaCountInput struct { + _ struct{} `type:"structure"` + + // If True, the number of replica nodes is increased immediately. If False, + // the number of replica nodes is increased during the next maintenance window. + // + // ApplyImmediately is a required field + ApplyImmediately *bool `type:"boolean" required:"true"` + + // The number of read replica nodes you want at the completion of this operation. + // For Redis (cluster mode disabled) replication groups, this is the number + // of replica nodes in the replication group. For Redis (cluster mode enabled) + // replication groups, this is the number of replica nodes in each of the replication + // group's node groups. + NewReplicaCount *int64 `type:"integer"` + + // A list of ConfigureShard objects that can be used to configure each shard + // in a Redis (cluster mode enabled) replication group. The ConfigureShard has + // three members: NewReplicaCount, NodeGroupId, and PreferredAvailabilityZones. + ReplicaConfiguration []*ConfigureShard `locationNameList:"ConfigureShard" type:"list"` + + // The id of the replication group to which you want to add replica nodes. + // + // ReplicationGroupId is a required field + ReplicationGroupId *string `type:"string" required:"true"` +} + +// String returns the string representation +func (s IncreaseReplicaCountInput) String() string { + return awsutil.Prettify(s) +} + +// GoString returns the string representation +func (s IncreaseReplicaCountInput) GoString() string { + return s.String() +} + +// Validate inspects the fields of the type to determine if they are valid. +func (s *IncreaseReplicaCountInput) Validate() error { + invalidParams := request.ErrInvalidParams{Context: "IncreaseReplicaCountInput"} + if s.ApplyImmediately == nil { + invalidParams.Add(request.NewErrParamRequired("ApplyImmediately")) + } + if s.ReplicationGroupId == nil { + invalidParams.Add(request.NewErrParamRequired("ReplicationGroupId")) + } + if s.ReplicaConfiguration != nil { + for i, v := range s.ReplicaConfiguration { + if v == nil { + continue + } + if err := v.Validate(); err != nil { + invalidParams.AddNested(fmt.Sprintf("%s[%v]", "ReplicaConfiguration", i), err.(request.ErrInvalidParams)) + } + } + } + + if invalidParams.Len() > 0 { + return invalidParams + } + return nil +} + +// SetApplyImmediately sets the ApplyImmediately field's value. +func (s *IncreaseReplicaCountInput) SetApplyImmediately(v bool) *IncreaseReplicaCountInput { + s.ApplyImmediately = &v + return s +} + +// SetNewReplicaCount sets the NewReplicaCount field's value. +func (s *IncreaseReplicaCountInput) SetNewReplicaCount(v int64) *IncreaseReplicaCountInput { + s.NewReplicaCount = &v + return s +} + +// SetReplicaConfiguration sets the ReplicaConfiguration field's value. +func (s *IncreaseReplicaCountInput) SetReplicaConfiguration(v []*ConfigureShard) *IncreaseReplicaCountInput { + s.ReplicaConfiguration = v + return s +} + +// SetReplicationGroupId sets the ReplicationGroupId field's value. +func (s *IncreaseReplicaCountInput) SetReplicationGroupId(v string) *IncreaseReplicaCountInput { + s.ReplicationGroupId = &v + return s +} + +type IncreaseReplicaCountOutput struct { + _ struct{} `type:"structure"` + + // Contains all of the attributes of a specific Redis replication group. + ReplicationGroup *ReplicationGroup `type:"structure"` +} + +// String returns the string representation +func (s IncreaseReplicaCountOutput) String() string { + return awsutil.Prettify(s) +} + +// GoString returns the string representation +func (s IncreaseReplicaCountOutput) GoString() string { + return s.String() +} + +// SetReplicationGroup sets the ReplicationGroup field's value. +func (s *IncreaseReplicaCountOutput) SetReplicationGroup(v *ReplicationGroup) *IncreaseReplicaCountOutput { + s.ReplicationGroup = v + return s +} + // The input parameters for the ListAllowedNodeTypeModifications operation. type ListAllowedNodeTypeModificationsInput struct { _ struct{} `type:"structure"` @@ -9461,7 +10076,7 @@ type ModifyCacheClusterInput struct { // Only newly created nodes are located in different Availability Zones. For // instructions on how to move existing Memcached nodes to different Availability // Zones, see the Availability Zone Considerations section of Cache Node Considerations - // for Memcached (http://docs.aws.amazon.com/AmazonElastiCache/latest/UserGuide/CacheNode.Memcached.html). + // for Memcached (http://docs.aws.amazon.com/AmazonElastiCache/latest/mem-ug/CacheNode.Memcached.html). AZMode *string `type:"string" enum:"AZMode"` // If true, this parameter causes the modifications in this request and any @@ -9520,7 +10135,7 @@ type ModifyCacheClusterInput struct { // The upgraded version of the cache engine to be run on the cache nodes. // // Important: You can upgrade to a newer engine version (see Selecting a Cache - // Engine and Version (http://docs.aws.amazon.com/AmazonElastiCache/latest/UserGuide/SelectEngine.html#VersionManagement)), + // Engine and Version (http://docs.aws.amazon.com/AmazonElastiCache/latest/red-ug/SelectEngine.html#VersionManagement)), // but you cannot downgrade to an earlier engine version. If you want to use // an earlier engine version, you must delete the existing cluster and create // it anew with the earlier engine version. @@ -9557,7 +10172,7 @@ type ModifyCacheClusterInput struct { // Availability Zone. Only newly created nodes can be located in different Availability // Zones. For guidance on how to move existing Memcached nodes to different // Availability Zones, see the Availability Zone Considerations section of Cache - // Node Considerations for Memcached (http://docs.aws.amazon.com/AmazonElastiCache/latest/UserGuide/CacheNode.Memcached.html). + // Node Considerations for Memcached (http://docs.aws.amazon.com/AmazonElastiCache/latest/mem-ug/CacheNode.Memcached.html). // // Impact of new add/remove requests upon pending requests // @@ -10035,14 +10650,16 @@ type ModifyReplicationGroupInput struct { // replication group. // // Important: You can upgrade to a newer engine version (see Selecting a Cache - // Engine and Version (http://docs.aws.amazon.com/AmazonElastiCache/latest/UserGuide/SelectEngine.html#VersionManagement)), + // Engine and Version (http://docs.aws.amazon.com/AmazonElastiCache/latest/red-ug/SelectEngine.html#VersionManagement)), // but you cannot downgrade to an earlier engine version. If you want to use // an earlier engine version, you must delete the existing replication group // and create it anew with the earlier engine version. EngineVersion *string `type:"string"` - // The name of the Node Group (called shard in the console). - NodeGroupId *string `type:"string"` + // Deprecated. This parameter is not used. + // + // Deprecated: NodeGroupId has been deprecated + NodeGroupId *string `deprecated:"true" type:"string"` // The Amazon Resource Name (ARN) of the Amazon SNS topic to which notifications // are sent. @@ -10297,10 +10914,21 @@ type ModifyReplicationGroupShardConfigurationInput struct { NodeGroupCount *int64 `type:"integer" required:"true"` // If the value of NodeGroupCount is less than the current number of node groups - // (shards), NodeGroupsToRemove is a required list of node group ids to remove + // (shards), the NodeGroupsToRemove or NodeGroupsToRetain is a required list + // of node group ids to remove from or retain in the cluster. + // + // ElastiCache for Redis will attempt to remove all node groups listed by NodeGroupsToRemove // from the cluster. NodeGroupsToRemove []*string `locationNameList:"NodeGroupToRemove" type:"list"` + // If the value of NodeGroupCount is less than the current number of node groups + // (shards), the NodeGroupsToRemove or NodeGroupsToRetain is a required list + // of node group ids to remove from or retain in the cluster. + // + // ElastiCache for Redis will attempt to remove all node groups except those + // listed by NodeGroupsToRetain from the cluster. + NodeGroupsToRetain []*string `locationNameList:"NodeGroupToRetain" type:"list"` + // The name of the Redis (cluster mode enabled) cluster (replication group) // on which the shards are to be configured. // @@ -10340,6 +10968,16 @@ func (s *ModifyReplicationGroupShardConfigurationInput) Validate() error { if s.ReplicationGroupId == nil { invalidParams.Add(request.NewErrParamRequired("ReplicationGroupId")) } + if s.ReshardingConfiguration != nil { + for i, v := range s.ReshardingConfiguration { + if v == nil { + continue + } + if err := v.Validate(); err != nil { + invalidParams.AddNested(fmt.Sprintf("%s[%v]", "ReshardingConfiguration", i), err.(request.ErrInvalidParams)) + } + } + } if invalidParams.Len() > 0 { return invalidParams @@ -10365,6 +11003,12 @@ func (s *ModifyReplicationGroupShardConfigurationInput) SetNodeGroupsToRemove(v return s } +// SetNodeGroupsToRetain sets the NodeGroupsToRetain field's value. +func (s *ModifyReplicationGroupShardConfigurationInput) SetNodeGroupsToRetain(v []*string) *ModifyReplicationGroupShardConfigurationInput { + s.NodeGroupsToRetain = v + return s +} + // SetReplicationGroupId sets the ReplicationGroupId field's value. func (s *ModifyReplicationGroupShardConfigurationInput) SetReplicationGroupId(v string) *ModifyReplicationGroupShardConfigurationInput { s.ReplicationGroupId = &v @@ -10472,6 +11116,9 @@ func (s *NodeGroup) SetStatus(v string) *NodeGroup { type NodeGroupConfiguration struct { _ struct{} `type:"structure"` + // The 4-digit id for the node group these configuration values apply to. + NodeGroupId *string `min:"1" type:"string"` + // The Availability Zone where the primary node of this node group (shard) is // launched. PrimaryAvailabilityZone *string `type:"string"` @@ -10501,6 +11148,25 @@ func (s NodeGroupConfiguration) GoString() string { return s.String() } +// Validate inspects the fields of the type to determine if they are valid. +func (s *NodeGroupConfiguration) Validate() error { + invalidParams := request.ErrInvalidParams{Context: "NodeGroupConfiguration"} + if s.NodeGroupId != nil && len(*s.NodeGroupId) < 1 { + invalidParams.Add(request.NewErrParamMinLen("NodeGroupId", 1)) + } + + if invalidParams.Len() > 0 { + return invalidParams + } + return nil +} + +// SetNodeGroupId sets the NodeGroupId field's value. +func (s *NodeGroupConfiguration) SetNodeGroupId(v string) *NodeGroupConfiguration { + s.NodeGroupId = &v + return s +} + // SetPrimaryAvailabilityZone sets the PrimaryAvailabilityZone field's value. func (s *NodeGroupConfiguration) SetPrimaryAvailabilityZone(v string) *NodeGroupConfiguration { s.PrimaryAvailabilityZone = &v @@ -10536,14 +11202,16 @@ type NodeGroupMember struct { // (0001, 0002, etc.). CacheNodeId *string `type:"string"` - // The role that is currently assigned to the node - primary or replica. + // The role that is currently assigned to the node - primary or replica. This + // member is only applicable for Redis (cluster mode disabled) replication groups. CurrentRole *string `type:"string"` // The name of the Availability Zone in which the node is located. PreferredAvailabilityZone *string `type:"string"` - // Represents the information required for client programs to connect to a cache - // node. + // The information required for client programs to connect to a node for read + // operations. The read endpoint is only applicable on Redis (cluster mode disabled) + // clusters. ReadEndpoint *Endpoint `type:"structure"` } @@ -10712,7 +11380,7 @@ type Parameter struct { // Indicates whether a change to the parameter is applied immediately or requires // a reboot for the change to be applied. You can force a reboot or wait until // the next maintenance window's reboot. For more information, see Rebooting - // a Cluster (http://docs.aws.amazon.com/AmazonElastiCache/latest/UserGuide/Clusters.Rebooting.html). + // a Cluster (http://docs.aws.amazon.com/AmazonElastiCache/latest/red-ug/Clusters.Rebooting.html). ChangeType *string `type:"string" enum:"ChangeType"` // The valid data type for the parameter. @@ -10842,7 +11510,7 @@ type PendingModifiedValues struct { _ struct{} `type:"structure"` // A list of cache node IDs that are being removed (or will be removed) from - // the cluster. A node ID is a numeric identifier (0001, 0002, etc.). + // the cluster. A node ID is a 4-digit numeric identifier (0001, 0002, etc.). CacheNodeIdsToRemove []*string `locationNameList:"CacheNodeId" type:"list"` // The cache node type that this cluster or replication group is scaled to. @@ -11161,6 +11829,9 @@ type ReplicationGroup struct { // is created. To enable encryption at-rest on a cluster you must set AtRestEncryptionEnabled // to true when you create a cluster. // + // Required: Only available when creating a replication group in an Amazon VPC + // using redis version 3.2.6 or 4.x. + // // Default: false AtRestEncryptionEnabled *bool `type:"boolean"` @@ -11200,7 +11871,7 @@ type ReplicationGroup struct { // The user supplied description of the replication group. Description *string `type:"string"` - // The identifiers of all the nodes that are part of this replication group. + // The names of all the cache clusters that are part of this replication group. MemberClusters []*string `locationNameList:"ClusterId" type:"list"` // A list of node groups in this replication group. For Redis (cluster mode @@ -11249,6 +11920,9 @@ type ReplicationGroup struct { // is created. To enable in-transit encryption on a cluster you must set TransitEncryptionEnabled // to true when you create a cluster. // + // Required: Only available when creating a replication group in an Amazon VPC + // using redis version 3.2.6 or 4.x. + // // Default: false TransitEncryptionEnabled *bool `type:"boolean"` } @@ -11456,6 +12130,9 @@ type ReservedCacheNode struct { // R3 node types:cache.r3.large, cache.r3.xlarge, cache.r3.2xlarge, cache.r3.4xlarge, // cache.r3.8xlarge // + // R4 node types;cache.r4.large, cache.r4.xlarge, cache.r4.2xlarge, cache.r4.4xlarge, + // cache.r4.8xlarge, cache.r4.16xlarge + // // Previous generation: (not recommended) // // M2 node types:cache.m2.xlarge, cache.m2.2xlarge, cache.m2.4xlarge @@ -11474,10 +12151,13 @@ type ReservedCacheNode struct { // * Redis Append-only files (AOF) functionality is not supported for T1 // or T2 instances. // - // For a complete listing of node types and specifications, see Amazon ElastiCache - // Product Features and Details (http://aws.amazon.com/elasticache/details) - // and either Cache Node Type-Specific Parameters for Memcached (http://docs.aws.amazon.com/AmazonElastiCache/latest/UserGuide/CacheParameterGroups.Memcached.html#ParameterGroups.Memcached.NodeSpecific) - // or Cache Node Type-Specific Parameters for Redis (http://docs.aws.amazon.com/AmazonElastiCache/latest/UserGuide/CacheParameterGroups.Redis.html#ParameterGroups.Redis.NodeSpecific). + // For a complete listing of node types and specifications, see: + // + // * Amazon ElastiCache Product Features and Details (http://aws.amazon.com/elasticache/details) + // + // * Cache Node Type-Specific Parameters for Memcached (http://docs.aws.amazon.com/AmazonElastiCache/latest/mem-ug/ParameterGroups.Memcached.html#ParameterGroups.Memcached.NodeSpecific) + // + // * Cache Node Type-Specific Parameters for Redis (http://docs.aws.amazon.com/AmazonElastiCache/latest/red-ug/ParameterGroups.Redis.html#ParameterGroups.Redis.NodeSpecific) CacheNodeType *string `type:"string"` // The duration of the reservation in seconds. @@ -11495,6 +12175,11 @@ type ReservedCacheNode struct { // The recurring price charged to run this reserved cache node. RecurringCharges []*RecurringCharge `locationNameList:"RecurringCharge" type:"list"` + // The Amazon Resource Name (ARN) of the reserved cache node. + // + // Example: arn:aws:elasticache:us-east-1:123456789012:reserved-instance:ri-2017-03-27-08-33-25-582 + ReservationARN *string `type:"string"` + // The unique identifier for the reservation. ReservedCacheNodeId *string `type:"string"` @@ -11563,6 +12248,12 @@ func (s *ReservedCacheNode) SetRecurringCharges(v []*RecurringCharge) *ReservedC return s } +// SetReservationARN sets the ReservationARN field's value. +func (s *ReservedCacheNode) SetReservationARN(v string) *ReservedCacheNode { + s.ReservationARN = &v + return s +} + // SetReservedCacheNodeId sets the ReservedCacheNodeId field's value. func (s *ReservedCacheNode) SetReservedCacheNodeId(v string) *ReservedCacheNode { s.ReservedCacheNodeId = &v @@ -11633,6 +12324,9 @@ type ReservedCacheNodesOffering struct { // R3 node types:cache.r3.large, cache.r3.xlarge, cache.r3.2xlarge, cache.r3.4xlarge, // cache.r3.8xlarge // + // R4 node types;cache.r4.large, cache.r4.xlarge, cache.r4.2xlarge, cache.r4.4xlarge, + // cache.r4.8xlarge, cache.r4.16xlarge + // // Previous generation: (not recommended) // // M2 node types:cache.m2.xlarge, cache.m2.2xlarge, cache.m2.4xlarge @@ -11651,10 +12345,13 @@ type ReservedCacheNodesOffering struct { // * Redis Append-only files (AOF) functionality is not supported for T1 // or T2 instances. // - // For a complete listing of node types and specifications, see Amazon ElastiCache - // Product Features and Details (http://aws.amazon.com/elasticache/details) - // and either Cache Node Type-Specific Parameters for Memcached (http://docs.aws.amazon.com/AmazonElastiCache/latest/UserGuide/CacheParameterGroups.Memcached.html#ParameterGroups.Memcached.NodeSpecific) - // or Cache Node Type-Specific Parameters for Redis (http://docs.aws.amazon.com/AmazonElastiCache/latest/UserGuide/CacheParameterGroups.Redis.html#ParameterGroups.Redis.NodeSpecific). + // For a complete listing of node types and specifications, see: + // + // * Amazon ElastiCache Product Features and Details (http://aws.amazon.com/elasticache/details) + // + // * Cache Node Type-Specific Parameters for Memcached (http://docs.aws.amazon.com/AmazonElastiCache/latest/mem-ug/ParameterGroups.Memcached.html#ParameterGroups.Memcached.NodeSpecific) + // + // * Cache Node Type-Specific Parameters for Redis (http://docs.aws.amazon.com/AmazonElastiCache/latest/red-ug/ParameterGroups.Redis.html#ParameterGroups.Redis.NodeSpecific) CacheNodeType *string `type:"string"` // The duration of the offering. in seconds. @@ -11805,6 +12502,9 @@ func (s *ResetCacheParameterGroupInput) SetResetAllParameters(v bool) *ResetCach type ReshardingConfiguration struct { _ struct{} `type:"structure"` + // The 4-digit id for the node group these configuration values apply to. + NodeGroupId *string `min:"1" type:"string"` + // A list of preferred availability zones for the nodes in this cluster. PreferredAvailabilityZones []*string `locationNameList:"AvailabilityZone" type:"list"` } @@ -11819,6 +12519,25 @@ func (s ReshardingConfiguration) GoString() string { return s.String() } +// Validate inspects the fields of the type to determine if they are valid. +func (s *ReshardingConfiguration) Validate() error { + invalidParams := request.ErrInvalidParams{Context: "ReshardingConfiguration"} + if s.NodeGroupId != nil && len(*s.NodeGroupId) < 1 { + invalidParams.Add(request.NewErrParamMinLen("NodeGroupId", 1)) + } + + if invalidParams.Len() > 0 { + return invalidParams + } + return nil +} + +// SetNodeGroupId sets the NodeGroupId field's value. +func (s *ReshardingConfiguration) SetNodeGroupId(v string) *ReshardingConfiguration { + s.NodeGroupId = &v + return s +} + // SetPreferredAvailabilityZones sets the PreferredAvailabilityZones field's value. func (s *ReshardingConfiguration) SetPreferredAvailabilityZones(v []*string) *ReshardingConfiguration { s.PreferredAvailabilityZones = v @@ -12069,6 +12788,9 @@ type Snapshot struct { // R3 node types:cache.r3.large, cache.r3.xlarge, cache.r3.2xlarge, cache.r3.4xlarge, // cache.r3.8xlarge // + // R4 node types;cache.r4.large, cache.r4.xlarge, cache.r4.2xlarge, cache.r4.4xlarge, + // cache.r4.8xlarge, cache.r4.16xlarge + // // Previous generation: (not recommended) // // M2 node types:cache.m2.xlarge, cache.m2.2xlarge, cache.m2.4xlarge @@ -12087,10 +12809,13 @@ type Snapshot struct { // * Redis Append-only files (AOF) functionality is not supported for T1 // or T2 instances. // - // For a complete listing of node types and specifications, see Amazon ElastiCache - // Product Features and Details (http://aws.amazon.com/elasticache/details) - // and either Cache Node Type-Specific Parameters for Memcached (http://docs.aws.amazon.com/AmazonElastiCache/latest/UserGuide/CacheParameterGroups.Memcached.html#ParameterGroups.Memcached.NodeSpecific) - // or Cache Node Type-Specific Parameters for Redis (http://docs.aws.amazon.com/AmazonElastiCache/latest/UserGuide/CacheParameterGroups.Redis.html#ParameterGroups.Redis.NodeSpecific). + // For a complete listing of node types and specifications, see: + // + // * Amazon ElastiCache Product Features and Details (http://aws.amazon.com/elasticache/details) + // + // * Cache Node Type-Specific Parameters for Memcached (http://docs.aws.amazon.com/AmazonElastiCache/latest/mem-ug/ParameterGroups.Memcached.html#ParameterGroups.Memcached.NodeSpecific) + // + // * Cache Node Type-Specific Parameters for Redis (http://docs.aws.amazon.com/AmazonElastiCache/latest/red-ug/ParameterGroups.Redis.html#ParameterGroups.Redis.NodeSpecific) CacheNodeType *string `type:"string"` // The cache parameter group that is associated with the source cluster. @@ -12448,7 +13173,7 @@ type TestFailoverInput struct { // failover on up to 5 node groups in any rolling 24-hour period. // // NodeGroupId is a required field - NodeGroupId *string `type:"string" required:"true"` + NodeGroupId *string `min:"1" type:"string" required:"true"` // The name of the replication group (console: cluster) whose automatic failover // is being tested by this operation. @@ -12473,6 +13198,9 @@ func (s *TestFailoverInput) Validate() error { if s.NodeGroupId == nil { invalidParams.Add(request.NewErrParamRequired("NodeGroupId")) } + if s.NodeGroupId != nil && len(*s.NodeGroupId) < 1 { + invalidParams.Add(request.NewErrParamMinLen("NodeGroupId", 1)) + } if s.ReplicationGroupId == nil { invalidParams.Add(request.NewErrParamRequired("ReplicationGroupId")) } diff --git a/vendor/github.com/aws/aws-sdk-go/service/elasticache/errors.go b/vendor/github.com/aws/aws-sdk-go/service/elasticache/errors.go index 272ee75b8..e35a9ece8 100644 --- a/vendor/github.com/aws/aws-sdk-go/service/elasticache/errors.go +++ b/vendor/github.com/aws/aws-sdk-go/service/elasticache/errors.go @@ -186,6 +186,12 @@ const ( // The VPC network is in an invalid state. ErrCodeInvalidVPCNetworkStateFault = "InvalidVPCNetworkStateFault" + // ErrCodeNoOperationFault for service response error code + // "NoOperationFault". + // + // The operation was not performed because no changes were required. + ErrCodeNoOperationFault = "NoOperationFault" + // ErrCodeNodeGroupNotFoundFault for service response error code // "NodeGroupNotFoundFault". // @@ -253,6 +259,12 @@ const ( // The requested cache node offering does not exist. ErrCodeReservedCacheNodesOfferingNotFoundFault = "ReservedCacheNodesOfferingNotFound" + // ErrCodeServiceLinkedRoleNotFoundFault for service response error code + // "ServiceLinkedRoleNotFoundFault". + // + // The specified service linked role (SLR) was not found. + ErrCodeServiceLinkedRoleNotFoundFault = "ServiceLinkedRoleNotFoundFault" + // ErrCodeSnapshotAlreadyExistsFault for service response error code // "SnapshotAlreadyExistsFault". // @@ -308,5 +320,7 @@ const ( // ErrCodeTestFailoverNotAvailableFault for service response error code // "TestFailoverNotAvailableFault". + // + // The TestFailover action is not available. ErrCodeTestFailoverNotAvailableFault = "TestFailoverNotAvailableFault" ) diff --git a/vendor/github.com/aws/aws-sdk-go/service/elasticbeanstalk/api.go b/vendor/github.com/aws/aws-sdk-go/service/elasticbeanstalk/api.go index 3424828c3..c6971eead 100644 --- a/vendor/github.com/aws/aws-sdk-go/service/elasticbeanstalk/api.go +++ b/vendor/github.com/aws/aws-sdk-go/service/elasticbeanstalk/api.go @@ -586,6 +586,9 @@ func (c *ElasticBeanstalk) CreateConfigurationTemplateRequest(input *CreateConfi // application and are used to deploy different versions of the application // with the same configuration settings. // +// Templates aren't associated with any environment. The EnvironmentName response +// element is always null. +// // Related Topics // // * DescribeConfigurationOptions @@ -4553,10 +4556,14 @@ func (s *Builder) SetARN(v string) *Builder { type CPUUtilization struct { _ struct{} `type:"structure"` + // Available on Linux environments only. + // // Percentage of time that the CPU has spent in the I/O Wait state over the // last 10 seconds. IOWait *float64 `type:"double"` + // Available on Linux environments only. + // // Percentage of time that the CPU has spent in the IRQ state over the last // 10 seconds. IRQ *float64 `type:"double"` @@ -4565,14 +4572,26 @@ type CPUUtilization struct { // 10 seconds. Idle *float64 `type:"double"` + // Available on Linux environments only. + // // Percentage of time that the CPU has spent in the Nice state over the last // 10 seconds. Nice *float64 `type:"double"` + // Available on Windows environments only. + // + // Percentage of time that the CPU has spent in the Privileged state over the + // last 10 seconds. + Privileged *float64 `type:"double"` + + // Available on Linux environments only. + // // Percentage of time that the CPU has spent in the SoftIRQ state over the last // 10 seconds. SoftIRQ *float64 `type:"double"` + // Available on Linux environments only. + // // Percentage of time that the CPU has spent in the System state over the last // 10 seconds. System *float64 `type:"double"` @@ -4616,6 +4635,12 @@ func (s *CPUUtilization) SetNice(v float64) *CPUUtilization { return s } +// SetPrivileged sets the Privileged field's value. +func (s *CPUUtilization) SetPrivileged(v float64) *CPUUtilization { + s.Privileged = &v + return s +} + // SetSoftIRQ sets the SoftIRQ field's value. func (s *CPUUtilization) SetSoftIRQ(v float64) *CPUUtilization { s.SoftIRQ = &v @@ -7548,6 +7573,10 @@ type DescribeInstancesHealthOutput struct { _ struct{} `type:"structure"` // Detailed health information about each instance. + // + // The output differs slightly between Linux and Windows environments. There + // is a difference in the members that are supported under the + // type. InstanceHealthList []*SingleInstanceHealth `type:"list"` // Pagination token for the next page of results, if available. diff --git a/vendor/github.com/aws/aws-sdk-go/service/elasticsearchservice/api.go b/vendor/github.com/aws/aws-sdk-go/service/elasticsearchservice/api.go index f3cff5fbf..5df6dcd9b 100644 --- a/vendor/github.com/aws/aws-sdk-go/service/elasticsearchservice/api.go +++ b/vendor/github.com/aws/aws-sdk-go/service/elasticsearchservice/api.go @@ -1048,6 +1048,345 @@ func (c *ElasticsearchService) DescribeReservedElasticsearchInstancesPagesWithCo return p.Err() } +const opGetCompatibleElasticsearchVersions = "GetCompatibleElasticsearchVersions" + +// GetCompatibleElasticsearchVersionsRequest generates a "aws/request.Request" representing the +// client's request for the GetCompatibleElasticsearchVersions operation. The "output" return +// value will be populated with the request's response once the request completes +// successfuly. +// +// Use "Send" method on the returned Request to send the API call to the service. +// the "output" return value is not valid until after Send returns without error. +// +// See GetCompatibleElasticsearchVersions for more information on using the GetCompatibleElasticsearchVersions +// API call, and error handling. +// +// This method is useful when you want to inject custom logic or configuration +// into the SDK's request lifecycle. Such as custom headers, or retry logic. +// +// +// // Example sending a request using the GetCompatibleElasticsearchVersionsRequest method. +// req, resp := client.GetCompatibleElasticsearchVersionsRequest(params) +// +// err := req.Send() +// if err == nil { // resp is now filled +// fmt.Println(resp) +// } +func (c *ElasticsearchService) GetCompatibleElasticsearchVersionsRequest(input *GetCompatibleElasticsearchVersionsInput) (req *request.Request, output *GetCompatibleElasticsearchVersionsOutput) { + op := &request.Operation{ + Name: opGetCompatibleElasticsearchVersions, + HTTPMethod: "GET", + HTTPPath: "/2015-01-01/es/compatibleVersions", + } + + if input == nil { + input = &GetCompatibleElasticsearchVersionsInput{} + } + + output = &GetCompatibleElasticsearchVersionsOutput{} + req = c.newRequest(op, input, output) + return +} + +// GetCompatibleElasticsearchVersions API operation for Amazon Elasticsearch Service. +// +// Returns a list of upgrade compatible Elastisearch versions. You can optionally +// pass a DomainName to get all upgrade compatible Elasticsearch versions for +// that specific domain. +// +// Returns awserr.Error for service API and SDK errors. Use runtime type assertions +// with awserr.Error's Code and Message methods to get detailed information about +// the error. +// +// See the AWS API reference guide for Amazon Elasticsearch Service's +// API operation GetCompatibleElasticsearchVersions for usage and error information. +// +// Returned Error Codes: +// * ErrCodeBaseException "BaseException" +// An error occurred while processing the request. +// +// * ErrCodeResourceNotFoundException "ResourceNotFoundException" +// An exception for accessing or deleting a resource that does not exist. Gives +// http status code of 400. +// +// * ErrCodeDisabledOperationException "DisabledOperationException" +// An error occured because the client wanted to access a not supported operation. +// Gives http status code of 409. +// +// * ErrCodeValidationException "ValidationException" +// An exception for missing / invalid input fields. Gives http status code of +// 400. +// +// * ErrCodeInternalException "InternalException" +// The request processing has failed because of an unknown error, exception +// or failure (the failure is internal to the service) . Gives http status code +// of 500. +// +func (c *ElasticsearchService) GetCompatibleElasticsearchVersions(input *GetCompatibleElasticsearchVersionsInput) (*GetCompatibleElasticsearchVersionsOutput, error) { + req, out := c.GetCompatibleElasticsearchVersionsRequest(input) + return out, req.Send() +} + +// GetCompatibleElasticsearchVersionsWithContext is the same as GetCompatibleElasticsearchVersions with the addition of +// the ability to pass a context and additional request options. +// +// See GetCompatibleElasticsearchVersions for details on how to use this API operation. +// +// The context must be non-nil and will be used for request cancellation. If +// the context is nil a panic will occur. In the future the SDK may create +// sub-contexts for http.Requests. See https://golang.org/pkg/context/ +// for more information on using Contexts. +func (c *ElasticsearchService) GetCompatibleElasticsearchVersionsWithContext(ctx aws.Context, input *GetCompatibleElasticsearchVersionsInput, opts ...request.Option) (*GetCompatibleElasticsearchVersionsOutput, error) { + req, out := c.GetCompatibleElasticsearchVersionsRequest(input) + req.SetContext(ctx) + req.ApplyOptions(opts...) + return out, req.Send() +} + +const opGetUpgradeHistory = "GetUpgradeHistory" + +// GetUpgradeHistoryRequest generates a "aws/request.Request" representing the +// client's request for the GetUpgradeHistory operation. The "output" return +// value will be populated with the request's response once the request completes +// successfuly. +// +// Use "Send" method on the returned Request to send the API call to the service. +// the "output" return value is not valid until after Send returns without error. +// +// See GetUpgradeHistory for more information on using the GetUpgradeHistory +// API call, and error handling. +// +// This method is useful when you want to inject custom logic or configuration +// into the SDK's request lifecycle. Such as custom headers, or retry logic. +// +// +// // Example sending a request using the GetUpgradeHistoryRequest method. +// req, resp := client.GetUpgradeHistoryRequest(params) +// +// err := req.Send() +// if err == nil { // resp is now filled +// fmt.Println(resp) +// } +func (c *ElasticsearchService) GetUpgradeHistoryRequest(input *GetUpgradeHistoryInput) (req *request.Request, output *GetUpgradeHistoryOutput) { + op := &request.Operation{ + Name: opGetUpgradeHistory, + HTTPMethod: "GET", + HTTPPath: "/2015-01-01/es/upgradeDomain/{DomainName}/history", + Paginator: &request.Paginator{ + InputTokens: []string{"NextToken"}, + OutputTokens: []string{"NextToken"}, + LimitToken: "MaxResults", + TruncationToken: "", + }, + } + + if input == nil { + input = &GetUpgradeHistoryInput{} + } + + output = &GetUpgradeHistoryOutput{} + req = c.newRequest(op, input, output) + return +} + +// GetUpgradeHistory API operation for Amazon Elasticsearch Service. +// +// Retrieves the complete history of the last 10 upgrades that were performed +// on the domain. +// +// Returns awserr.Error for service API and SDK errors. Use runtime type assertions +// with awserr.Error's Code and Message methods to get detailed information about +// the error. +// +// See the AWS API reference guide for Amazon Elasticsearch Service's +// API operation GetUpgradeHistory for usage and error information. +// +// Returned Error Codes: +// * ErrCodeBaseException "BaseException" +// An error occurred while processing the request. +// +// * ErrCodeResourceNotFoundException "ResourceNotFoundException" +// An exception for accessing or deleting a resource that does not exist. Gives +// http status code of 400. +// +// * ErrCodeDisabledOperationException "DisabledOperationException" +// An error occured because the client wanted to access a not supported operation. +// Gives http status code of 409. +// +// * ErrCodeValidationException "ValidationException" +// An exception for missing / invalid input fields. Gives http status code of +// 400. +// +// * ErrCodeInternalException "InternalException" +// The request processing has failed because of an unknown error, exception +// or failure (the failure is internal to the service) . Gives http status code +// of 500. +// +func (c *ElasticsearchService) GetUpgradeHistory(input *GetUpgradeHistoryInput) (*GetUpgradeHistoryOutput, error) { + req, out := c.GetUpgradeHistoryRequest(input) + return out, req.Send() +} + +// GetUpgradeHistoryWithContext is the same as GetUpgradeHistory with the addition of +// the ability to pass a context and additional request options. +// +// See GetUpgradeHistory for details on how to use this API operation. +// +// The context must be non-nil and will be used for request cancellation. If +// the context is nil a panic will occur. In the future the SDK may create +// sub-contexts for http.Requests. See https://golang.org/pkg/context/ +// for more information on using Contexts. +func (c *ElasticsearchService) GetUpgradeHistoryWithContext(ctx aws.Context, input *GetUpgradeHistoryInput, opts ...request.Option) (*GetUpgradeHistoryOutput, error) { + req, out := c.GetUpgradeHistoryRequest(input) + req.SetContext(ctx) + req.ApplyOptions(opts...) + return out, req.Send() +} + +// GetUpgradeHistoryPages iterates over the pages of a GetUpgradeHistory operation, +// calling the "fn" function with the response data for each page. To stop +// iterating, return false from the fn function. +// +// See GetUpgradeHistory method for more information on how to use this operation. +// +// Note: This operation can generate multiple requests to a service. +// +// // Example iterating over at most 3 pages of a GetUpgradeHistory operation. +// pageNum := 0 +// err := client.GetUpgradeHistoryPages(params, +// func(page *GetUpgradeHistoryOutput, lastPage bool) bool { +// pageNum++ +// fmt.Println(page) +// return pageNum <= 3 +// }) +// +func (c *ElasticsearchService) GetUpgradeHistoryPages(input *GetUpgradeHistoryInput, fn func(*GetUpgradeHistoryOutput, bool) bool) error { + return c.GetUpgradeHistoryPagesWithContext(aws.BackgroundContext(), input, fn) +} + +// GetUpgradeHistoryPagesWithContext same as GetUpgradeHistoryPages except +// it takes a Context and allows setting request options on the pages. +// +// The context must be non-nil and will be used for request cancellation. If +// the context is nil a panic will occur. In the future the SDK may create +// sub-contexts for http.Requests. See https://golang.org/pkg/context/ +// for more information on using Contexts. +func (c *ElasticsearchService) GetUpgradeHistoryPagesWithContext(ctx aws.Context, input *GetUpgradeHistoryInput, fn func(*GetUpgradeHistoryOutput, bool) bool, opts ...request.Option) error { + p := request.Pagination{ + NewRequest: func() (*request.Request, error) { + var inCpy *GetUpgradeHistoryInput + if input != nil { + tmp := *input + inCpy = &tmp + } + req, _ := c.GetUpgradeHistoryRequest(inCpy) + req.SetContext(ctx) + req.ApplyOptions(opts...) + return req, nil + }, + } + + cont := true + for p.Next() && cont { + cont = fn(p.Page().(*GetUpgradeHistoryOutput), !p.HasNextPage()) + } + return p.Err() +} + +const opGetUpgradeStatus = "GetUpgradeStatus" + +// GetUpgradeStatusRequest generates a "aws/request.Request" representing the +// client's request for the GetUpgradeStatus operation. The "output" return +// value will be populated with the request's response once the request completes +// successfuly. +// +// Use "Send" method on the returned Request to send the API call to the service. +// the "output" return value is not valid until after Send returns without error. +// +// See GetUpgradeStatus for more information on using the GetUpgradeStatus +// API call, and error handling. +// +// This method is useful when you want to inject custom logic or configuration +// into the SDK's request lifecycle. Such as custom headers, or retry logic. +// +// +// // Example sending a request using the GetUpgradeStatusRequest method. +// req, resp := client.GetUpgradeStatusRequest(params) +// +// err := req.Send() +// if err == nil { // resp is now filled +// fmt.Println(resp) +// } +func (c *ElasticsearchService) GetUpgradeStatusRequest(input *GetUpgradeStatusInput) (req *request.Request, output *GetUpgradeStatusOutput) { + op := &request.Operation{ + Name: opGetUpgradeStatus, + HTTPMethod: "GET", + HTTPPath: "/2015-01-01/es/upgradeDomain/{DomainName}/status", + } + + if input == nil { + input = &GetUpgradeStatusInput{} + } + + output = &GetUpgradeStatusOutput{} + req = c.newRequest(op, input, output) + return +} + +// GetUpgradeStatus API operation for Amazon Elasticsearch Service. +// +// Retrieves the latest status of the last upgrade or upgrade eligibility check +// that was performed on the domain. +// +// Returns awserr.Error for service API and SDK errors. Use runtime type assertions +// with awserr.Error's Code and Message methods to get detailed information about +// the error. +// +// See the AWS API reference guide for Amazon Elasticsearch Service's +// API operation GetUpgradeStatus for usage and error information. +// +// Returned Error Codes: +// * ErrCodeBaseException "BaseException" +// An error occurred while processing the request. +// +// * ErrCodeResourceNotFoundException "ResourceNotFoundException" +// An exception for accessing or deleting a resource that does not exist. Gives +// http status code of 400. +// +// * ErrCodeDisabledOperationException "DisabledOperationException" +// An error occured because the client wanted to access a not supported operation. +// Gives http status code of 409. +// +// * ErrCodeValidationException "ValidationException" +// An exception for missing / invalid input fields. Gives http status code of +// 400. +// +// * ErrCodeInternalException "InternalException" +// The request processing has failed because of an unknown error, exception +// or failure (the failure is internal to the service) . Gives http status code +// of 500. +// +func (c *ElasticsearchService) GetUpgradeStatus(input *GetUpgradeStatusInput) (*GetUpgradeStatusOutput, error) { + req, out := c.GetUpgradeStatusRequest(input) + return out, req.Send() +} + +// GetUpgradeStatusWithContext is the same as GetUpgradeStatus with the addition of +// the ability to pass a context and additional request options. +// +// See GetUpgradeStatus for details on how to use this API operation. +// +// The context must be non-nil and will be used for request cancellation. If +// the context is nil a panic will occur. In the future the SDK may create +// sub-contexts for http.Requests. See https://golang.org/pkg/context/ +// for more information on using Contexts. +func (c *ElasticsearchService) GetUpgradeStatusWithContext(ctx aws.Context, input *GetUpgradeStatusInput, opts ...request.Option) (*GetUpgradeStatusOutput, error) { + req, out := c.GetUpgradeStatusRequest(input) + req.SetContext(ctx) + req.ApplyOptions(opts...) + return out, req.Send() +} + const opListDomainNames = "ListDomainNames" // ListDomainNamesRequest generates a "aws/request.Request" representing the @@ -1791,6 +2130,104 @@ func (c *ElasticsearchService) UpdateElasticsearchDomainConfigWithContext(ctx aw return out, req.Send() } +const opUpgradeElasticsearchDomain = "UpgradeElasticsearchDomain" + +// UpgradeElasticsearchDomainRequest generates a "aws/request.Request" representing the +// client's request for the UpgradeElasticsearchDomain operation. The "output" return +// value will be populated with the request's response once the request completes +// successfuly. +// +// Use "Send" method on the returned Request to send the API call to the service. +// the "output" return value is not valid until after Send returns without error. +// +// See UpgradeElasticsearchDomain for more information on using the UpgradeElasticsearchDomain +// API call, and error handling. +// +// This method is useful when you want to inject custom logic or configuration +// into the SDK's request lifecycle. Such as custom headers, or retry logic. +// +// +// // Example sending a request using the UpgradeElasticsearchDomainRequest method. +// req, resp := client.UpgradeElasticsearchDomainRequest(params) +// +// err := req.Send() +// if err == nil { // resp is now filled +// fmt.Println(resp) +// } +func (c *ElasticsearchService) UpgradeElasticsearchDomainRequest(input *UpgradeElasticsearchDomainInput) (req *request.Request, output *UpgradeElasticsearchDomainOutput) { + op := &request.Operation{ + Name: opUpgradeElasticsearchDomain, + HTTPMethod: "POST", + HTTPPath: "/2015-01-01/es/upgradeDomain", + } + + if input == nil { + input = &UpgradeElasticsearchDomainInput{} + } + + output = &UpgradeElasticsearchDomainOutput{} + req = c.newRequest(op, input, output) + return +} + +// UpgradeElasticsearchDomain API operation for Amazon Elasticsearch Service. +// +// Allows you to either upgrade your domain or perform an Upgrade eligibility +// check to a compatible Elasticsearch version. +// +// Returns awserr.Error for service API and SDK errors. Use runtime type assertions +// with awserr.Error's Code and Message methods to get detailed information about +// the error. +// +// See the AWS API reference guide for Amazon Elasticsearch Service's +// API operation UpgradeElasticsearchDomain for usage and error information. +// +// Returned Error Codes: +// * ErrCodeBaseException "BaseException" +// An error occurred while processing the request. +// +// * ErrCodeResourceNotFoundException "ResourceNotFoundException" +// An exception for accessing or deleting a resource that does not exist. Gives +// http status code of 400. +// +// * ErrCodeResourceAlreadyExistsException "ResourceAlreadyExistsException" +// An exception for creating a resource that already exists. Gives http status +// code of 400. +// +// * ErrCodeDisabledOperationException "DisabledOperationException" +// An error occured because the client wanted to access a not supported operation. +// Gives http status code of 409. +// +// * ErrCodeValidationException "ValidationException" +// An exception for missing / invalid input fields. Gives http status code of +// 400. +// +// * ErrCodeInternalException "InternalException" +// The request processing has failed because of an unknown error, exception +// or failure (the failure is internal to the service) . Gives http status code +// of 500. +// +func (c *ElasticsearchService) UpgradeElasticsearchDomain(input *UpgradeElasticsearchDomainInput) (*UpgradeElasticsearchDomainOutput, error) { + req, out := c.UpgradeElasticsearchDomainRequest(input) + return out, req.Send() +} + +// UpgradeElasticsearchDomainWithContext is the same as UpgradeElasticsearchDomain with the addition of +// the ability to pass a context and additional request options. +// +// See UpgradeElasticsearchDomain for details on how to use this API operation. +// +// The context must be non-nil and will be used for request cancellation. If +// the context is nil a panic will occur. In the future the SDK may create +// sub-contexts for http.Requests. See https://golang.org/pkg/context/ +// for more information on using Contexts. +func (c *ElasticsearchService) UpgradeElasticsearchDomainWithContext(ctx aws.Context, input *UpgradeElasticsearchDomainInput, opts ...request.Option) (*UpgradeElasticsearchDomainOutput, error) { + req, out := c.UpgradeElasticsearchDomainRequest(input) + req.SetContext(ctx) + req.ApplyOptions(opts...) + return out, req.Send() +} + // The configured access rules for the domain's document and search endpoints, // and the current status of those rules. type AccessPoliciesStatus struct { @@ -2108,6 +2545,40 @@ func (s *CognitoOptionsStatus) SetStatus(v *OptionStatus) *CognitoOptionsStatus return s } +// A map from an ElasticsearchVersion to a list of compatible ElasticsearchVersion +// s to which the domain can be upgraded. +type CompatibleVersionsMap struct { + _ struct{} `type:"structure"` + + // The current version of Elasticsearch on which a domain is. + SourceVersion *string `type:"string"` + + // List of supported elastic search versions. + TargetVersions []*string `type:"list"` +} + +// String returns the string representation +func (s CompatibleVersionsMap) String() string { + return awsutil.Prettify(s) +} + +// GoString returns the string representation +func (s CompatibleVersionsMap) GoString() string { + return s.String() +} + +// SetSourceVersion sets the SourceVersion field's value. +func (s *CompatibleVersionsMap) SetSourceVersion(v string) *CompatibleVersionsMap { + s.SourceVersion = &v + return s +} + +// SetTargetVersions sets the TargetVersions field's value. +func (s *CompatibleVersionsMap) SetTargetVersions(v []*string) *CompatibleVersionsMap { + s.TargetVersions = v + return s +} + type CreateElasticsearchDomainInput struct { _ struct{} `type:"structure"` @@ -2152,6 +2623,9 @@ type CreateElasticsearchDomainInput struct { // a given type of Elasticsearch log. LogPublishingOptions map[string]*LogPublishingOption `type:"map"` + // Specifies the NodeToNodeEncryptionOptions. + NodeToNodeEncryptionOptions *NodeToNodeEncryptionOptions `type:"structure"` + // Option to set time, in UTC format, of the daily automated snapshot. Default // value is 0 hours. SnapshotOptions *SnapshotOptions `type:"structure"` @@ -2252,6 +2726,12 @@ func (s *CreateElasticsearchDomainInput) SetLogPublishingOptions(v map[string]*L return s } +// SetNodeToNodeEncryptionOptions sets the NodeToNodeEncryptionOptions field's value. +func (s *CreateElasticsearchDomainInput) SetNodeToNodeEncryptionOptions(v *NodeToNodeEncryptionOptions) *CreateElasticsearchDomainInput { + s.NodeToNodeEncryptionOptions = v + return s +} + // SetSnapshotOptions sets the SnapshotOptions field's value. func (s *CreateElasticsearchDomainInput) SetSnapshotOptions(v *SnapshotOptions) *CreateElasticsearchDomainInput { s.SnapshotOptions = v @@ -3101,6 +3581,9 @@ type ElasticsearchDomainConfig struct { // Log publishing options for the given domain. LogPublishingOptions *LogPublishingOptionsStatus `type:"structure"` + // Specifies the NodeToNodeEncryptionOptions for the Elasticsearch domain. + NodeToNodeEncryptionOptions *NodeToNodeEncryptionOptionsStatus `type:"structure"` + // Specifies the SnapshotOptions for the Elasticsearch domain. SnapshotOptions *SnapshotOptionsStatus `type:"structure"` @@ -3167,6 +3650,12 @@ func (s *ElasticsearchDomainConfig) SetLogPublishingOptions(v *LogPublishingOpti return s } +// SetNodeToNodeEncryptionOptions sets the NodeToNodeEncryptionOptions field's value. +func (s *ElasticsearchDomainConfig) SetNodeToNodeEncryptionOptions(v *NodeToNodeEncryptionOptionsStatus) *ElasticsearchDomainConfig { + s.NodeToNodeEncryptionOptions = v + return s +} + // SetSnapshotOptions sets the SnapshotOptions field's value. func (s *ElasticsearchDomainConfig) SetSnapshotOptions(v *SnapshotOptionsStatus) *ElasticsearchDomainConfig { s.SnapshotOptions = v @@ -3249,6 +3738,9 @@ type ElasticsearchDomainStatus struct { // Log publishing options for the given domain. LogPublishingOptions map[string]*LogPublishingOption `type:"map"` + // Specifies the status of the NodeToNodeEncryptionOptions. + NodeToNodeEncryptionOptions *NodeToNodeEncryptionOptions `type:"structure"` + // The status of the Elasticsearch domain configuration. True if Amazon Elasticsearch // Service is processing configuration changes. False if the configuration is // active. @@ -3257,6 +3749,10 @@ type ElasticsearchDomainStatus struct { // Specifies the status of the SnapshotOptions SnapshotOptions *SnapshotOptions `type:"structure"` + // The status of an Elasticsearch domain version upgrade. True if Amazon Elasticsearch + // Service is undergoing a version upgrade. False if the configuration is active. + UpgradeProcessing *bool `type:"boolean"` + // The VPCOptions for the specified domain. For more information, see VPC Endpoints // for Amazon Elasticsearch Service Domains (http://docs.aws.amazon.com/elasticsearch-service/latest/developerguide/es-vpc.html). VPCOptions *VPCDerivedInfo `type:"structure"` @@ -3362,6 +3858,12 @@ func (s *ElasticsearchDomainStatus) SetLogPublishingOptions(v map[string]*LogPub return s } +// SetNodeToNodeEncryptionOptions sets the NodeToNodeEncryptionOptions field's value. +func (s *ElasticsearchDomainStatus) SetNodeToNodeEncryptionOptions(v *NodeToNodeEncryptionOptions) *ElasticsearchDomainStatus { + s.NodeToNodeEncryptionOptions = v + return s +} + // SetProcessing sets the Processing field's value. func (s *ElasticsearchDomainStatus) SetProcessing(v bool) *ElasticsearchDomainStatus { s.Processing = &v @@ -3374,6 +3876,12 @@ func (s *ElasticsearchDomainStatus) SetSnapshotOptions(v *SnapshotOptions) *Elas return s } +// SetUpgradeProcessing sets the UpgradeProcessing field's value. +func (s *ElasticsearchDomainStatus) SetUpgradeProcessing(v bool) *ElasticsearchDomainStatus { + s.UpgradeProcessing = &v + return s +} + // SetVPCOptions sets the VPCOptions field's value. func (s *ElasticsearchDomainStatus) SetVPCOptions(v *VPCDerivedInfo) *ElasticsearchDomainStatus { s.VPCOptions = v @@ -3505,6 +4013,266 @@ func (s *EncryptionAtRestOptionsStatus) SetStatus(v *OptionStatus) *EncryptionAt return s } +// Container for request parameters to GetCompatibleElasticsearchVersions operation. +type GetCompatibleElasticsearchVersionsInput struct { + _ struct{} `type:"structure"` + + // The name of an Elasticsearch domain. Domain names are unique across the domains + // owned by an account within an AWS region. Domain names start with a letter + // or number and can contain the following characters: a-z (lowercase), 0-9, + // and - (hyphen). + DomainName *string `location:"querystring" locationName:"domainName" min:"3" type:"string"` +} + +// String returns the string representation +func (s GetCompatibleElasticsearchVersionsInput) String() string { + return awsutil.Prettify(s) +} + +// GoString returns the string representation +func (s GetCompatibleElasticsearchVersionsInput) GoString() string { + return s.String() +} + +// Validate inspects the fields of the type to determine if they are valid. +func (s *GetCompatibleElasticsearchVersionsInput) Validate() error { + invalidParams := request.ErrInvalidParams{Context: "GetCompatibleElasticsearchVersionsInput"} + if s.DomainName != nil && len(*s.DomainName) < 3 { + invalidParams.Add(request.NewErrParamMinLen("DomainName", 3)) + } + + if invalidParams.Len() > 0 { + return invalidParams + } + return nil +} + +// SetDomainName sets the DomainName field's value. +func (s *GetCompatibleElasticsearchVersionsInput) SetDomainName(v string) *GetCompatibleElasticsearchVersionsInput { + s.DomainName = &v + return s +} + +// Container for response returned by GetCompatibleElasticsearchVersions operation. +type GetCompatibleElasticsearchVersionsOutput struct { + _ struct{} `type:"structure"` + + // A map of compatible Elasticsearch versions returned as part of the GetCompatibleElasticsearchVersions + // operation. + CompatibleElasticsearchVersions []*CompatibleVersionsMap `type:"list"` +} + +// String returns the string representation +func (s GetCompatibleElasticsearchVersionsOutput) String() string { + return awsutil.Prettify(s) +} + +// GoString returns the string representation +func (s GetCompatibleElasticsearchVersionsOutput) GoString() string { + return s.String() +} + +// SetCompatibleElasticsearchVersions sets the CompatibleElasticsearchVersions field's value. +func (s *GetCompatibleElasticsearchVersionsOutput) SetCompatibleElasticsearchVersions(v []*CompatibleVersionsMap) *GetCompatibleElasticsearchVersionsOutput { + s.CompatibleElasticsearchVersions = v + return s +} + +// Container for request parameters to GetUpgradeHistory operation. +type GetUpgradeHistoryInput struct { + _ struct{} `type:"structure"` + + // The name of an Elasticsearch domain. Domain names are unique across the domains + // owned by an account within an AWS region. Domain names start with a letter + // or number and can contain the following characters: a-z (lowercase), 0-9, + // and - (hyphen). + // + // DomainName is a required field + DomainName *string `location:"uri" locationName:"DomainName" min:"3" type:"string" required:"true"` + + // Set this value to limit the number of results returned. + MaxResults *int64 `location:"querystring" locationName:"maxResults" type:"integer"` + + // Paginated APIs accepts NextToken input to returns next page results and provides + // a NextToken output in the response which can be used by the client to retrieve + // more results. + NextToken *string `location:"querystring" locationName:"nextToken" type:"string"` +} + +// String returns the string representation +func (s GetUpgradeHistoryInput) String() string { + return awsutil.Prettify(s) +} + +// GoString returns the string representation +func (s GetUpgradeHistoryInput) GoString() string { + return s.String() +} + +// Validate inspects the fields of the type to determine if they are valid. +func (s *GetUpgradeHistoryInput) Validate() error { + invalidParams := request.ErrInvalidParams{Context: "GetUpgradeHistoryInput"} + if s.DomainName == nil { + invalidParams.Add(request.NewErrParamRequired("DomainName")) + } + if s.DomainName != nil && len(*s.DomainName) < 3 { + invalidParams.Add(request.NewErrParamMinLen("DomainName", 3)) + } + + if invalidParams.Len() > 0 { + return invalidParams + } + return nil +} + +// SetDomainName sets the DomainName field's value. +func (s *GetUpgradeHistoryInput) SetDomainName(v string) *GetUpgradeHistoryInput { + s.DomainName = &v + return s +} + +// SetMaxResults sets the MaxResults field's value. +func (s *GetUpgradeHistoryInput) SetMaxResults(v int64) *GetUpgradeHistoryInput { + s.MaxResults = &v + return s +} + +// SetNextToken sets the NextToken field's value. +func (s *GetUpgradeHistoryInput) SetNextToken(v string) *GetUpgradeHistoryInput { + s.NextToken = &v + return s +} + +// Container for response returned by GetUpgradeHistory operation. +type GetUpgradeHistoryOutput struct { + _ struct{} `type:"structure"` + + // Pagination token that needs to be supplied to the next call to get the next + // page of results + NextToken *string `type:"string"` + + // A list of UpgradeHistory objects corresponding to each Upgrade or Upgrade + // Eligibility Check performed on a domain returned as part of GetUpgradeHistoryResponse + // object. + UpgradeHistories []*UpgradeHistory `type:"list"` +} + +// String returns the string representation +func (s GetUpgradeHistoryOutput) String() string { + return awsutil.Prettify(s) +} + +// GoString returns the string representation +func (s GetUpgradeHistoryOutput) GoString() string { + return s.String() +} + +// SetNextToken sets the NextToken field's value. +func (s *GetUpgradeHistoryOutput) SetNextToken(v string) *GetUpgradeHistoryOutput { + s.NextToken = &v + return s +} + +// SetUpgradeHistories sets the UpgradeHistories field's value. +func (s *GetUpgradeHistoryOutput) SetUpgradeHistories(v []*UpgradeHistory) *GetUpgradeHistoryOutput { + s.UpgradeHistories = v + return s +} + +// Container for request parameters to GetUpgradeStatus operation. +type GetUpgradeStatusInput struct { + _ struct{} `type:"structure"` + + // The name of an Elasticsearch domain. Domain names are unique across the domains + // owned by an account within an AWS region. Domain names start with a letter + // or number and can contain the following characters: a-z (lowercase), 0-9, + // and - (hyphen). + // + // DomainName is a required field + DomainName *string `location:"uri" locationName:"DomainName" min:"3" type:"string" required:"true"` +} + +// String returns the string representation +func (s GetUpgradeStatusInput) String() string { + return awsutil.Prettify(s) +} + +// GoString returns the string representation +func (s GetUpgradeStatusInput) GoString() string { + return s.String() +} + +// Validate inspects the fields of the type to determine if they are valid. +func (s *GetUpgradeStatusInput) Validate() error { + invalidParams := request.ErrInvalidParams{Context: "GetUpgradeStatusInput"} + if s.DomainName == nil { + invalidParams.Add(request.NewErrParamRequired("DomainName")) + } + if s.DomainName != nil && len(*s.DomainName) < 3 { + invalidParams.Add(request.NewErrParamMinLen("DomainName", 3)) + } + + if invalidParams.Len() > 0 { + return invalidParams + } + return nil +} + +// SetDomainName sets the DomainName field's value. +func (s *GetUpgradeStatusInput) SetDomainName(v string) *GetUpgradeStatusInput { + s.DomainName = &v + return s +} + +// Container for response returned by GetUpgradeStatus operation. +type GetUpgradeStatusOutput struct { + _ struct{} `type:"structure"` + + // One of 4 statuses that a step can go through returned as part of the GetUpgradeStatusResponse + // object. The status can take one of the following values: In Progress + // Succeeded + // Succeeded with Issues + // Failed + StepStatus *string `type:"string" enum:"UpgradeStatus"` + + // A string that describes the update briefly + UpgradeName *string `type:"string"` + + // Represents one of 3 steps that an Upgrade or Upgrade Eligibility Check does + // through: PreUpgradeCheck + // Snapshot + // Upgrade + UpgradeStep *string `type:"string" enum:"UpgradeStep"` +} + +// String returns the string representation +func (s GetUpgradeStatusOutput) String() string { + return awsutil.Prettify(s) +} + +// GoString returns the string representation +func (s GetUpgradeStatusOutput) GoString() string { + return s.String() +} + +// SetStepStatus sets the StepStatus field's value. +func (s *GetUpgradeStatusOutput) SetStepStatus(v string) *GetUpgradeStatusOutput { + s.StepStatus = &v + return s +} + +// SetUpgradeName sets the UpgradeName field's value. +func (s *GetUpgradeStatusOutput) SetUpgradeName(v string) *GetUpgradeStatusOutput { + s.UpgradeName = &v + return s +} + +// SetUpgradeStep sets the UpgradeStep field's value. +func (s *GetUpgradeStatusOutput) SetUpgradeStep(v string) *GetUpgradeStatusOutput { + s.UpgradeStep = &v + return s +} + // InstanceCountLimits represents the limits on number of instances that be // created in Amazon Elasticsearch for given InstanceType. type InstanceCountLimits struct { @@ -3972,6 +4740,70 @@ func (s *LogPublishingOptionsStatus) SetStatus(v *OptionStatus) *LogPublishingOp return s } +// Specifies the node-to-node encryption options. +type NodeToNodeEncryptionOptions struct { + _ struct{} `type:"structure"` + + // Specify true to enable node-to-node encryption. + Enabled *bool `type:"boolean"` +} + +// String returns the string representation +func (s NodeToNodeEncryptionOptions) String() string { + return awsutil.Prettify(s) +} + +// GoString returns the string representation +func (s NodeToNodeEncryptionOptions) GoString() string { + return s.String() +} + +// SetEnabled sets the Enabled field's value. +func (s *NodeToNodeEncryptionOptions) SetEnabled(v bool) *NodeToNodeEncryptionOptions { + s.Enabled = &v + return s +} + +// Status of the node-to-node encryption options for the specified Elasticsearch +// domain. +type NodeToNodeEncryptionOptionsStatus struct { + _ struct{} `type:"structure"` + + // Specifies the node-to-node encryption options for the specified Elasticsearch + // domain. + // + // Options is a required field + Options *NodeToNodeEncryptionOptions `type:"structure" required:"true"` + + // Specifies the status of the node-to-node encryption options for the specified + // Elasticsearch domain. + // + // Status is a required field + Status *OptionStatus `type:"structure" required:"true"` +} + +// String returns the string representation +func (s NodeToNodeEncryptionOptionsStatus) String() string { + return awsutil.Prettify(s) +} + +// GoString returns the string representation +func (s NodeToNodeEncryptionOptionsStatus) GoString() string { + return s.String() +} + +// SetOptions sets the Options field's value. +func (s *NodeToNodeEncryptionOptionsStatus) SetOptions(v *NodeToNodeEncryptionOptions) *NodeToNodeEncryptionOptionsStatus { + s.Options = v + return s +} + +// SetStatus sets the Status field's value. +func (s *NodeToNodeEncryptionOptionsStatus) SetStatus(v *OptionStatus) *NodeToNodeEncryptionOptionsStatus { + s.Status = v + return s +} + // Provides the current status of the entity. type OptionStatus struct { _ struct{} `type:"structure"` @@ -4841,6 +5673,238 @@ func (s *UpdateElasticsearchDomainConfigOutput) SetDomainConfig(v *Elasticsearch return s } +// Container for request parameters to UpgradeElasticsearchDomain operation. +type UpgradeElasticsearchDomainInput struct { + _ struct{} `type:"structure"` + + // The name of an Elasticsearch domain. Domain names are unique across the domains + // owned by an account within an AWS region. Domain names start with a letter + // or number and can contain the following characters: a-z (lowercase), 0-9, + // and - (hyphen). + // + // DomainName is a required field + DomainName *string `min:"3" type:"string" required:"true"` + + // This flag, when set to True, indicates that an Upgrade Eligibility Check + // needs to be performed. This will not actually perform the Upgrade. + PerformCheckOnly *bool `type:"boolean"` + + // The version of Elasticsearch that you intend to upgrade the domain to. + // + // TargetVersion is a required field + TargetVersion *string `type:"string" required:"true"` +} + +// String returns the string representation +func (s UpgradeElasticsearchDomainInput) String() string { + return awsutil.Prettify(s) +} + +// GoString returns the string representation +func (s UpgradeElasticsearchDomainInput) GoString() string { + return s.String() +} + +// Validate inspects the fields of the type to determine if they are valid. +func (s *UpgradeElasticsearchDomainInput) Validate() error { + invalidParams := request.ErrInvalidParams{Context: "UpgradeElasticsearchDomainInput"} + if s.DomainName == nil { + invalidParams.Add(request.NewErrParamRequired("DomainName")) + } + if s.DomainName != nil && len(*s.DomainName) < 3 { + invalidParams.Add(request.NewErrParamMinLen("DomainName", 3)) + } + if s.TargetVersion == nil { + invalidParams.Add(request.NewErrParamRequired("TargetVersion")) + } + + if invalidParams.Len() > 0 { + return invalidParams + } + return nil +} + +// SetDomainName sets the DomainName field's value. +func (s *UpgradeElasticsearchDomainInput) SetDomainName(v string) *UpgradeElasticsearchDomainInput { + s.DomainName = &v + return s +} + +// SetPerformCheckOnly sets the PerformCheckOnly field's value. +func (s *UpgradeElasticsearchDomainInput) SetPerformCheckOnly(v bool) *UpgradeElasticsearchDomainInput { + s.PerformCheckOnly = &v + return s +} + +// SetTargetVersion sets the TargetVersion field's value. +func (s *UpgradeElasticsearchDomainInput) SetTargetVersion(v string) *UpgradeElasticsearchDomainInput { + s.TargetVersion = &v + return s +} + +// Container for response returned by UpgradeElasticsearchDomain operation. +type UpgradeElasticsearchDomainOutput struct { + _ struct{} `type:"structure"` + + // The name of an Elasticsearch domain. Domain names are unique across the domains + // owned by an account within an AWS region. Domain names start with a letter + // or number and can contain the following characters: a-z (lowercase), 0-9, + // and - (hyphen). + DomainName *string `min:"3" type:"string"` + + // This flag, when set to True, indicates that an Upgrade Eligibility Check + // needs to be performed. This will not actually perform the Upgrade. + PerformCheckOnly *bool `type:"boolean"` + + // The version of Elasticsearch that you intend to upgrade the domain to. + TargetVersion *string `type:"string"` +} + +// String returns the string representation +func (s UpgradeElasticsearchDomainOutput) String() string { + return awsutil.Prettify(s) +} + +// GoString returns the string representation +func (s UpgradeElasticsearchDomainOutput) GoString() string { + return s.String() +} + +// SetDomainName sets the DomainName field's value. +func (s *UpgradeElasticsearchDomainOutput) SetDomainName(v string) *UpgradeElasticsearchDomainOutput { + s.DomainName = &v + return s +} + +// SetPerformCheckOnly sets the PerformCheckOnly field's value. +func (s *UpgradeElasticsearchDomainOutput) SetPerformCheckOnly(v bool) *UpgradeElasticsearchDomainOutput { + s.PerformCheckOnly = &v + return s +} + +// SetTargetVersion sets the TargetVersion field's value. +func (s *UpgradeElasticsearchDomainOutput) SetTargetVersion(v string) *UpgradeElasticsearchDomainOutput { + s.TargetVersion = &v + return s +} + +// History of the last 10 Upgrades and Upgrade Eligibility Checks. +type UpgradeHistory struct { + _ struct{} `type:"structure"` + + // UTC Timestamp at which the Upgrade API call was made in "yyyy-MM-ddTHH:mm:ssZ" + // format. + StartTimestamp *time.Time `type:"timestamp"` + + // A list of UpgradeStepItem s representing information about each step performed + // as pard of a specific Upgrade or Upgrade Eligibility Check. + StepsList []*UpgradeStepItem `type:"list"` + + // A string that describes the update briefly + UpgradeName *string `type:"string"` + + // The overall status of the update. The status can take one of the following + // values: In Progress + // Succeeded + // Succeeded with Issues + // Failed + UpgradeStatus *string `type:"string" enum:"UpgradeStatus"` +} + +// String returns the string representation +func (s UpgradeHistory) String() string { + return awsutil.Prettify(s) +} + +// GoString returns the string representation +func (s UpgradeHistory) GoString() string { + return s.String() +} + +// SetStartTimestamp sets the StartTimestamp field's value. +func (s *UpgradeHistory) SetStartTimestamp(v time.Time) *UpgradeHistory { + s.StartTimestamp = &v + return s +} + +// SetStepsList sets the StepsList field's value. +func (s *UpgradeHistory) SetStepsList(v []*UpgradeStepItem) *UpgradeHistory { + s.StepsList = v + return s +} + +// SetUpgradeName sets the UpgradeName field's value. +func (s *UpgradeHistory) SetUpgradeName(v string) *UpgradeHistory { + s.UpgradeName = &v + return s +} + +// SetUpgradeStatus sets the UpgradeStatus field's value. +func (s *UpgradeHistory) SetUpgradeStatus(v string) *UpgradeHistory { + s.UpgradeStatus = &v + return s +} + +// Represents a single step of the Upgrade or Upgrade Eligibility Check workflow. +type UpgradeStepItem struct { + _ struct{} `type:"structure"` + + // A list of strings containing detailed information about the errors encountered + // in a particular step. + Issues []*string `type:"list"` + + // The Floating point value representing progress percentage of a particular + // step. + ProgressPercent *float64 `type:"double"` + + // Represents one of 3 steps that an Upgrade or Upgrade Eligibility Check does + // through: PreUpgradeCheck + // Snapshot + // Upgrade + UpgradeStep *string `type:"string" enum:"UpgradeStep"` + + // The status of a particular step during an upgrade. The status can take one + // of the following values: In Progress + // Succeeded + // Succeeded with Issues + // Failed + UpgradeStepStatus *string `type:"string" enum:"UpgradeStatus"` +} + +// String returns the string representation +func (s UpgradeStepItem) String() string { + return awsutil.Prettify(s) +} + +// GoString returns the string representation +func (s UpgradeStepItem) GoString() string { + return s.String() +} + +// SetIssues sets the Issues field's value. +func (s *UpgradeStepItem) SetIssues(v []*string) *UpgradeStepItem { + s.Issues = v + return s +} + +// SetProgressPercent sets the ProgressPercent field's value. +func (s *UpgradeStepItem) SetProgressPercent(v float64) *UpgradeStepItem { + s.ProgressPercent = &v + return s +} + +// SetUpgradeStep sets the UpgradeStep field's value. +func (s *UpgradeStepItem) SetUpgradeStep(v string) *UpgradeStepItem { + s.UpgradeStep = &v + return s +} + +// SetUpgradeStepStatus sets the UpgradeStepStatus field's value. +func (s *UpgradeStepItem) SetUpgradeStepStatus(v string) *UpgradeStepItem { + s.UpgradeStepStatus = &v + return s +} + // Options to specify the subnets and security groups for VPC endpoint. For // more information, see VPC Endpoints for Amazon Elasticsearch Service Domains // (http://docs.aws.amazon.com/elasticsearch-service/latest/developerguide/es-vpc.html). @@ -5091,16 +6155,22 @@ const ( ) // Type of Log File, it can be one of the following: INDEX_SLOW_LOGS: Index -// slow logs contains insert requests that took more time than configured index +// slow logs contain insert requests that took more time than configured index // query log threshold to execute. -// SEARCH_SLOW_LOGS: Search slow logs contains search queries that took more +// SEARCH_SLOW_LOGS: Search slow logs contain search queries that took more // time than configured search query log threshold to execute. +// ES_APPLICATION_LOGS: Elasticsearch application logs contain information about +// errors and warnings raised during the operation of the service and can be +// useful for troubleshooting. const ( // LogTypeIndexSlowLogs is a LogType enum value LogTypeIndexSlowLogs = "INDEX_SLOW_LOGS" // LogTypeSearchSlowLogs is a LogType enum value LogTypeSearchSlowLogs = "SEARCH_SLOW_LOGS" + + // LogTypeEsApplicationLogs is a LogType enum value + LogTypeEsApplicationLogs = "ES_APPLICATION_LOGS" ) // The state of a requested change. One of the following: @@ -5130,6 +6200,31 @@ const ( ReservedElasticsearchInstancePaymentOptionNoUpfront = "NO_UPFRONT" ) +const ( + // UpgradeStatusInProgress is a UpgradeStatus enum value + UpgradeStatusInProgress = "IN_PROGRESS" + + // UpgradeStatusSucceeded is a UpgradeStatus enum value + UpgradeStatusSucceeded = "SUCCEEDED" + + // UpgradeStatusSucceededWithIssues is a UpgradeStatus enum value + UpgradeStatusSucceededWithIssues = "SUCCEEDED_WITH_ISSUES" + + // UpgradeStatusFailed is a UpgradeStatus enum value + UpgradeStatusFailed = "FAILED" +) + +const ( + // UpgradeStepPreUpgradeCheck is a UpgradeStep enum value + UpgradeStepPreUpgradeCheck = "PRE_UPGRADE_CHECK" + + // UpgradeStepSnapshot is a UpgradeStep enum value + UpgradeStepSnapshot = "SNAPSHOT" + + // UpgradeStepUpgrade is a UpgradeStep enum value + UpgradeStepUpgrade = "UPGRADE" +) + // The type of EBS volume, standard, gp2, or io1. See Configuring EBS-based // Storage (http://docs.aws.amazon.com/elasticsearch-service/latest/developerguide/es-createupdatedomains.html#es-createdomain-configure-ebs)for // more information. diff --git a/vendor/github.com/aws/aws-sdk-go/service/elastictranscoder/api.go b/vendor/github.com/aws/aws-sdk-go/service/elastictranscoder/api.go index 9ba387e93..0b044bcbc 100644 --- a/vendor/github.com/aws/aws-sdk-go/service/elastictranscoder/api.go +++ b/vendor/github.com/aws/aws-sdk-go/service/elastictranscoder/api.go @@ -1471,6 +1471,8 @@ const opTestRole = "TestRole" // if err == nil { // resp is now filled // fmt.Println(resp) // } +// +// Deprecated: TestRole has been deprecated func (c *ElasticTranscoder) TestRoleRequest(input *TestRoleInput) (req *request.Request, output *TestRoleOutput) { if c.Client.Config.Logger != nil { c.Client.Config.Logger.Log("This operation, TestRole, has been deprecated") @@ -1525,6 +1527,8 @@ func (c *ElasticTranscoder) TestRoleRequest(input *TestRoleInput) (req *request. // Elastic Transcoder encountered an unexpected exception while trying to fulfill // the request. // +// +// Deprecated: TestRole has been deprecated func (c *ElasticTranscoder) TestRole(input *TestRoleInput) (*TestRoleOutput, error) { req, out := c.TestRoleRequest(input) return out, req.Send() @@ -1539,6 +1543,8 @@ func (c *ElasticTranscoder) TestRole(input *TestRoleInput) (*TestRoleOutput, err // the context is nil a panic will occur. In the future the SDK may create // sub-contexts for http.Requests. See https://golang.org/pkg/context/ // for more information on using Contexts. +// +// Deprecated: TestRoleWithContext has been deprecated func (c *ElasticTranscoder) TestRoleWithContext(ctx aws.Context, input *TestRoleInput, opts ...request.Option) (*TestRoleOutput, error) { req, out := c.TestRoleRequest(input) req.SetContext(ctx) @@ -2539,6 +2545,8 @@ type Captions struct { // Source files for the input sidecar captions used during the transcoding process. // To omit all sidecar captions, leave CaptionSources blank. + // + // Deprecated: CaptionSources has been deprecated CaptionSources []*CaptionSource `deprecated:"true" type:"list"` // A policy that determines how Elastic Transcoder handles the existence of @@ -2560,6 +2568,8 @@ type Captions struct { // you specify in CaptionSources. // // MergePolicy cannot be null. + // + // Deprecated: MergePolicy has been deprecated MergePolicy *string `deprecated:"true" type:"string"` } @@ -2613,6 +2623,8 @@ func (s *Captions) SetMergePolicy(v string) *Captions { // Settings for one clip in a composition. All jobs in a playlist must have // the same clip settings. +// +// Deprecated: Clip has been deprecated type Clip struct { _ struct{} `deprecated:"true" type:"structure"` @@ -2858,6 +2870,8 @@ type CreateJobOutput struct { // of the file. The Composition object contains settings for the clips that // make up an output file. For the current release, you can only specify settings // for a single clip per output file. The Composition object cannot be null. + // + // Deprecated: Composition has been deprecated Composition []*Clip `deprecated:"true" type:"list"` // You can specify encryption settings for any output files that you want to @@ -3211,11 +3225,11 @@ type CreatePipelineInput struct { // The AWS Key Management Service (AWS KMS) key that you want to use with this // pipeline. // - // If you use either S3 or S3-AWS-KMS as your Encryption:Mode, you don't need + // If you use either s3 or s3-aws-kms as your Encryption:Mode, you don't need // to provide a key with your job because a default key, known as an AWS-KMS // key, is created for you automatically. You need to provide an AWS-KMS key // only if you want to use a non-default AWS-KMS key, or if you are using an - // Encryption:Mode of AES-PKCS7, AES-CTR, or AES-GCM. + // Encryption:Mode of aes-cbc-pkcs7, aes-ctr, or aes-gcm. AwsKmsKeyArn *string `type:"string"` // The optional ContentConfig object specifies information about the Amazon @@ -3311,7 +3325,7 @@ type CreatePipelineInput struct { // SNS returned when you created the topic. For more information, see Create // a Topic in the Amazon Simple Notification Service Developer Guide. // - // * Completed: The topic ARN for the Amazon SNS topic that you want to notify + // * Complete: The topic ARN for the Amazon SNS topic that you want to notify // when Elastic Transcoder has finished processing a job in this pipeline. // This is the ARN that Amazon SNS returned when you created the topic. // @@ -3893,20 +3907,20 @@ type Encryption struct { // to use when decrypting your input files or encrypting your output files. // Elastic Transcoder supports the following options: // - // * S3: Amazon S3 creates and manages the keys used for encrypting your + // * s3: Amazon S3 creates and manages the keys used for encrypting your // files. // - // * S3-AWS-KMS: Amazon S3 calls the Amazon Key Management Service, which + // * s3-aws-kms: Amazon S3 calls the Amazon Key Management Service, which // creates and manages the keys that are used for encrypting your files. - // If you specify S3-AWS-KMS and you don't want to use the default key, you + // If you specify s3-aws-kms and you don't want to use the default key, you // must add the AWS-KMS key that you want to use to your pipeline. // - // * AES-CBC-PKCS7: A padded cipher-block mode of operation originally used + // * aes-cbc-pkcs7: A padded cipher-block mode of operation originally used // for HLS files. // - // * AES-CTR: AES Counter Mode. + // * aes-ctr: AES Counter Mode. // - // * AES-GCM: AES Galois Counter Mode, a mode of operation that is an authenticated + // * aes-gcm: AES Galois Counter Mode, a mode of operation that is an authenticated // encryption format, meaning that a file, key, or initialization vector // that has been tampered with fails the decryption process. // @@ -4631,6 +4645,8 @@ type JobOutput struct { // of the file. The Composition object contains settings for the clips that // make up an output file. For the current release, you can only specify settings // for a single clip per output file. The Composition object cannot be null. + // + // Deprecated: Composition has been deprecated Composition []*Clip `deprecated:"true" type:"list"` // Duration of the output file, in seconds. @@ -5471,11 +5487,11 @@ type Pipeline struct { // The AWS Key Management Service (AWS KMS) key that you want to use with this // pipeline. // - // If you use either S3 or S3-AWS-KMS as your Encryption:Mode, you don't need + // If you use either s3 or s3-aws-kms as your Encryption:Mode, you don't need // to provide a key with your job because a default key, known as an AWS-KMS // key, is created for you automatically. You need to provide an AWS-KMS key // only if you want to use a non-default AWS-KMS key, or if you are using an - // Encryption:Mode of AES-PKCS7, AES-CTR, or AES-GCM. + // Encryption:Mode of aes-cbc-pkcs7, aes-ctr, or aes-gcm. AwsKmsKeyArn *string `type:"string"` // Information about the Amazon S3 bucket in which you want Elastic Transcoder @@ -5547,7 +5563,7 @@ type Pipeline struct { // SNS) topic that you want to notify when Elastic Transcoder has started // to process the job. // - // * Completed (optional): The Amazon SNS topic that you want to notify when + // * Complete (optional): The Amazon SNS topic that you want to notify when // Elastic Transcoder has finished processing the job. // // * Warning (optional): The Amazon SNS topic that you want to notify when @@ -5793,7 +5809,7 @@ func (s *PipelineOutputConfig) SetStorageClass(v string) *PipelineOutputConfig { // The PlayReady DRM settings, if any, that you want Elastic Transcoder to apply // to the output files associated with this playlist. // -// PlayReady DRM encrypts your media files using AES-CTR encryption. +// PlayReady DRM encrypts your media files using aes-ctr encryption. // // If you use DRM for an HLSv3 playlist, your outputs must have a master playlist. type PlayReadyDrm struct { @@ -6589,6 +6605,8 @@ func (s *ReadPresetOutput) SetPreset(v *Preset) *ReadPresetOutput { } // The TestRoleRequest structure. +// +// Deprecated: TestRoleInput has been deprecated type TestRoleInput struct { _ struct{} `deprecated:"true" type:"structure"` @@ -6674,6 +6692,8 @@ func (s *TestRoleInput) SetTopics(v []*string) *TestRoleInput { } // The TestRoleResponse structure. +// +// Deprecated: TestRoleOutput has been deprecated type TestRoleOutput struct { _ struct{} `deprecated:"true" type:"structure"` @@ -6942,11 +6962,11 @@ type UpdatePipelineInput struct { // The AWS Key Management Service (AWS KMS) key that you want to use with this // pipeline. // - // If you use either S3 or S3-AWS-KMS as your Encryption:Mode, you don't need + // If you use either s3 or s3-aws-kms as your Encryption:Mode, you don't need // to provide a key with your job because a default key, known as an AWS-KMS // key, is created for you automatically. You need to provide an AWS-KMS key // only if you want to use a non-default AWS-KMS key, or if you are using an - // Encryption:Mode of AES-PKCS7, AES-CTR, or AES-GCM. + // Encryption:Mode of aes-cbc-pkcs7, aes-ctr, or aes-gcm. AwsKmsKeyArn *string `type:"string"` // The optional ContentConfig object specifies information about the Amazon @@ -7042,7 +7062,7 @@ type UpdatePipelineInput struct { // started to process jobs that are added to this pipeline. This is the ARN // that Amazon SNS returned when you created the topic. // - // * Completed: The topic ARN for the Amazon SNS topic that you want to notify + // * Complete: The topic ARN for the Amazon SNS topic that you want to notify // when Elastic Transcoder has finished processing a job. This is the ARN // that Amazon SNS returned when you created the topic. // @@ -7225,7 +7245,7 @@ type UpdatePipelineNotificationsInput struct { // started to process jobs that are added to this pipeline. This is the ARN // that Amazon SNS returned when you created the topic. // - // * Completed: The topic ARN for the Amazon SNS topic that you want to notify + // * Complete: The topic ARN for the Amazon SNS topic that you want to notify // when Elastic Transcoder has finished processing a job. This is the ARN // that Amazon SNS returned when you created the topic. // diff --git a/vendor/github.com/aws/aws-sdk-go/service/elb/api.go b/vendor/github.com/aws/aws-sdk-go/service/elb/api.go index c41d020c5..bb3af0540 100644 --- a/vendor/github.com/aws/aws-sdk-go/service/elb/api.go +++ b/vendor/github.com/aws/aws-sdk-go/service/elb/api.go @@ -62,7 +62,7 @@ func (c *ELB) AddTagsRequest(input *AddTagsInput) (req *request.Request, output // key is already associated with the load balancer, AddTags updates its value. // // For more information, see Tag Your Classic Load Balancer (http://docs.aws.amazon.com/elasticloadbalancing/latest/classic/add-remove-tags.html) -// in the Classic Load Balancer Guide. +// in the Classic Load Balancers Guide. // // Returns awserr.Error for service API and SDK errors. Use runtime type assertions // with awserr.Error's Code and Message methods to get detailed information about @@ -153,7 +153,7 @@ func (c *ELB) ApplySecurityGroupsToLoadBalancerRequest(input *ApplySecurityGroup // associated security groups. // // For more information, see Security Groups for Load Balancers in a VPC (http://docs.aws.amazon.com/elasticloadbalancing/latest/classic/elb-security-groups.html#elb-vpc-security-groups) -// in the Classic Load Balancer Guide. +// in the Classic Load Balancers Guide. // // Returns awserr.Error for service API and SDK errors. Use runtime type assertions // with awserr.Error's Code and Message methods to get detailed information about @@ -244,7 +244,7 @@ func (c *ELB) AttachLoadBalancerToSubnetsRequest(input *AttachLoadBalancerToSubn // The load balancer evenly distributes requests across all registered subnets. // For more information, see Add or Remove Subnets for Your Load Balancer in // a VPC (http://docs.aws.amazon.com/elasticloadbalancing/latest/classic/elb-manage-subnets.html) -// in the Classic Load Balancer Guide. +// in the Classic Load Balancers Guide. // // Returns awserr.Error for service API and SDK errors. Use runtime type assertions // with awserr.Error's Code and Message methods to get detailed information about @@ -337,7 +337,7 @@ func (c *ELB) ConfigureHealthCheckRequest(input *ConfigureHealthCheckInput) (req // // For more information, see Configure Health Checks for Your Load Balancer // (http://docs.aws.amazon.com/elasticloadbalancing/latest/classic/elb-healthchecks.html) -// in the Classic Load Balancer Guide. +// in the Classic Load Balancers Guide. // // Returns awserr.Error for service API and SDK errors. Use runtime type assertions // with awserr.Error's Code and Message methods to get detailed information about @@ -430,7 +430,7 @@ func (c *ELB) CreateAppCookieStickinessPolicyRequest(input *CreateAppCookieStick // being sticky until a new application cookie is issued. // // For more information, see Application-Controlled Session Stickiness (http://docs.aws.amazon.com/elasticloadbalancing/latest/classic/elb-sticky-sessions.html#enable-sticky-sessions-application) -// in the Classic Load Balancer Guide. +// in the Classic Load Balancers Guide. // // Returns awserr.Error for service API and SDK errors. Use runtime type assertions // with awserr.Error's Code and Message methods to get detailed information about @@ -534,7 +534,7 @@ func (c *ELB) CreateLBCookieStickinessPolicyRequest(input *CreateLBCookieStickin // cookie expiration time, which is specified in the policy configuration. // // For more information, see Duration-Based Session Stickiness (http://docs.aws.amazon.com/elasticloadbalancing/latest/classic/elb-sticky-sessions.html#enable-sticky-sessions-duration) -// in the Classic Load Balancer Guide. +// in the Classic Load Balancers Guide. // // Returns awserr.Error for service API and SDK errors. Use runtime type assertions // with awserr.Error's Code and Message methods to get detailed information about @@ -634,7 +634,7 @@ func (c *ELB) CreateLoadBalancerRequest(input *CreateLoadBalancerInput) (req *re // You can create up to 20 load balancers per region per account. You can request // an increase for the number of load balancers for your account. For more information, // see Limits for Your Classic Load Balancer (http://docs.aws.amazon.com/elasticloadbalancing/latest/classic/elb-limits.html) -// in the Classic Load Balancer Guide. +// in the Classic Load Balancers Guide. // // Returns awserr.Error for service API and SDK errors. Use runtime type assertions // with awserr.Error's Code and Message methods to get detailed information about @@ -757,7 +757,7 @@ func (c *ELB) CreateLoadBalancerListenersRequest(input *CreateLoadBalancerListen // listener. // // For more information, see Listeners for Your Classic Load Balancer (http://docs.aws.amazon.com/elasticloadbalancing/latest/classic/elb-listener-config.html) -// in the Classic Load Balancer Guide. +// in the Classic Load Balancers Guide. // // Returns awserr.Error for service API and SDK errors. Use runtime type assertions // with awserr.Error's Code and Message methods to get detailed information about @@ -1200,7 +1200,7 @@ func (c *ELB) DeregisterInstancesFromLoadBalancerRequest(input *DeregisterInstan // from the load balancer. // // For more information, see Register or De-Register EC2 Instances (http://docs.aws.amazon.com/elasticloadbalancing/latest/classic/elb-deregister-register-instances.html) -// in the Classic Load Balancer Guide. +// in the Classic Load Balancers Guide. // // Returns awserr.Error for service API and SDK errors. Use runtime type assertions // with awserr.Error's Code and Message methods to get detailed information about @@ -1286,7 +1286,7 @@ func (c *ELB) DescribeAccountLimitsRequest(input *DescribeAccountLimitsInput) (r // account. // // For more information, see Limits for Your Classic Load Balancer (http://docs.aws.amazon.com/elasticloadbalancing/latest/classic/elb-limits.html) -// in the Classic Load Balancer Guide. +// in the Classic Load Balancers Guide. // // Returns awserr.Error for service API and SDK errors. Use runtime type assertions // with awserr.Error's Code and Message methods to get detailed information about @@ -1729,6 +1729,8 @@ func (c *ELB) DescribeLoadBalancersRequest(input *DescribeLoadBalancersInput) (r // The specified load balancer does not exist. // // * ErrCodeDependencyThrottleException "DependencyThrottle" +// A request made by Elastic Load Balancing to another service exceeds the maximum +// request rate permitted for your account. // // See also, https://docs.aws.amazon.com/goto/WebAPI/elasticloadbalancing-2012-06-01/DescribeLoadBalancers func (c *ELB) DescribeLoadBalancers(input *DescribeLoadBalancersInput) (*DescribeLoadBalancersOutput, error) { @@ -2013,7 +2015,9 @@ func (c *ELB) DisableAvailabilityZonesForLoadBalancerRequest(input *DisableAvail // DisableAvailabilityZonesForLoadBalancer API operation for Elastic Load Balancing. // // Removes the specified Availability Zones from the set of Availability Zones -// for the specified load balancer. +// for the specified load balancer in EC2-Classic or a default VPC. +// +// For load balancers in a non-default VPC, use DetachLoadBalancerFromSubnets. // // There must be at least one Availability Zone registered with a load balancer // at all times. After an Availability Zone is removed, all instances registered @@ -2022,7 +2026,7 @@ func (c *ELB) DisableAvailabilityZonesForLoadBalancerRequest(input *DisableAvail // the traffic among its remaining Availability Zones. // // For more information, see Add or Remove Availability Zones (http://docs.aws.amazon.com/elasticloadbalancing/latest/classic/enable-disable-az.html) -// in the Classic Load Balancer Guide. +// in the Classic Load Balancers Guide. // // Returns awserr.Error for service API and SDK errors. Use runtime type assertions // with awserr.Error's Code and Message methods to get detailed information about @@ -2105,13 +2109,14 @@ func (c *ELB) EnableAvailabilityZonesForLoadBalancerRequest(input *EnableAvailab // EnableAvailabilityZonesForLoadBalancer API operation for Elastic Load Balancing. // // Adds the specified Availability Zones to the set of Availability Zones for -// the specified load balancer. +// the specified load balancer in EC2-Classic or a default VPC. +// +// For load balancers in a non-default VPC, use AttachLoadBalancerToSubnets. // // The load balancer evenly distributes requests across all its registered Availability -// Zones that contain instances. -// -// For more information, see Add or Remove Availability Zones (http://docs.aws.amazon.com/elasticloadbalancing/latest/classic/enable-disable-az.html) -// in the Classic Load Balancer Guide. +// Zones that contain instances. For more information, see Add or Remove Availability +// Zones (http://docs.aws.amazon.com/elasticloadbalancing/latest/classic/enable-disable-az.html) +// in the Classic Load Balancers Guide. // // Returns awserr.Error for service API and SDK errors. Use runtime type assertions // with awserr.Error's Code and Message methods to get detailed information about @@ -2197,7 +2202,7 @@ func (c *ELB) ModifyLoadBalancerAttributesRequest(input *ModifyLoadBalancerAttri // can modify the load balancer attribute ConnectionSettings by specifying an // idle connection timeout value for your load balancer. // -// For more information, see the following in the Classic Load Balancer Guide: +// For more information, see the following in the Classic Load Balancers Guide: // // * Cross-Zone Load Balancing (http://docs.aws.amazon.com/elasticloadbalancing/latest/classic/enable-disable-crosszone-lb.html) // @@ -2312,7 +2317,7 @@ func (c *ELB) RegisterInstancesWithLoadBalancerRequest(input *RegisterInstancesW // To deregister instances from a load balancer, use DeregisterInstancesFromLoadBalancer. // // For more information, see Register or De-Register EC2 Instances (http://docs.aws.amazon.com/elasticloadbalancing/latest/classic/elb-deregister-register-instances.html) -// in the Classic Load Balancer Guide. +// in the Classic Load Balancers Guide. // // Returns awserr.Error for service API and SDK errors. Use runtime type assertions // with awserr.Error's Code and Message methods to get detailed information about @@ -2479,7 +2484,7 @@ func (c *ELB) SetLoadBalancerListenerSSLCertificateRequest(input *SetLoadBalance // // For more information about updating your SSL certificate, see Replace the // SSL Certificate for Your Load Balancer (http://docs.aws.amazon.com/elasticloadbalancing/latest/classic/elb-update-ssl-cert.html) -// in the Classic Load Balancer Guide. +// in the Classic Load Balancers Guide. // // Returns awserr.Error for service API and SDK errors. Use runtime type assertions // with awserr.Error's Code and Message methods to get detailed information about @@ -2586,9 +2591,9 @@ func (c *ELB) SetLoadBalancerPoliciesForBackendServerRequest(input *SetLoadBalan // // For more information about enabling back-end instance authentication, see // Configure Back-end Instance Authentication (http://docs.aws.amazon.com/elasticloadbalancing/latest/classic/elb-create-https-ssl-load-balancer.html#configure_backendauth_clt) -// in the Classic Load Balancer Guide. For more information about Proxy Protocol, +// in the Classic Load Balancers Guide. For more information about Proxy Protocol, // see Configure Proxy Protocol Support (http://docs.aws.amazon.com/elasticloadbalancing/latest/classic/enable-proxy-protocol.html) -// in the Classic Load Balancer Guide. +// in the Classic Load Balancers Guide. // // Returns awserr.Error for service API and SDK errors. Use runtime type assertions // with awserr.Error's Code and Message methods to get detailed information about @@ -2682,7 +2687,7 @@ func (c *ELB) SetLoadBalancerPoliciesOfListenerRequest(input *SetLoadBalancerPol // Configuration (http://docs.aws.amazon.com/elasticloadbalancing/latest/classic/ssl-config-update.html), // Duration-Based Session Stickiness (http://docs.aws.amazon.com/elasticloadbalancing/latest/classic/elb-sticky-sessions.html#enable-sticky-sessions-duration), // and Application-Controlled Session Stickiness (http://docs.aws.amazon.com/elasticloadbalancing/latest/classic/elb-sticky-sessions.html#enable-sticky-sessions-application) -// in the Classic Load Balancer Guide. +// in the Classic Load Balancers Guide. // // Returns awserr.Error for service API and SDK errors. Use runtime type assertions // with awserr.Error's Code and Message methods to get detailed information about @@ -3489,7 +3494,7 @@ type CreateLoadBalancerInput struct { // The listeners. // // For more information, see Listeners for Your Classic Load Balancer (http://docs.aws.amazon.com/elasticloadbalancing/latest/classic/elb-listener-config.html) - // in the Classic Load Balancer Guide. + // in the Classic Load Balancers Guide. // // Listeners is a required field Listeners []*Listener `type:"list" required:"true"` @@ -3526,7 +3531,7 @@ type CreateLoadBalancerInput struct { // // For more information about tagging your load balancer, see Tag Your Classic // Load Balancer (http://docs.aws.amazon.com/elasticloadbalancing/latest/classic/add-remove-tags.html) - // in the Classic Load Balancer Guide. + // in the Classic Load Balancers Guide. Tags []*Tag `min:"1" type:"list"` } @@ -5115,6 +5120,8 @@ type Limit struct { // * classic-listeners // // * classic-load-balancers + // + // * classic-registered-instances Name *string `type:"string"` } @@ -5144,7 +5151,7 @@ func (s *Limit) SetName(v string) *Limit { // // For information about the protocols and the ports supported by Elastic Load // Balancing, see Listeners for Your Classic Load Balancer (http://docs.aws.amazon.com/elasticloadbalancing/latest/classic/elb-listener-config.html) -// in the Classic Load Balancer Guide. +// in the Classic Load Balancers Guide. type Listener struct { _ struct{} `type:"structure"` @@ -5286,7 +5293,7 @@ type LoadBalancerAttributes struct { // and delivers the information to the Amazon S3 bucket that you specify. // // For more information, see Enable Access Logs (http://docs.aws.amazon.com/elasticloadbalancing/latest/classic/enable-access-logs.html) - // in the Classic Load Balancer Guide. + // in the Classic Load Balancers Guide. AccessLog *AccessLog `type:"structure"` // This parameter is reserved. @@ -5296,7 +5303,7 @@ type LoadBalancerAttributes struct { // the load balancer shifts traffic away from a deregistered or unhealthy instance. // // For more information, see Configure Connection Draining (http://docs.aws.amazon.com/elasticloadbalancing/latest/classic/config-conn-drain.html) - // in the Classic Load Balancer Guide. + // in the Classic Load Balancers Guide. ConnectionDraining *ConnectionDraining `type:"structure"` // If enabled, the load balancer allows the connections to remain idle (no data @@ -5305,14 +5312,14 @@ type LoadBalancerAttributes struct { // By default, Elastic Load Balancing maintains a 60-second idle connection // timeout for both front-end and back-end connections of your load balancer. // For more information, see Configure Idle Connection Timeout (http://docs.aws.amazon.com/elasticloadbalancing/latest/classic/config-idle-timeout.html) - // in the Classic Load Balancer Guide. + // in the Classic Load Balancers Guide. ConnectionSettings *ConnectionSettings `type:"structure"` // If enabled, the load balancer routes the request traffic evenly across all // instances regardless of the Availability Zones. // // For more information, see Configure Cross-Zone Load Balancing (http://docs.aws.amazon.com/elasticloadbalancing/latest/classic/enable-disable-crosszone-lb.html) - // in the Classic Load Balancer Guide. + // in the Classic Load Balancers Guide. CrossZoneLoadBalancing *CrossZoneLoadBalancing `type:"structure"` } @@ -5399,7 +5406,7 @@ type LoadBalancerDescription struct { // The DNS name of the load balancer. // // For more information, see Configure a Custom Domain Name (http://docs.aws.amazon.com/elasticloadbalancing/latest/classic/using-domain-names-with-elb.html) - // in the Classic Load Balancer Guide. + // in the Classic Load Balancers Guide. CanonicalHostedZoneName *string `type:"string"` // The ID of the Amazon Route 53 hosted zone for the load balancer. diff --git a/vendor/github.com/aws/aws-sdk-go/service/elb/errors.go b/vendor/github.com/aws/aws-sdk-go/service/elb/errors.go index fbf2140d8..14f1e6717 100644 --- a/vendor/github.com/aws/aws-sdk-go/service/elb/errors.go +++ b/vendor/github.com/aws/aws-sdk-go/service/elb/errors.go @@ -21,6 +21,9 @@ const ( // ErrCodeDependencyThrottleException for service response error code // "DependencyThrottle". + // + // A request made by Elastic Load Balancing to another service exceeds the maximum + // request rate permitted for your account. ErrCodeDependencyThrottleException = "DependencyThrottle" // ErrCodeDuplicateAccessPointNameException for service response error code diff --git a/vendor/github.com/aws/aws-sdk-go/service/elbv2/api.go b/vendor/github.com/aws/aws-sdk-go/service/elbv2/api.go index 8427b6215..b821105c5 100644 --- a/vendor/github.com/aws/aws-sdk-go/service/elbv2/api.go +++ b/vendor/github.com/aws/aws-sdk-go/service/elbv2/api.go @@ -748,7 +748,7 @@ func (c *ELBV2) DeleteListenerRequest(input *DeleteListenerInput) (req *request. // Deletes the specified listener. // // Alternatively, your listener is deleted when you delete the load balancer -// it is attached to using DeleteLoadBalancer. +// to which it is attached, using DeleteLoadBalancer. // // Returns awserr.Error for service API and SDK errors. Use runtime type assertions // with awserr.Error's Code and Message methods to get detailed information about @@ -3046,7 +3046,7 @@ func (c *ELBV2) SetIpAddressTypeRequest(input *SetIpAddressTypeInput) (req *requ // Sets the type of IP addresses used by the subnets of the specified Application // Load Balancer or Network Load Balancer. // -// Note that Network Load Balancers must use ipv4. +// Network Load Balancers must use ipv4. // // Returns awserr.Error for service API and SDK errors. Use runtime type assertions // with awserr.Error's Code and Message methods to get detailed information about @@ -3224,7 +3224,7 @@ func (c *ELBV2) SetSecurityGroupsRequest(input *SetSecurityGroupsInput) (req *re // Balancer. The specified security groups override the previously associated // security groups. // -// Note that you can't specify a security group for a Network Load Balancer. +// You can't specify a security group for a Network Load Balancer. // // Returns awserr.Error for service API and SDK errors. Use runtime type assertions // with awserr.Error's Code and Message methods to get detailed information about @@ -3313,7 +3313,7 @@ func (c *ELBV2) SetSubnetsRequest(input *SetSubnetsInput) (req *request.Request, // Application Load Balancer. The specified subnets replace the previously enabled // subnets. // -// Note that you can't change the subnets for a Network Load Balancer. +// You can't change the subnets for a Network Load Balancer. // // Returns awserr.Error for service API and SDK errors. Use runtime type assertions // with awserr.Error's Code and Message methods to get detailed information about @@ -3375,19 +3375,25 @@ type Action struct { // with OpenID Connect (OIDC). Specify only when Type is authenticate-oidc. AuthenticateOidcConfig *AuthenticateOidcActionConfig `type:"structure"` + // [Application Load Balancer] Information for creating an action that returns + // a custom HTTP response. Specify only when Type is fixed-response. + FixedResponseConfig *FixedResponseActionConfig `type:"structure"` + // The order for the action. This value is required for rules with multiple // actions. The action with the lowest value for order is performed first. The - // forward action must be performed last. + // final action to be performed must be a forward or a fixed-response action. Order *int64 `min:"1" type:"integer"` + // [Application Load Balancer] Information for creating a redirect action. Specify + // only when Type is redirect. + RedirectConfig *RedirectActionConfig `type:"structure"` + // The Amazon Resource Name (ARN) of the target group. Specify only when Type // is forward. - // - // For a default rule, the protocol of the target group must be HTTP or HTTPS - // for an Application Load Balancer or TCP for a Network Load Balancer. TargetGroupArn *string `type:"string"` - // The type of action. Each rule must include one forward action. + // The type of action. Each rule must include exactly one of the following types + // of actions: forward, fixed-response, or redirect. // // Type is a required field Type *string `type:"string" required:"true" enum:"ActionTypeEnum"` @@ -3422,6 +3428,16 @@ func (s *Action) Validate() error { invalidParams.AddNested("AuthenticateOidcConfig", err.(request.ErrInvalidParams)) } } + if s.FixedResponseConfig != nil { + if err := s.FixedResponseConfig.Validate(); err != nil { + invalidParams.AddNested("FixedResponseConfig", err.(request.ErrInvalidParams)) + } + } + if s.RedirectConfig != nil { + if err := s.RedirectConfig.Validate(); err != nil { + invalidParams.AddNested("RedirectConfig", err.(request.ErrInvalidParams)) + } + } if invalidParams.Len() > 0 { return invalidParams @@ -3441,12 +3457,24 @@ func (s *Action) SetAuthenticateOidcConfig(v *AuthenticateOidcActionConfig) *Act return s } +// SetFixedResponseConfig sets the FixedResponseConfig field's value. +func (s *Action) SetFixedResponseConfig(v *FixedResponseActionConfig) *Action { + s.FixedResponseConfig = v + return s +} + // SetOrder sets the Order field's value. func (s *Action) SetOrder(v int64) *Action { s.Order = &v return s } +// SetRedirectConfig sets the RedirectConfig field's value. +func (s *Action) SetRedirectConfig(v *RedirectActionConfig) *Action { + s.RedirectConfig = v + return s +} + // SetTargetGroupArn sets the TargetGroupArn field's value. func (s *Action) SetTargetGroupArn(v string) *Action { s.TargetGroupArn = &v @@ -4024,21 +4052,28 @@ type CreateListenerInput struct { _ struct{} `type:"structure"` // [HTTPS listeners] The default SSL server certificate. You must provide exactly - // one certificate. To create a certificate list, use AddListenerCertificates. + // one default certificate. To create a certificate list, use AddListenerCertificates. Certificates []*Certificate `type:"list"` - // The actions for the default rule. The rule must include one forward action. + // The actions for the default rule. The rule must include one forward action + // or one or more fixed-response actions. // // If the action type is forward, you can specify a single target group. The // protocol of the target group must be HTTP or HTTPS for an Application Load // Balancer or TCP for a Network Load Balancer. // - // If the action type is authenticate-oidc, you can use an identity provider - // that is OpenID Connect (OIDC) compliant to authenticate users as they access - // your application. + // [HTTPS listener] If the action type is authenticate-oidc, you can use an + // identity provider that is OpenID Connect (OIDC) compliant to authenticate + // users as they access your application. // - // If the action type is authenticate-cognito, you can use Amazon Cognito to - // authenticate users as they access your application. + // [HTTPS listener] If the action type is authenticate-cognito, you can use + // Amazon Cognito to authenticate users as they access your application. + // + // [Application Load Balancer] If the action type is redirect, you can redirect + // HTTP and HTTPS requests. + // + // [Application Load Balancer] If the action type is fixed-response, you can + // return a custom HTTP response. // // DefaultActions is a required field DefaultActions []*Action `type:"list" required:"true"` @@ -4190,7 +4225,7 @@ type CreateLoadBalancerInput struct { // The nodes of an Internet-facing load balancer have public IP addresses. The // DNS name of an Internet-facing load balancer is publicly resolvable to the // public IP addresses of the nodes. Therefore, Internet-facing load balancers - // can route requests from clients over the Internet. + // can route requests from clients over the internet. // // The nodes of an internal load balancer have only private IP addresses. The // DNS name of an internal load balancer is publicly resolvable to the private @@ -4341,16 +4376,23 @@ func (s *CreateLoadBalancerOutput) SetLoadBalancers(v []*LoadBalancer) *CreateLo type CreateRuleInput struct { _ struct{} `type:"structure"` - // The actions. Each rule must include one forward action. + // The actions. Each rule must include exactly one of the following types of + // actions: forward, fixed-response, or redirect. // // If the action type is forward, you can specify a single target group. // - // If the action type is authenticate-oidc, you can use an identity provider - // that is OpenID Connect (OIDC) compliant to authenticate users as they access - // your application. + // [HTTPS listener] If the action type is authenticate-oidc, you can use an + // identity provider that is OpenID Connect (OIDC) compliant to authenticate + // users as they access your application. // - // If the action type is authenticate-cognito, you can use Amazon Cognito to - // authenticate users as they access your application. + // [HTTPS listener] If the action type is authenticate-cognito, you can use + // Amazon Cognito to authenticate users as they access your application. + // + // [Application Load Balancer] If the action type is redirect, you can redirect + // HTTP and HTTPS requests. + // + // [Application Load Balancer] If the action type is fixed-response, you can + // return a custom HTTP response. // // Actions is a required field Actions []*Action `type:"list" required:"true"` @@ -4359,8 +4401,8 @@ type CreateRuleInput struct { // // If the field name is host-header, you can specify a single host name (for // example, my.example.com). A host name is case insensitive, can be up to 128 - // characters in length, and can contain any of the following characters. Note - // that you can include up to three wildcard characters. + // characters in length, and can contain any of the following characters. You + // can include up to three wildcard characters. // // * A-Z, a-z, 0-9 // @@ -4371,9 +4413,9 @@ type CreateRuleInput struct { // * ? (matches exactly 1 character) // // If the field name is path-pattern, you can specify a single path pattern. - // A path pattern is case sensitive, can be up to 128 characters in length, - // and can contain any of the following characters. Note that you can include - // up to three wildcard characters. + // A path pattern is case-sensitive, can be up to 128 characters in length, + // and can contain any of the following characters. You can include up to three + // wildcard characters. // // * A-Z, a-z, 0-9 // @@ -4495,9 +4537,9 @@ type CreateTargetGroupInput struct { _ struct{} `type:"structure"` // The approximate amount of time, in seconds, between health checks of an individual - // target. For Application Load Balancers, the range is 5 to 300 seconds. For - // Network Load Balancers, the supported values are 10 or 30 seconds. The default - // is 30 seconds. + // target. For Application Load Balancers, the range is 5–300 seconds. For Network + // Load Balancers, the supported values are 10 or 30 seconds. The default is + // 30 seconds. HealthCheckIntervalSeconds *int64 `min:"5" type:"integer"` // [HTTP/HTTPS health checks] The ping path that is the destination on the targets @@ -4516,9 +4558,9 @@ type CreateTargetGroupInput struct { HealthCheckProtocol *string `type:"string" enum:"ProtocolEnum"` // The amount of time, in seconds, during which no response from a target means - // a failed health check. For Application Load Balancers, the range is 2 to - // 60 seconds and the default is 5 seconds. For Network Load Balancers, this - // is 10 seconds for TCP and HTTPS health checks and 6 seconds for HTTP health + // a failed health check. For Application Load Balancers, the range is 2–60 + // seconds and the default is 5 seconds. For Network Load Balancers, this is + // 10 seconds for TCP and HTTPS health checks and 6 seconds for HTTP health // checks. HealthCheckTimeoutSeconds *int64 `min:"2" type:"integer"` @@ -4556,8 +4598,8 @@ type CreateTargetGroupInput struct { // The type of target that you must specify when registering targets with this // target group. The possible values are instance (targets are specified by // instance ID) or ip (targets are specified by IP address). The default is - // instance. Note that you can't specify targets for a target group using both - // instance IDs and IP addresses. + // instance. You can't specify targets for a target group using both instance + // IDs and IP addresses. // // If the target type is ip, specify IP addresses from the subnets of the virtual // private cloud (VPC) for the target group, the RFC 1918 range (10.0.0.0/8, @@ -5939,6 +5981,66 @@ func (s *DescribeTargetHealthOutput) SetTargetHealthDescriptions(v []*TargetHeal return s } +// Information about an action that returns a custom HTTP response. +type FixedResponseActionConfig struct { + _ struct{} `type:"structure"` + + // The content type. + // + // Valid Values: text/plain | text/css | text/html | application/javascript + // | application/json + ContentType *string `type:"string"` + + // The message. + MessageBody *string `type:"string"` + + // The HTTP response code (2XX, 4XX, or 5XX). + // + // StatusCode is a required field + StatusCode *string `type:"string" required:"true"` +} + +// String returns the string representation +func (s FixedResponseActionConfig) String() string { + return awsutil.Prettify(s) +} + +// GoString returns the string representation +func (s FixedResponseActionConfig) GoString() string { + return s.String() +} + +// Validate inspects the fields of the type to determine if they are valid. +func (s *FixedResponseActionConfig) Validate() error { + invalidParams := request.ErrInvalidParams{Context: "FixedResponseActionConfig"} + if s.StatusCode == nil { + invalidParams.Add(request.NewErrParamRequired("StatusCode")) + } + + if invalidParams.Len() > 0 { + return invalidParams + } + return nil +} + +// SetContentType sets the ContentType field's value. +func (s *FixedResponseActionConfig) SetContentType(v string) *FixedResponseActionConfig { + s.ContentType = &v + return s +} + +// SetMessageBody sets the MessageBody field's value. +func (s *FixedResponseActionConfig) SetMessageBody(v string) *FixedResponseActionConfig { + s.MessageBody = &v + return s +} + +// SetStatusCode sets the StatusCode field's value. +func (s *FixedResponseActionConfig) SetStatusCode(v string) *FixedResponseActionConfig { + s.StatusCode = &v + return s +} + // Information about an Elastic Load Balancing resource limit for your AWS account. type Limit struct { _ struct{} `type:"structure"` @@ -6100,7 +6202,7 @@ type LoadBalancer struct { // The nodes of an Internet-facing load balancer have public IP addresses. The // DNS name of an Internet-facing load balancer is publicly resolvable to the // public IP addresses of the nodes. Therefore, Internet-facing load balancers - // can route requests from clients over the Internet. + // can route requests from clients over the internet. // // The nodes of an internal load balancer have only private IP addresses. The // DNS name of an internal load balancer is publicly resolvable to the private @@ -6256,7 +6358,7 @@ type LoadBalancerAttribute struct { // * access_logs.s3.bucket - The name of the S3 bucket for the access logs. // This attribute is required if access logs are enabled. The bucket must // exist in the same region as the load balancer and have a bucket policy - // that grants Elastic Load Balancing permission to write to the bucket. + // that grants Elastic Load Balancing permissions to write to the bucket. // // * access_logs.s3.prefix - The prefix for the location in the S3 bucket // for the access logs. @@ -6344,7 +6446,7 @@ type Matcher struct { // and the default value is 200. You can specify multiple values (for example, // "200,202") or a range of values (for example, "200-299"). // - // For Network Load Balancers, this is 200 to 399. + // For Network Load Balancers, this is 200–399. // // HttpCode is a required field HttpCode *string `type:"string" required:"true"` @@ -6383,21 +6485,28 @@ type ModifyListenerInput struct { _ struct{} `type:"structure"` // [HTTPS listeners] The default SSL server certificate. You must provide exactly - // one certificate. To create a certificate list, use AddListenerCertificates. + // one default certificate. To create a certificate list, use AddListenerCertificates. Certificates []*Certificate `type:"list"` - // The actions for the default rule. The rule must include one forward action. + // The actions for the default rule. The rule must include one forward action + // or one or more fixed-response actions. // // If the action type is forward, you can specify a single target group. The // protocol of the target group must be HTTP or HTTPS for an Application Load // Balancer or TCP for a Network Load Balancer. // - // If the action type is authenticate-oidc, you can use an identity provider - // that is OpenID Connect (OIDC) compliant to authenticate users as they access - // your application. + // [HTTPS listener] If the action type is authenticate-oidc, you can use an + // identity provider that is OpenID Connect (OIDC) compliant to authenticate + // users as they access your application. // - // If the action type is authenticate-cognito, you can use Amazon Cognito to - // authenticate users as they access your application. + // [HTTPS listener] If the action type is authenticate-cognito, you can use + // Amazon Cognito to authenticate users as they access your application. + // + // [Application Load Balancer] If the action type is redirect, you can redirect + // HTTP and HTTPS requests. + // + // [Application Load Balancer] If the action type is fixed-response, you can + // return a custom HTTP response. DefaultActions []*Action `type:"list"` // The Amazon Resource Name (ARN) of the listener. @@ -6608,8 +6717,8 @@ type ModifyRuleInput struct { // // If the field name is host-header, you can specify a single host name (for // example, my.example.com). A host name is case insensitive, can be up to 128 - // characters in length, and can contain any of the following characters. Note - // that you can include up to three wildcard characters. + // characters in length, and can contain any of the following characters. You + // can include up to three wildcard characters. // // * A-Z, a-z, 0-9 // @@ -6620,9 +6729,9 @@ type ModifyRuleInput struct { // * ? (matches exactly 1 character) // // If the field name is path-pattern, you can specify a single path pattern. - // A path pattern is case sensitive, can be up to 128 characters in length, - // and can contain any of the following characters. Note that you can include - // up to three wildcard characters. + // A path pattern is case-sensitive, can be up to 128 characters in length, + // and can contain any of the following characters. You can include up to three + // wildcard characters. // // * A-Z, a-z, 0-9 // @@ -6794,8 +6903,8 @@ type ModifyTargetGroupInput struct { _ struct{} `type:"structure"` // The approximate amount of time, in seconds, between health checks of an individual - // target. For Application Load Balancers, the range is 5 to 300 seconds. For - // Network Load Balancers, the supported values are 10 or 30 seconds. + // target. For Application Load Balancers, the range is 5–300 seconds. For Network + // Load Balancers, the supported values are 10 or 30 seconds. HealthCheckIntervalSeconds *int64 `min:"5" type:"integer"` // [HTTP/HTTPS health checks] The ping path that is the destination for the @@ -6953,6 +7062,123 @@ func (s *ModifyTargetGroupOutput) SetTargetGroups(v []*TargetGroup) *ModifyTarge return s } +// Information about a redirect action. +// +// A URI consists of the following components: protocol://hostname:port/path?query. +// You must modify at least one of the following components to avoid a redirect +// loop: protocol, hostname, port, or path. Any components that you do not modify +// retain their original values. +// +// You can reuse URI components using the following reserved keywords: +// +// * #{protocol} +// +// * #{host} +// +// * #{port} +// +// * #{path} (the leading "/" is removed) +// +// * #{query} +// +// For example, you can change the path to "/new/#{path}", the hostname to "example.#{host}", +// or the query to "#{query}&value=xyz". +type RedirectActionConfig struct { + _ struct{} `type:"structure"` + + // The hostname. This component is not percent-encoded. The hostname can contain + // #{host}. + Host *string `min:"1" type:"string"` + + // The absolute path, starting with the leading "/". This component is not percent-encoded. + // The path can contain #{host}, #{path}, and #{port}. + Path *string `min:"1" type:"string"` + + // The port. You can specify a value from 1 to 65535 or #{port}. + Port *string `type:"string"` + + // The protocol. You can specify HTTP, HTTPS, or #{protocol}. You can redirect + // HTTP to HTTP, HTTP to HTTPS, and HTTPS to HTTPS. You cannot redirect HTTPS + // to HTTP. + Protocol *string `type:"string"` + + // The query parameters, URL-encoded when necessary, but not percent-encoded. + // Do not include the leading "?", as it is automatically added. You can specify + // any of the reserved keywords. + Query *string `type:"string"` + + // The HTTP redirect code. The redirect is either permanent (HTTP 301) or temporary + // (HTTP 302). + // + // StatusCode is a required field + StatusCode *string `type:"string" required:"true" enum:"RedirectActionStatusCodeEnum"` +} + +// String returns the string representation +func (s RedirectActionConfig) String() string { + return awsutil.Prettify(s) +} + +// GoString returns the string representation +func (s RedirectActionConfig) GoString() string { + return s.String() +} + +// Validate inspects the fields of the type to determine if they are valid. +func (s *RedirectActionConfig) Validate() error { + invalidParams := request.ErrInvalidParams{Context: "RedirectActionConfig"} + if s.Host != nil && len(*s.Host) < 1 { + invalidParams.Add(request.NewErrParamMinLen("Host", 1)) + } + if s.Path != nil && len(*s.Path) < 1 { + invalidParams.Add(request.NewErrParamMinLen("Path", 1)) + } + if s.StatusCode == nil { + invalidParams.Add(request.NewErrParamRequired("StatusCode")) + } + + if invalidParams.Len() > 0 { + return invalidParams + } + return nil +} + +// SetHost sets the Host field's value. +func (s *RedirectActionConfig) SetHost(v string) *RedirectActionConfig { + s.Host = &v + return s +} + +// SetPath sets the Path field's value. +func (s *RedirectActionConfig) SetPath(v string) *RedirectActionConfig { + s.Path = &v + return s +} + +// SetPort sets the Port field's value. +func (s *RedirectActionConfig) SetPort(v string) *RedirectActionConfig { + s.Port = &v + return s +} + +// SetProtocol sets the Protocol field's value. +func (s *RedirectActionConfig) SetProtocol(v string) *RedirectActionConfig { + s.Protocol = &v + return s +} + +// SetQuery sets the Query field's value. +func (s *RedirectActionConfig) SetQuery(v string) *RedirectActionConfig { + s.Query = &v + return s +} + +// SetStatusCode sets the StatusCode field's value. +func (s *RedirectActionConfig) SetStatusCode(v string) *RedirectActionConfig { + s.StatusCode = &v + return s +} + type RegisterTargetsInput struct { _ struct{} `type:"structure"` @@ -7232,8 +7458,8 @@ type RuleCondition struct { // // If the field name is host-header, you can specify a single host name (for // example, my.example.com). A host name is case insensitive, can be up to 128 - // characters in length, and can contain any of the following characters. Note - // that you can include up to three wildcard characters. + // characters in length, and can contain any of the following characters. You + // can include up to three wildcard characters. // // * A-Z, a-z, 0-9 // @@ -7244,9 +7470,9 @@ type RuleCondition struct { // * ? (matches exactly 1 character) // // If the field name is path-pattern, you can specify a single path pattern - // (for example, /img/*). A path pattern is case sensitive, can be up to 128 - // characters in length, and can contain any of the following characters. Note - // that you can include up to three wildcard characters. + // (for example, /img/*). A path pattern is case-sensitive, can be up to 128 + // characters in length, and can contain any of the following characters. You + // can include up to three wildcard characters. // // * A-Z, a-z, 0-9 // @@ -8226,6 +8452,12 @@ const ( // ActionTypeEnumAuthenticateCognito is a ActionTypeEnum enum value ActionTypeEnumAuthenticateCognito = "authenticate-cognito" + + // ActionTypeEnumRedirect is a ActionTypeEnum enum value + ActionTypeEnumRedirect = "redirect" + + // ActionTypeEnumFixedResponse is a ActionTypeEnum enum value + ActionTypeEnumFixedResponse = "fixed-response" ) const ( @@ -8299,6 +8531,14 @@ const ( ProtocolEnumTcp = "TCP" ) +const ( + // RedirectActionStatusCodeEnumHttp301 is a RedirectActionStatusCodeEnum enum value + RedirectActionStatusCodeEnumHttp301 = "HTTP_301" + + // RedirectActionStatusCodeEnumHttp302 is a RedirectActionStatusCodeEnum enum value + RedirectActionStatusCodeEnumHttp302 = "HTTP_302" +) + const ( // TargetHealthReasonEnumElbRegistrationInProgress is a TargetHealthReasonEnum enum value TargetHealthReasonEnumElbRegistrationInProgress = "Elb.RegistrationInProgress" diff --git a/vendor/github.com/aws/aws-sdk-go/service/emr/api.go b/vendor/github.com/aws/aws-sdk-go/service/emr/api.go index 12fe5fb54..7ca8a0e72 100644 --- a/vendor/github.com/aws/aws-sdk-go/service/emr/api.go +++ b/vendor/github.com/aws/aws-sdk-go/service/emr/api.go @@ -725,6 +725,8 @@ const opDescribeJobFlows = "DescribeJobFlows" // } // // See also, https://docs.aws.amazon.com/goto/WebAPI/elasticmapreduce-2009-03-31/DescribeJobFlows +// +// Deprecated: DescribeJobFlows has been deprecated func (c *EMR) DescribeJobFlowsRequest(input *DescribeJobFlowsInput) (req *request.Request, output *DescribeJobFlowsOutput) { if c.Client.Config.Logger != nil { c.Client.Config.Logger.Log("This operation, DescribeJobFlows, has been deprecated") @@ -780,6 +782,8 @@ func (c *EMR) DescribeJobFlowsRequest(input *DescribeJobFlowsInput) (req *reques // request was not completed. // // See also, https://docs.aws.amazon.com/goto/WebAPI/elasticmapreduce-2009-03-31/DescribeJobFlows +// +// Deprecated: DescribeJobFlows has been deprecated func (c *EMR) DescribeJobFlows(input *DescribeJobFlowsInput) (*DescribeJobFlowsOutput, error) { req, out := c.DescribeJobFlowsRequest(input) return out, req.Send() @@ -794,6 +798,8 @@ func (c *EMR) DescribeJobFlows(input *DescribeJobFlowsInput) (*DescribeJobFlowsO // the context is nil a panic will occur. In the future the SDK may create // sub-contexts for http.Requests. See https://golang.org/pkg/context/ // for more information on using Contexts. +// +// Deprecated: DescribeJobFlowsWithContext has been deprecated func (c *EMR) DescribeJobFlowsWithContext(ctx aws.Context, input *DescribeJobFlowsInput, opts ...request.Option) (*DescribeJobFlowsOutput, error) { req, out := c.DescribeJobFlowsRequest(input) req.SetContext(ctx) diff --git a/vendor/github.com/aws/aws-sdk-go/service/firehose/api.go b/vendor/github.com/aws/aws-sdk-go/service/firehose/api.go index 5718acff4..5c11bf73a 100644 --- a/vendor/github.com/aws/aws-sdk-go/service/firehose/api.go +++ b/vendor/github.com/aws/aws-sdk-go/service/firehose/api.go @@ -1282,6 +1282,8 @@ type CreateDeliveryStreamInput struct { RedshiftDestinationConfiguration *RedshiftDestinationConfiguration `type:"structure"` // [Deprecated] The destination in Amazon S3. You can specify only one destination. + // + // Deprecated: S3DestinationConfiguration has been deprecated S3DestinationConfiguration *S3DestinationConfiguration `deprecated:"true" type:"structure"` // The destination in Splunk. You can specify only one destination. @@ -5822,6 +5824,8 @@ type UpdateDestinationInput struct { RedshiftDestinationUpdate *RedshiftDestinationUpdate `type:"structure"` // [Deprecated] Describes an update for a destination in Amazon S3. + // + // Deprecated: S3DestinationUpdate has been deprecated S3DestinationUpdate *S3DestinationUpdate `deprecated:"true" type:"structure"` // Describes an update for a destination in Splunk. diff --git a/vendor/github.com/aws/aws-sdk-go/service/fms/api.go b/vendor/github.com/aws/aws-sdk-go/service/fms/api.go index 68169facc..86436aab3 100644 --- a/vendor/github.com/aws/aws-sdk-go/service/fms/api.go +++ b/vendor/github.com/aws/aws-sdk-go/service/fms/api.go @@ -60,13 +60,13 @@ func (c *FMS) AssociateAdminAccountRequest(input *AssociateAdminAccountInput) (r // AssociateAdminAccount API operation for Firewall Management Service. // // Sets the AWS Firewall Manager administrator account. AWS Firewall Manager -// must be associated with a master account in AWS Organizations or associated +// must be associated with the master account your AWS organization or associated // with a member account that has the appropriate permissions. If the account // ID that you submit is not an AWS Organizations master account, AWS Firewall // Manager will set the appropriate permissions for the given member account. // // The account that you associate with AWS Firewall Manager is called the AWS -// Firewall manager administrator account. +// Firewall Manager administrator account. // // Returns awserr.Error for service API and SDK errors. Use runtime type assertions // with awserr.Error's Code and Message methods to get detailed information about @@ -717,6 +717,9 @@ func (c *FMS) GetPolicyRequest(input *GetPolicyInput) (req *request.Request, out // The operation failed because of a system problem, even though the request // was valid. Retry your request. // +// * ErrCodeInvalidTypeException "InvalidTypeException" +// The value of the Type parameter is invalid. +// // See also, https://docs.aws.amazon.com/goto/WebAPI/fms-2018-01-01/GetPolicy func (c *FMS) GetPolicy(input *GetPolicyInput) (*GetPolicyOutput, error) { req, out := c.GetPolicyRequest(input) @@ -824,6 +827,93 @@ func (c *FMS) ListComplianceStatusWithContext(ctx aws.Context, input *ListCompli return out, req.Send() } +const opListMemberAccounts = "ListMemberAccounts" + +// ListMemberAccountsRequest generates a "aws/request.Request" representing the +// client's request for the ListMemberAccounts operation. The "output" return +// value will be populated with the request's response once the request completes +// successfuly. +// +// Use "Send" method on the returned Request to send the API call to the service. +// the "output" return value is not valid until after Send returns without error. +// +// See ListMemberAccounts for more information on using the ListMemberAccounts +// API call, and error handling. +// +// This method is useful when you want to inject custom logic or configuration +// into the SDK's request lifecycle. Such as custom headers, or retry logic. +// +// +// // Example sending a request using the ListMemberAccountsRequest method. +// req, resp := client.ListMemberAccountsRequest(params) +// +// err := req.Send() +// if err == nil { // resp is now filled +// fmt.Println(resp) +// } +// +// See also, https://docs.aws.amazon.com/goto/WebAPI/fms-2018-01-01/ListMemberAccounts +func (c *FMS) ListMemberAccountsRequest(input *ListMemberAccountsInput) (req *request.Request, output *ListMemberAccountsOutput) { + op := &request.Operation{ + Name: opListMemberAccounts, + HTTPMethod: "POST", + HTTPPath: "/", + } + + if input == nil { + input = &ListMemberAccountsInput{} + } + + output = &ListMemberAccountsOutput{} + req = c.newRequest(op, input, output) + return +} + +// ListMemberAccounts API operation for Firewall Management Service. +// +// Returns a MemberAccounts object that lists the member accounts in the administrator's +// AWS organization. +// +// The ListMemberAccounts must be submitted by the account that is set as the +// AWS Firewall Manager administrator. +// +// Returns awserr.Error for service API and SDK errors. Use runtime type assertions +// with awserr.Error's Code and Message methods to get detailed information about +// the error. +// +// See the AWS API reference guide for Firewall Management Service's +// API operation ListMemberAccounts for usage and error information. +// +// Returned Error Codes: +// * ErrCodeResourceNotFoundException "ResourceNotFoundException" +// The specified resource was not found. +// +// * ErrCodeInternalErrorException "InternalErrorException" +// The operation failed because of a system problem, even though the request +// was valid. Retry your request. +// +// See also, https://docs.aws.amazon.com/goto/WebAPI/fms-2018-01-01/ListMemberAccounts +func (c *FMS) ListMemberAccounts(input *ListMemberAccountsInput) (*ListMemberAccountsOutput, error) { + req, out := c.ListMemberAccountsRequest(input) + return out, req.Send() +} + +// ListMemberAccountsWithContext is the same as ListMemberAccounts with the addition of +// the ability to pass a context and additional request options. +// +// See ListMemberAccounts for details on how to use this API operation. +// +// The context must be non-nil and will be used for request cancellation. If +// the context is nil a panic will occur. In the future the SDK may create +// sub-contexts for http.Requests. See https://golang.org/pkg/context/ +// for more information on using Contexts. +func (c *FMS) ListMemberAccountsWithContext(ctx aws.Context, input *ListMemberAccountsInput, opts ...request.Option) (*ListMemberAccountsOutput, error) { + req, out := c.ListMemberAccountsRequest(input) + req.SetContext(ctx) + req.ApplyOptions(opts...) + return out, req.Send() +} + const opListPolicies = "ListPolicies" // ListPoliciesRequest generates a "aws/request.Request" representing the @@ -1074,10 +1164,19 @@ func (c *FMS) PutPolicyRequest(input *PutPolicyInput) (req *request.Request, out // * ErrCodeInvalidInputException "InvalidInputException" // The parameters of the request were invalid. // +// * ErrCodeLimitExceededException "LimitExceededException" +// The operation exceeds a resource limit, for example, the maximum number of +// policy objects that you can create for an AWS account. For more information, +// see Firewall Manager Limits (http://docs.aws.amazon.com/waf/latest/developerguide/fms-limits.html) +// in the AWS WAF Developer Guide. +// // * ErrCodeInternalErrorException "InternalErrorException" // The operation failed because of a system problem, even though the request // was valid. Retry your request. // +// * ErrCodeInvalidTypeException "InvalidTypeException" +// The value of the Type parameter is invalid. +// // See also, https://docs.aws.amazon.com/goto/WebAPI/fms-2018-01-01/PutPolicy func (c *FMS) PutPolicy(input *PutPolicyInput) (*PutPolicyOutput, error) { req, out := c.PutPolicyRequest(input) @@ -1379,6 +1478,9 @@ type GetAdminAccountOutput struct { // The AWS account that is set as the AWS Firewall Manager administrator. AdminAccount *string `min:"1" type:"string"` + + // The status of the AWS account that you set as the AWS Firewall Manager administrator. + RoleStatus *string `type:"string" enum:"AccountRoleStatus"` } // String returns the string representation @@ -1397,6 +1499,12 @@ func (s *GetAdminAccountOutput) SetAdminAccount(v string) *GetAdminAccountOutput return s } +// SetRoleStatus sets the RoleStatus field's value. +func (s *GetAdminAccountOutput) SetRoleStatus(v string) *GetAdminAccountOutput { + s.RoleStatus = &v + return s +} + type GetComplianceDetailInput struct { _ struct{} `type:"structure"` @@ -1710,6 +1818,98 @@ func (s *ListComplianceStatusOutput) SetPolicyComplianceStatusList(v []*PolicyCo return s } +type ListMemberAccountsInput struct { + _ struct{} `type:"structure"` + + // Specifies the number of member account IDs that you want AWS Firewall Manager + // to return for this request. If you have more IDs than the number that you + // specify for MaxResults, the response includes a NextToken value that you + // can use to get another batch of member account IDs. The maximum value for + // MaxResults is 100. + MaxResults *int64 `min:"1" type:"integer"` + + // If you specify a value for MaxResults and you have more account IDs than + // the number that you specify for MaxResults, AWS Firewall Manager returns + // a NextToken value in the response that allows you to list another group of + // IDs. For the second and subsequent ListMemberAccountsRequest requests, specify + // the value of NextToken from the previous response to get information about + // another batch of member account IDs. + NextToken *string `min:"1" type:"string"` +} + +// String returns the string representation +func (s ListMemberAccountsInput) String() string { + return awsutil.Prettify(s) +} + +// GoString returns the string representation +func (s ListMemberAccountsInput) GoString() string { + return s.String() +} + +// Validate inspects the fields of the type to determine if they are valid. +func (s *ListMemberAccountsInput) Validate() error { + invalidParams := request.ErrInvalidParams{Context: "ListMemberAccountsInput"} + if s.MaxResults != nil && *s.MaxResults < 1 { + invalidParams.Add(request.NewErrParamMinValue("MaxResults", 1)) + } + if s.NextToken != nil && len(*s.NextToken) < 1 { + invalidParams.Add(request.NewErrParamMinLen("NextToken", 1)) + } + + if invalidParams.Len() > 0 { + return invalidParams + } + return nil +} + +// SetMaxResults sets the MaxResults field's value. +func (s *ListMemberAccountsInput) SetMaxResults(v int64) *ListMemberAccountsInput { + s.MaxResults = &v + return s +} + +// SetNextToken sets the NextToken field's value. +func (s *ListMemberAccountsInput) SetNextToken(v string) *ListMemberAccountsInput { + s.NextToken = &v + return s +} + +type ListMemberAccountsOutput struct { + _ struct{} `type:"structure"` + + // An array of account IDs. + MemberAccounts []*string `type:"list"` + + // If you have more member account IDs than the number that you specified for + // MaxResults in the request, the response includes a NextToken value. To list + // more IDs, submit another ListMemberAccounts request, and specify the NextToken + // value from the response in the NextToken value in the next request. + NextToken *string `min:"1" type:"string"` +} + +// String returns the string representation +func (s ListMemberAccountsOutput) String() string { + return awsutil.Prettify(s) +} + +// GoString returns the string representation +func (s ListMemberAccountsOutput) GoString() string { + return s.String() +} + +// SetMemberAccounts sets the MemberAccounts field's value. +func (s *ListMemberAccountsOutput) SetMemberAccounts(v []*string) *ListMemberAccountsOutput { + s.MemberAccounts = v + return s +} + +// SetNextToken sets the NextToken field's value. +func (s *ListMemberAccountsOutput) SetNextToken(v string) *ListMemberAccountsOutput { + s.NextToken = &v + return s +} + type ListPoliciesInput struct { _ struct{} `type:"structure"` @@ -1806,6 +2006,15 @@ func (s *ListPoliciesOutput) SetPolicyList(v []*PolicySummary) *ListPoliciesOutp type Policy struct { _ struct{} `type:"structure"` + // Specifies the AWS account IDs to exclude from the policy. The IncludeMap + // values are evaluated first, with all of the appropriate account IDs added + // to the policy. Then the accounts listed in ExcludeMap are removed, resulting + // in the final list of accounts to add to the policy. + // + // The key to the map is ACCOUNT. For example, a valid ExcludeMap would be {“ACCOUNT” + // : [“accountID1”, “accountID2”]}. + ExcludeMap map[string][]*string `type:"map"` + // If set to True, resources with the tags that are specified in the ResourceTag // array are not protected by the policy. If set to False, and the ResourceTag // array is not null, only resources with the specified tags are associated @@ -1814,6 +2023,15 @@ type Policy struct { // ExcludeResourceTags is a required field ExcludeResourceTags *bool `type:"boolean" required:"true"` + // Specifies the AWS account IDs to include in the policy. If IncludeMap is + // null, all accounts in the AWS Organization are included in the policy. If + // IncludeMap is not null, only values listed in IncludeMap will be included + // in the policy. + // + // The key to the map is ACCOUNT. For example, a valid IncludeMap would be {“ACCOUNT” + // : [“accountID1”, “accountID2”]}. + IncludeMap map[string][]*string `type:"map"` + // The ID of the AWS Firewall Manager policy. PolicyId *string `min:"36" type:"string"` @@ -1912,12 +2130,24 @@ func (s *Policy) Validate() error { return nil } +// SetExcludeMap sets the ExcludeMap field's value. +func (s *Policy) SetExcludeMap(v map[string][]*string) *Policy { + s.ExcludeMap = v + return s +} + // SetExcludeResourceTags sets the ExcludeResourceTags field's value. func (s *Policy) SetExcludeResourceTags(v bool) *Policy { s.ExcludeResourceTags = &v return s } +// SetIncludeMap sets the IncludeMap field's value. +func (s *Policy) SetIncludeMap(v map[string][]*string) *Policy { + s.IncludeMap = v + return s +} + // SetPolicyId sets the PolicyId field's value. func (s *Policy) SetPolicyId(v string) *Policy { s.PolicyId = &v @@ -1974,6 +2204,12 @@ type PolicyComplianceDetail struct { // out-of-date. ExpiredAt *time.Time `type:"timestamp"` + // Details about problems with dependent services, such as AWS WAF or AWS Config, + // that are causing a resource to be non-compliant. The details include the + // name of the dependent service and the error message recieved indicating the + // problem with the service. + IssueInfoMap map[string]*string `type:"map"` + // The AWS account ID. MemberAccount *string `min:"1" type:"string"` @@ -2009,6 +2245,12 @@ func (s *PolicyComplianceDetail) SetExpiredAt(v time.Time) *PolicyComplianceDeta return s } +// SetIssueInfoMap sets the IssueInfoMap field's value. +func (s *PolicyComplianceDetail) SetIssueInfoMap(v map[string]*string) *PolicyComplianceDetail { + s.IssueInfoMap = v + return s +} + // SetMemberAccount sets the MemberAccount field's value. func (s *PolicyComplianceDetail) SetMemberAccount(v string) *PolicyComplianceDetail { s.MemberAccount = &v @@ -2042,6 +2284,12 @@ type PolicyComplianceStatus struct { // An array of EvaluationResult objects. EvaluationResults []*EvaluationResult `type:"list"` + // Details about problems with dependent services, such as AWS WAF or AWS Config, + // that are causing a resource to be non-compliant. The details include the + // name of the dependent service and the error message recieved indicating the + // problem with the service. + IssueInfoMap map[string]*string `type:"map"` + // Time stamp of the last update to the EvaluationResult objects. LastUpdated *time.Time `type:"timestamp"` @@ -2074,6 +2322,12 @@ func (s *PolicyComplianceStatus) SetEvaluationResults(v []*EvaluationResult) *Po return s } +// SetIssueInfoMap sets the IssueInfoMap field's value. +func (s *PolicyComplianceStatus) SetIssueInfoMap(v map[string]*string) *PolicyComplianceStatus { + s.IssueInfoMap = v + return s +} + // SetLastUpdated sets the LastUpdated field's value. func (s *PolicyComplianceStatus) SetLastUpdated(v time.Time) *PolicyComplianceStatus { s.LastUpdated = &v @@ -2441,6 +2695,36 @@ func (s *SecurityServicePolicyData) SetType(v string) *SecurityServicePolicyData return s } +const ( + // AccountRoleStatusReady is a AccountRoleStatus enum value + AccountRoleStatusReady = "READY" + + // AccountRoleStatusCreating is a AccountRoleStatus enum value + AccountRoleStatusCreating = "CREATING" + + // AccountRoleStatusPendingDeletion is a AccountRoleStatus enum value + AccountRoleStatusPendingDeletion = "PENDING_DELETION" + + // AccountRoleStatusDeleting is a AccountRoleStatus enum value + AccountRoleStatusDeleting = "DELETING" + + // AccountRoleStatusDeleted is a AccountRoleStatus enum value + AccountRoleStatusDeleted = "DELETED" +) + +const ( + // CustomerPolicyScopeIdTypeAccount is a CustomerPolicyScopeIdType enum value + CustomerPolicyScopeIdTypeAccount = "ACCOUNT" +) + +const ( + // DependentServiceNameAwsconfig is a DependentServiceName enum value + DependentServiceNameAwsconfig = "AWSCONFIG" + + // DependentServiceNameAwswaf is a DependentServiceName enum value + DependentServiceNameAwswaf = "AWSWAF" +) + const ( // PolicyComplianceStatusTypeCompliant is a PolicyComplianceStatusType enum value PolicyComplianceStatusTypeCompliant = "COMPLIANT" diff --git a/vendor/github.com/aws/aws-sdk-go/service/fms/errors.go b/vendor/github.com/aws/aws-sdk-go/service/fms/errors.go index f0a64c975..c63fd3c5b 100644 --- a/vendor/github.com/aws/aws-sdk-go/service/fms/errors.go +++ b/vendor/github.com/aws/aws-sdk-go/service/fms/errors.go @@ -25,6 +25,12 @@ const ( // you submitted was already set as the AWS Firewall Manager administrator. ErrCodeInvalidOperationException = "InvalidOperationException" + // ErrCodeInvalidTypeException for service response error code + // "InvalidTypeException". + // + // The value of the Type parameter is invalid. + ErrCodeInvalidTypeException = "InvalidTypeException" + // ErrCodeLimitExceededException for service response error code // "LimitExceededException". // diff --git a/vendor/github.com/aws/aws-sdk-go/service/glacier/api.go b/vendor/github.com/aws/aws-sdk-go/service/glacier/api.go index 8087df5f7..34050f7ce 100644 --- a/vendor/github.com/aws/aws-sdk-go/service/glacier/api.go +++ b/vendor/github.com/aws/aws-sdk-go/service/glacier/api.go @@ -2207,7 +2207,7 @@ func (c *Glacier) ListJobsRequest(input *ListJobsInput) (req *request.Request, o // List Jobs request. // // You can set a maximum limit for the number of jobs returned in the response -// by specifying the limit parameter in the request. The default limit is 1000. +// by specifying the limit parameter in the request. The default limit is 50. // The number of jobs returned might be fewer than the limit, but the number // of returned jobs never exceeds the limit. // @@ -2368,7 +2368,7 @@ func (c *Glacier) ListMultipartUploadsRequest(input *ListMultipartUploadsInput) // order. // // The List Multipart Uploads operation supports pagination. By default, this -// operation returns up to 1,000 multipart uploads in the response. You should +// operation returns up to 50 multipart uploads in the response. You should // always check the response for a marker at which to continue the list; if // there are no more items the marker is null. To return a list of multipart // uploads that begins at a specific upload, set the marker request parameter @@ -2539,7 +2539,7 @@ func (c *Glacier) ListPartsRequest(input *ListPartsInput) (req *request.Request, // List Parts response is sorted by part range. // // The List Parts operation supports pagination. By default, this operation -// returns up to 1,000 uploaded parts in the response. You should always check +// returns up to 50 uploaded parts in the response. You should always check // the response for a marker at which to continue the list; if there are no // more items the marker is null. To return a list of parts that begins at a // specific part, set the marker request parameter to the value you obtained @@ -2871,7 +2871,7 @@ func (c *Glacier) ListVaultsRequest(input *ListVaultsInput) (req *request.Reques // This operation lists all vaults owned by the calling user's account. The // list returned in the response is ASCII-sorted by vault name. // -// By default, this operation returns up to 1,000 items. If there are more vaults +// By default, this operation returns up to 10 items. If there are more vaults // to list, the response marker field contains the vault Amazon Resource Name // (ARN) at which to continue the list with a new List Vaults request; otherwise, // the marker field is null. To return a list of vaults that begins at a specific @@ -6569,9 +6569,9 @@ type ListJobsInput struct { // The state of the jobs to return. You can specify true or false. Completed *string `location:"querystring" locationName:"completed" type:"string"` - // The maximum number of jobs to be returned. The default limit is 1000. The - // number of jobs returned might be fewer than the specified limit, but the - // number of returned jobs never exceeds the limit. + // The maximum number of jobs to be returned. The default limit is 50. The number + // of jobs returned might be fewer than the specified limit, but the number + // of returned jobs never exceeds the limit. Limit *string `location:"querystring" locationName:"limit" type:"string"` // An opaque string used for pagination. This value specifies the job at which @@ -6703,7 +6703,7 @@ type ListMultipartUploadsInput struct { AccountId *string `location:"uri" locationName:"accountId" type:"string" required:"true"` // Specifies the maximum number of uploads returned in the response body. If - // this value is not specified, the List Uploads operation returns up to 1,000 + // this value is not specified, the List Uploads operation returns up to 50 // uploads. Limit *string `location:"querystring" locationName:"limit" type:"string"` @@ -6818,7 +6818,7 @@ type ListPartsInput struct { // AccountId is a required field AccountId *string `location:"uri" locationName:"accountId" type:"string" required:"true"` - // The maximum number of parts to be returned. The default limit is 1000. The + // The maximum number of parts to be returned. The default limit is 50. The // number of parts returned might be fewer than the specified limit, but the // number of returned parts never exceeds the limit. Limit *string `location:"querystring" locationName:"limit" type:"string"` @@ -7145,7 +7145,7 @@ type ListVaultsInput struct { // AccountId is a required field AccountId *string `location:"uri" locationName:"accountId" type:"string" required:"true"` - // The maximum number of vaults to be returned. The default limit is 1000. The + // The maximum number of vaults to be returned. The default limit is 10. The // number of vaults returned might be fewer than the specified limit, but the // number of returned vaults never exceeds the limit. Limit *string `location:"querystring" locationName:"limit" type:"string"` diff --git a/vendor/github.com/aws/aws-sdk-go/service/glacier/doc.go b/vendor/github.com/aws/aws-sdk-go/service/glacier/doc.go index 844805b42..80c74d848 100644 --- a/vendor/github.com/aws/aws-sdk-go/service/glacier/doc.go +++ b/vendor/github.com/aws/aws-sdk-go/service/glacier/doc.go @@ -13,11 +13,10 @@ // about capacity planning, hardware provisioning, data replication, hardware // failure and recovery, or time-consuming hardware migrations. // -// Amazon Glacier is a great storage choice when low storage cost is paramount, -// your data is rarely retrieved, and retrieval latency of several hours is -// acceptable. If your application requires fast or frequent access to your -// data, consider using Amazon S3. For more information, see Amazon Simple Storage -// Service (Amazon S3) (http://aws.amazon.com/s3/). +// Amazon Glacier is a great storage choice when low storage cost is paramount +// and your data is rarely retrieved. If your application requires fast or frequent +// access to your data, consider using Amazon S3. For more information, see +// Amazon Simple Storage Service (Amazon S3) (http://aws.amazon.com/s3/). // // You can store any kind of data in any format. There is no maximum limit on // the total amount of data you can store in Amazon Glacier. diff --git a/vendor/github.com/aws/aws-sdk-go/service/glue/api.go b/vendor/github.com/aws/aws-sdk-go/service/glue/api.go index 9f95a7710..83d1890b7 100644 --- a/vendor/github.com/aws/aws-sdk-go/service/glue/api.go +++ b/vendor/github.com/aws/aws-sdk-go/service/glue/api.go @@ -83,6 +83,9 @@ func (c *Glue) BatchCreatePartitionRequest(input *BatchCreatePartitionInput) (re // * ErrCodeOperationTimeoutException "OperationTimeoutException" // The operation timed out. // +// * ErrCodeEncryptionException "GlueEncryptionException" +// An encryption operation failed. +// // See also, https://docs.aws.amazon.com/goto/WebAPI/glue-2017-03-31/BatchCreatePartition func (c *Glue) BatchCreatePartition(input *BatchCreatePartitionInput) (*BatchCreatePartitionOutput, error) { req, out := c.BatchCreatePartitionRequest(input) @@ -321,6 +324,15 @@ func (c *Glue) BatchDeleteTableRequest(input *BatchDeleteTableInput) (req *reque // // Deletes multiple tables at once. // +// After completing this operation, you will no longer have access to the table +// versions and partitions that belong to the deleted table. AWS Glue deletes +// these "orphaned" resources asynchronously in a timely manner, at the discretion +// of the service. +// +// To ensure immediate deletion of all related resources, before calling BatchDeleteTable, +// use DeleteTableVersion or BatchDeleteTableVersion, and DeletePartition or +// BatchDeletePartition, to delete any resources that belong to the table. +// // Returns awserr.Error for service API and SDK errors. Use runtime type assertions // with awserr.Error's Code and Message methods to get detailed information about // the error. @@ -517,6 +529,9 @@ func (c *Glue) BatchGetPartitionRequest(input *BatchGetPartitionInput) (req *req // * ErrCodeInternalServiceException "InternalServiceException" // An internal service error occurred. // +// * ErrCodeEncryptionException "GlueEncryptionException" +// An encryption operation failed. +// // See also, https://docs.aws.amazon.com/goto/WebAPI/glue-2017-03-31/BatchGetPartition func (c *Glue) BatchGetPartition(input *BatchGetPartitionInput) (*BatchGetPartitionOutput, error) { req, out := c.BatchGetPartitionRequest(input) @@ -777,6 +792,9 @@ func (c *Glue) CreateConnectionRequest(input *CreateConnectionInput) (req *reque // * ErrCodeResourceNumberLimitExceededException "ResourceNumberLimitExceededException" // A resource numerical limit was exceeded. // +// * ErrCodeEncryptionException "GlueEncryptionException" +// An encryption operation failed. +// // See also, https://docs.aws.amazon.com/goto/WebAPI/glue-2017-03-31/CreateConnection func (c *Glue) CreateConnection(input *CreateConnectionInput) (*CreateConnectionOutput, error) { req, out := c.CreateConnectionRequest(input) @@ -958,6 +976,9 @@ func (c *Glue) CreateDatabaseRequest(input *CreateDatabaseInput) (req *request.R // * ErrCodeOperationTimeoutException "OperationTimeoutException" // The operation timed out. // +// * ErrCodeEncryptionException "GlueEncryptionException" +// An encryption operation failed. +// // See also, https://docs.aws.amazon.com/goto/WebAPI/glue-2017-03-31/CreateDatabase func (c *Glue) CreateDatabase(input *CreateDatabaseInput) (*CreateDatabaseOutput, error) { req, out := c.CreateDatabaseRequest(input) @@ -1249,6 +1270,9 @@ func (c *Glue) CreatePartitionRequest(input *CreatePartitionInput) (req *request // * ErrCodeOperationTimeoutException "OperationTimeoutException" // The operation timed out. // +// * ErrCodeEncryptionException "GlueEncryptionException" +// An encryption operation failed. +// // See also, https://docs.aws.amazon.com/goto/WebAPI/glue-2017-03-31/CreatePartition func (c *Glue) CreatePartition(input *CreatePartitionInput) (*CreatePartitionOutput, error) { req, out := c.CreatePartitionRequest(input) @@ -1356,6 +1380,97 @@ func (c *Glue) CreateScriptWithContext(ctx aws.Context, input *CreateScriptInput return out, req.Send() } +const opCreateSecurityConfiguration = "CreateSecurityConfiguration" + +// CreateSecurityConfigurationRequest generates a "aws/request.Request" representing the +// client's request for the CreateSecurityConfiguration operation. The "output" return +// value will be populated with the request's response once the request completes +// successfuly. +// +// Use "Send" method on the returned Request to send the API call to the service. +// the "output" return value is not valid until after Send returns without error. +// +// See CreateSecurityConfiguration for more information on using the CreateSecurityConfiguration +// API call, and error handling. +// +// This method is useful when you want to inject custom logic or configuration +// into the SDK's request lifecycle. Such as custom headers, or retry logic. +// +// +// // Example sending a request using the CreateSecurityConfigurationRequest method. +// req, resp := client.CreateSecurityConfigurationRequest(params) +// +// err := req.Send() +// if err == nil { // resp is now filled +// fmt.Println(resp) +// } +// +// See also, https://docs.aws.amazon.com/goto/WebAPI/glue-2017-03-31/CreateSecurityConfiguration +func (c *Glue) CreateSecurityConfigurationRequest(input *CreateSecurityConfigurationInput) (req *request.Request, output *CreateSecurityConfigurationOutput) { + op := &request.Operation{ + Name: opCreateSecurityConfiguration, + HTTPMethod: "POST", + HTTPPath: "/", + } + + if input == nil { + input = &CreateSecurityConfigurationInput{} + } + + output = &CreateSecurityConfigurationOutput{} + req = c.newRequest(op, input, output) + return +} + +// CreateSecurityConfiguration API operation for AWS Glue. +// +// Creates a new security configuration. +// +// Returns awserr.Error for service API and SDK errors. Use runtime type assertions +// with awserr.Error's Code and Message methods to get detailed information about +// the error. +// +// See the AWS API reference guide for AWS Glue's +// API operation CreateSecurityConfiguration for usage and error information. +// +// Returned Error Codes: +// * ErrCodeAlreadyExistsException "AlreadyExistsException" +// A resource to be created or added already exists. +// +// * ErrCodeInvalidInputException "InvalidInputException" +// The input provided was not valid. +// +// * ErrCodeInternalServiceException "InternalServiceException" +// An internal service error occurred. +// +// * ErrCodeOperationTimeoutException "OperationTimeoutException" +// The operation timed out. +// +// * ErrCodeResourceNumberLimitExceededException "ResourceNumberLimitExceededException" +// A resource numerical limit was exceeded. +// +// See also, https://docs.aws.amazon.com/goto/WebAPI/glue-2017-03-31/CreateSecurityConfiguration +func (c *Glue) CreateSecurityConfiguration(input *CreateSecurityConfigurationInput) (*CreateSecurityConfigurationOutput, error) { + req, out := c.CreateSecurityConfigurationRequest(input) + return out, req.Send() +} + +// CreateSecurityConfigurationWithContext is the same as CreateSecurityConfiguration with the addition of +// the ability to pass a context and additional request options. +// +// See CreateSecurityConfiguration for details on how to use this API operation. +// +// The context must be non-nil and will be used for request cancellation. If +// the context is nil a panic will occur. In the future the SDK may create +// sub-contexts for http.Requests. See https://golang.org/pkg/context/ +// for more information on using Contexts. +func (c *Glue) CreateSecurityConfigurationWithContext(ctx aws.Context, input *CreateSecurityConfigurationInput, opts ...request.Option) (*CreateSecurityConfigurationOutput, error) { + req, out := c.CreateSecurityConfigurationRequest(input) + req.SetContext(ctx) + req.ApplyOptions(opts...) + return out, req.Send() +} + const opCreateTable = "CreateTable" // CreateTableRequest generates a "aws/request.Request" representing the @@ -1428,6 +1543,9 @@ func (c *Glue) CreateTableRequest(input *CreateTableInput) (req *request.Request // * ErrCodeOperationTimeoutException "OperationTimeoutException" // The operation timed out. // +// * ErrCodeEncryptionException "GlueEncryptionException" +// An encryption operation failed. +// // See also, https://docs.aws.amazon.com/goto/WebAPI/glue-2017-03-31/CreateTable func (c *Glue) CreateTable(input *CreateTableInput) (*CreateTableOutput, error) { req, out := c.CreateTableRequest(input) @@ -1619,6 +1737,9 @@ func (c *Glue) CreateUserDefinedFunctionRequest(input *CreateUserDefinedFunction // * ErrCodeResourceNumberLimitExceededException "ResourceNumberLimitExceededException" // A resource numerical limit was exceeded. // +// * ErrCodeEncryptionException "GlueEncryptionException" +// An encryption operation failed. +// // See also, https://docs.aws.amazon.com/goto/WebAPI/glue-2017-03-31/CreateUserDefinedFunction func (c *Glue) CreateUserDefinedFunction(input *CreateUserDefinedFunctionInput) (*CreateUserDefinedFunctionOutput, error) { req, out := c.CreateUserDefinedFunctionRequest(input) @@ -1940,6 +2061,17 @@ func (c *Glue) DeleteDatabaseRequest(input *DeleteDatabaseInput) (req *request.R // // Removes a specified Database from a Data Catalog. // +// After completing this operation, you will no longer have access to the tables +// (and all table versions and partitions that might belong to the tables) and +// the user-defined functions in the deleted database. AWS Glue deletes these +// "orphaned" resources asynchronously in a timely manner, at the discretion +// of the service. +// +// To ensure immediate deletion of all related resources, before calling DeleteDatabase, +// use DeleteTableVersion or BatchDeleteTableVersion, DeletePartition or BatchDeletePartition, +// DeleteUserDefinedFunction, and DeleteTable or BatchDeleteTable, to delete +// any resources that belong to the database. +// // Returns awserr.Error for service API and SDK errors. Use runtime type assertions // with awserr.Error's Code and Message methods to get detailed information about // the error. @@ -2244,6 +2376,94 @@ func (c *Glue) DeletePartitionWithContext(ctx aws.Context, input *DeletePartitio return out, req.Send() } +const opDeleteSecurityConfiguration = "DeleteSecurityConfiguration" + +// DeleteSecurityConfigurationRequest generates a "aws/request.Request" representing the +// client's request for the DeleteSecurityConfiguration operation. The "output" return +// value will be populated with the request's response once the request completes +// successfuly. +// +// Use "Send" method on the returned Request to send the API call to the service. +// the "output" return value is not valid until after Send returns without error. +// +// See DeleteSecurityConfiguration for more information on using the DeleteSecurityConfiguration +// API call, and error handling. +// +// This method is useful when you want to inject custom logic or configuration +// into the SDK's request lifecycle. Such as custom headers, or retry logic. +// +// +// // Example sending a request using the DeleteSecurityConfigurationRequest method. +// req, resp := client.DeleteSecurityConfigurationRequest(params) +// +// err := req.Send() +// if err == nil { // resp is now filled +// fmt.Println(resp) +// } +// +// See also, https://docs.aws.amazon.com/goto/WebAPI/glue-2017-03-31/DeleteSecurityConfiguration +func (c *Glue) DeleteSecurityConfigurationRequest(input *DeleteSecurityConfigurationInput) (req *request.Request, output *DeleteSecurityConfigurationOutput) { + op := &request.Operation{ + Name: opDeleteSecurityConfiguration, + HTTPMethod: "POST", + HTTPPath: "/", + } + + if input == nil { + input = &DeleteSecurityConfigurationInput{} + } + + output = &DeleteSecurityConfigurationOutput{} + req = c.newRequest(op, input, output) + return +} + +// DeleteSecurityConfiguration API operation for AWS Glue. +// +// Deletes a specified security configuration. +// +// Returns awserr.Error for service API and SDK errors. Use runtime type assertions +// with awserr.Error's Code and Message methods to get detailed information about +// the error. +// +// See the AWS API reference guide for AWS Glue's +// API operation DeleteSecurityConfiguration for usage and error information. +// +// Returned Error Codes: +// * ErrCodeEntityNotFoundException "EntityNotFoundException" +// A specified entity does not exist +// +// * ErrCodeInvalidInputException "InvalidInputException" +// The input provided was not valid. +// +// * ErrCodeInternalServiceException "InternalServiceException" +// An internal service error occurred. +// +// * ErrCodeOperationTimeoutException "OperationTimeoutException" +// The operation timed out. +// +// See also, https://docs.aws.amazon.com/goto/WebAPI/glue-2017-03-31/DeleteSecurityConfiguration +func (c *Glue) DeleteSecurityConfiguration(input *DeleteSecurityConfigurationInput) (*DeleteSecurityConfigurationOutput, error) { + req, out := c.DeleteSecurityConfigurationRequest(input) + return out, req.Send() +} + +// DeleteSecurityConfigurationWithContext is the same as DeleteSecurityConfiguration with the addition of +// the ability to pass a context and additional request options. +// +// See DeleteSecurityConfiguration for details on how to use this API operation. +// +// The context must be non-nil and will be used for request cancellation. If +// the context is nil a panic will occur. In the future the SDK may create +// sub-contexts for http.Requests. See https://golang.org/pkg/context/ +// for more information on using Contexts. +func (c *Glue) DeleteSecurityConfigurationWithContext(ctx aws.Context, input *DeleteSecurityConfigurationInput, opts ...request.Option) (*DeleteSecurityConfigurationOutput, error) { + req, out := c.DeleteSecurityConfigurationRequest(input) + req.SetContext(ctx) + req.ApplyOptions(opts...) + return out, req.Send() +} + const opDeleteTable = "DeleteTable" // DeleteTableRequest generates a "aws/request.Request" representing the @@ -2290,6 +2510,15 @@ func (c *Glue) DeleteTableRequest(input *DeleteTableInput) (req *request.Request // // Removes a table definition from the Data Catalog. // +// After completing this operation, you will no longer have access to the table +// versions and partitions that belong to the deleted table. AWS Glue deletes +// these "orphaned" resources asynchronously in a timely manner, at the discretion +// of the service. +// +// To ensure immediate deletion of all related resources, before calling DeleteTable, +// use DeleteTableVersion or BatchDeleteTableVersion, and DeletePartition or +// BatchDeletePartition, to delete any resources that belong to the table. +// // Returns awserr.Error for service API and SDK errors. Use runtime type assertions // with awserr.Error's Code and Message methods to get detailed information about // the error. @@ -2956,6 +3185,12 @@ func (c *Glue) GetConnectionRequest(input *GetConnectionInput) (req *request.Req // * ErrCodeOperationTimeoutException "OperationTimeoutException" // The operation timed out. // +// * ErrCodeInvalidInputException "InvalidInputException" +// The input provided was not valid. +// +// * ErrCodeEncryptionException "GlueEncryptionException" +// An encryption operation failed. +// // See also, https://docs.aws.amazon.com/goto/WebAPI/glue-2017-03-31/GetConnection func (c *Glue) GetConnection(input *GetConnectionInput) (*GetConnectionOutput, error) { req, out := c.GetConnectionRequest(input) @@ -3044,6 +3279,12 @@ func (c *Glue) GetConnectionsRequest(input *GetConnectionsInput) (req *request.R // * ErrCodeOperationTimeoutException "OperationTimeoutException" // The operation timed out. // +// * ErrCodeInvalidInputException "InvalidInputException" +// The input provided was not valid. +// +// * ErrCodeEncryptionException "GlueEncryptionException" +// An encryption operation failed. +// // See also, https://docs.aws.amazon.com/goto/WebAPI/glue-2017-03-31/GetConnections func (c *Glue) GetConnections(input *GetConnectionsInput) (*GetConnectionsOutput, error) { req, out := c.GetConnectionsRequest(input) @@ -3468,6 +3709,91 @@ func (c *Glue) GetCrawlersPagesWithContext(ctx aws.Context, input *GetCrawlersIn return p.Err() } +const opGetDataCatalogEncryptionSettings = "GetDataCatalogEncryptionSettings" + +// GetDataCatalogEncryptionSettingsRequest generates a "aws/request.Request" representing the +// client's request for the GetDataCatalogEncryptionSettings operation. The "output" return +// value will be populated with the request's response once the request completes +// successfuly. +// +// Use "Send" method on the returned Request to send the API call to the service. +// the "output" return value is not valid until after Send returns without error. +// +// See GetDataCatalogEncryptionSettings for more information on using the GetDataCatalogEncryptionSettings +// API call, and error handling. +// +// This method is useful when you want to inject custom logic or configuration +// into the SDK's request lifecycle. Such as custom headers, or retry logic. +// +// +// // Example sending a request using the GetDataCatalogEncryptionSettingsRequest method. +// req, resp := client.GetDataCatalogEncryptionSettingsRequest(params) +// +// err := req.Send() +// if err == nil { // resp is now filled +// fmt.Println(resp) +// } +// +// See also, https://docs.aws.amazon.com/goto/WebAPI/glue-2017-03-31/GetDataCatalogEncryptionSettings +func (c *Glue) GetDataCatalogEncryptionSettingsRequest(input *GetDataCatalogEncryptionSettingsInput) (req *request.Request, output *GetDataCatalogEncryptionSettingsOutput) { + op := &request.Operation{ + Name: opGetDataCatalogEncryptionSettings, + HTTPMethod: "POST", + HTTPPath: "/", + } + + if input == nil { + input = &GetDataCatalogEncryptionSettingsInput{} + } + + output = &GetDataCatalogEncryptionSettingsOutput{} + req = c.newRequest(op, input, output) + return +} + +// GetDataCatalogEncryptionSettings API operation for AWS Glue. +// +// Retrieves the security configuration for a specified catalog. +// +// Returns awserr.Error for service API and SDK errors. Use runtime type assertions +// with awserr.Error's Code and Message methods to get detailed information about +// the error. +// +// See the AWS API reference guide for AWS Glue's +// API operation GetDataCatalogEncryptionSettings for usage and error information. +// +// Returned Error Codes: +// * ErrCodeInternalServiceException "InternalServiceException" +// An internal service error occurred. +// +// * ErrCodeInvalidInputException "InvalidInputException" +// The input provided was not valid. +// +// * ErrCodeOperationTimeoutException "OperationTimeoutException" +// The operation timed out. +// +// See also, https://docs.aws.amazon.com/goto/WebAPI/glue-2017-03-31/GetDataCatalogEncryptionSettings +func (c *Glue) GetDataCatalogEncryptionSettings(input *GetDataCatalogEncryptionSettingsInput) (*GetDataCatalogEncryptionSettingsOutput, error) { + req, out := c.GetDataCatalogEncryptionSettingsRequest(input) + return out, req.Send() +} + +// GetDataCatalogEncryptionSettingsWithContext is the same as GetDataCatalogEncryptionSettings with the addition of +// the ability to pass a context and additional request options. +// +// See GetDataCatalogEncryptionSettings for details on how to use this API operation. +// +// The context must be non-nil and will be used for request cancellation. If +// the context is nil a panic will occur. In the future the SDK may create +// sub-contexts for http.Requests. See https://golang.org/pkg/context/ +// for more information on using Contexts. +func (c *Glue) GetDataCatalogEncryptionSettingsWithContext(ctx aws.Context, input *GetDataCatalogEncryptionSettingsInput, opts ...request.Option) (*GetDataCatalogEncryptionSettingsOutput, error) { + req, out := c.GetDataCatalogEncryptionSettingsRequest(input) + req.SetContext(ctx) + req.ApplyOptions(opts...) + return out, req.Send() +} + const opGetDatabase = "GetDatabase" // GetDatabaseRequest generates a "aws/request.Request" representing the @@ -3534,6 +3860,9 @@ func (c *Glue) GetDatabaseRequest(input *GetDatabaseInput) (req *request.Request // * ErrCodeOperationTimeoutException "OperationTimeoutException" // The operation timed out. // +// * ErrCodeEncryptionException "GlueEncryptionException" +// An encryption operation failed. +// // See also, https://docs.aws.amazon.com/goto/WebAPI/glue-2017-03-31/GetDatabase func (c *Glue) GetDatabase(input *GetDatabaseInput) (*GetDatabaseOutput, error) { req, out := c.GetDatabaseRequest(input) @@ -3625,6 +3954,9 @@ func (c *Glue) GetDatabasesRequest(input *GetDatabasesInput) (req *request.Reque // * ErrCodeOperationTimeoutException "OperationTimeoutException" // The operation timed out. // +// * ErrCodeEncryptionException "GlueEncryptionException" +// An encryption operation failed. +// // See also, https://docs.aws.amazon.com/goto/WebAPI/glue-2017-03-31/GetDatabases func (c *Glue) GetDatabases(input *GetDatabasesInput) (*GetDatabasesOutput, error) { req, out := c.GetDatabasesRequest(input) @@ -4632,6 +4964,9 @@ func (c *Glue) GetPartitionRequest(input *GetPartitionInput) (req *request.Reque // * ErrCodeOperationTimeoutException "OperationTimeoutException" // The operation timed out. // +// * ErrCodeEncryptionException "GlueEncryptionException" +// An encryption operation failed. +// // See also, https://docs.aws.amazon.com/goto/WebAPI/glue-2017-03-31/GetPartition func (c *Glue) GetPartition(input *GetPartitionInput) (*GetPartitionOutput, error) { req, out := c.GetPartitionRequest(input) @@ -4726,6 +5061,9 @@ func (c *Glue) GetPartitionsRequest(input *GetPartitionsInput) (req *request.Req // * ErrCodeInternalServiceException "InternalServiceException" // An internal service error occurred. // +// * ErrCodeEncryptionException "GlueEncryptionException" +// An encryption operation failed. +// // See also, https://docs.aws.amazon.com/goto/WebAPI/glue-2017-03-31/GetPartitions func (c *Glue) GetPartitions(input *GetPartitionsInput) (*GetPartitionsOutput, error) { req, out := c.GetPartitionsRequest(input) @@ -4883,6 +5221,182 @@ func (c *Glue) GetPlanWithContext(ctx aws.Context, input *GetPlanInput, opts ... return out, req.Send() } +const opGetSecurityConfiguration = "GetSecurityConfiguration" + +// GetSecurityConfigurationRequest generates a "aws/request.Request" representing the +// client's request for the GetSecurityConfiguration operation. The "output" return +// value will be populated with the request's response once the request completes +// successfuly. +// +// Use "Send" method on the returned Request to send the API call to the service. +// the "output" return value is not valid until after Send returns without error. +// +// See GetSecurityConfiguration for more information on using the GetSecurityConfiguration +// API call, and error handling. +// +// This method is useful when you want to inject custom logic or configuration +// into the SDK's request lifecycle. Such as custom headers, or retry logic. +// +// +// // Example sending a request using the GetSecurityConfigurationRequest method. +// req, resp := client.GetSecurityConfigurationRequest(params) +// +// err := req.Send() +// if err == nil { // resp is now filled +// fmt.Println(resp) +// } +// +// See also, https://docs.aws.amazon.com/goto/WebAPI/glue-2017-03-31/GetSecurityConfiguration +func (c *Glue) GetSecurityConfigurationRequest(input *GetSecurityConfigurationInput) (req *request.Request, output *GetSecurityConfigurationOutput) { + op := &request.Operation{ + Name: opGetSecurityConfiguration, + HTTPMethod: "POST", + HTTPPath: "/", + } + + if input == nil { + input = &GetSecurityConfigurationInput{} + } + + output = &GetSecurityConfigurationOutput{} + req = c.newRequest(op, input, output) + return +} + +// GetSecurityConfiguration API operation for AWS Glue. +// +// Retrieves a specified security configuration. +// +// Returns awserr.Error for service API and SDK errors. Use runtime type assertions +// with awserr.Error's Code and Message methods to get detailed information about +// the error. +// +// See the AWS API reference guide for AWS Glue's +// API operation GetSecurityConfiguration for usage and error information. +// +// Returned Error Codes: +// * ErrCodeEntityNotFoundException "EntityNotFoundException" +// A specified entity does not exist +// +// * ErrCodeInvalidInputException "InvalidInputException" +// The input provided was not valid. +// +// * ErrCodeInternalServiceException "InternalServiceException" +// An internal service error occurred. +// +// * ErrCodeOperationTimeoutException "OperationTimeoutException" +// The operation timed out. +// +// See also, https://docs.aws.amazon.com/goto/WebAPI/glue-2017-03-31/GetSecurityConfiguration +func (c *Glue) GetSecurityConfiguration(input *GetSecurityConfigurationInput) (*GetSecurityConfigurationOutput, error) { + req, out := c.GetSecurityConfigurationRequest(input) + return out, req.Send() +} + +// GetSecurityConfigurationWithContext is the same as GetSecurityConfiguration with the addition of +// the ability to pass a context and additional request options. +// +// See GetSecurityConfiguration for details on how to use this API operation. +// +// The context must be non-nil and will be used for request cancellation. If +// the context is nil a panic will occur. In the future the SDK may create +// sub-contexts for http.Requests. See https://golang.org/pkg/context/ +// for more information on using Contexts. +func (c *Glue) GetSecurityConfigurationWithContext(ctx aws.Context, input *GetSecurityConfigurationInput, opts ...request.Option) (*GetSecurityConfigurationOutput, error) { + req, out := c.GetSecurityConfigurationRequest(input) + req.SetContext(ctx) + req.ApplyOptions(opts...) + return out, req.Send() +} + +const opGetSecurityConfigurations = "GetSecurityConfigurations" + +// GetSecurityConfigurationsRequest generates a "aws/request.Request" representing the +// client's request for the GetSecurityConfigurations operation. The "output" return +// value will be populated with the request's response once the request completes +// successfuly. +// +// Use "Send" method on the returned Request to send the API call to the service. +// the "output" return value is not valid until after Send returns without error. +// +// See GetSecurityConfigurations for more information on using the GetSecurityConfigurations +// API call, and error handling. +// +// This method is useful when you want to inject custom logic or configuration +// into the SDK's request lifecycle. Such as custom headers, or retry logic. +// +// +// // Example sending a request using the GetSecurityConfigurationsRequest method. +// req, resp := client.GetSecurityConfigurationsRequest(params) +// +// err := req.Send() +// if err == nil { // resp is now filled +// fmt.Println(resp) +// } +// +// See also, https://docs.aws.amazon.com/goto/WebAPI/glue-2017-03-31/GetSecurityConfigurations +func (c *Glue) GetSecurityConfigurationsRequest(input *GetSecurityConfigurationsInput) (req *request.Request, output *GetSecurityConfigurationsOutput) { + op := &request.Operation{ + Name: opGetSecurityConfigurations, + HTTPMethod: "POST", + HTTPPath: "/", + } + + if input == nil { + input = &GetSecurityConfigurationsInput{} + } + + output = &GetSecurityConfigurationsOutput{} + req = c.newRequest(op, input, output) + return +} + +// GetSecurityConfigurations API operation for AWS Glue. +// +// Retrieves a list of all security configurations. +// +// Returns awserr.Error for service API and SDK errors. Use runtime type assertions +// with awserr.Error's Code and Message methods to get detailed information about +// the error. +// +// See the AWS API reference guide for AWS Glue's +// API operation GetSecurityConfigurations for usage and error information. +// +// Returned Error Codes: +// * ErrCodeEntityNotFoundException "EntityNotFoundException" +// A specified entity does not exist +// +// * ErrCodeInvalidInputException "InvalidInputException" +// The input provided was not valid. +// +// * ErrCodeInternalServiceException "InternalServiceException" +// An internal service error occurred. +// +// * ErrCodeOperationTimeoutException "OperationTimeoutException" +// The operation timed out. +// +// See also, https://docs.aws.amazon.com/goto/WebAPI/glue-2017-03-31/GetSecurityConfigurations +func (c *Glue) GetSecurityConfigurations(input *GetSecurityConfigurationsInput) (*GetSecurityConfigurationsOutput, error) { + req, out := c.GetSecurityConfigurationsRequest(input) + return out, req.Send() +} + +// GetSecurityConfigurationsWithContext is the same as GetSecurityConfigurations with the addition of +// the ability to pass a context and additional request options. +// +// See GetSecurityConfigurations for details on how to use this API operation. +// +// The context must be non-nil and will be used for request cancellation. If +// the context is nil a panic will occur. In the future the SDK may create +// sub-contexts for http.Requests. See https://golang.org/pkg/context/ +// for more information on using Contexts. +func (c *Glue) GetSecurityConfigurationsWithContext(ctx aws.Context, input *GetSecurityConfigurationsInput, opts ...request.Option) (*GetSecurityConfigurationsOutput, error) { + req, out := c.GetSecurityConfigurationsRequest(input) + req.SetContext(ctx) + req.ApplyOptions(opts...) + return out, req.Send() +} + const opGetTable = "GetTable" // GetTableRequest generates a "aws/request.Request" representing the @@ -4949,6 +5463,9 @@ func (c *Glue) GetTableRequest(input *GetTableInput) (req *request.Request, outp // * ErrCodeOperationTimeoutException "OperationTimeoutException" // The operation timed out. // +// * ErrCodeEncryptionException "GlueEncryptionException" +// An encryption operation failed. +// // See also, https://docs.aws.amazon.com/goto/WebAPI/glue-2017-03-31/GetTable func (c *Glue) GetTable(input *GetTableInput) (*GetTableOutput, error) { req, out := c.GetTableRequest(input) @@ -5037,6 +5554,9 @@ func (c *Glue) GetTableVersionRequest(input *GetTableVersionInput) (req *request // * ErrCodeOperationTimeoutException "OperationTimeoutException" // The operation timed out. // +// * ErrCodeEncryptionException "GlueEncryptionException" +// An encryption operation failed. +// // See also, https://docs.aws.amazon.com/goto/WebAPI/glue-2017-03-31/GetTableVersion func (c *Glue) GetTableVersion(input *GetTableVersionInput) (*GetTableVersionOutput, error) { req, out := c.GetTableVersionRequest(input) @@ -5132,6 +5652,9 @@ func (c *Glue) GetTableVersionsRequest(input *GetTableVersionsInput) (req *reque // * ErrCodeOperationTimeoutException "OperationTimeoutException" // The operation timed out. // +// * ErrCodeEncryptionException "GlueEncryptionException" +// An encryption operation failed. +// // See also, https://docs.aws.amazon.com/goto/WebAPI/glue-2017-03-31/GetTableVersions func (c *Glue) GetTableVersions(input *GetTableVersionsInput) (*GetTableVersionsOutput, error) { req, out := c.GetTableVersionsRequest(input) @@ -5276,6 +5799,9 @@ func (c *Glue) GetTablesRequest(input *GetTablesInput) (req *request.Request, ou // * ErrCodeInternalServiceException "InternalServiceException" // An internal service error occurred. // +// * ErrCodeEncryptionException "GlueEncryptionException" +// An encryption operation failed. +// // See also, https://docs.aws.amazon.com/goto/WebAPI/glue-2017-03-31/GetTables func (c *Glue) GetTables(input *GetTablesInput) (*GetTablesOutput, error) { req, out := c.GetTablesRequest(input) @@ -5646,6 +6172,9 @@ func (c *Glue) GetUserDefinedFunctionRequest(input *GetUserDefinedFunctionInput) // * ErrCodeOperationTimeoutException "OperationTimeoutException" // The operation timed out. // +// * ErrCodeEncryptionException "GlueEncryptionException" +// An encryption operation failed. +// // See also, https://docs.aws.amazon.com/goto/WebAPI/glue-2017-03-31/GetUserDefinedFunction func (c *Glue) GetUserDefinedFunction(input *GetUserDefinedFunctionInput) (*GetUserDefinedFunctionOutput, error) { req, out := c.GetUserDefinedFunctionRequest(input) @@ -5740,6 +6269,9 @@ func (c *Glue) GetUserDefinedFunctionsRequest(input *GetUserDefinedFunctionsInpu // * ErrCodeInternalServiceException "InternalServiceException" // An internal service error occurred. // +// * ErrCodeEncryptionException "GlueEncryptionException" +// An encryption operation failed. +// // See also, https://docs.aws.amazon.com/goto/WebAPI/glue-2017-03-31/GetUserDefinedFunctions func (c *Glue) GetUserDefinedFunctions(input *GetUserDefinedFunctionsInput) (*GetUserDefinedFunctionsOutput, error) { req, out := c.GetUserDefinedFunctionsRequest(input) @@ -5894,6 +6426,93 @@ func (c *Glue) ImportCatalogToGlueWithContext(ctx aws.Context, input *ImportCata return out, req.Send() } +const opPutDataCatalogEncryptionSettings = "PutDataCatalogEncryptionSettings" + +// PutDataCatalogEncryptionSettingsRequest generates a "aws/request.Request" representing the +// client's request for the PutDataCatalogEncryptionSettings operation. The "output" return +// value will be populated with the request's response once the request completes +// successfuly. +// +// Use "Send" method on the returned Request to send the API call to the service. +// the "output" return value is not valid until after Send returns without error. +// +// See PutDataCatalogEncryptionSettings for more information on using the PutDataCatalogEncryptionSettings +// API call, and error handling. +// +// This method is useful when you want to inject custom logic or configuration +// into the SDK's request lifecycle. Such as custom headers, or retry logic. +// +// +// // Example sending a request using the PutDataCatalogEncryptionSettingsRequest method. +// req, resp := client.PutDataCatalogEncryptionSettingsRequest(params) +// +// err := req.Send() +// if err == nil { // resp is now filled +// fmt.Println(resp) +// } +// +// See also, https://docs.aws.amazon.com/goto/WebAPI/glue-2017-03-31/PutDataCatalogEncryptionSettings +func (c *Glue) PutDataCatalogEncryptionSettingsRequest(input *PutDataCatalogEncryptionSettingsInput) (req *request.Request, output *PutDataCatalogEncryptionSettingsOutput) { + op := &request.Operation{ + Name: opPutDataCatalogEncryptionSettings, + HTTPMethod: "POST", + HTTPPath: "/", + } + + if input == nil { + input = &PutDataCatalogEncryptionSettingsInput{} + } + + output = &PutDataCatalogEncryptionSettingsOutput{} + req = c.newRequest(op, input, output) + return +} + +// PutDataCatalogEncryptionSettings API operation for AWS Glue. +// +// Sets the security configuration for a specified catalog. Once the configuration +// has been set, the specified encryption is applied to every catalog write +// thereafter. +// +// Returns awserr.Error for service API and SDK errors. Use runtime type assertions +// with awserr.Error's Code and Message methods to get detailed information about +// the error. +// +// See the AWS API reference guide for AWS Glue's +// API operation PutDataCatalogEncryptionSettings for usage and error information. +// +// Returned Error Codes: +// * ErrCodeInternalServiceException "InternalServiceException" +// An internal service error occurred. +// +// * ErrCodeInvalidInputException "InvalidInputException" +// The input provided was not valid. +// +// * ErrCodeOperationTimeoutException "OperationTimeoutException" +// The operation timed out. +// +// See also, https://docs.aws.amazon.com/goto/WebAPI/glue-2017-03-31/PutDataCatalogEncryptionSettings +func (c *Glue) PutDataCatalogEncryptionSettings(input *PutDataCatalogEncryptionSettingsInput) (*PutDataCatalogEncryptionSettingsOutput, error) { + req, out := c.PutDataCatalogEncryptionSettingsRequest(input) + return out, req.Send() +} + +// PutDataCatalogEncryptionSettingsWithContext is the same as PutDataCatalogEncryptionSettings with the addition of +// the ability to pass a context and additional request options. +// +// See PutDataCatalogEncryptionSettings for details on how to use this API operation. +// +// The context must be non-nil and will be used for request cancellation. If +// the context is nil a panic will occur. In the future the SDK may create +// sub-contexts for http.Requests. See https://golang.org/pkg/context/ +// for more information on using Contexts. +func (c *Glue) PutDataCatalogEncryptionSettingsWithContext(ctx aws.Context, input *PutDataCatalogEncryptionSettingsInput, opts ...request.Option) (*PutDataCatalogEncryptionSettingsOutput, error) { + req, out := c.PutDataCatalogEncryptionSettingsRequest(input) + req.SetContext(ctx) + req.ApplyOptions(opts...) + return out, req.Send() +} + const opResetJobBookmark = "ResetJobBookmark" // ResetJobBookmarkRequest generates a "aws/request.Request" representing the @@ -6769,6 +7388,12 @@ func (c *Glue) UpdateConnectionRequest(input *UpdateConnectionInput) (req *reque // * ErrCodeOperationTimeoutException "OperationTimeoutException" // The operation timed out. // +// * ErrCodeInvalidInputException "InvalidInputException" +// The input provided was not valid. +// +// * ErrCodeEncryptionException "GlueEncryptionException" +// An encryption operation failed. +// // See also, https://docs.aws.amazon.com/goto/WebAPI/glue-2017-03-31/UpdateConnection func (c *Glue) UpdateConnection(input *UpdateConnectionInput) (*UpdateConnectionOutput, error) { req, out := c.UpdateConnectionRequest(input) @@ -7040,6 +7665,9 @@ func (c *Glue) UpdateDatabaseRequest(input *UpdateDatabaseInput) (req *request.R // * ErrCodeOperationTimeoutException "OperationTimeoutException" // The operation timed out. // +// * ErrCodeEncryptionException "GlueEncryptionException" +// An encryption operation failed. +// // See also, https://docs.aws.amazon.com/goto/WebAPI/glue-2017-03-31/UpdateDatabase func (c *Glue) UpdateDatabase(input *UpdateDatabaseInput) (*UpdateDatabaseOutput, error) { req, out := c.UpdateDatabaseRequest(input) @@ -7310,6 +7938,9 @@ func (c *Glue) UpdatePartitionRequest(input *UpdatePartitionInput) (req *request // * ErrCodeOperationTimeoutException "OperationTimeoutException" // The operation timed out. // +// * ErrCodeEncryptionException "GlueEncryptionException" +// An encryption operation failed. +// // See also, https://docs.aws.amazon.com/goto/WebAPI/glue-2017-03-31/UpdatePartition func (c *Glue) UpdatePartition(input *UpdatePartitionInput) (*UpdatePartitionOutput, error) { req, out := c.UpdatePartitionRequest(input) @@ -7404,6 +8035,9 @@ func (c *Glue) UpdateTableRequest(input *UpdateTableInput) (req *request.Request // * ErrCodeResourceNumberLimitExceededException "ResourceNumberLimitExceededException" // A resource numerical limit was exceeded. // +// * ErrCodeEncryptionException "GlueEncryptionException" +// An encryption operation failed. +// // See also, https://docs.aws.amazon.com/goto/WebAPI/glue-2017-03-31/UpdateTable func (c *Glue) UpdateTable(input *UpdateTableInput) (*UpdateTableOutput, error) { req, out := c.UpdateTableRequest(input) @@ -7583,6 +8217,9 @@ func (c *Glue) UpdateUserDefinedFunctionRequest(input *UpdateUserDefinedFunction // * ErrCodeOperationTimeoutException "OperationTimeoutException" // The operation timed out. // +// * ErrCodeEncryptionException "GlueEncryptionException" +// An encryption operation failed. +// // See also, https://docs.aws.amazon.com/goto/WebAPI/glue-2017-03-31/UpdateUserDefinedFunction func (c *Glue) UpdateUserDefinedFunction(input *UpdateUserDefinedFunctionInput) (*UpdateUserDefinedFunctionOutput, error) { req, out := c.UpdateUserDefinedFunctionRequest(input) @@ -7609,7 +8246,7 @@ func (c *Glue) UpdateUserDefinedFunctionWithContext(ctx aws.Context, input *Upda type Action struct { _ struct{} `type:"structure"` - // Arguments to be passed to the job. + // Arguments to be passed to the job run. // // You can specify arguments here that your own job-execution script consumes, // as well as arguments that AWS Glue itself consumes. @@ -7629,7 +8266,13 @@ type Action struct { // Specifies configuration properties of a job run notification. NotificationProperty *NotificationProperty `type:"structure"` - // The job run timeout in minutes. It overrides the timeout value of the job. + // The name of the SecurityConfiguration structure to be used with this action. + SecurityConfiguration *string `min:"1" type:"string"` + + // The JobRun timeout in minutes. This is the maximum time that a job run can + // consume resources before it is terminated and enters TIMEOUT status. The + // default is 2,880 minutes (48 hours). This overrides the timeout value set + // in the parent job. Timeout *int64 `min:"1" type:"integer"` } @@ -7649,6 +8292,9 @@ func (s *Action) Validate() error { if s.JobName != nil && len(*s.JobName) < 1 { invalidParams.Add(request.NewErrParamMinLen("JobName", 1)) } + if s.SecurityConfiguration != nil && len(*s.SecurityConfiguration) < 1 { + invalidParams.Add(request.NewErrParamMinLen("SecurityConfiguration", 1)) + } if s.Timeout != nil && *s.Timeout < 1 { invalidParams.Add(request.NewErrParamMinValue("Timeout", 1)) } @@ -7682,6 +8328,12 @@ func (s *Action) SetNotificationProperty(v *NotificationProperty) *Action { return s } +// SetSecurityConfiguration sets the SecurityConfiguration field's value. +func (s *Action) SetSecurityConfiguration(v string) *Action { + s.SecurityConfiguration = &v + return s +} + // SetTimeout sets the Timeout field's value. func (s *Action) SetTimeout(v int64) *Action { s.Timeout = &v @@ -8654,6 +9306,39 @@ func (s *Classifier) SetXMLClassifier(v *XMLClassifier) *Classifier { return s } +// Specifies how CloudWatch data should be encrypted. +type CloudWatchEncryption struct { + _ struct{} `type:"structure"` + + // The encryption mode to use for CloudWatch data. + CloudWatchEncryptionMode *string `type:"string" enum:"CloudWatchEncryptionMode"` + + // The AWS ARN of the KMS key to be used to encrypt the data. + KmsKeyArn *string `type:"string"` +} + +// String returns the string representation +func (s CloudWatchEncryption) String() string { + return awsutil.Prettify(s) +} + +// GoString returns the string representation +func (s CloudWatchEncryption) GoString() string { + return s.String() +} + +// SetCloudWatchEncryptionMode sets the CloudWatchEncryptionMode field's value. +func (s *CloudWatchEncryption) SetCloudWatchEncryptionMode(v string) *CloudWatchEncryption { + s.CloudWatchEncryptionMode = &v + return s +} + +// SetKmsKeyArn sets the KmsKeyArn field's value. +func (s *CloudWatchEncryption) SetKmsKeyArn(v string) *CloudWatchEncryption { + s.KmsKeyArn = &v + return s +} + // Represents a directional edge in a directed acyclic graph (DAG). type CodeGenEdge struct { _ struct{} `type:"structure"` @@ -8994,7 +9679,36 @@ func (s *Condition) SetState(v string) *Condition { type Connection struct { _ struct{} `type:"structure"` - // A list of key-value pairs used as parameters for this connection. + // These key-value pairs define parameters for the connection: + // + // * HOST - The host URI: either the fully qualified domain name (FQDN) or + // the IPv4 address of the database host. + // + // * PORT - The port number, between 1024 and 65535, of the port on which + // the database host is listening for database connections. + // + // * USER_NAME - The name under which to log in to the database. + // + // * PASSWORD - A password, if one is used, for the user name. + // + // * JDBC_DRIVER_JAR_URI - The S3 path of the a jar file that contains the + // JDBC driver to use. + // + // * JDBC_DRIVER_CLASS_NAME - The class name of the JDBC driver to use. + // + // * JDBC_ENGINE - The name of the JDBC engine to use. + // + // * JDBC_ENGINE_VERSION - The version of the JDBC engine to use. + // + // * CONFIG_FILES - (Reserved for future use). + // + // * INSTANCE_ID - The instance ID to use. + // + // * JDBC_CONNECTION_URL - The URL for the JDBC connection. + // + // * JDBC_ENFORCE_SSL - A Boolean string (true, false) specifying whether + // SSL with hostname matching will be enforced for the JDBC connection on + // the client. The default is false. ConnectionProperties map[string]*string `type:"map"` // The type of the connection. Currently, only JDBC is supported; SFTP is not @@ -9092,7 +9806,7 @@ func (s *Connection) SetPhysicalConnectionRequirements(v *PhysicalConnectionRequ type ConnectionInput struct { _ struct{} `type:"structure"` - // A list of key-value pairs used as parameters for this connection. + // These key-value pairs define parameters for the connection. // // ConnectionProperties is a required field ConnectionProperties map[string]*string `type:"map" required:"true"` @@ -9226,14 +9940,24 @@ type Crawler struct { Classifiers []*string `type:"list"` // Crawler configuration information. This versioned JSON string allows users - // to specify aspects of a crawler's behavior. For more information, see Configuring - // a Crawler (http://docs.aws.amazon.com/glue/latest/dg/crawler-configuration.html). + // to specify aspects of a Crawler's behavior. + // + // You can use this field to force partitions to inherit metadata such as classification, + // input format, output format, serde information, and schema from their parent + // table, rather than detect this information separately for each partition. + // Use the following JSON string to specify that behavior: + // + // Example: '{ "Version": 1.0, "CrawlerOutput": { "Partitions": { "AddOrUpdateBehavior": + // "InheritFromTable" } } }' Configuration *string `type:"string"` // If the crawler is running, contains the total time elapsed since the last // crawl began. CrawlElapsedTime *int64 `type:"long"` + // The name of the SecurityConfiguration structure to be used by this Crawler. + CrawlerSecurityConfiguration *string `type:"string"` + // The time when the crawler was created. CreationTime *time.Time `type:"timestamp"` @@ -9304,6 +10028,12 @@ func (s *Crawler) SetCrawlElapsedTime(v int64) *Crawler { return s } +// SetCrawlerSecurityConfiguration sets the CrawlerSecurityConfiguration field's value. +func (s *Crawler) SetCrawlerSecurityConfiguration(v string) *Crawler { + s.CrawlerSecurityConfiguration = &v + return s +} + // SetCreationTime sets the CreationTime field's value. func (s *Crawler) SetCreationTime(v time.Time) *Crawler { s.CreationTime = &v @@ -9671,10 +10401,20 @@ type CreateCrawlerInput struct { Classifiers []*string `type:"list"` // Crawler configuration information. This versioned JSON string allows users - // to specify aspects of a crawler's behavior. For more information, see Configuring - // a Crawler (http://docs.aws.amazon.com/glue/latest/dg/crawler-configuration.html). + // to specify aspects of a Crawler's behavior. + // + // You can use this field to force partitions to inherit metadata such as classification, + // input format, output format, serde information, and schema from their parent + // table, rather than detect this information separately for each partition. + // Use the following JSON string to specify that behavior: + // + // Example: '{ "Version": 1.0, "CrawlerOutput": { "Partitions": { "AddOrUpdateBehavior": + // "InheritFromTable" } } }' Configuration *string `type:"string"` + // The name of the SecurityConfiguration structure to be used by this Crawler. + CrawlerSecurityConfiguration *string `type:"string"` + // The AWS Glue database where results are written, such as: arn:aws:daylight:us-east-1::database/sometable/*. // // DatabaseName is a required field @@ -9759,6 +10499,12 @@ func (s *CreateCrawlerInput) SetConfiguration(v string) *CreateCrawlerInput { return s } +// SetCrawlerSecurityConfiguration sets the CrawlerSecurityConfiguration field's value. +func (s *CreateCrawlerInput) SetCrawlerSecurityConfiguration(v string) *CreateCrawlerInput { + s.CrawlerSecurityConfiguration = &v + return s +} + // SetDatabaseName sets the DatabaseName field's value. func (s *CreateCrawlerInput) SetDatabaseName(v string) *CreateCrawlerInput { s.DatabaseName = &v @@ -9915,14 +10661,29 @@ type CreateDevEndpointInput struct { // The number of AWS Glue Data Processing Units (DPUs) to allocate to this DevEndpoint. NumberOfNodes *int64 `type:"integer"` - // The public key to use for authentication. + // The public key to be used by this DevEndpoint for authentication. This attribute + // is provided for backward compatibility, as the recommended attribute to use + // is public keys. PublicKey *string `type:"string"` + // A list of public keys to be used by the DevEndpoints for authentication. + // The use of this attribute is preferred over a single public key because the + // public keys allow you to have a different private key per client. + // + // If you previously created an endpoint with a public key, you must remove + // that key to be able to set a list of public keys: call the UpdateDevEndpoint + // API with the public key content in the deletePublicKeys attribute, and the + // list of new keys in the addPublicKeys attribute. + PublicKeys []*string `type:"list"` + // The IAM role for the DevEndpoint. // // RoleArn is a required field RoleArn *string `type:"string" required:"true"` + // The name of the SecurityConfiguration structure to be used with this DevEndpoint. + SecurityConfiguration *string `min:"1" type:"string"` + // Security group IDs for the security groups to be used by the new DevEndpoint. SecurityGroupIds []*string `type:"list"` @@ -9949,6 +10710,9 @@ func (s *CreateDevEndpointInput) Validate() error { if s.RoleArn == nil { invalidParams.Add(request.NewErrParamRequired("RoleArn")) } + if s.SecurityConfiguration != nil && len(*s.SecurityConfiguration) < 1 { + invalidParams.Add(request.NewErrParamMinLen("SecurityConfiguration", 1)) + } if invalidParams.Len() > 0 { return invalidParams @@ -9986,12 +10750,24 @@ func (s *CreateDevEndpointInput) SetPublicKey(v string) *CreateDevEndpointInput return s } +// SetPublicKeys sets the PublicKeys field's value. +func (s *CreateDevEndpointInput) SetPublicKeys(v []*string) *CreateDevEndpointInput { + s.PublicKeys = v + return s +} + // SetRoleArn sets the RoleArn field's value. func (s *CreateDevEndpointInput) SetRoleArn(v string) *CreateDevEndpointInput { s.RoleArn = &v return s } +// SetSecurityConfiguration sets the SecurityConfiguration field's value. +func (s *CreateDevEndpointInput) SetSecurityConfiguration(v string) *CreateDevEndpointInput { + s.SecurityConfiguration = &v + return s +} + // SetSecurityGroupIds sets the SecurityGroupIds field's value. func (s *CreateDevEndpointInput) SetSecurityGroupIds(v []*string) *CreateDevEndpointInput { s.SecurityGroupIds = v @@ -10033,6 +10809,9 @@ type CreateDevEndpointOutput struct { // The AWS ARN of the role assigned to the new DevEndpoint. RoleArn *string `type:"string"` + // The name of the SecurityConfiguration structure being used with this DevEndpoint. + SecurityConfiguration *string `min:"1" type:"string"` + // The security groups assigned to the new DevEndpoint. SecurityGroupIds []*string `type:"list"` @@ -10110,6 +10889,12 @@ func (s *CreateDevEndpointOutput) SetRoleArn(v string) *CreateDevEndpointOutput return s } +// SetSecurityConfiguration sets the SecurityConfiguration field's value. +func (s *CreateDevEndpointOutput) SetSecurityConfiguration(v string) *CreateDevEndpointOutput { + s.SecurityConfiguration = &v + return s +} + // SetSecurityGroupIds sets the SecurityGroupIds field's value. func (s *CreateDevEndpointOutput) SetSecurityGroupIds(v []*string) *CreateDevEndpointOutput { s.SecurityGroupIds = v @@ -10287,7 +11072,12 @@ type CreateJobInput struct { // Role is a required field Role *string `type:"string" required:"true"` - // The job timeout in minutes. The default is 2880 minutes (48 hours). + // The name of the SecurityConfiguration structure to be used with this job. + SecurityConfiguration *string `min:"1" type:"string"` + + // The job timeout in minutes. This is the maximum time that a job run can consume + // resources before it is terminated and enters TIMEOUT status. The default + // is 2,880 minutes (48 hours). Timeout *int64 `min:"1" type:"integer"` } @@ -10316,6 +11106,9 @@ func (s *CreateJobInput) Validate() error { if s.Role == nil { invalidParams.Add(request.NewErrParamRequired("Role")) } + if s.SecurityConfiguration != nil && len(*s.SecurityConfiguration) < 1 { + invalidParams.Add(request.NewErrParamMinLen("SecurityConfiguration", 1)) + } if s.Timeout != nil && *s.Timeout < 1 { invalidParams.Add(request.NewErrParamMinValue("Timeout", 1)) } @@ -10397,6 +11190,12 @@ func (s *CreateJobInput) SetRole(v string) *CreateJobInput { return s } +// SetSecurityConfiguration sets the SecurityConfiguration field's value. +func (s *CreateJobInput) SetSecurityConfiguration(v string) *CreateJobInput { + s.SecurityConfiguration = &v + return s +} + // SetTimeout sets the Timeout field's value. func (s *CreateJobInput) SetTimeout(v int64) *CreateJobInput { s.Timeout = &v @@ -10691,6 +11490,93 @@ func (s *CreateScriptOutput) SetScalaCode(v string) *CreateScriptOutput { return s } +type CreateSecurityConfigurationInput struct { + _ struct{} `type:"structure"` + + // The encryption configuration for the new security configuration. + // + // EncryptionConfiguration is a required field + EncryptionConfiguration *EncryptionConfiguration `type:"structure" required:"true"` + + // The name for the new security configuration. + // + // Name is a required field + Name *string `min:"1" type:"string" required:"true"` +} + +// String returns the string representation +func (s CreateSecurityConfigurationInput) String() string { + return awsutil.Prettify(s) +} + +// GoString returns the string representation +func (s CreateSecurityConfigurationInput) GoString() string { + return s.String() +} + +// Validate inspects the fields of the type to determine if they are valid. +func (s *CreateSecurityConfigurationInput) Validate() error { + invalidParams := request.ErrInvalidParams{Context: "CreateSecurityConfigurationInput"} + if s.EncryptionConfiguration == nil { + invalidParams.Add(request.NewErrParamRequired("EncryptionConfiguration")) + } + if s.Name == nil { + invalidParams.Add(request.NewErrParamRequired("Name")) + } + if s.Name != nil && len(*s.Name) < 1 { + invalidParams.Add(request.NewErrParamMinLen("Name", 1)) + } + + if invalidParams.Len() > 0 { + return invalidParams + } + return nil +} + +// SetEncryptionConfiguration sets the EncryptionConfiguration field's value. +func (s *CreateSecurityConfigurationInput) SetEncryptionConfiguration(v *EncryptionConfiguration) *CreateSecurityConfigurationInput { + s.EncryptionConfiguration = v + return s +} + +// SetName sets the Name field's value. +func (s *CreateSecurityConfigurationInput) SetName(v string) *CreateSecurityConfigurationInput { + s.Name = &v + return s +} + +type CreateSecurityConfigurationOutput struct { + _ struct{} `type:"structure"` + + // The time at which the new security configuration was created. + CreatedTimestamp *time.Time `type:"timestamp"` + + // The name assigned to the new security configuration. + Name *string `min:"1" type:"string"` +} + +// String returns the string representation +func (s CreateSecurityConfigurationOutput) String() string { + return awsutil.Prettify(s) +} + +// GoString returns the string representation +func (s CreateSecurityConfigurationOutput) GoString() string { + return s.String() +} + +// SetCreatedTimestamp sets the CreatedTimestamp field's value. +func (s *CreateSecurityConfigurationOutput) SetCreatedTimestamp(v time.Time) *CreateSecurityConfigurationOutput { + s.CreatedTimestamp = &v + return s +} + +// SetName sets the Name field's value. +func (s *CreateSecurityConfigurationOutput) SetName(v string) *CreateSecurityConfigurationOutput { + s.Name = &v + return s +} + type CreateTableInput struct { _ struct{} `type:"structure"` @@ -11086,6 +11972,45 @@ func (s *CreateXMLClassifierRequest) SetRowTag(v string) *CreateXMLClassifierReq return s } +// Contains configuration information for maintaining Data Catalog security. +type DataCatalogEncryptionSettings struct { + _ struct{} `type:"structure"` + + // Specifies encryption-at-rest configuration for the Data Catalog. + EncryptionAtRest *EncryptionAtRest `type:"structure"` +} + +// String returns the string representation +func (s DataCatalogEncryptionSettings) String() string { + return awsutil.Prettify(s) +} + +// GoString returns the string representation +func (s DataCatalogEncryptionSettings) GoString() string { + return s.String() +} + +// Validate inspects the fields of the type to determine if they are valid. +func (s *DataCatalogEncryptionSettings) Validate() error { + invalidParams := request.ErrInvalidParams{Context: "DataCatalogEncryptionSettings"} + if s.EncryptionAtRest != nil { + if err := s.EncryptionAtRest.Validate(); err != nil { + invalidParams.AddNested("EncryptionAtRest", err.(request.ErrInvalidParams)) + } + } + + if invalidParams.Len() > 0 { + return invalidParams + } + return nil +} + +// SetEncryptionAtRest sets the EncryptionAtRest field's value. +func (s *DataCatalogEncryptionSettings) SetEncryptionAtRest(v *EncryptionAtRest) *DataCatalogEncryptionSettings { + s.EncryptionAtRest = v + return s +} + // The Database object represents a logical grouping of tables that may reside // in a Hive metastore or an RDBMS. type Database struct { @@ -11106,7 +12031,7 @@ type Database struct { // Name is a required field Name *string `min:"1" type:"string" required:"true"` - // A list of key-value pairs that define parameters and properties of the database. + // These key-value pairs define parameters and properties of the database. Parameters map[string]*string `type:"map"` } @@ -11166,7 +12091,7 @@ type DatabaseInput struct { // Name is a required field Name *string `min:"1" type:"string" required:"true"` - // A list of key-value pairs that define parameters and properties of the database. + // Thes key-value pairs define parameters and properties of the database. Parameters map[string]*string `type:"map"` } @@ -11685,6 +12610,61 @@ func (s DeletePartitionOutput) GoString() string { return s.String() } +type DeleteSecurityConfigurationInput struct { + _ struct{} `type:"structure"` + + // The name of the security configuration to delete. + // + // Name is a required field + Name *string `min:"1" type:"string" required:"true"` +} + +// String returns the string representation +func (s DeleteSecurityConfigurationInput) String() string { + return awsutil.Prettify(s) +} + +// GoString returns the string representation +func (s DeleteSecurityConfigurationInput) GoString() string { + return s.String() +} + +// Validate inspects the fields of the type to determine if they are valid. +func (s *DeleteSecurityConfigurationInput) Validate() error { + invalidParams := request.ErrInvalidParams{Context: "DeleteSecurityConfigurationInput"} + if s.Name == nil { + invalidParams.Add(request.NewErrParamRequired("Name")) + } + if s.Name != nil && len(*s.Name) < 1 { + invalidParams.Add(request.NewErrParamMinLen("Name", 1)) + } + + if invalidParams.Len() > 0 { + return invalidParams + } + return nil +} + +// SetName sets the Name field's value. +func (s *DeleteSecurityConfigurationInput) SetName(v string) *DeleteSecurityConfigurationInput { + s.Name = &v + return s +} + +type DeleteSecurityConfigurationOutput struct { + _ struct{} `type:"structure"` +} + +// String returns the string representation +func (s DeleteSecurityConfigurationOutput) String() string { + return awsutil.Prettify(s) +} + +// GoString returns the string representation +func (s DeleteSecurityConfigurationOutput) GoString() string { + return s.String() +} + type DeleteTableInput struct { _ struct{} `type:"structure"` @@ -12065,18 +13045,34 @@ type DevEndpoint struct { // The number of AWS Glue Data Processing Units (DPUs) allocated to this DevEndpoint. NumberOfNodes *int64 `type:"integer"` - // The private address used by this DevEndpoint. + // A private DNS to access the DevEndpoint within a VPC, if the DevEndpoint + // is created within one. PrivateAddress *string `type:"string"` // The public VPC address used by this DevEndpoint. PublicAddress *string `type:"string"` - // The public key to be used by this DevEndpoint for authentication. + // The public key to be used by this DevEndpoint for authentication. This attribute + // is provided for backward compatibility, as the recommended attribute to use + // is public keys. PublicKey *string `type:"string"` + // A list of public keys to be used by the DevEndpoints for authentication. + // The use of this attribute is preferred over a single public key because the + // public keys allow you to have a different private key per client. + // + // If you previously created an endpoint with a public key, you must remove + // that key to be able to set a list of public keys: call the UpdateDevEndpoint + // API with the public key content in the deletePublicKeys attribute, and the + // list of new keys in the addPublicKeys attribute. + PublicKeys []*string `type:"list"` + // The AWS ARN of the IAM role used in this DevEndpoint. RoleArn *string `type:"string"` + // The name of the SecurityConfiguration structure to be used with this DevEndpoint. + SecurityConfiguration *string `min:"1" type:"string"` + // A list of security group identifiers used in this DevEndpoint. SecurityGroupIds []*string `type:"list"` @@ -12178,12 +13174,24 @@ func (s *DevEndpoint) SetPublicKey(v string) *DevEndpoint { return s } +// SetPublicKeys sets the PublicKeys field's value. +func (s *DevEndpoint) SetPublicKeys(v []*string) *DevEndpoint { + s.PublicKeys = v + return s +} + // SetRoleArn sets the RoleArn field's value. func (s *DevEndpoint) SetRoleArn(v string) *DevEndpoint { s.RoleArn = &v return s } +// SetSecurityConfiguration sets the SecurityConfiguration field's value. +func (s *DevEndpoint) SetSecurityConfiguration(v string) *DevEndpoint { + s.SecurityConfiguration = &v + return s +} + // SetSecurityGroupIds sets the SecurityGroupIds field's value. func (s *DevEndpoint) SetSecurityGroupIds(v []*string) *DevEndpoint { s.SecurityGroupIds = v @@ -12287,6 +13295,99 @@ func (s *DynamoDBTarget) SetPath(v string) *DynamoDBTarget { return s } +// Specifies encryption-at-rest configuration for the Data Catalog. +type EncryptionAtRest struct { + _ struct{} `type:"structure"` + + // The encryption-at-rest mode for encrypting Data Catalog data. + // + // CatalogEncryptionMode is a required field + CatalogEncryptionMode *string `type:"string" required:"true" enum:"CatalogEncryptionMode"` + + // The ID of the AWS KMS key to use for encryption at rest. + SseAwsKmsKeyId *string `min:"1" type:"string"` +} + +// String returns the string representation +func (s EncryptionAtRest) String() string { + return awsutil.Prettify(s) +} + +// GoString returns the string representation +func (s EncryptionAtRest) GoString() string { + return s.String() +} + +// Validate inspects the fields of the type to determine if they are valid. +func (s *EncryptionAtRest) Validate() error { + invalidParams := request.ErrInvalidParams{Context: "EncryptionAtRest"} + if s.CatalogEncryptionMode == nil { + invalidParams.Add(request.NewErrParamRequired("CatalogEncryptionMode")) + } + if s.SseAwsKmsKeyId != nil && len(*s.SseAwsKmsKeyId) < 1 { + invalidParams.Add(request.NewErrParamMinLen("SseAwsKmsKeyId", 1)) + } + + if invalidParams.Len() > 0 { + return invalidParams + } + return nil +} + +// SetCatalogEncryptionMode sets the CatalogEncryptionMode field's value. +func (s *EncryptionAtRest) SetCatalogEncryptionMode(v string) *EncryptionAtRest { + s.CatalogEncryptionMode = &v + return s +} + +// SetSseAwsKmsKeyId sets the SseAwsKmsKeyId field's value. +func (s *EncryptionAtRest) SetSseAwsKmsKeyId(v string) *EncryptionAtRest { + s.SseAwsKmsKeyId = &v + return s +} + +// Specifies an encryption configuration. +type EncryptionConfiguration struct { + _ struct{} `type:"structure"` + + // The encryption configuration for CloudWatch. + CloudWatchEncryption *CloudWatchEncryption `type:"structure"` + + // The encryption configuration for Job Bookmarks. + JobBookmarksEncryption *JobBookmarksEncryption `type:"structure"` + + // The encryption configuration for S3 data. + S3Encryption []*S3Encryption `type:"list"` +} + +// String returns the string representation +func (s EncryptionConfiguration) String() string { + return awsutil.Prettify(s) +} + +// GoString returns the string representation +func (s EncryptionConfiguration) GoString() string { + return s.String() +} + +// SetCloudWatchEncryption sets the CloudWatchEncryption field's value. +func (s *EncryptionConfiguration) SetCloudWatchEncryption(v *CloudWatchEncryption) *EncryptionConfiguration { + s.CloudWatchEncryption = v + return s +} + +// SetJobBookmarksEncryption sets the JobBookmarksEncryption field's value. +func (s *EncryptionConfiguration) SetJobBookmarksEncryption(v *JobBookmarksEncryption) *EncryptionConfiguration { + s.JobBookmarksEncryption = v + return s +} + +// SetS3Encryption sets the S3Encryption field's value. +func (s *EncryptionConfiguration) SetS3Encryption(v []*S3Encryption) *EncryptionConfiguration { + s.S3Encryption = v + return s +} + // Contains details about an error. type ErrorDetail struct { _ struct{} `type:"structure"` @@ -12988,6 +14089,66 @@ func (s *GetCrawlersOutput) SetNextToken(v string) *GetCrawlersOutput { return s } +type GetDataCatalogEncryptionSettingsInput struct { + _ struct{} `type:"structure"` + + // The ID of the Data Catalog for which to retrieve the security configuration. + // If none is supplied, the AWS account ID is used by default. + CatalogId *string `min:"1" type:"string"` +} + +// String returns the string representation +func (s GetDataCatalogEncryptionSettingsInput) String() string { + return awsutil.Prettify(s) +} + +// GoString returns the string representation +func (s GetDataCatalogEncryptionSettingsInput) GoString() string { + return s.String() +} + +// Validate inspects the fields of the type to determine if they are valid. +func (s *GetDataCatalogEncryptionSettingsInput) Validate() error { + invalidParams := request.ErrInvalidParams{Context: "GetDataCatalogEncryptionSettingsInput"} + if s.CatalogId != nil && len(*s.CatalogId) < 1 { + invalidParams.Add(request.NewErrParamMinLen("CatalogId", 1)) + } + + if invalidParams.Len() > 0 { + return invalidParams + } + return nil +} + +// SetCatalogId sets the CatalogId field's value. +func (s *GetDataCatalogEncryptionSettingsInput) SetCatalogId(v string) *GetDataCatalogEncryptionSettingsInput { + s.CatalogId = &v + return s +} + +type GetDataCatalogEncryptionSettingsOutput struct { + _ struct{} `type:"structure"` + + // The requested security configuration. + DataCatalogEncryptionSettings *DataCatalogEncryptionSettings `type:"structure"` +} + +// String returns the string representation +func (s GetDataCatalogEncryptionSettingsOutput) String() string { + return awsutil.Prettify(s) +} + +// GoString returns the string representation +func (s GetDataCatalogEncryptionSettingsOutput) GoString() string { + return s.String() +} + +// SetDataCatalogEncryptionSettings sets the DataCatalogEncryptionSettings field's value. +func (s *GetDataCatalogEncryptionSettingsOutput) SetDataCatalogEncryptionSettings(v *DataCatalogEncryptionSettings) *GetDataCatalogEncryptionSettingsOutput { + s.DataCatalogEncryptionSettings = v + return s +} + type GetDatabaseInput struct { _ struct{} `type:"structure"` @@ -14165,6 +15326,147 @@ func (s *GetPlanOutput) SetScalaCode(v string) *GetPlanOutput { return s } +type GetSecurityConfigurationInput struct { + _ struct{} `type:"structure"` + + // The name of the security configuration to retrieve. + // + // Name is a required field + Name *string `min:"1" type:"string" required:"true"` +} + +// String returns the string representation +func (s GetSecurityConfigurationInput) String() string { + return awsutil.Prettify(s) +} + +// GoString returns the string representation +func (s GetSecurityConfigurationInput) GoString() string { + return s.String() +} + +// Validate inspects the fields of the type to determine if they are valid. +func (s *GetSecurityConfigurationInput) Validate() error { + invalidParams := request.ErrInvalidParams{Context: "GetSecurityConfigurationInput"} + if s.Name == nil { + invalidParams.Add(request.NewErrParamRequired("Name")) + } + if s.Name != nil && len(*s.Name) < 1 { + invalidParams.Add(request.NewErrParamMinLen("Name", 1)) + } + + if invalidParams.Len() > 0 { + return invalidParams + } + return nil +} + +// SetName sets the Name field's value. +func (s *GetSecurityConfigurationInput) SetName(v string) *GetSecurityConfigurationInput { + s.Name = &v + return s +} + +type GetSecurityConfigurationOutput struct { + _ struct{} `type:"structure"` + + // The requested security configuration + SecurityConfiguration *SecurityConfiguration `type:"structure"` +} + +// String returns the string representation +func (s GetSecurityConfigurationOutput) String() string { + return awsutil.Prettify(s) +} + +// GoString returns the string representation +func (s GetSecurityConfigurationOutput) GoString() string { + return s.String() +} + +// SetSecurityConfiguration sets the SecurityConfiguration field's value. +func (s *GetSecurityConfigurationOutput) SetSecurityConfiguration(v *SecurityConfiguration) *GetSecurityConfigurationOutput { + s.SecurityConfiguration = v + return s +} + +type GetSecurityConfigurationsInput struct { + _ struct{} `type:"structure"` + + // The maximum number of results to return. + MaxResults *int64 `min:"1" type:"integer"` + + // A continuation token, if this is a continuation call. + NextToken *string `type:"string"` +} + +// String returns the string representation +func (s GetSecurityConfigurationsInput) String() string { + return awsutil.Prettify(s) +} + +// GoString returns the string representation +func (s GetSecurityConfigurationsInput) GoString() string { + return s.String() +} + +// Validate inspects the fields of the type to determine if they are valid. +func (s *GetSecurityConfigurationsInput) Validate() error { + invalidParams := request.ErrInvalidParams{Context: "GetSecurityConfigurationsInput"} + if s.MaxResults != nil && *s.MaxResults < 1 { + invalidParams.Add(request.NewErrParamMinValue("MaxResults", 1)) + } + + if invalidParams.Len() > 0 { + return invalidParams + } + return nil +} + +// SetMaxResults sets the MaxResults field's value. +func (s *GetSecurityConfigurationsInput) SetMaxResults(v int64) *GetSecurityConfigurationsInput { + s.MaxResults = &v + return s +} + +// SetNextToken sets the NextToken field's value. +func (s *GetSecurityConfigurationsInput) SetNextToken(v string) *GetSecurityConfigurationsInput { + s.NextToken = &v + return s +} + +type GetSecurityConfigurationsOutput struct { + _ struct{} `type:"structure"` + + // A continuation token, if there are more security configurations to return. + NextToken *string `type:"string"` + + // A list of security configurations. + SecurityConfigurations []*SecurityConfiguration `type:"list"` +} + +// String returns the string representation +func (s GetSecurityConfigurationsOutput) String() string { + return awsutil.Prettify(s) +} + +// GoString returns the string representation +func (s GetSecurityConfigurationsOutput) GoString() string { + return s.String() +} + +// SetNextToken sets the NextToken field's value. +func (s *GetSecurityConfigurationsOutput) SetNextToken(v string) *GetSecurityConfigurationsOutput { + s.NextToken = &v + return s +} + +// SetSecurityConfigurations sets the SecurityConfigurations field's value. +func (s *GetSecurityConfigurationsOutput) SetSecurityConfigurations(v []*SecurityConfiguration) *GetSecurityConfigurationsOutput { + s.SecurityConfigurations = v + return s +} + type GetTableInput struct { _ struct{} `type:"structure"` @@ -15227,7 +16529,12 @@ type Job struct { // The name or ARN of the IAM role associated with this job. Role *string `type:"string"` - // The job timeout in minutes. + // The name of the SecurityConfiguration structure to be used with this job. + SecurityConfiguration *string `min:"1" type:"string"` + + // The job timeout in minutes. This is the maximum time that a job run can consume + // resources before it is terminated and enters TIMEOUT status. The default + // is 2,880 minutes (48 hours). Timeout *int64 `min:"1" type:"integer"` } @@ -15319,6 +16626,12 @@ func (s *Job) SetRole(v string) *Job { return s } +// SetSecurityConfiguration sets the SecurityConfiguration field's value. +func (s *Job) SetSecurityConfiguration(v string) *Job { + s.SecurityConfiguration = &v + return s +} + // SetTimeout sets the Timeout field's value. func (s *Job) SetTimeout(v int64) *Job { s.Timeout = &v @@ -15385,6 +16698,39 @@ func (s *JobBookmarkEntry) SetVersion(v int64) *JobBookmarkEntry { return s } +// Specifies how Job bookmark data should be encrypted. +type JobBookmarksEncryption struct { + _ struct{} `type:"structure"` + + // The encryption mode to use for Job bookmarks data. + JobBookmarksEncryptionMode *string `type:"string" enum:"JobBookmarksEncryptionMode"` + + // The AWS ARN of the KMS key to be used to encrypt the data. + KmsKeyArn *string `type:"string"` +} + +// String returns the string representation +func (s JobBookmarksEncryption) String() string { + return awsutil.Prettify(s) +} + +// GoString returns the string representation +func (s JobBookmarksEncryption) GoString() string { + return s.String() +} + +// SetJobBookmarksEncryptionMode sets the JobBookmarksEncryptionMode field's value. +func (s *JobBookmarksEncryption) SetJobBookmarksEncryptionMode(v string) *JobBookmarksEncryption { + s.JobBookmarksEncryptionMode = &v + return s +} + +// SetKmsKeyArn sets the KmsKeyArn field's value. +func (s *JobBookmarksEncryption) SetKmsKeyArn(v string) *JobBookmarksEncryption { + s.KmsKeyArn = &v + return s +} + // Specifies code executed when a job is run. type JobCommand struct { _ struct{} `type:"structure"` @@ -15468,6 +16814,13 @@ type JobRun struct { // The last time this job run was modified. LastModifiedOn *time.Time `type:"timestamp"` + // The name of the log group for secure logging, that can be server-side encrypted + // in CloudWatch using KMS. This name can be /aws-glue/jobs/, in which case + // the default encryption is NONE. If you add a role name and SecurityConfiguration + // name (in other words, /aws-glue/jobs-yourRoleName-yourSecurityConfigurationName/), + // then that security configuration will be used to encrypt the log group. + LogGroupName *string `type:"string"` + // Specifies configuration properties of a job run notification. NotificationProperty *NotificationProperty `type:"structure"` @@ -15478,10 +16831,17 @@ type JobRun struct { // in the StartJobRun action. PreviousRunId *string `min:"1" type:"string"` + // The name of the SecurityConfiguration structure to be used with this job + // run. + SecurityConfiguration *string `min:"1" type:"string"` + // The date and time at which this job run was started. StartedOn *time.Time `type:"timestamp"` - // The job run timeout in minutes. + // The JobRun timeout in minutes. This is the maximum time that a job run can + // consume resources before it is terminated and enters TIMEOUT status. The + // default is 2,880 minutes (48 hours). This overrides the timeout value set + // in the parent job. Timeout *int64 `min:"1" type:"integer"` // The name of the trigger that started this job run. @@ -15558,6 +16918,12 @@ func (s *JobRun) SetLastModifiedOn(v time.Time) *JobRun { return s } +// SetLogGroupName sets the LogGroupName field's value. +func (s *JobRun) SetLogGroupName(v string) *JobRun { + s.LogGroupName = &v + return s +} + // SetNotificationProperty sets the NotificationProperty field's value. func (s *JobRun) SetNotificationProperty(v *NotificationProperty) *JobRun { s.NotificationProperty = v @@ -15576,6 +16942,12 @@ func (s *JobRun) SetPreviousRunId(v string) *JobRun { return s } +// SetSecurityConfiguration sets the SecurityConfiguration field's value. +func (s *JobRun) SetSecurityConfiguration(v string) *JobRun { + s.SecurityConfiguration = &v + return s +} + // SetStartedOn sets the StartedOn field's value. func (s *JobRun) SetStartedOn(v time.Time) *JobRun { s.StartedOn = &v @@ -15645,7 +17017,12 @@ type JobUpdate struct { // The name or ARN of the IAM role associated with this job (required). Role *string `type:"string"` - // The job timeout in minutes. The default is 2880 minutes (48 hours). + // The name of the SecurityConfiguration structure to be used with this job. + SecurityConfiguration *string `min:"1" type:"string"` + + // The job timeout in minutes. This is the maximum time that a job run can consume + // resources before it is terminated and enters TIMEOUT status. The default + // is 2,880 minutes (48 hours). Timeout *int64 `min:"1" type:"integer"` } @@ -15662,6 +17039,9 @@ func (s JobUpdate) GoString() string { // Validate inspects the fields of the type to determine if they are valid. func (s *JobUpdate) Validate() error { invalidParams := request.ErrInvalidParams{Context: "JobUpdate"} + if s.SecurityConfiguration != nil && len(*s.SecurityConfiguration) < 1 { + invalidParams.Add(request.NewErrParamMinLen("SecurityConfiguration", 1)) + } if s.Timeout != nil && *s.Timeout < 1 { invalidParams.Add(request.NewErrParamMinValue("Timeout", 1)) } @@ -15737,6 +17117,12 @@ func (s *JobUpdate) SetRole(v string) *JobUpdate { return s } +// SetSecurityConfiguration sets the SecurityConfiguration field's value. +func (s *JobUpdate) SetSecurityConfiguration(v string) *JobUpdate { + s.SecurityConfiguration = &v + return s +} + // SetTimeout sets the Timeout field's value. func (s *JobUpdate) SetTimeout(v int64) *JobUpdate { s.Timeout = &v @@ -16140,7 +17526,7 @@ type Partition struct { // The last time at which column statistics were computed for this partition. LastAnalyzedTime *time.Time `type:"timestamp"` - // Partition parameters, in the form of a list of key-value pairs. + // These key-value pairs define partition parameters. Parameters map[string]*string `type:"map"` // Provides information about the physical location where the partition is stored. @@ -16254,7 +17640,7 @@ type PartitionInput struct { // The last time at which column statistics were computed for this partition. LastAnalyzedTime *time.Time `type:"timestamp"` - // Partition parameters, in the form of a list of key-value pairs. + // These key-value pairs define partition parameters. Parameters map[string]*string `type:"map"` // Provides information about the physical location where the partition is stored. @@ -16362,7 +17748,9 @@ func (s *PartitionValueList) SetValues(v []*string) *PartitionValueList { type PhysicalConnectionRequirements struct { _ struct{} `type:"structure"` - // The connection's availability zone. This field is deprecated and has no effect. + // The connection's availability zone. This field is redundant, since the specified + // subnet implies the availability zone to be used. The field must be populated + // now, but will be deprecated in the future. AvailabilityZone *string `min:"1" type:"string"` // The security group ID list used by the connection. @@ -16504,6 +17892,76 @@ func (s *Predicate) SetLogical(v string) *Predicate { return s } +type PutDataCatalogEncryptionSettingsInput struct { + _ struct{} `type:"structure"` + + // The ID of the Data Catalog for which to set the security configuration. If + // none is supplied, the AWS account ID is used by default. + CatalogId *string `min:"1" type:"string"` + + // The security configuration to set. + // + // DataCatalogEncryptionSettings is a required field + DataCatalogEncryptionSettings *DataCatalogEncryptionSettings `type:"structure" required:"true"` +} + +// String returns the string representation +func (s PutDataCatalogEncryptionSettingsInput) String() string { + return awsutil.Prettify(s) +} + +// GoString returns the string representation +func (s PutDataCatalogEncryptionSettingsInput) GoString() string { + return s.String() +} + +// Validate inspects the fields of the type to determine if they are valid. +func (s *PutDataCatalogEncryptionSettingsInput) Validate() error { + invalidParams := request.ErrInvalidParams{Context: "PutDataCatalogEncryptionSettingsInput"} + if s.CatalogId != nil && len(*s.CatalogId) < 1 { + invalidParams.Add(request.NewErrParamMinLen("CatalogId", 1)) + } + if s.DataCatalogEncryptionSettings == nil { + invalidParams.Add(request.NewErrParamRequired("DataCatalogEncryptionSettings")) + } + if s.DataCatalogEncryptionSettings != nil { + if err := s.DataCatalogEncryptionSettings.Validate(); err != nil { + invalidParams.AddNested("DataCatalogEncryptionSettings", err.(request.ErrInvalidParams)) + } + } + + if invalidParams.Len() > 0 { + return invalidParams + } + return nil +} + +// SetCatalogId sets the CatalogId field's value. +func (s *PutDataCatalogEncryptionSettingsInput) SetCatalogId(v string) *PutDataCatalogEncryptionSettingsInput { + s.CatalogId = &v + return s +} + +// SetDataCatalogEncryptionSettings sets the DataCatalogEncryptionSettings field's value. +func (s *PutDataCatalogEncryptionSettingsInput) SetDataCatalogEncryptionSettings(v *DataCatalogEncryptionSettings) *PutDataCatalogEncryptionSettingsInput { + s.DataCatalogEncryptionSettings = v + return s +} + +type PutDataCatalogEncryptionSettingsOutput struct { + _ struct{} `type:"structure"` +} + +// String returns the string representation +func (s PutDataCatalogEncryptionSettingsOutput) String() string { + return awsutil.Prettify(s) +} + +// GoString returns the string representation +func (s PutDataCatalogEncryptionSettingsOutput) GoString() string { + return s.String() +} + type ResetJobBookmarkInput struct { _ struct{} `type:"structure"` @@ -16611,6 +18069,39 @@ func (s *ResourceUri) SetUri(v string) *ResourceUri { return s } +// Specifies how S3 data should be encrypted. +type S3Encryption struct { + _ struct{} `type:"structure"` + + // The AWS ARN of the KMS key to be used to encrypt the data. + KmsKeyArn *string `type:"string"` + + // The encryption mode to use for S3 data. + S3EncryptionMode *string `type:"string" enum:"S3EncryptionMode"` +} + +// String returns the string representation +func (s S3Encryption) String() string { + return awsutil.Prettify(s) +} + +// GoString returns the string representation +func (s S3Encryption) GoString() string { + return s.String() +} + +// SetKmsKeyArn sets the KmsKeyArn field's value. +func (s *S3Encryption) SetKmsKeyArn(v string) *S3Encryption { + s.KmsKeyArn = &v + return s +} + +// SetS3EncryptionMode sets the S3EncryptionMode field's value. +func (s *S3Encryption) SetS3EncryptionMode(v string) *S3Encryption { + s.S3EncryptionMode = &v + return s +} + // Specifies a data store in Amazon S3. type S3Target struct { _ struct{} `type:"structure"` @@ -16714,6 +18205,48 @@ func (s *SchemaChangePolicy) SetUpdateBehavior(v string) *SchemaChangePolicy { return s } +// Specifies a security configuration. +type SecurityConfiguration struct { + _ struct{} `type:"structure"` + + // The time at which this security configuration was created. + CreatedTimeStamp *time.Time `type:"timestamp"` + + // The encryption configuration associated with this security configuration. + EncryptionConfiguration *EncryptionConfiguration `type:"structure"` + + // The name of the security configuration. + Name *string `min:"1" type:"string"` +} + +// String returns the string representation +func (s SecurityConfiguration) String() string { + return awsutil.Prettify(s) +} + +// GoString returns the string representation +func (s SecurityConfiguration) GoString() string { + return s.String() +} + +// SetCreatedTimeStamp sets the CreatedTimeStamp field's value. +func (s *SecurityConfiguration) SetCreatedTimeStamp(v time.Time) *SecurityConfiguration { + s.CreatedTimeStamp = &v + return s +} + +// SetEncryptionConfiguration sets the EncryptionConfiguration field's value. +func (s *SecurityConfiguration) SetEncryptionConfiguration(v *EncryptionConfiguration) *SecurityConfiguration { + s.EncryptionConfiguration = v + return s +} + +// SetName sets the Name field's value. +func (s *SecurityConfiguration) SetName(v string) *SecurityConfiguration { + s.Name = &v + return s +} + // Defines a non-overlapping region of a table's partitions, allowing multiple // requests to be executed in parallel. type Segment struct { @@ -16781,7 +18314,7 @@ type SerDeInfo struct { // Name of the SerDe. Name *string `min:"1" type:"string"` - // A list of initialization parameters for the SerDe, in key-value form. + // These key-value pairs define initialization parameters for the SerDe. Parameters map[string]*string `type:"map"` // Usually the class that implements the SerDe. An example is: org.apache.hadoop.hive.serde2.columnar.ColumnarSerDe. @@ -17021,7 +18554,14 @@ type StartJobRunInput struct { // Specifies configuration properties of a job run notification. NotificationProperty *NotificationProperty `type:"structure"` - // The job run timeout in minutes. It overrides the timeout value of the job. + // The name of the SecurityConfiguration structure to be used with this job + // run. + SecurityConfiguration *string `min:"1" type:"string"` + + // The JobRun timeout in minutes. This is the maximum time that a job run can + // consume resources before it is terminated and enters TIMEOUT status. The + // default is 2,880 minutes (48 hours). This overrides the timeout value set + // in the parent job. Timeout *int64 `min:"1" type:"integer"` } @@ -17047,6 +18587,9 @@ func (s *StartJobRunInput) Validate() error { if s.JobRunId != nil && len(*s.JobRunId) < 1 { invalidParams.Add(request.NewErrParamMinLen("JobRunId", 1)) } + if s.SecurityConfiguration != nil && len(*s.SecurityConfiguration) < 1 { + invalidParams.Add(request.NewErrParamMinLen("SecurityConfiguration", 1)) + } if s.Timeout != nil && *s.Timeout < 1 { invalidParams.Add(request.NewErrParamMinValue("Timeout", 1)) } @@ -17092,6 +18635,12 @@ func (s *StartJobRunInput) SetNotificationProperty(v *NotificationProperty) *Sta return s } +// SetSecurityConfiguration sets the SecurityConfiguration field's value. +func (s *StartJobRunInput) SetSecurityConfiguration(v string) *StartJobRunInput { + s.SecurityConfiguration = &v + return s +} + // SetTimeout sets the Timeout field's value. func (s *StartJobRunInput) SetTimeout(v int64) *StartJobRunInput { s.Timeout = &v @@ -17555,7 +19104,7 @@ type Table struct { // Owner of the table. Owner *string `min:"1" type:"string"` - // Properties associated with this table, as a list of key-value pairs. + // These key-value pairs define properties associated with the table. Parameters map[string]*string `type:"map"` // A list of columns by which the table is partitioned. Only primitive types @@ -17743,7 +19292,7 @@ type TableInput struct { // Owner of the table. Owner *string `min:"1" type:"string"` - // Properties associated with this table, as a list of key-value pairs. + // These key-value pairs define properties associated with the table. Parameters map[string]*string `type:"map"` // A list of columns by which the table is partitioned. Only primitive types @@ -18316,10 +19865,20 @@ type UpdateCrawlerInput struct { Classifiers []*string `type:"list"` // Crawler configuration information. This versioned JSON string allows users - // to specify aspects of a crawler's behavior. For more information, see Configuring - // a Crawler (http://docs.aws.amazon.com/glue/latest/dg/crawler-configuration.html). + // to specify aspects of a Crawler's behavior. + // + // You can use this field to force partitions to inherit metadata such as classification, + // input format, output format, serde information, and schema from their parent + // table, rather than detect this information separately for each partition. + // Use the following JSON string to specify that behavior: + // + // Example: '{ "Version": 1.0, "CrawlerOutput": { "Partitions": { "AddOrUpdateBehavior": + // "InheritFromTable" } } }' Configuration *string `type:"string"` + // The name of the SecurityConfiguration structure to be used by this Crawler. + CrawlerSecurityConfiguration *string `type:"string"` + // The AWS Glue database where results are stored, such as: arn:aws:daylight:us-east-1::database/sometable/*. DatabaseName *string `type:"string"` @@ -18389,6 +19948,12 @@ func (s *UpdateCrawlerInput) SetConfiguration(v string) *UpdateCrawlerInput { return s } +// SetCrawlerSecurityConfiguration sets the CrawlerSecurityConfiguration field's value. +func (s *UpdateCrawlerInput) SetCrawlerSecurityConfiguration(v string) *UpdateCrawlerInput { + s.CrawlerSecurityConfiguration = &v + return s +} + // SetDatabaseName sets the DatabaseName field's value. func (s *UpdateCrawlerInput) SetDatabaseName(v string) *UpdateCrawlerInput { s.DatabaseName = &v @@ -18610,9 +20175,15 @@ func (s UpdateDatabaseOutput) GoString() string { type UpdateDevEndpointInput struct { _ struct{} `type:"structure"` + // The list of public keys for the DevEndpoint to use. + AddPublicKeys []*string `type:"list"` + // Custom Python or Java libraries to be loaded in the DevEndpoint. CustomLibraries *DevEndpointCustomLibraries `type:"structure"` + // The list of public keys to be deleted from the DevEndpoint. + DeletePublicKeys []*string `type:"list"` + // The name of the DevEndpoint to be updated. // // EndpointName is a required field @@ -18649,12 +20220,24 @@ func (s *UpdateDevEndpointInput) Validate() error { return nil } +// SetAddPublicKeys sets the AddPublicKeys field's value. +func (s *UpdateDevEndpointInput) SetAddPublicKeys(v []*string) *UpdateDevEndpointInput { + s.AddPublicKeys = v + return s +} + // SetCustomLibraries sets the CustomLibraries field's value. func (s *UpdateDevEndpointInput) SetCustomLibraries(v *DevEndpointCustomLibraries) *UpdateDevEndpointInput { s.CustomLibraries = v return s } +// SetDeletePublicKeys sets the DeletePublicKeys field's value. +func (s *UpdateDevEndpointInput) SetDeletePublicKeys(v []*string) *UpdateDevEndpointInput { + s.DeletePublicKeys = v + return s +} + // SetEndpointName sets the EndpointName field's value. func (s *UpdateDevEndpointInput) SetEndpointName(v string) *UpdateDevEndpointInput { s.EndpointName = &v @@ -19599,6 +21182,22 @@ func (s *XMLClassifier) SetVersion(v int64) *XMLClassifier { return s } +const ( + // CatalogEncryptionModeDisabled is a CatalogEncryptionMode enum value + CatalogEncryptionModeDisabled = "DISABLED" + + // CatalogEncryptionModeSseKms is a CatalogEncryptionMode enum value + CatalogEncryptionModeSseKms = "SSE-KMS" +) + +const ( + // CloudWatchEncryptionModeDisabled is a CloudWatchEncryptionMode enum value + CloudWatchEncryptionModeDisabled = "DISABLED" + + // CloudWatchEncryptionModeSseKms is a CloudWatchEncryptionMode enum value + CloudWatchEncryptionModeSseKms = "SSE-KMS" +) + const ( // ConnectionPropertyKeyHost is a ConnectionPropertyKey enum value ConnectionPropertyKeyHost = "HOST" @@ -19632,6 +21231,9 @@ const ( // ConnectionPropertyKeyJdbcConnectionUrl is a ConnectionPropertyKey enum value ConnectionPropertyKeyJdbcConnectionUrl = "JDBC_CONNECTION_URL" + + // ConnectionPropertyKeyJdbcEnforceSsl is a ConnectionPropertyKey enum value + ConnectionPropertyKeyJdbcEnforceSsl = "JDBC_ENFORCE_SSL" ) const ( @@ -19664,6 +21266,14 @@ const ( DeleteBehaviorDeprecateInDatabase = "DEPRECATE_IN_DATABASE" ) +const ( + // JobBookmarksEncryptionModeDisabled is a JobBookmarksEncryptionMode enum value + JobBookmarksEncryptionModeDisabled = "DISABLED" + + // JobBookmarksEncryptionModeCseKms is a JobBookmarksEncryptionMode enum value + JobBookmarksEncryptionModeCseKms = "CSE-KMS" +) + const ( // JobRunStateStarting is a JobRunState enum value JobRunStateStarting = "STARTING" @@ -19741,6 +21351,17 @@ const ( ResourceTypeArchive = "ARCHIVE" ) +const ( + // S3EncryptionModeDisabled is a S3EncryptionMode enum value + S3EncryptionModeDisabled = "DISABLED" + + // S3EncryptionModeSseKms is a S3EncryptionMode enum value + S3EncryptionModeSseKms = "SSE-KMS" + + // S3EncryptionModeSseS3 is a S3EncryptionMode enum value + S3EncryptionModeSseS3 = "SSE-S3" +) + const ( // ScheduleStateScheduled is a ScheduleState enum value ScheduleStateScheduled = "SCHEDULED" diff --git a/vendor/github.com/aws/aws-sdk-go/service/glue/errors.go b/vendor/github.com/aws/aws-sdk-go/service/glue/errors.go index c54357306..6de7b4f0e 100644 --- a/vendor/github.com/aws/aws-sdk-go/service/glue/errors.go +++ b/vendor/github.com/aws/aws-sdk-go/service/glue/errors.go @@ -46,6 +46,12 @@ const ( // The specified crawler is stopping. ErrCodeCrawlerStoppingException = "CrawlerStoppingException" + // ErrCodeEncryptionException for service response error code + // "GlueEncryptionException". + // + // An encryption operation failed. + ErrCodeEncryptionException = "GlueEncryptionException" + // ErrCodeEntityNotFoundException for service response error code // "EntityNotFoundException". // diff --git a/vendor/github.com/aws/aws-sdk-go/service/guardduty/api.go b/vendor/github.com/aws/aws-sdk-go/service/guardduty/api.go index b8cc0dc00..0356a188e 100644 --- a/vendor/github.com/aws/aws-sdk-go/service/guardduty/api.go +++ b/vendor/github.com/aws/aws-sdk-go/service/guardduty/api.go @@ -3880,10 +3880,14 @@ type AcceptInvitationInput struct { DetectorId *string `location:"uri" locationName:"detectorId" type:"string" required:"true"` // This value is used to validate the master account to the member account. - InvitationId *string `locationName:"invitationId" type:"string"` + // + // InvitationId is a required field + InvitationId *string `locationName:"invitationId" type:"string" required:"true"` // The account ID of the master GuardDuty account whose invitation you're accepting. - MasterId *string `locationName:"masterId" type:"string"` + // + // MasterId is a required field + MasterId *string `locationName:"masterId" type:"string" required:"true"` } // String returns the string representation @@ -3902,6 +3906,12 @@ func (s *AcceptInvitationInput) Validate() error { if s.DetectorId == nil { invalidParams.Add(request.NewErrParamRequired("DetectorId")) } + if s.InvitationId == nil { + invalidParams.Add(request.NewErrParamRequired("InvitationId")) + } + if s.MasterId == nil { + invalidParams.Add(request.NewErrParamRequired("MasterId")) + } if invalidParams.Len() > 0 { return invalidParams @@ -4114,7 +4124,9 @@ type ArchiveFindingsInput struct { DetectorId *string `location:"uri" locationName:"detectorId" type:"string" required:"true"` // IDs of the findings that you want to archive. - FindingIds []*string `locationName:"findingIds" type:"list"` + // + // FindingIds is a required field + FindingIds []*string `locationName:"findingIds" type:"list" required:"true"` } // String returns the string representation @@ -4133,6 +4145,9 @@ func (s *ArchiveFindingsInput) Validate() error { if s.DetectorId == nil { invalidParams.Add(request.NewErrParamRequired("DetectorId")) } + if s.FindingIds == nil { + invalidParams.Add(request.NewErrParamRequired("FindingIds")) + } if invalidParams.Len() > 0 { return invalidParams @@ -4363,8 +4378,16 @@ func (s *Country) SetCountryName(v string) *Country { type CreateDetectorInput struct { _ struct{} `type:"structure"` + // The idempotency token for the create request. + ClientToken *string `locationName:"clientToken" type:"string" idempotencyToken:"true"` + // A boolean value that specifies whether the detector is to be enabled. - Enable *bool `locationName:"enable" type:"boolean"` + // + // Enable is a required field + Enable *bool `locationName:"enable" type:"boolean" required:"true"` + + // A enum value that specifies how frequently customer got Finding updates published. + FindingPublishingFrequency *string `locationName:"findingPublishingFrequency" type:"string" enum:"FindingPublishingFrequency"` } // String returns the string representation @@ -4377,12 +4400,37 @@ func (s CreateDetectorInput) GoString() string { return s.String() } +// Validate inspects the fields of the type to determine if they are valid. +func (s *CreateDetectorInput) Validate() error { + invalidParams := request.ErrInvalidParams{Context: "CreateDetectorInput"} + if s.Enable == nil { + invalidParams.Add(request.NewErrParamRequired("Enable")) + } + + if invalidParams.Len() > 0 { + return invalidParams + } + return nil +} + +// SetClientToken sets the ClientToken field's value. +func (s *CreateDetectorInput) SetClientToken(v string) *CreateDetectorInput { + s.ClientToken = &v + return s +} + // SetEnable sets the Enable field's value. func (s *CreateDetectorInput) SetEnable(v bool) *CreateDetectorInput { s.Enable = &v return s } +// SetFindingPublishingFrequency sets the FindingPublishingFrequency field's value. +func (s *CreateDetectorInput) SetFindingPublishingFrequency(v string) *CreateDetectorInput { + s.FindingPublishingFrequency = &v + return s +} + // CreateDetector response object. type CreateDetectorOutput struct { _ struct{} `type:"structure"` @@ -4425,10 +4473,14 @@ type CreateFilterInput struct { DetectorId *string `location:"uri" locationName:"detectorId" type:"string" required:"true"` // Represents the criteria to be used in the filter for querying findings. - FindingCriteria *FindingCriteria `locationName:"findingCriteria" type:"structure"` + // + // FindingCriteria is a required field + FindingCriteria *FindingCriteria `locationName:"findingCriteria" type:"structure" required:"true"` // The name of the filter. - Name *string `locationName:"name" type:"string"` + // + // Name is a required field + Name *string `locationName:"name" type:"string" required:"true"` // Specifies the position of the filter in the list of current filters. Also // specifies the order in which this filter is applied to the findings. @@ -4451,6 +4503,12 @@ func (s *CreateFilterInput) Validate() error { if s.DetectorId == nil { invalidParams.Add(request.NewErrParamRequired("DetectorId")) } + if s.FindingCriteria == nil { + invalidParams.Add(request.NewErrParamRequired("FindingCriteria")) + } + if s.Name == nil { + invalidParams.Add(request.NewErrParamRequired("Name")) + } if invalidParams.Len() > 0 { return invalidParams @@ -4530,21 +4588,32 @@ type CreateIPSetInput struct { // A boolean value that indicates whether GuardDuty is to start using the uploaded // IPSet. - Activate *bool `locationName:"activate" type:"boolean"` + // + // Activate is a required field + Activate *bool `locationName:"activate" type:"boolean" required:"true"` + + // The idempotency token for the create request. + ClientToken *string `locationName:"clientToken" type:"string" idempotencyToken:"true"` // DetectorId is a required field DetectorId *string `location:"uri" locationName:"detectorId" type:"string" required:"true"` // The format of the file that contains the IPSet. - Format *string `locationName:"format" type:"string" enum:"IpSetFormat"` + // + // Format is a required field + Format *string `locationName:"format" type:"string" required:"true" enum:"IpSetFormat"` // The URI of the file that contains the IPSet. For example (https://s3.us-west-2.amazonaws.com/my-bucket/my-object-key) - Location *string `locationName:"location" type:"string"` + // + // Location is a required field + Location *string `locationName:"location" type:"string" required:"true"` // The user friendly name to identify the IPSet. This name is displayed in all // findings that are triggered by activity that involves IP addresses included // in this IPSet. - Name *string `locationName:"name" type:"string"` + // + // Name is a required field + Name *string `locationName:"name" type:"string" required:"true"` } // String returns the string representation @@ -4560,9 +4629,21 @@ func (s CreateIPSetInput) GoString() string { // Validate inspects the fields of the type to determine if they are valid. func (s *CreateIPSetInput) Validate() error { invalidParams := request.ErrInvalidParams{Context: "CreateIPSetInput"} + if s.Activate == nil { + invalidParams.Add(request.NewErrParamRequired("Activate")) + } if s.DetectorId == nil { invalidParams.Add(request.NewErrParamRequired("DetectorId")) } + if s.Format == nil { + invalidParams.Add(request.NewErrParamRequired("Format")) + } + if s.Location == nil { + invalidParams.Add(request.NewErrParamRequired("Location")) + } + if s.Name == nil { + invalidParams.Add(request.NewErrParamRequired("Name")) + } if invalidParams.Len() > 0 { return invalidParams @@ -4576,6 +4657,12 @@ func (s *CreateIPSetInput) SetActivate(v bool) *CreateIPSetInput { return s } +// SetClientToken sets the ClientToken field's value. +func (s *CreateIPSetInput) SetClientToken(v string) *CreateIPSetInput { + s.ClientToken = &v + return s +} + // SetDetectorId sets the DetectorId field's value. func (s *CreateIPSetInput) SetDetectorId(v string) *CreateIPSetInput { s.DetectorId = &v @@ -4630,7 +4717,9 @@ type CreateMembersInput struct { // A list of account ID and email address pairs of the accounts that you want // to associate with the master GuardDuty account. - AccountDetails []*AccountDetail `locationName:"accountDetails" type:"list"` + // + // AccountDetails is a required field + AccountDetails []*AccountDetail `locationName:"accountDetails" type:"list" required:"true"` // DetectorId is a required field DetectorId *string `location:"uri" locationName:"detectorId" type:"string" required:"true"` @@ -4649,6 +4738,9 @@ func (s CreateMembersInput) GoString() string { // Validate inspects the fields of the type to determine if they are valid. func (s *CreateMembersInput) Validate() error { invalidParams := request.ErrInvalidParams{Context: "CreateMembersInput"} + if s.AccountDetails == nil { + invalidParams.Add(request.NewErrParamRequired("AccountDetails")) + } if s.DetectorId == nil { invalidParams.Add(request.NewErrParamRequired("DetectorId")) } @@ -4772,20 +4864,31 @@ type CreateThreatIntelSetInput struct { // A boolean value that indicates whether GuardDuty is to start using the uploaded // ThreatIntelSet. - Activate *bool `locationName:"activate" type:"boolean"` + // + // Activate is a required field + Activate *bool `locationName:"activate" type:"boolean" required:"true"` + + // The idempotency token for the create request. + ClientToken *string `locationName:"clientToken" type:"string" idempotencyToken:"true"` // DetectorId is a required field DetectorId *string `location:"uri" locationName:"detectorId" type:"string" required:"true"` // The format of the file that contains the ThreatIntelSet. - Format *string `locationName:"format" type:"string" enum:"ThreatIntelSetFormat"` + // + // Format is a required field + Format *string `locationName:"format" type:"string" required:"true" enum:"ThreatIntelSetFormat"` // The URI of the file that contains the ThreatIntelSet. For example (https://s3.us-west-2.amazonaws.com/my-bucket/my-object-key). - Location *string `locationName:"location" type:"string"` + // + // Location is a required field + Location *string `locationName:"location" type:"string" required:"true"` // A user-friendly ThreatIntelSet name that is displayed in all finding generated // by activity that involves IP addresses included in this ThreatIntelSet. - Name *string `locationName:"name" type:"string"` + // + // Name is a required field + Name *string `locationName:"name" type:"string" required:"true"` } // String returns the string representation @@ -4801,9 +4904,21 @@ func (s CreateThreatIntelSetInput) GoString() string { // Validate inspects the fields of the type to determine if they are valid. func (s *CreateThreatIntelSetInput) Validate() error { invalidParams := request.ErrInvalidParams{Context: "CreateThreatIntelSetInput"} + if s.Activate == nil { + invalidParams.Add(request.NewErrParamRequired("Activate")) + } if s.DetectorId == nil { invalidParams.Add(request.NewErrParamRequired("DetectorId")) } + if s.Format == nil { + invalidParams.Add(request.NewErrParamRequired("Format")) + } + if s.Location == nil { + invalidParams.Add(request.NewErrParamRequired("Location")) + } + if s.Name == nil { + invalidParams.Add(request.NewErrParamRequired("Name")) + } if invalidParams.Len() > 0 { return invalidParams @@ -4817,6 +4932,12 @@ func (s *CreateThreatIntelSetInput) SetActivate(v bool) *CreateThreatIntelSetInp return s } +// SetClientToken sets the ClientToken field's value. +func (s *CreateThreatIntelSetInput) SetClientToken(v string) *CreateThreatIntelSetInput { + s.ClientToken = &v + return s +} + // SetDetectorId sets the DetectorId field's value. func (s *CreateThreatIntelSetInput) SetDetectorId(v string) *CreateThreatIntelSetInput { s.DetectorId = &v @@ -4871,7 +4992,9 @@ type DeclineInvitationsInput struct { // A list of account IDs of the AWS accounts that sent invitations to the current // member account that you want to decline invitations from. - AccountIds []*string `locationName:"accountIds" type:"list"` + // + // AccountIds is a required field + AccountIds []*string `locationName:"accountIds" type:"list" required:"true"` } // String returns the string representation @@ -4884,6 +5007,19 @@ func (s DeclineInvitationsInput) GoString() string { return s.String() } +// Validate inspects the fields of the type to determine if they are valid. +func (s *DeclineInvitationsInput) Validate() error { + invalidParams := request.ErrInvalidParams{Context: "DeclineInvitationsInput"} + if s.AccountIds == nil { + invalidParams.Add(request.NewErrParamRequired("AccountIds")) + } + + if invalidParams.Len() > 0 { + return invalidParams + } + return nil +} + // SetAccountIds sets the AccountIds field's value. func (s *DeclineInvitationsInput) SetAccountIds(v []*string) *DeclineInvitationsInput { s.AccountIds = v @@ -5095,7 +5231,9 @@ type DeleteInvitationsInput struct { // A list of account IDs of the AWS accounts that sent invitations to the current // member account that you want to delete invitations from. - AccountIds []*string `locationName:"accountIds" type:"list"` + // + // AccountIds is a required field + AccountIds []*string `locationName:"accountIds" type:"list" required:"true"` } // String returns the string representation @@ -5108,6 +5246,19 @@ func (s DeleteInvitationsInput) GoString() string { return s.String() } +// Validate inspects the fields of the type to determine if they are valid. +func (s *DeleteInvitationsInput) Validate() error { + invalidParams := request.ErrInvalidParams{Context: "DeleteInvitationsInput"} + if s.AccountIds == nil { + invalidParams.Add(request.NewErrParamRequired("AccountIds")) + } + + if invalidParams.Len() > 0 { + return invalidParams + } + return nil +} + // SetAccountIds sets the AccountIds field's value. func (s *DeleteInvitationsInput) SetAccountIds(v []*string) *DeleteInvitationsInput { s.AccountIds = v @@ -5144,7 +5295,9 @@ type DeleteMembersInput struct { _ struct{} `type:"structure"` // A list of account IDs of the GuardDuty member accounts that you want to delete. - AccountIds []*string `locationName:"accountIds" type:"list"` + // + // AccountIds is a required field + AccountIds []*string `locationName:"accountIds" type:"list" required:"true"` // DetectorId is a required field DetectorId *string `location:"uri" locationName:"detectorId" type:"string" required:"true"` @@ -5163,6 +5316,9 @@ func (s DeleteMembersInput) GoString() string { // Validate inspects the fields of the type to determine if they are valid. func (s *DeleteMembersInput) Validate() error { invalidParams := request.ErrInvalidParams{Context: "DeleteMembersInput"} + if s.AccountIds == nil { + invalidParams.Add(request.NewErrParamRequired("AccountIds")) + } if s.DetectorId == nil { invalidParams.Add(request.NewErrParamRequired("DetectorId")) } @@ -5328,7 +5484,9 @@ type DisassociateMembersInput struct { // A list of account IDs of the GuardDuty member accounts that you want to disassociate // from master. - AccountIds []*string `locationName:"accountIds" type:"list"` + // + // AccountIds is a required field + AccountIds []*string `locationName:"accountIds" type:"list" required:"true"` // DetectorId is a required field DetectorId *string `location:"uri" locationName:"detectorId" type:"string" required:"true"` @@ -5347,6 +5505,9 @@ func (s DisassociateMembersInput) GoString() string { // Validate inspects the fields of the type to determine if they are valid. func (s *DisassociateMembersInput) Validate() error { invalidParams := request.ErrInvalidParams{Context: "DisassociateMembersInput"} + if s.AccountIds == nil { + invalidParams.Add(request.NewErrParamRequired("AccountIds")) + } if s.DetectorId == nil { invalidParams.Add(request.NewErrParamRequired("DetectorId")) } @@ -5731,6 +5892,9 @@ type GetDetectorOutput struct { // The first time a resource was created. The format will be ISO-8601. CreatedAt *string `locationName:"createdAt" type:"string"` + // A enum value that specifies how frequently customer got Finding updates published. + FindingPublishingFrequency *string `locationName:"findingPublishingFrequency" type:"string" enum:"FindingPublishingFrequency"` + // Customer serviceRole name or ARN for accessing customer resources ServiceRole *string `locationName:"serviceRole" type:"string"` @@ -5757,6 +5921,12 @@ func (s *GetDetectorOutput) SetCreatedAt(v string) *GetDetectorOutput { return s } +// SetFindingPublishingFrequency sets the FindingPublishingFrequency field's value. +func (s *GetDetectorOutput) SetFindingPublishingFrequency(v string) *GetDetectorOutput { + s.FindingPublishingFrequency = &v + return s +} + // SetServiceRole sets the ServiceRole field's value. func (s *GetDetectorOutput) SetServiceRole(v string) *GetDetectorOutput { s.ServiceRole = &v @@ -5893,7 +6063,9 @@ type GetFindingsInput struct { DetectorId *string `location:"uri" locationName:"detectorId" type:"string" required:"true"` // IDs of the findings that you want to retrieve. - FindingIds []*string `locationName:"findingIds" type:"list"` + // + // FindingIds is a required field + FindingIds []*string `locationName:"findingIds" type:"list" required:"true"` // Represents the criteria used for sorting findings. SortCriteria *SortCriteria `locationName:"sortCriteria" type:"structure"` @@ -5915,6 +6087,9 @@ func (s *GetFindingsInput) Validate() error { if s.DetectorId == nil { invalidParams.Add(request.NewErrParamRequired("DetectorId")) } + if s.FindingIds == nil { + invalidParams.Add(request.NewErrParamRequired("FindingIds")) + } if invalidParams.Len() > 0 { return invalidParams @@ -5975,7 +6150,9 @@ type GetFindingsStatisticsInput struct { FindingCriteria *FindingCriteria `locationName:"findingCriteria" type:"structure"` // Types of finding statistics to retrieve. - FindingStatisticTypes []*string `locationName:"findingStatisticTypes" type:"list"` + // + // FindingStatisticTypes is a required field + FindingStatisticTypes []*string `locationName:"findingStatisticTypes" type:"list" required:"true"` } // String returns the string representation @@ -5994,6 +6171,9 @@ func (s *GetFindingsStatisticsInput) Validate() error { if s.DetectorId == nil { invalidParams.Add(request.NewErrParamRequired("DetectorId")) } + if s.FindingStatisticTypes == nil { + invalidParams.Add(request.NewErrParamRequired("FindingStatisticTypes")) + } if invalidParams.Len() > 0 { return invalidParams @@ -6247,7 +6427,9 @@ type GetMembersInput struct { _ struct{} `type:"structure"` // A list of account IDs of the GuardDuty member accounts that you want to describe. - AccountIds []*string `locationName:"accountIds" type:"list"` + // + // AccountIds is a required field + AccountIds []*string `locationName:"accountIds" type:"list" required:"true"` // DetectorId is a required field DetectorId *string `location:"uri" locationName:"detectorId" type:"string" required:"true"` @@ -6266,6 +6448,9 @@ func (s GetMembersInput) GoString() string { // Validate inspects the fields of the type to determine if they are valid. func (s *GetMembersInput) Validate() error { invalidParams := request.ErrInvalidParams{Context: "GetMembersInput"} + if s.AccountIds == nil { + invalidParams.Add(request.NewErrParamRequired("AccountIds")) + } if s.DetectorId == nil { invalidParams.Add(request.NewErrParamRequired("DetectorId")) } @@ -6636,7 +6821,9 @@ type InviteMembersInput struct { // A list of account IDs of the accounts that you want to invite to GuardDuty // as members. - AccountIds []*string `locationName:"accountIds" type:"list"` + // + // AccountIds is a required field + AccountIds []*string `locationName:"accountIds" type:"list" required:"true"` // DetectorId is a required field DetectorId *string `location:"uri" locationName:"detectorId" type:"string" required:"true"` @@ -6663,6 +6850,9 @@ func (s InviteMembersInput) GoString() string { // Validate inspects the fields of the type to determine if they are valid. func (s *InviteMembersInput) Validate() error { invalidParams := request.ErrInvalidParams{Context: "InviteMembersInput"} + if s.AccountIds == nil { + invalidParams.Add(request.NewErrParamRequired("AccountIds")) + } if s.DetectorId == nil { invalidParams.Add(request.NewErrParamRequired("DetectorId")) } @@ -8218,7 +8408,9 @@ type StartMonitoringMembersInput struct { // A list of account IDs of the GuardDuty member accounts whose findings you // want the master account to monitor. - AccountIds []*string `locationName:"accountIds" type:"list"` + // + // AccountIds is a required field + AccountIds []*string `locationName:"accountIds" type:"list" required:"true"` // DetectorId is a required field DetectorId *string `location:"uri" locationName:"detectorId" type:"string" required:"true"` @@ -8237,6 +8429,9 @@ func (s StartMonitoringMembersInput) GoString() string { // Validate inspects the fields of the type to determine if they are valid. func (s *StartMonitoringMembersInput) Validate() error { invalidParams := request.ErrInvalidParams{Context: "StartMonitoringMembersInput"} + if s.AccountIds == nil { + invalidParams.Add(request.NewErrParamRequired("AccountIds")) + } if s.DetectorId == nil { invalidParams.Add(request.NewErrParamRequired("DetectorId")) } @@ -8290,7 +8485,9 @@ type StopMonitoringMembersInput struct { // A list of account IDs of the GuardDuty member accounts whose findings you // want the master account to stop monitoring. - AccountIds []*string `locationName:"accountIds" type:"list"` + // + // AccountIds is a required field + AccountIds []*string `locationName:"accountIds" type:"list" required:"true"` // DetectorId is a required field DetectorId *string `location:"uri" locationName:"detectorId" type:"string" required:"true"` @@ -8309,6 +8506,9 @@ func (s StopMonitoringMembersInput) GoString() string { // Validate inspects the fields of the type to determine if they are valid. func (s *StopMonitoringMembersInput) Validate() error { invalidParams := request.ErrInvalidParams{Context: "StopMonitoringMembersInput"} + if s.AccountIds == nil { + invalidParams.Add(request.NewErrParamRequired("AccountIds")) + } if s.DetectorId == nil { invalidParams.Add(request.NewErrParamRequired("DetectorId")) } @@ -8397,7 +8597,9 @@ type UnarchiveFindingsInput struct { DetectorId *string `location:"uri" locationName:"detectorId" type:"string" required:"true"` // IDs of the findings that you want to unarchive. - FindingIds []*string `locationName:"findingIds" type:"list"` + // + // FindingIds is a required field + FindingIds []*string `locationName:"findingIds" type:"list" required:"true"` } // String returns the string representation @@ -8416,6 +8618,9 @@ func (s *UnarchiveFindingsInput) Validate() error { if s.DetectorId == nil { invalidParams.Add(request.NewErrParamRequired("DetectorId")) } + if s.FindingIds == nil { + invalidParams.Add(request.NewErrParamRequired("FindingIds")) + } if invalidParams.Len() > 0 { return invalidParams @@ -8497,6 +8702,9 @@ type UpdateDetectorInput struct { // Updated boolean value for the detector that specifies whether the detector // is enabled. Enable *bool `locationName:"enable" type:"boolean"` + + // A enum value that specifies how frequently customer got Finding updates published. + FindingPublishingFrequency *string `locationName:"findingPublishingFrequency" type:"string" enum:"FindingPublishingFrequency"` } // String returns the string representation @@ -8534,6 +8742,12 @@ func (s *UpdateDetectorInput) SetEnable(v bool) *UpdateDetectorInput { return s } +// SetFindingPublishingFrequency sets the FindingPublishingFrequency field's value. +func (s *UpdateDetectorInput) SetFindingPublishingFrequency(v string) *UpdateDetectorInput { + s.FindingPublishingFrequency = &v + return s +} + type UpdateDetectorOutput struct { _ struct{} `type:"structure"` } @@ -8670,10 +8884,14 @@ type UpdateFindingsFeedbackInput struct { DetectorId *string `location:"uri" locationName:"detectorId" type:"string" required:"true"` // Valid values: USEFUL | NOT_USEFUL - Feedback *string `locationName:"feedback" type:"string" enum:"Feedback"` + // + // Feedback is a required field + Feedback *string `locationName:"feedback" type:"string" required:"true" enum:"Feedback"` // IDs of the findings that you want to mark as useful or not useful. - FindingIds []*string `locationName:"findingIds" type:"list"` + // + // FindingIds is a required field + FindingIds []*string `locationName:"findingIds" type:"list" required:"true"` } // String returns the string representation @@ -8692,6 +8910,12 @@ func (s *UpdateFindingsFeedbackInput) Validate() error { if s.DetectorId == nil { invalidParams.Add(request.NewErrParamRequired("DetectorId")) } + if s.Feedback == nil { + invalidParams.Add(request.NewErrParamRequired("Feedback")) + } + if s.FindingIds == nil { + invalidParams.Add(request.NewErrParamRequired("FindingIds")) + } if invalidParams.Len() > 0 { return invalidParams @@ -8946,6 +9170,18 @@ const ( FilterActionArchive = "ARCHIVE" ) +// A enum value that specifies how frequently customer got Finding updates published. +const ( + // FindingPublishingFrequencyFifteenMinutes is a FindingPublishingFrequency enum value + FindingPublishingFrequencyFifteenMinutes = "FIFTEEN_MINUTES" + + // FindingPublishingFrequencyOneHour is a FindingPublishingFrequency enum value + FindingPublishingFrequencyOneHour = "ONE_HOUR" + + // FindingPublishingFrequencySixHours is a FindingPublishingFrequency enum value + FindingPublishingFrequencySixHours = "SIX_HOURS" +) + // The types of finding statistics. const ( // FindingStatisticTypeCountBySeverity is a FindingStatisticType enum value diff --git a/vendor/github.com/aws/aws-sdk-go/service/inspector/api.go b/vendor/github.com/aws/aws-sdk-go/service/inspector/api.go index 98fe8c4f8..d5698b18c 100644 --- a/vendor/github.com/aws/aws-sdk-go/service/inspector/api.go +++ b/vendor/github.com/aws/aws-sdk-go/service/inspector/api.go @@ -82,6 +82,9 @@ func (c *Inspector) AddAttributesToFindingsRequest(input *AddAttributesToFinding // The request was rejected because it referenced an entity that does not exist. // The error code describes the entity. // +// * ErrCodeServiceTemporarilyUnavailableException "ServiceTemporarilyUnavailableException" +// The serice is temporary unavailable. +// // See also, https://docs.aws.amazon.com/goto/WebAPI/inspector-2016-02-16/AddAttributesToFindings func (c *Inspector) AddAttributesToFindings(input *AddAttributesToFindingsInput) (*AddAttributesToFindingsOutput, error) { req, out := c.AddAttributesToFindingsRequest(input) @@ -149,9 +152,11 @@ func (c *Inspector) CreateAssessmentTargetRequest(input *CreateAssessmentTargetI // CreateAssessmentTarget API operation for Amazon Inspector. // // Creates a new assessment target using the ARN of the resource group that -// is generated by CreateResourceGroup. If the service-linked role (https://docs.aws.amazon.com/inspector/latest/userguide/inspector_slr.html) -// isn’t already registered, also creates and registers a service-linked role -// to grant Amazon Inspector access to AWS Services needed to perform security +// is generated by CreateResourceGroup. If resourceGroupArn is not specified, +// all EC2 instances in the current AWS account and region are included in the +// assessment target. If the service-linked role (https://docs.aws.amazon.com/inspector/latest/userguide/inspector_slr.html) +// isn’t already registered, this action also creates and registers a service-linked +// role to grant Amazon Inspector access to AWS Services needed to perform security // assessments. You can create up to 50 assessment targets per AWS account. // You can run up to 500 concurrent agents per AWS account. For more information, // see Amazon Inspector Assessment Targets (http://docs.aws.amazon.com/inspector/latest/userguide/inspector_applications.html). @@ -186,6 +191,9 @@ func (c *Inspector) CreateAssessmentTargetRequest(input *CreateAssessmentTargetI // Amazon Inspector cannot assume the cross-account role that it needs to list // your EC2 instances during the assessment run. // +// * ErrCodeServiceTemporarilyUnavailableException "ServiceTemporarilyUnavailableException" +// The serice is temporary unavailable. +// // See also, https://docs.aws.amazon.com/goto/WebAPI/inspector-2016-02-16/CreateAssessmentTarget func (c *Inspector) CreateAssessmentTarget(input *CreateAssessmentTargetInput) (*CreateAssessmentTargetOutput, error) { req, out := c.CreateAssessmentTargetRequest(input) @@ -254,8 +262,8 @@ func (c *Inspector) CreateAssessmentTemplateRequest(input *CreateAssessmentTempl // // Creates an assessment template for the assessment target that is specified // by the ARN of the assessment target. If the service-linked role (https://docs.aws.amazon.com/inspector/latest/userguide/inspector_slr.html) -// isn’t already registered, also creates and registers a service-linked role -// to grant Amazon Inspector access to AWS Services needed to perform security +// isn’t already registered, this action also creates and registers a service-linked +// role to grant Amazon Inspector access to AWS Services needed to perform security // assessments. // // Returns awserr.Error for service API and SDK errors. Use runtime type assertions @@ -284,6 +292,9 @@ func (c *Inspector) CreateAssessmentTemplateRequest(input *CreateAssessmentTempl // The request was rejected because it referenced an entity that does not exist. // The error code describes the entity. // +// * ErrCodeServiceTemporarilyUnavailableException "ServiceTemporarilyUnavailableException" +// The serice is temporary unavailable. +// // See also, https://docs.aws.amazon.com/goto/WebAPI/inspector-2016-02-16/CreateAssessmentTemplate func (c *Inspector) CreateAssessmentTemplate(input *CreateAssessmentTemplateInput) (*CreateAssessmentTemplateOutput, error) { req, out := c.CreateAssessmentTemplateRequest(input) @@ -380,6 +391,9 @@ func (c *Inspector) CreateExclusionsPreviewRequest(input *CreateExclusionsPrevie // The request was rejected because it referenced an entity that does not exist. // The error code describes the entity. // +// * ErrCodeServiceTemporarilyUnavailableException "ServiceTemporarilyUnavailableException" +// The serice is temporary unavailable. +// // See also, https://docs.aws.amazon.com/goto/WebAPI/inspector-2016-02-16/CreateExclusionsPreview func (c *Inspector) CreateExclusionsPreview(input *CreateExclusionsPreviewInput) (*CreateExclusionsPreviewOutput, error) { req, out := c.CreateExclusionsPreviewRequest(input) @@ -473,6 +487,9 @@ func (c *Inspector) CreateResourceGroupRequest(input *CreateResourceGroupInput) // * ErrCodeAccessDeniedException "AccessDeniedException" // You do not have required permissions to access the requested resource. // +// * ErrCodeServiceTemporarilyUnavailableException "ServiceTemporarilyUnavailableException" +// The serice is temporary unavailable. +// // See also, https://docs.aws.amazon.com/goto/WebAPI/inspector-2016-02-16/CreateResourceGroup func (c *Inspector) CreateResourceGroup(input *CreateResourceGroupInput) (*CreateResourceGroupOutput, error) { req, out := c.CreateResourceGroupRequest(input) @@ -570,6 +587,9 @@ func (c *Inspector) DeleteAssessmentRunRequest(input *DeleteAssessmentRunInput) // The request was rejected because it referenced an entity that does not exist. // The error code describes the entity. // +// * ErrCodeServiceTemporarilyUnavailableException "ServiceTemporarilyUnavailableException" +// The serice is temporary unavailable. +// // See also, https://docs.aws.amazon.com/goto/WebAPI/inspector-2016-02-16/DeleteAssessmentRun func (c *Inspector) DeleteAssessmentRun(input *DeleteAssessmentRunInput) (*DeleteAssessmentRunOutput, error) { req, out := c.DeleteAssessmentRunRequest(input) @@ -667,6 +687,9 @@ func (c *Inspector) DeleteAssessmentTargetRequest(input *DeleteAssessmentTargetI // The request was rejected because it referenced an entity that does not exist. // The error code describes the entity. // +// * ErrCodeServiceTemporarilyUnavailableException "ServiceTemporarilyUnavailableException" +// The serice is temporary unavailable. +// // See also, https://docs.aws.amazon.com/goto/WebAPI/inspector-2016-02-16/DeleteAssessmentTarget func (c *Inspector) DeleteAssessmentTarget(input *DeleteAssessmentTargetInput) (*DeleteAssessmentTargetOutput, error) { req, out := c.DeleteAssessmentTargetRequest(input) @@ -764,6 +787,9 @@ func (c *Inspector) DeleteAssessmentTemplateRequest(input *DeleteAssessmentTempl // The request was rejected because it referenced an entity that does not exist. // The error code describes the entity. // +// * ErrCodeServiceTemporarilyUnavailableException "ServiceTemporarilyUnavailableException" +// The serice is temporary unavailable. +// // See also, https://docs.aws.amazon.com/goto/WebAPI/inspector-2016-02-16/DeleteAssessmentTemplate func (c *Inspector) DeleteAssessmentTemplate(input *DeleteAssessmentTemplateInput) (*DeleteAssessmentTemplateOutput, error) { req, out := c.DeleteAssessmentTemplateRequest(input) @@ -1531,6 +1557,9 @@ func (c *Inspector) GetAssessmentReportRequest(input *GetAssessmentReportInput) // runs that took place or will take place after generating reports in Amazon // Inspector became available. // +// * ErrCodeServiceTemporarilyUnavailableException "ServiceTemporarilyUnavailableException" +// The serice is temporary unavailable. +// // See also, https://docs.aws.amazon.com/goto/WebAPI/inspector-2016-02-16/GetAssessmentReport func (c *Inspector) GetAssessmentReport(input *GetAssessmentReportInput) (*GetAssessmentReportOutput, error) { req, out := c.GetAssessmentReportRequest(input) @@ -3272,6 +3301,9 @@ func (c *Inspector) RegisterCrossAccountAccessRoleRequest(input *RegisterCrossAc // Amazon Inspector cannot assume the cross-account role that it needs to list // your EC2 instances during the assessment run. // +// * ErrCodeServiceTemporarilyUnavailableException "ServiceTemporarilyUnavailableException" +// The serice is temporary unavailable. +// // See also, https://docs.aws.amazon.com/goto/WebAPI/inspector-2016-02-16/RegisterCrossAccountAccessRole func (c *Inspector) RegisterCrossAccountAccessRole(input *RegisterCrossAccountAccessRoleInput) (*RegisterCrossAccountAccessRoleOutput, error) { req, out := c.RegisterCrossAccountAccessRoleRequest(input) @@ -3364,6 +3396,9 @@ func (c *Inspector) RemoveAttributesFromFindingsRequest(input *RemoveAttributesF // The request was rejected because it referenced an entity that does not exist. // The error code describes the entity. // +// * ErrCodeServiceTemporarilyUnavailableException "ServiceTemporarilyUnavailableException" +// The serice is temporary unavailable. +// // See also, https://docs.aws.amazon.com/goto/WebAPI/inspector-2016-02-16/RemoveAttributesFromFindings func (c *Inspector) RemoveAttributesFromFindings(input *RemoveAttributesFromFindingsInput) (*RemoveAttributesFromFindingsOutput, error) { req, out := c.RemoveAttributesFromFindingsRequest(input) @@ -3457,6 +3492,9 @@ func (c *Inspector) SetTagsForResourceRequest(input *SetTagsForResourceInput) (r // The request was rejected because it referenced an entity that does not exist. // The error code describes the entity. // +// * ErrCodeServiceTemporarilyUnavailableException "ServiceTemporarilyUnavailableException" +// The serice is temporary unavailable. +// // See also, https://docs.aws.amazon.com/goto/WebAPI/inspector-2016-02-16/SetTagsForResource func (c *Inspector) SetTagsForResource(input *SetTagsForResourceInput) (*SetTagsForResourceOutput, error) { req, out := c.SetTagsForResourceRequest(input) @@ -3561,6 +3599,9 @@ func (c *Inspector) StartAssessmentRunRequest(input *StartAssessmentRunInput) (r // You started an assessment run, but one of the instances is already participating // in another assessment run. // +// * ErrCodeServiceTemporarilyUnavailableException "ServiceTemporarilyUnavailableException" +// The serice is temporary unavailable. +// // See also, https://docs.aws.amazon.com/goto/WebAPI/inspector-2016-02-16/StartAssessmentRun func (c *Inspector) StartAssessmentRun(input *StartAssessmentRunInput) (*StartAssessmentRunOutput, error) { req, out := c.StartAssessmentRunRequest(input) @@ -3653,6 +3694,9 @@ func (c *Inspector) StopAssessmentRunRequest(input *StopAssessmentRunInput) (req // The request was rejected because it referenced an entity that does not exist. // The error code describes the entity. // +// * ErrCodeServiceTemporarilyUnavailableException "ServiceTemporarilyUnavailableException" +// The serice is temporary unavailable. +// // See also, https://docs.aws.amazon.com/goto/WebAPI/inspector-2016-02-16/StopAssessmentRun func (c *Inspector) StopAssessmentRun(input *StopAssessmentRunInput) (*StopAssessmentRunOutput, error) { req, out := c.StopAssessmentRunRequest(input) @@ -3750,6 +3794,9 @@ func (c *Inspector) SubscribeToEventRequest(input *SubscribeToEventInput) (req * // The request was rejected because it referenced an entity that does not exist. // The error code describes the entity. // +// * ErrCodeServiceTemporarilyUnavailableException "ServiceTemporarilyUnavailableException" +// The serice is temporary unavailable. +// // See also, https://docs.aws.amazon.com/goto/WebAPI/inspector-2016-02-16/SubscribeToEvent func (c *Inspector) SubscribeToEvent(input *SubscribeToEventInput) (*SubscribeToEventOutput, error) { req, out := c.SubscribeToEventRequest(input) @@ -3843,6 +3890,9 @@ func (c *Inspector) UnsubscribeFromEventRequest(input *UnsubscribeFromEventInput // The request was rejected because it referenced an entity that does not exist. // The error code describes the entity. // +// * ErrCodeServiceTemporarilyUnavailableException "ServiceTemporarilyUnavailableException" +// The serice is temporary unavailable. +// // See also, https://docs.aws.amazon.com/goto/WebAPI/inspector-2016-02-16/UnsubscribeFromEvent func (c *Inspector) UnsubscribeFromEvent(input *UnsubscribeFromEventInput) (*UnsubscribeFromEventOutput, error) { req, out := c.UnsubscribeFromEventRequest(input) @@ -3914,6 +3964,9 @@ func (c *Inspector) UpdateAssessmentTargetRequest(input *UpdateAssessmentTargetI // Updates the assessment target that is specified by the ARN of the assessment // target. // +// If resourceGroupArn is not specified, all EC2 instances in the current AWS +// account and region are included in the assessment target. +// // Returns awserr.Error for service API and SDK errors. Use runtime type assertions // with awserr.Error's Code and Message methods to get detailed information about // the error. @@ -3936,6 +3989,9 @@ func (c *Inspector) UpdateAssessmentTargetRequest(input *UpdateAssessmentTargetI // The request was rejected because it referenced an entity that does not exist. // The error code describes the entity. // +// * ErrCodeServiceTemporarilyUnavailableException "ServiceTemporarilyUnavailableException" +// The serice is temporary unavailable. +// // See also, https://docs.aws.amazon.com/goto/WebAPI/inspector-2016-02-16/UpdateAssessmentTarget func (c *Inspector) UpdateAssessmentTarget(input *UpdateAssessmentTargetInput) (*UpdateAssessmentTargetOutput, error) { req, out := c.UpdateAssessmentTargetRequest(input) @@ -5166,7 +5222,8 @@ type CreateAssessmentTargetInput struct { AssessmentTargetName *string `locationName:"assessmentTargetName" min:"1" type:"string" required:"true"` // The ARN that specifies the resource group that is used to create the assessment - // target. + // target. If resourceGroupArn is not specified, all EC2 instances in the current + // AWS account and region are included in the assessment target. ResourceGroupArn *string `locationName:"resourceGroupArn" min:"1" type:"string"` } @@ -5253,8 +5310,7 @@ type CreateAssessmentTemplateInput struct { // AssessmentTemplateName is a required field AssessmentTemplateName *string `locationName:"assessmentTemplateName" min:"1" type:"string" required:"true"` - // The duration of the assessment run in seconds. The default value is 3600 - // seconds (one hour). + // The duration of the assessment run in seconds. // // DurationInSeconds is a required field DurationInSeconds *int64 `locationName:"durationInSeconds" min:"180" type:"integer" required:"true"` diff --git a/vendor/github.com/aws/aws-sdk-go/service/inspector/errors.go b/vendor/github.com/aws/aws-sdk-go/service/inspector/errors.go index 8d532b03e..9e106a587 100644 --- a/vendor/github.com/aws/aws-sdk-go/service/inspector/errors.go +++ b/vendor/github.com/aws/aws-sdk-go/service/inspector/errors.go @@ -65,6 +65,12 @@ const ( // an exclusions preview. ErrCodePreviewGenerationInProgressException = "PreviewGenerationInProgressException" + // ErrCodeServiceTemporarilyUnavailableException for service response error code + // "ServiceTemporarilyUnavailableException". + // + // The serice is temporary unavailable. + ErrCodeServiceTemporarilyUnavailableException = "ServiceTemporarilyUnavailableException" + // ErrCodeUnsupportedFeatureException for service response error code // "UnsupportedFeatureException". // diff --git a/vendor/github.com/aws/aws-sdk-go/service/iot/api.go b/vendor/github.com/aws/aws-sdk-go/service/iot/api.go index e5e5aa6fd..bbecfc059 100644 --- a/vendor/github.com/aws/aws-sdk-go/service/iot/api.go +++ b/vendor/github.com/aws/aws-sdk-go/service/iot/api.go @@ -415,6 +415,8 @@ const opAttachPrincipalPolicy = "AttachPrincipalPolicy" // if err == nil { // resp is now filled // fmt.Println(resp) // } +// +// Deprecated: AttachPrincipalPolicy has been deprecated func (c *IoT) AttachPrincipalPolicyRequest(input *AttachPrincipalPolicyInput) (req *request.Request, output *AttachPrincipalPolicyOutput) { if c.Client.Config.Logger != nil { c.Client.Config.Logger.Log("This operation, AttachPrincipalPolicy, has been deprecated") @@ -472,6 +474,8 @@ func (c *IoT) AttachPrincipalPolicyRequest(input *AttachPrincipalPolicyInput) (r // * ErrCodeLimitExceededException "LimitExceededException" // A limit has been exceeded. // +// +// Deprecated: AttachPrincipalPolicy has been deprecated func (c *IoT) AttachPrincipalPolicy(input *AttachPrincipalPolicyInput) (*AttachPrincipalPolicyOutput, error) { req, out := c.AttachPrincipalPolicyRequest(input) return out, req.Send() @@ -486,6 +490,8 @@ func (c *IoT) AttachPrincipalPolicy(input *AttachPrincipalPolicyInput) (*AttachP // the context is nil a panic will occur. In the future the SDK may create // sub-contexts for http.Requests. See https://golang.org/pkg/context/ // for more information on using Contexts. +// +// Deprecated: AttachPrincipalPolicyWithContext has been deprecated func (c *IoT) AttachPrincipalPolicyWithContext(ctx aws.Context, input *AttachPrincipalPolicyInput, opts ...request.Option) (*AttachPrincipalPolicyOutput, error) { req, out := c.AttachPrincipalPolicyRequest(input) req.SetContext(ctx) @@ -493,6 +499,100 @@ func (c *IoT) AttachPrincipalPolicyWithContext(ctx aws.Context, input *AttachPri return out, req.Send() } +const opAttachSecurityProfile = "AttachSecurityProfile" + +// AttachSecurityProfileRequest generates a "aws/request.Request" representing the +// client's request for the AttachSecurityProfile operation. The "output" return +// value will be populated with the request's response once the request completes +// successfuly. +// +// Use "Send" method on the returned Request to send the API call to the service. +// the "output" return value is not valid until after Send returns without error. +// +// See AttachSecurityProfile for more information on using the AttachSecurityProfile +// API call, and error handling. +// +// This method is useful when you want to inject custom logic or configuration +// into the SDK's request lifecycle. Such as custom headers, or retry logic. +// +// +// // Example sending a request using the AttachSecurityProfileRequest method. +// req, resp := client.AttachSecurityProfileRequest(params) +// +// err := req.Send() +// if err == nil { // resp is now filled +// fmt.Println(resp) +// } +func (c *IoT) AttachSecurityProfileRequest(input *AttachSecurityProfileInput) (req *request.Request, output *AttachSecurityProfileOutput) { + op := &request.Operation{ + Name: opAttachSecurityProfile, + HTTPMethod: "PUT", + HTTPPath: "/security-profiles/{securityProfileName}/targets", + } + + if input == nil { + input = &AttachSecurityProfileInput{} + } + + output = &AttachSecurityProfileOutput{} + req = c.newRequest(op, input, output) + return +} + +// AttachSecurityProfile API operation for AWS IoT. +// +// Associates a Device Defender security profile with a thing group or with +// this account. Each thing group or account can have up to five security profiles +// associated with it. +// +// Returns awserr.Error for service API and SDK errors. Use runtime type assertions +// with awserr.Error's Code and Message methods to get detailed information about +// the error. +// +// See the AWS API reference guide for AWS IoT's +// API operation AttachSecurityProfile for usage and error information. +// +// Returned Error Codes: +// * ErrCodeInvalidRequestException "InvalidRequestException" +// The request is not valid. +// +// * ErrCodeResourceNotFoundException "ResourceNotFoundException" +// The specified resource does not exist. +// +// * ErrCodeLimitExceededException "LimitExceededException" +// A limit has been exceeded. +// +// * ErrCodeVersionConflictException "VersionConflictException" +// An exception thrown when the version of an entity specified with the expectedVersion +// parameter does not match the latest version in the system. +// +// * ErrCodeThrottlingException "ThrottlingException" +// The rate exceeds the limit. +// +// * ErrCodeInternalFailureException "InternalFailureException" +// An unexpected error has occurred. +// +func (c *IoT) AttachSecurityProfile(input *AttachSecurityProfileInput) (*AttachSecurityProfileOutput, error) { + req, out := c.AttachSecurityProfileRequest(input) + return out, req.Send() +} + +// AttachSecurityProfileWithContext is the same as AttachSecurityProfile with the addition of +// the ability to pass a context and additional request options. +// +// See AttachSecurityProfile for details on how to use this API operation. +// +// The context must be non-nil and will be used for request cancellation. If +// the context is nil a panic will occur. In the future the SDK may create +// sub-contexts for http.Requests. See https://golang.org/pkg/context/ +// for more information on using Contexts. +func (c *IoT) AttachSecurityProfileWithContext(ctx aws.Context, input *AttachSecurityProfileInput, opts ...request.Option) (*AttachSecurityProfileOutput, error) { + req, out := c.AttachSecurityProfileRequest(input) + req.SetContext(ctx) + req.ApplyOptions(opts...) + return out, req.Send() +} + const opAttachThingPrincipal = "AttachThingPrincipal" // AttachThingPrincipalRequest generates a "aws/request.Request" representing the @@ -584,6 +684,93 @@ func (c *IoT) AttachThingPrincipalWithContext(ctx aws.Context, input *AttachThin return out, req.Send() } +const opCancelAuditTask = "CancelAuditTask" + +// CancelAuditTaskRequest generates a "aws/request.Request" representing the +// client's request for the CancelAuditTask operation. The "output" return +// value will be populated with the request's response once the request completes +// successfuly. +// +// Use "Send" method on the returned Request to send the API call to the service. +// the "output" return value is not valid until after Send returns without error. +// +// See CancelAuditTask for more information on using the CancelAuditTask +// API call, and error handling. +// +// This method is useful when you want to inject custom logic or configuration +// into the SDK's request lifecycle. Such as custom headers, or retry logic. +// +// +// // Example sending a request using the CancelAuditTaskRequest method. +// req, resp := client.CancelAuditTaskRequest(params) +// +// err := req.Send() +// if err == nil { // resp is now filled +// fmt.Println(resp) +// } +func (c *IoT) CancelAuditTaskRequest(input *CancelAuditTaskInput) (req *request.Request, output *CancelAuditTaskOutput) { + op := &request.Operation{ + Name: opCancelAuditTask, + HTTPMethod: "PUT", + HTTPPath: "/audit/tasks/{taskId}/cancel", + } + + if input == nil { + input = &CancelAuditTaskInput{} + } + + output = &CancelAuditTaskOutput{} + req = c.newRequest(op, input, output) + return +} + +// CancelAuditTask API operation for AWS IoT. +// +// Cancels an audit that is in progress. The audit can be either scheduled or +// on-demand. If the audit is not in progress, an "InvalidRequestException" +// occurs. +// +// Returns awserr.Error for service API and SDK errors. Use runtime type assertions +// with awserr.Error's Code and Message methods to get detailed information about +// the error. +// +// See the AWS API reference guide for AWS IoT's +// API operation CancelAuditTask for usage and error information. +// +// Returned Error Codes: +// * ErrCodeResourceNotFoundException "ResourceNotFoundException" +// The specified resource does not exist. +// +// * ErrCodeInvalidRequestException "InvalidRequestException" +// The request is not valid. +// +// * ErrCodeThrottlingException "ThrottlingException" +// The rate exceeds the limit. +// +// * ErrCodeInternalFailureException "InternalFailureException" +// An unexpected error has occurred. +// +func (c *IoT) CancelAuditTask(input *CancelAuditTaskInput) (*CancelAuditTaskOutput, error) { + req, out := c.CancelAuditTaskRequest(input) + return out, req.Send() +} + +// CancelAuditTaskWithContext is the same as CancelAuditTask with the addition of +// the ability to pass a context and additional request options. +// +// See CancelAuditTask for details on how to use this API operation. +// +// The context must be non-nil and will be used for request cancellation. If +// the context is nil a panic will occur. In the future the SDK may create +// sub-contexts for http.Requests. See https://golang.org/pkg/context/ +// for more information on using Contexts. +func (c *IoT) CancelAuditTaskWithContext(ctx aws.Context, input *CancelAuditTaskInput, opts ...request.Option) (*CancelAuditTaskOutput, error) { + req, out := c.CancelAuditTaskRequest(input) + req.SetContext(ctx) + req.ApplyOptions(opts...) + return out, req.Send() +} + const opCancelCertificateTransfer = "CancelCertificateTransfer" // CancelCertificateTransferRequest generates a "aws/request.Request" representing the @@ -1423,6 +1610,9 @@ func (c *IoT) CreateOTAUpdateRequest(input *CreateOTAUpdateInput) (req *request. // * ErrCodeInvalidRequestException "InvalidRequestException" // The request is not valid. // +// * ErrCodeLimitExceededException "LimitExceededException" +// A limit has been exceeded. +// // * ErrCodeResourceNotFoundException "ResourceNotFoundException" // The specified resource does not exist. // @@ -1758,6 +1948,176 @@ func (c *IoT) CreateRoleAliasWithContext(ctx aws.Context, input *CreateRoleAlias return out, req.Send() } +const opCreateScheduledAudit = "CreateScheduledAudit" + +// CreateScheduledAuditRequest generates a "aws/request.Request" representing the +// client's request for the CreateScheduledAudit operation. The "output" return +// value will be populated with the request's response once the request completes +// successfuly. +// +// Use "Send" method on the returned Request to send the API call to the service. +// the "output" return value is not valid until after Send returns without error. +// +// See CreateScheduledAudit for more information on using the CreateScheduledAudit +// API call, and error handling. +// +// This method is useful when you want to inject custom logic or configuration +// into the SDK's request lifecycle. Such as custom headers, or retry logic. +// +// +// // Example sending a request using the CreateScheduledAuditRequest method. +// req, resp := client.CreateScheduledAuditRequest(params) +// +// err := req.Send() +// if err == nil { // resp is now filled +// fmt.Println(resp) +// } +func (c *IoT) CreateScheduledAuditRequest(input *CreateScheduledAuditInput) (req *request.Request, output *CreateScheduledAuditOutput) { + op := &request.Operation{ + Name: opCreateScheduledAudit, + HTTPMethod: "POST", + HTTPPath: "/audit/scheduledaudits/{scheduledAuditName}", + } + + if input == nil { + input = &CreateScheduledAuditInput{} + } + + output = &CreateScheduledAuditOutput{} + req = c.newRequest(op, input, output) + return +} + +// CreateScheduledAudit API operation for AWS IoT. +// +// Creates a scheduled audit that is run at a specified time interval. +// +// Returns awserr.Error for service API and SDK errors. Use runtime type assertions +// with awserr.Error's Code and Message methods to get detailed information about +// the error. +// +// See the AWS API reference guide for AWS IoT's +// API operation CreateScheduledAudit for usage and error information. +// +// Returned Error Codes: +// * ErrCodeInvalidRequestException "InvalidRequestException" +// The request is not valid. +// +// * ErrCodeThrottlingException "ThrottlingException" +// The rate exceeds the limit. +// +// * ErrCodeInternalFailureException "InternalFailureException" +// An unexpected error has occurred. +// +// * ErrCodeLimitExceededException "LimitExceededException" +// A limit has been exceeded. +// +func (c *IoT) CreateScheduledAudit(input *CreateScheduledAuditInput) (*CreateScheduledAuditOutput, error) { + req, out := c.CreateScheduledAuditRequest(input) + return out, req.Send() +} + +// CreateScheduledAuditWithContext is the same as CreateScheduledAudit with the addition of +// the ability to pass a context and additional request options. +// +// See CreateScheduledAudit for details on how to use this API operation. +// +// The context must be non-nil and will be used for request cancellation. If +// the context is nil a panic will occur. In the future the SDK may create +// sub-contexts for http.Requests. See https://golang.org/pkg/context/ +// for more information on using Contexts. +func (c *IoT) CreateScheduledAuditWithContext(ctx aws.Context, input *CreateScheduledAuditInput, opts ...request.Option) (*CreateScheduledAuditOutput, error) { + req, out := c.CreateScheduledAuditRequest(input) + req.SetContext(ctx) + req.ApplyOptions(opts...) + return out, req.Send() +} + +const opCreateSecurityProfile = "CreateSecurityProfile" + +// CreateSecurityProfileRequest generates a "aws/request.Request" representing the +// client's request for the CreateSecurityProfile operation. The "output" return +// value will be populated with the request's response once the request completes +// successfuly. +// +// Use "Send" method on the returned Request to send the API call to the service. +// the "output" return value is not valid until after Send returns without error. +// +// See CreateSecurityProfile for more information on using the CreateSecurityProfile +// API call, and error handling. +// +// This method is useful when you want to inject custom logic or configuration +// into the SDK's request lifecycle. Such as custom headers, or retry logic. +// +// +// // Example sending a request using the CreateSecurityProfileRequest method. +// req, resp := client.CreateSecurityProfileRequest(params) +// +// err := req.Send() +// if err == nil { // resp is now filled +// fmt.Println(resp) +// } +func (c *IoT) CreateSecurityProfileRequest(input *CreateSecurityProfileInput) (req *request.Request, output *CreateSecurityProfileOutput) { + op := &request.Operation{ + Name: opCreateSecurityProfile, + HTTPMethod: "POST", + HTTPPath: "/security-profiles/{securityProfileName}", + } + + if input == nil { + input = &CreateSecurityProfileInput{} + } + + output = &CreateSecurityProfileOutput{} + req = c.newRequest(op, input, output) + return +} + +// CreateSecurityProfile API operation for AWS IoT. +// +// Creates a Device Defender security profile. +// +// Returns awserr.Error for service API and SDK errors. Use runtime type assertions +// with awserr.Error's Code and Message methods to get detailed information about +// the error. +// +// See the AWS API reference guide for AWS IoT's +// API operation CreateSecurityProfile for usage and error information. +// +// Returned Error Codes: +// * ErrCodeInvalidRequestException "InvalidRequestException" +// The request is not valid. +// +// * ErrCodeResourceAlreadyExistsException "ResourceAlreadyExistsException" +// The resource already exists. +// +// * ErrCodeThrottlingException "ThrottlingException" +// The rate exceeds the limit. +// +// * ErrCodeInternalFailureException "InternalFailureException" +// An unexpected error has occurred. +// +func (c *IoT) CreateSecurityProfile(input *CreateSecurityProfileInput) (*CreateSecurityProfileOutput, error) { + req, out := c.CreateSecurityProfileRequest(input) + return out, req.Send() +} + +// CreateSecurityProfileWithContext is the same as CreateSecurityProfile with the addition of +// the ability to pass a context and additional request options. +// +// See CreateSecurityProfile for details on how to use this API operation. +// +// The context must be non-nil and will be used for request cancellation. If +// the context is nil a panic will occur. In the future the SDK may create +// sub-contexts for http.Requests. See https://golang.org/pkg/context/ +// for more information on using Contexts. +func (c *IoT) CreateSecurityProfileWithContext(ctx aws.Context, input *CreateSecurityProfileInput, opts ...request.Option) (*CreateSecurityProfileOutput, error) { + req, out := c.CreateSecurityProfileRequest(input) + req.SetContext(ctx) + req.ApplyOptions(opts...) + return out, req.Send() +} + const opCreateStream = "CreateStream" // CreateStreamRequest generates a "aws/request.Request" representing the @@ -1819,6 +2179,9 @@ func (c *IoT) CreateStreamRequest(input *CreateStreamInput) (req *request.Reques // * ErrCodeInvalidRequestException "InvalidRequestException" // The request is not valid. // +// * ErrCodeLimitExceededException "LimitExceededException" +// A limit has been exceeded. +// // * ErrCodeResourceNotFoundException "ResourceNotFoundException" // The specified resource does not exist. // @@ -1902,6 +2265,9 @@ func (c *IoT) CreateThingRequest(input *CreateThingInput) (req *request.Request, // // Creates a thing record in the registry. // +// This is a control plane operation. See Authorization (http://docs.aws.amazon.com/iot/latest/developerguide/authorization.html) +// for information about authorizing control plane actions. +// // Returns awserr.Error for service API and SDK errors. Use runtime type assertions // with awserr.Error's Code and Message methods to get detailed information about // the error. @@ -1996,6 +2362,9 @@ func (c *IoT) CreateThingGroupRequest(input *CreateThingGroupInput) (req *reques // // Create a thing group. // +// This is a control plane operation. See Authorization (http://docs.aws.amazon.com/iot/latest/developerguide/authorization.html) +// for information about authorizing control plane actions. +// // Returns awserr.Error for service API and SDK errors. Use runtime type assertions // with awserr.Error's Code and Message methods to get detailed information about // the error. @@ -2220,6 +2589,93 @@ func (c *IoT) CreateTopicRuleWithContext(ctx aws.Context, input *CreateTopicRule return out, req.Send() } +const opDeleteAccountAuditConfiguration = "DeleteAccountAuditConfiguration" + +// DeleteAccountAuditConfigurationRequest generates a "aws/request.Request" representing the +// client's request for the DeleteAccountAuditConfiguration operation. The "output" return +// value will be populated with the request's response once the request completes +// successfuly. +// +// Use "Send" method on the returned Request to send the API call to the service. +// the "output" return value is not valid until after Send returns without error. +// +// See DeleteAccountAuditConfiguration for more information on using the DeleteAccountAuditConfiguration +// API call, and error handling. +// +// This method is useful when you want to inject custom logic or configuration +// into the SDK's request lifecycle. Such as custom headers, or retry logic. +// +// +// // Example sending a request using the DeleteAccountAuditConfigurationRequest method. +// req, resp := client.DeleteAccountAuditConfigurationRequest(params) +// +// err := req.Send() +// if err == nil { // resp is now filled +// fmt.Println(resp) +// } +func (c *IoT) DeleteAccountAuditConfigurationRequest(input *DeleteAccountAuditConfigurationInput) (req *request.Request, output *DeleteAccountAuditConfigurationOutput) { + op := &request.Operation{ + Name: opDeleteAccountAuditConfiguration, + HTTPMethod: "DELETE", + HTTPPath: "/audit/configuration", + } + + if input == nil { + input = &DeleteAccountAuditConfigurationInput{} + } + + output = &DeleteAccountAuditConfigurationOutput{} + req = c.newRequest(op, input, output) + return +} + +// DeleteAccountAuditConfiguration API operation for AWS IoT. +// +// Restores the default settings for Device Defender audits for this account. +// Any configuration data you entered is deleted and all audit checks are reset +// to disabled. +// +// Returns awserr.Error for service API and SDK errors. Use runtime type assertions +// with awserr.Error's Code and Message methods to get detailed information about +// the error. +// +// See the AWS API reference guide for AWS IoT's +// API operation DeleteAccountAuditConfiguration for usage and error information. +// +// Returned Error Codes: +// * ErrCodeInvalidRequestException "InvalidRequestException" +// The request is not valid. +// +// * ErrCodeResourceNotFoundException "ResourceNotFoundException" +// The specified resource does not exist. +// +// * ErrCodeThrottlingException "ThrottlingException" +// The rate exceeds the limit. +// +// * ErrCodeInternalFailureException "InternalFailureException" +// An unexpected error has occurred. +// +func (c *IoT) DeleteAccountAuditConfiguration(input *DeleteAccountAuditConfigurationInput) (*DeleteAccountAuditConfigurationOutput, error) { + req, out := c.DeleteAccountAuditConfigurationRequest(input) + return out, req.Send() +} + +// DeleteAccountAuditConfigurationWithContext is the same as DeleteAccountAuditConfiguration with the addition of +// the ability to pass a context and additional request options. +// +// See DeleteAccountAuditConfiguration for details on how to use this API operation. +// +// The context must be non-nil and will be used for request cancellation. If +// the context is nil a panic will occur. In the future the SDK may create +// sub-contexts for http.Requests. See https://golang.org/pkg/context/ +// for more information on using Contexts. +func (c *IoT) DeleteAccountAuditConfigurationWithContext(ctx aws.Context, input *DeleteAccountAuditConfigurationInput, opts ...request.Option) (*DeleteAccountAuditConfigurationOutput, error) { + req, out := c.DeleteAccountAuditConfigurationRequest(input) + req.SetContext(ctx) + req.ApplyOptions(opts...) + return out, req.Send() +} + const opDeleteAuthorizer = "DeleteAuthorizer" // DeleteAuthorizerRequest generates a "aws/request.Request" representing the @@ -2778,6 +3234,10 @@ func (c *IoT) DeleteOTAUpdateRequest(input *DeleteOTAUpdateInput) (req *request. // * ErrCodeServiceUnavailableException "ServiceUnavailableException" // The service is temporarily unavailable. // +// * ErrCodeVersionConflictException "VersionConflictException" +// An exception thrown when the version of an entity specified with the expectedVersion +// parameter does not match the latest version in the system. +// func (c *IoT) DeleteOTAUpdate(input *DeleteOTAUpdateInput) (*DeleteOTAUpdateOutput, error) { req, out := c.DeleteOTAUpdateRequest(input) return out, req.Send() @@ -3186,6 +3646,177 @@ func (c *IoT) DeleteRoleAliasWithContext(ctx aws.Context, input *DeleteRoleAlias return out, req.Send() } +const opDeleteScheduledAudit = "DeleteScheduledAudit" + +// DeleteScheduledAuditRequest generates a "aws/request.Request" representing the +// client's request for the DeleteScheduledAudit operation. The "output" return +// value will be populated with the request's response once the request completes +// successfuly. +// +// Use "Send" method on the returned Request to send the API call to the service. +// the "output" return value is not valid until after Send returns without error. +// +// See DeleteScheduledAudit for more information on using the DeleteScheduledAudit +// API call, and error handling. +// +// This method is useful when you want to inject custom logic or configuration +// into the SDK's request lifecycle. Such as custom headers, or retry logic. +// +// +// // Example sending a request using the DeleteScheduledAuditRequest method. +// req, resp := client.DeleteScheduledAuditRequest(params) +// +// err := req.Send() +// if err == nil { // resp is now filled +// fmt.Println(resp) +// } +func (c *IoT) DeleteScheduledAuditRequest(input *DeleteScheduledAuditInput) (req *request.Request, output *DeleteScheduledAuditOutput) { + op := &request.Operation{ + Name: opDeleteScheduledAudit, + HTTPMethod: "DELETE", + HTTPPath: "/audit/scheduledaudits/{scheduledAuditName}", + } + + if input == nil { + input = &DeleteScheduledAuditInput{} + } + + output = &DeleteScheduledAuditOutput{} + req = c.newRequest(op, input, output) + return +} + +// DeleteScheduledAudit API operation for AWS IoT. +// +// Deletes a scheduled audit. +// +// Returns awserr.Error for service API and SDK errors. Use runtime type assertions +// with awserr.Error's Code and Message methods to get detailed information about +// the error. +// +// See the AWS API reference guide for AWS IoT's +// API operation DeleteScheduledAudit for usage and error information. +// +// Returned Error Codes: +// * ErrCodeInvalidRequestException "InvalidRequestException" +// The request is not valid. +// +// * ErrCodeResourceNotFoundException "ResourceNotFoundException" +// The specified resource does not exist. +// +// * ErrCodeThrottlingException "ThrottlingException" +// The rate exceeds the limit. +// +// * ErrCodeInternalFailureException "InternalFailureException" +// An unexpected error has occurred. +// +func (c *IoT) DeleteScheduledAudit(input *DeleteScheduledAuditInput) (*DeleteScheduledAuditOutput, error) { + req, out := c.DeleteScheduledAuditRequest(input) + return out, req.Send() +} + +// DeleteScheduledAuditWithContext is the same as DeleteScheduledAudit with the addition of +// the ability to pass a context and additional request options. +// +// See DeleteScheduledAudit for details on how to use this API operation. +// +// The context must be non-nil and will be used for request cancellation. If +// the context is nil a panic will occur. In the future the SDK may create +// sub-contexts for http.Requests. See https://golang.org/pkg/context/ +// for more information on using Contexts. +func (c *IoT) DeleteScheduledAuditWithContext(ctx aws.Context, input *DeleteScheduledAuditInput, opts ...request.Option) (*DeleteScheduledAuditOutput, error) { + req, out := c.DeleteScheduledAuditRequest(input) + req.SetContext(ctx) + req.ApplyOptions(opts...) + return out, req.Send() +} + +const opDeleteSecurityProfile = "DeleteSecurityProfile" + +// DeleteSecurityProfileRequest generates a "aws/request.Request" representing the +// client's request for the DeleteSecurityProfile operation. The "output" return +// value will be populated with the request's response once the request completes +// successfuly. +// +// Use "Send" method on the returned Request to send the API call to the service. +// the "output" return value is not valid until after Send returns without error. +// +// See DeleteSecurityProfile for more information on using the DeleteSecurityProfile +// API call, and error handling. +// +// This method is useful when you want to inject custom logic or configuration +// into the SDK's request lifecycle. Such as custom headers, or retry logic. +// +// +// // Example sending a request using the DeleteSecurityProfileRequest method. +// req, resp := client.DeleteSecurityProfileRequest(params) +// +// err := req.Send() +// if err == nil { // resp is now filled +// fmt.Println(resp) +// } +func (c *IoT) DeleteSecurityProfileRequest(input *DeleteSecurityProfileInput) (req *request.Request, output *DeleteSecurityProfileOutput) { + op := &request.Operation{ + Name: opDeleteSecurityProfile, + HTTPMethod: "DELETE", + HTTPPath: "/security-profiles/{securityProfileName}", + } + + if input == nil { + input = &DeleteSecurityProfileInput{} + } + + output = &DeleteSecurityProfileOutput{} + req = c.newRequest(op, input, output) + return +} + +// DeleteSecurityProfile API operation for AWS IoT. +// +// Deletes a Device Defender security profile. +// +// Returns awserr.Error for service API and SDK errors. Use runtime type assertions +// with awserr.Error's Code and Message methods to get detailed information about +// the error. +// +// See the AWS API reference guide for AWS IoT's +// API operation DeleteSecurityProfile for usage and error information. +// +// Returned Error Codes: +// * ErrCodeInvalidRequestException "InvalidRequestException" +// The request is not valid. +// +// * ErrCodeThrottlingException "ThrottlingException" +// The rate exceeds the limit. +// +// * ErrCodeInternalFailureException "InternalFailureException" +// An unexpected error has occurred. +// +// * ErrCodeVersionConflictException "VersionConflictException" +// An exception thrown when the version of an entity specified with the expectedVersion +// parameter does not match the latest version in the system. +// +func (c *IoT) DeleteSecurityProfile(input *DeleteSecurityProfileInput) (*DeleteSecurityProfileOutput, error) { + req, out := c.DeleteSecurityProfileRequest(input) + return out, req.Send() +} + +// DeleteSecurityProfileWithContext is the same as DeleteSecurityProfile with the addition of +// the ability to pass a context and additional request options. +// +// See DeleteSecurityProfile for details on how to use this API operation. +// +// The context must be non-nil and will be used for request cancellation. If +// the context is nil a panic will occur. In the future the SDK may create +// sub-contexts for http.Requests. See https://golang.org/pkg/context/ +// for more information on using Contexts. +func (c *IoT) DeleteSecurityProfileWithContext(ctx aws.Context, input *DeleteSecurityProfileInput, opts ...request.Option) (*DeleteSecurityProfileOutput, error) { + req, out := c.DeleteSecurityProfileRequest(input) + req.SetContext(ctx) + req.ApplyOptions(opts...) + return out, req.Send() +} + const opDeleteStream = "DeleteStream" // DeleteStreamRequest generates a "aws/request.Request" representing the @@ -3819,6 +4450,172 @@ func (c *IoT) DeprecateThingTypeWithContext(ctx aws.Context, input *DeprecateThi return out, req.Send() } +const opDescribeAccountAuditConfiguration = "DescribeAccountAuditConfiguration" + +// DescribeAccountAuditConfigurationRequest generates a "aws/request.Request" representing the +// client's request for the DescribeAccountAuditConfiguration operation. The "output" return +// value will be populated with the request's response once the request completes +// successfuly. +// +// Use "Send" method on the returned Request to send the API call to the service. +// the "output" return value is not valid until after Send returns without error. +// +// See DescribeAccountAuditConfiguration for more information on using the DescribeAccountAuditConfiguration +// API call, and error handling. +// +// This method is useful when you want to inject custom logic or configuration +// into the SDK's request lifecycle. Such as custom headers, or retry logic. +// +// +// // Example sending a request using the DescribeAccountAuditConfigurationRequest method. +// req, resp := client.DescribeAccountAuditConfigurationRequest(params) +// +// err := req.Send() +// if err == nil { // resp is now filled +// fmt.Println(resp) +// } +func (c *IoT) DescribeAccountAuditConfigurationRequest(input *DescribeAccountAuditConfigurationInput) (req *request.Request, output *DescribeAccountAuditConfigurationOutput) { + op := &request.Operation{ + Name: opDescribeAccountAuditConfiguration, + HTTPMethod: "GET", + HTTPPath: "/audit/configuration", + } + + if input == nil { + input = &DescribeAccountAuditConfigurationInput{} + } + + output = &DescribeAccountAuditConfigurationOutput{} + req = c.newRequest(op, input, output) + return +} + +// DescribeAccountAuditConfiguration API operation for AWS IoT. +// +// Gets information about the Device Defender audit settings for this account. +// Settings include how audit notifications are sent and which audit checks +// are enabled or disabled. +// +// Returns awserr.Error for service API and SDK errors. Use runtime type assertions +// with awserr.Error's Code and Message methods to get detailed information about +// the error. +// +// See the AWS API reference guide for AWS IoT's +// API operation DescribeAccountAuditConfiguration for usage and error information. +// +// Returned Error Codes: +// * ErrCodeThrottlingException "ThrottlingException" +// The rate exceeds the limit. +// +// * ErrCodeInternalFailureException "InternalFailureException" +// An unexpected error has occurred. +// +func (c *IoT) DescribeAccountAuditConfiguration(input *DescribeAccountAuditConfigurationInput) (*DescribeAccountAuditConfigurationOutput, error) { + req, out := c.DescribeAccountAuditConfigurationRequest(input) + return out, req.Send() +} + +// DescribeAccountAuditConfigurationWithContext is the same as DescribeAccountAuditConfiguration with the addition of +// the ability to pass a context and additional request options. +// +// See DescribeAccountAuditConfiguration for details on how to use this API operation. +// +// The context must be non-nil and will be used for request cancellation. If +// the context is nil a panic will occur. In the future the SDK may create +// sub-contexts for http.Requests. See https://golang.org/pkg/context/ +// for more information on using Contexts. +func (c *IoT) DescribeAccountAuditConfigurationWithContext(ctx aws.Context, input *DescribeAccountAuditConfigurationInput, opts ...request.Option) (*DescribeAccountAuditConfigurationOutput, error) { + req, out := c.DescribeAccountAuditConfigurationRequest(input) + req.SetContext(ctx) + req.ApplyOptions(opts...) + return out, req.Send() +} + +const opDescribeAuditTask = "DescribeAuditTask" + +// DescribeAuditTaskRequest generates a "aws/request.Request" representing the +// client's request for the DescribeAuditTask operation. The "output" return +// value will be populated with the request's response once the request completes +// successfuly. +// +// Use "Send" method on the returned Request to send the API call to the service. +// the "output" return value is not valid until after Send returns without error. +// +// See DescribeAuditTask for more information on using the DescribeAuditTask +// API call, and error handling. +// +// This method is useful when you want to inject custom logic or configuration +// into the SDK's request lifecycle. Such as custom headers, or retry logic. +// +// +// // Example sending a request using the DescribeAuditTaskRequest method. +// req, resp := client.DescribeAuditTaskRequest(params) +// +// err := req.Send() +// if err == nil { // resp is now filled +// fmt.Println(resp) +// } +func (c *IoT) DescribeAuditTaskRequest(input *DescribeAuditTaskInput) (req *request.Request, output *DescribeAuditTaskOutput) { + op := &request.Operation{ + Name: opDescribeAuditTask, + HTTPMethod: "GET", + HTTPPath: "/audit/tasks/{taskId}", + } + + if input == nil { + input = &DescribeAuditTaskInput{} + } + + output = &DescribeAuditTaskOutput{} + req = c.newRequest(op, input, output) + return +} + +// DescribeAuditTask API operation for AWS IoT. +// +// Gets information about a Device Defender audit. +// +// Returns awserr.Error for service API and SDK errors. Use runtime type assertions +// with awserr.Error's Code and Message methods to get detailed information about +// the error. +// +// See the AWS API reference guide for AWS IoT's +// API operation DescribeAuditTask for usage and error information. +// +// Returned Error Codes: +// * ErrCodeInvalidRequestException "InvalidRequestException" +// The request is not valid. +// +// * ErrCodeResourceNotFoundException "ResourceNotFoundException" +// The specified resource does not exist. +// +// * ErrCodeThrottlingException "ThrottlingException" +// The rate exceeds the limit. +// +// * ErrCodeInternalFailureException "InternalFailureException" +// An unexpected error has occurred. +// +func (c *IoT) DescribeAuditTask(input *DescribeAuditTaskInput) (*DescribeAuditTaskOutput, error) { + req, out := c.DescribeAuditTaskRequest(input) + return out, req.Send() +} + +// DescribeAuditTaskWithContext is the same as DescribeAuditTask with the addition of +// the ability to pass a context and additional request options. +// +// See DescribeAuditTask for details on how to use this API operation. +// +// The context must be non-nil and will be used for request cancellation. If +// the context is nil a panic will occur. In the future the SDK may create +// sub-contexts for http.Requests. See https://golang.org/pkg/context/ +// for more information on using Contexts. +func (c *IoT) DescribeAuditTaskWithContext(ctx aws.Context, input *DescribeAuditTaskInput, opts ...request.Option) (*DescribeAuditTaskOutput, error) { + req, out := c.DescribeAuditTaskRequest(input) + req.SetContext(ctx) + req.ApplyOptions(opts...) + return out, req.Send() +} + const opDescribeAuthorizer = "DescribeAuthorizer" // DescribeAuthorizerRequest generates a "aws/request.Request" representing the @@ -4699,6 +5496,176 @@ func (c *IoT) DescribeRoleAliasWithContext(ctx aws.Context, input *DescribeRoleA return out, req.Send() } +const opDescribeScheduledAudit = "DescribeScheduledAudit" + +// DescribeScheduledAuditRequest generates a "aws/request.Request" representing the +// client's request for the DescribeScheduledAudit operation. The "output" return +// value will be populated with the request's response once the request completes +// successfuly. +// +// Use "Send" method on the returned Request to send the API call to the service. +// the "output" return value is not valid until after Send returns without error. +// +// See DescribeScheduledAudit for more information on using the DescribeScheduledAudit +// API call, and error handling. +// +// This method is useful when you want to inject custom logic or configuration +// into the SDK's request lifecycle. Such as custom headers, or retry logic. +// +// +// // Example sending a request using the DescribeScheduledAuditRequest method. +// req, resp := client.DescribeScheduledAuditRequest(params) +// +// err := req.Send() +// if err == nil { // resp is now filled +// fmt.Println(resp) +// } +func (c *IoT) DescribeScheduledAuditRequest(input *DescribeScheduledAuditInput) (req *request.Request, output *DescribeScheduledAuditOutput) { + op := &request.Operation{ + Name: opDescribeScheduledAudit, + HTTPMethod: "GET", + HTTPPath: "/audit/scheduledaudits/{scheduledAuditName}", + } + + if input == nil { + input = &DescribeScheduledAuditInput{} + } + + output = &DescribeScheduledAuditOutput{} + req = c.newRequest(op, input, output) + return +} + +// DescribeScheduledAudit API operation for AWS IoT. +// +// Gets information about a scheduled audit. +// +// Returns awserr.Error for service API and SDK errors. Use runtime type assertions +// with awserr.Error's Code and Message methods to get detailed information about +// the error. +// +// See the AWS API reference guide for AWS IoT's +// API operation DescribeScheduledAudit for usage and error information. +// +// Returned Error Codes: +// * ErrCodeInvalidRequestException "InvalidRequestException" +// The request is not valid. +// +// * ErrCodeResourceNotFoundException "ResourceNotFoundException" +// The specified resource does not exist. +// +// * ErrCodeThrottlingException "ThrottlingException" +// The rate exceeds the limit. +// +// * ErrCodeInternalFailureException "InternalFailureException" +// An unexpected error has occurred. +// +func (c *IoT) DescribeScheduledAudit(input *DescribeScheduledAuditInput) (*DescribeScheduledAuditOutput, error) { + req, out := c.DescribeScheduledAuditRequest(input) + return out, req.Send() +} + +// DescribeScheduledAuditWithContext is the same as DescribeScheduledAudit with the addition of +// the ability to pass a context and additional request options. +// +// See DescribeScheduledAudit for details on how to use this API operation. +// +// The context must be non-nil and will be used for request cancellation. If +// the context is nil a panic will occur. In the future the SDK may create +// sub-contexts for http.Requests. See https://golang.org/pkg/context/ +// for more information on using Contexts. +func (c *IoT) DescribeScheduledAuditWithContext(ctx aws.Context, input *DescribeScheduledAuditInput, opts ...request.Option) (*DescribeScheduledAuditOutput, error) { + req, out := c.DescribeScheduledAuditRequest(input) + req.SetContext(ctx) + req.ApplyOptions(opts...) + return out, req.Send() +} + +const opDescribeSecurityProfile = "DescribeSecurityProfile" + +// DescribeSecurityProfileRequest generates a "aws/request.Request" representing the +// client's request for the DescribeSecurityProfile operation. The "output" return +// value will be populated with the request's response once the request completes +// successfuly. +// +// Use "Send" method on the returned Request to send the API call to the service. +// the "output" return value is not valid until after Send returns without error. +// +// See DescribeSecurityProfile for more information on using the DescribeSecurityProfile +// API call, and error handling. +// +// This method is useful when you want to inject custom logic or configuration +// into the SDK's request lifecycle. Such as custom headers, or retry logic. +// +// +// // Example sending a request using the DescribeSecurityProfileRequest method. +// req, resp := client.DescribeSecurityProfileRequest(params) +// +// err := req.Send() +// if err == nil { // resp is now filled +// fmt.Println(resp) +// } +func (c *IoT) DescribeSecurityProfileRequest(input *DescribeSecurityProfileInput) (req *request.Request, output *DescribeSecurityProfileOutput) { + op := &request.Operation{ + Name: opDescribeSecurityProfile, + HTTPMethod: "GET", + HTTPPath: "/security-profiles/{securityProfileName}", + } + + if input == nil { + input = &DescribeSecurityProfileInput{} + } + + output = &DescribeSecurityProfileOutput{} + req = c.newRequest(op, input, output) + return +} + +// DescribeSecurityProfile API operation for AWS IoT. +// +// Gets information about a Device Defender security profile. +// +// Returns awserr.Error for service API and SDK errors. Use runtime type assertions +// with awserr.Error's Code and Message methods to get detailed information about +// the error. +// +// See the AWS API reference guide for AWS IoT's +// API operation DescribeSecurityProfile for usage and error information. +// +// Returned Error Codes: +// * ErrCodeInvalidRequestException "InvalidRequestException" +// The request is not valid. +// +// * ErrCodeResourceNotFoundException "ResourceNotFoundException" +// The specified resource does not exist. +// +// * ErrCodeThrottlingException "ThrottlingException" +// The rate exceeds the limit. +// +// * ErrCodeInternalFailureException "InternalFailureException" +// An unexpected error has occurred. +// +func (c *IoT) DescribeSecurityProfile(input *DescribeSecurityProfileInput) (*DescribeSecurityProfileOutput, error) { + req, out := c.DescribeSecurityProfileRequest(input) + return out, req.Send() +} + +// DescribeSecurityProfileWithContext is the same as DescribeSecurityProfile with the addition of +// the ability to pass a context and additional request options. +// +// See DescribeSecurityProfile for details on how to use this API operation. +// +// The context must be non-nil and will be used for request cancellation. If +// the context is nil a panic will occur. In the future the SDK may create +// sub-contexts for http.Requests. See https://golang.org/pkg/context/ +// for more information on using Contexts. +func (c *IoT) DescribeSecurityProfileWithContext(ctx aws.Context, input *DescribeSecurityProfileInput, opts ...request.Option) (*DescribeSecurityProfileOutput, error) { + req, out := c.DescribeSecurityProfileRequest(input) + req.SetContext(ctx) + req.ApplyOptions(opts...) + return out, req.Send() +} + const opDescribeStream = "DescribeStream" // DescribeStreamRequest generates a "aws/request.Request" representing the @@ -5262,6 +6229,8 @@ const opDetachPrincipalPolicy = "DetachPrincipalPolicy" // if err == nil { // resp is now filled // fmt.Println(resp) // } +// +// Deprecated: DetachPrincipalPolicy has been deprecated func (c *IoT) DetachPrincipalPolicyRequest(input *DetachPrincipalPolicyInput) (req *request.Request, output *DetachPrincipalPolicyOutput) { if c.Client.Config.Logger != nil { c.Client.Config.Logger.Log("This operation, DetachPrincipalPolicy, has been deprecated") @@ -5315,6 +6284,8 @@ func (c *IoT) DetachPrincipalPolicyRequest(input *DetachPrincipalPolicyInput) (r // * ErrCodeInternalFailureException "InternalFailureException" // An unexpected error has occurred. // +// +// Deprecated: DetachPrincipalPolicy has been deprecated func (c *IoT) DetachPrincipalPolicy(input *DetachPrincipalPolicyInput) (*DetachPrincipalPolicyOutput, error) { req, out := c.DetachPrincipalPolicyRequest(input) return out, req.Send() @@ -5329,6 +6300,8 @@ func (c *IoT) DetachPrincipalPolicy(input *DetachPrincipalPolicyInput) (*DetachP // the context is nil a panic will occur. In the future the SDK may create // sub-contexts for http.Requests. See https://golang.org/pkg/context/ // for more information on using Contexts. +// +// Deprecated: DetachPrincipalPolicyWithContext has been deprecated func (c *IoT) DetachPrincipalPolicyWithContext(ctx aws.Context, input *DetachPrincipalPolicyInput, opts ...request.Option) (*DetachPrincipalPolicyOutput, error) { req, out := c.DetachPrincipalPolicyRequest(input) req.SetContext(ctx) @@ -5336,6 +6309,92 @@ func (c *IoT) DetachPrincipalPolicyWithContext(ctx aws.Context, input *DetachPri return out, req.Send() } +const opDetachSecurityProfile = "DetachSecurityProfile" + +// DetachSecurityProfileRequest generates a "aws/request.Request" representing the +// client's request for the DetachSecurityProfile operation. The "output" return +// value will be populated with the request's response once the request completes +// successfuly. +// +// Use "Send" method on the returned Request to send the API call to the service. +// the "output" return value is not valid until after Send returns without error. +// +// See DetachSecurityProfile for more information on using the DetachSecurityProfile +// API call, and error handling. +// +// This method is useful when you want to inject custom logic or configuration +// into the SDK's request lifecycle. Such as custom headers, or retry logic. +// +// +// // Example sending a request using the DetachSecurityProfileRequest method. +// req, resp := client.DetachSecurityProfileRequest(params) +// +// err := req.Send() +// if err == nil { // resp is now filled +// fmt.Println(resp) +// } +func (c *IoT) DetachSecurityProfileRequest(input *DetachSecurityProfileInput) (req *request.Request, output *DetachSecurityProfileOutput) { + op := &request.Operation{ + Name: opDetachSecurityProfile, + HTTPMethod: "DELETE", + HTTPPath: "/security-profiles/{securityProfileName}/targets", + } + + if input == nil { + input = &DetachSecurityProfileInput{} + } + + output = &DetachSecurityProfileOutput{} + req = c.newRequest(op, input, output) + return +} + +// DetachSecurityProfile API operation for AWS IoT. +// +// Disassociates a Device Defender security profile from a thing group or from +// this account. +// +// Returns awserr.Error for service API and SDK errors. Use runtime type assertions +// with awserr.Error's Code and Message methods to get detailed information about +// the error. +// +// See the AWS API reference guide for AWS IoT's +// API operation DetachSecurityProfile for usage and error information. +// +// Returned Error Codes: +// * ErrCodeInvalidRequestException "InvalidRequestException" +// The request is not valid. +// +// * ErrCodeResourceNotFoundException "ResourceNotFoundException" +// The specified resource does not exist. +// +// * ErrCodeThrottlingException "ThrottlingException" +// The rate exceeds the limit. +// +// * ErrCodeInternalFailureException "InternalFailureException" +// An unexpected error has occurred. +// +func (c *IoT) DetachSecurityProfile(input *DetachSecurityProfileInput) (*DetachSecurityProfileOutput, error) { + req, out := c.DetachSecurityProfileRequest(input) + return out, req.Send() +} + +// DetachSecurityProfileWithContext is the same as DetachSecurityProfile with the addition of +// the ability to pass a context and additional request options. +// +// See DetachSecurityProfile for details on how to use this API operation. +// +// The context must be non-nil and will be used for request cancellation. If +// the context is nil a panic will occur. In the future the SDK may create +// sub-contexts for http.Requests. See https://golang.org/pkg/context/ +// for more information on using Contexts. +func (c *IoT) DetachSecurityProfileWithContext(ctx aws.Context, input *DetachSecurityProfileInput, opts ...request.Option) (*DetachSecurityProfileOutput, error) { + req, out := c.DetachSecurityProfileRequest(input) + req.SetContext(ctx) + req.ApplyOptions(opts...) + return out, req.Send() +} + const opDetachThingPrincipal = "DetachThingPrincipal" // DetachThingPrincipalRequest generates a "aws/request.Request" representing the @@ -5913,6 +6972,8 @@ func (c *IoT) GetLoggingOptionsRequest(input *GetLoggingOptionsInput) (req *requ // // Gets the logging options. // +// NOTE: use of this command is not recommended. Use GetV2LoggingOptions instead. +// // Returns awserr.Error for service API and SDK errors. Use runtime type assertions // with awserr.Error's Code and Message methods to get detailed information about // the error. @@ -6453,8 +7514,8 @@ func (c *IoT) GetV2LoggingOptionsRequest(input *GetV2LoggingOptionsInput) (req * // * ErrCodeInternalException "InternalException" // An unexpected error has occurred. // -// * ErrCodeInvalidRequestException "InvalidRequestException" -// The request is not valid. +// * ErrCodeNotConfiguredException "NotConfiguredException" +// The resource is not configured. // // * ErrCodeServiceUnavailableException "ServiceUnavailableException" // The service is temporarily unavailable. @@ -6480,6 +7541,91 @@ func (c *IoT) GetV2LoggingOptionsWithContext(ctx aws.Context, input *GetV2Loggin return out, req.Send() } +const opListActiveViolations = "ListActiveViolations" + +// ListActiveViolationsRequest generates a "aws/request.Request" representing the +// client's request for the ListActiveViolations operation. The "output" return +// value will be populated with the request's response once the request completes +// successfuly. +// +// Use "Send" method on the returned Request to send the API call to the service. +// the "output" return value is not valid until after Send returns without error. +// +// See ListActiveViolations for more information on using the ListActiveViolations +// API call, and error handling. +// +// This method is useful when you want to inject custom logic or configuration +// into the SDK's request lifecycle. Such as custom headers, or retry logic. +// +// +// // Example sending a request using the ListActiveViolationsRequest method. +// req, resp := client.ListActiveViolationsRequest(params) +// +// err := req.Send() +// if err == nil { // resp is now filled +// fmt.Println(resp) +// } +func (c *IoT) ListActiveViolationsRequest(input *ListActiveViolationsInput) (req *request.Request, output *ListActiveViolationsOutput) { + op := &request.Operation{ + Name: opListActiveViolations, + HTTPMethod: "GET", + HTTPPath: "/active-violations", + } + + if input == nil { + input = &ListActiveViolationsInput{} + } + + output = &ListActiveViolationsOutput{} + req = c.newRequest(op, input, output) + return +} + +// ListActiveViolations API operation for AWS IoT. +// +// Lists the active violations for a given Device Defender security profile. +// +// Returns awserr.Error for service API and SDK errors. Use runtime type assertions +// with awserr.Error's Code and Message methods to get detailed information about +// the error. +// +// See the AWS API reference guide for AWS IoT's +// API operation ListActiveViolations for usage and error information. +// +// Returned Error Codes: +// * ErrCodeInvalidRequestException "InvalidRequestException" +// The request is not valid. +// +// * ErrCodeResourceNotFoundException "ResourceNotFoundException" +// The specified resource does not exist. +// +// * ErrCodeThrottlingException "ThrottlingException" +// The rate exceeds the limit. +// +// * ErrCodeInternalFailureException "InternalFailureException" +// An unexpected error has occurred. +// +func (c *IoT) ListActiveViolations(input *ListActiveViolationsInput) (*ListActiveViolationsOutput, error) { + req, out := c.ListActiveViolationsRequest(input) + return out, req.Send() +} + +// ListActiveViolationsWithContext is the same as ListActiveViolations with the addition of +// the ability to pass a context and additional request options. +// +// See ListActiveViolations for details on how to use this API operation. +// +// The context must be non-nil and will be used for request cancellation. If +// the context is nil a panic will occur. In the future the SDK may create +// sub-contexts for http.Requests. See https://golang.org/pkg/context/ +// for more information on using Contexts. +func (c *IoT) ListActiveViolationsWithContext(ctx aws.Context, input *ListActiveViolationsInput, opts ...request.Option) (*ListActiveViolationsOutput, error) { + req, out := c.ListActiveViolationsRequest(input) + req.SetContext(ctx) + req.ApplyOptions(opts...) + return out, req.Send() +} + const opListAttachedPolicies = "ListAttachedPolicies" // ListAttachedPoliciesRequest generates a "aws/request.Request" representing the @@ -6574,6 +7720,173 @@ func (c *IoT) ListAttachedPoliciesWithContext(ctx aws.Context, input *ListAttach return out, req.Send() } +const opListAuditFindings = "ListAuditFindings" + +// ListAuditFindingsRequest generates a "aws/request.Request" representing the +// client's request for the ListAuditFindings operation. The "output" return +// value will be populated with the request's response once the request completes +// successfuly. +// +// Use "Send" method on the returned Request to send the API call to the service. +// the "output" return value is not valid until after Send returns without error. +// +// See ListAuditFindings for more information on using the ListAuditFindings +// API call, and error handling. +// +// This method is useful when you want to inject custom logic or configuration +// into the SDK's request lifecycle. Such as custom headers, or retry logic. +// +// +// // Example sending a request using the ListAuditFindingsRequest method. +// req, resp := client.ListAuditFindingsRequest(params) +// +// err := req.Send() +// if err == nil { // resp is now filled +// fmt.Println(resp) +// } +func (c *IoT) ListAuditFindingsRequest(input *ListAuditFindingsInput) (req *request.Request, output *ListAuditFindingsOutput) { + op := &request.Operation{ + Name: opListAuditFindings, + HTTPMethod: "POST", + HTTPPath: "/audit/findings", + } + + if input == nil { + input = &ListAuditFindingsInput{} + } + + output = &ListAuditFindingsOutput{} + req = c.newRequest(op, input, output) + return +} + +// ListAuditFindings API operation for AWS IoT. +// +// Lists the findings (results) of a Device Defender audit or of the audits +// performed during a specified time period. (Findings are retained for 180 +// days.) +// +// Returns awserr.Error for service API and SDK errors. Use runtime type assertions +// with awserr.Error's Code and Message methods to get detailed information about +// the error. +// +// See the AWS API reference guide for AWS IoT's +// API operation ListAuditFindings for usage and error information. +// +// Returned Error Codes: +// * ErrCodeInvalidRequestException "InvalidRequestException" +// The request is not valid. +// +// * ErrCodeThrottlingException "ThrottlingException" +// The rate exceeds the limit. +// +// * ErrCodeInternalFailureException "InternalFailureException" +// An unexpected error has occurred. +// +func (c *IoT) ListAuditFindings(input *ListAuditFindingsInput) (*ListAuditFindingsOutput, error) { + req, out := c.ListAuditFindingsRequest(input) + return out, req.Send() +} + +// ListAuditFindingsWithContext is the same as ListAuditFindings with the addition of +// the ability to pass a context and additional request options. +// +// See ListAuditFindings for details on how to use this API operation. +// +// The context must be non-nil and will be used for request cancellation. If +// the context is nil a panic will occur. In the future the SDK may create +// sub-contexts for http.Requests. See https://golang.org/pkg/context/ +// for more information on using Contexts. +func (c *IoT) ListAuditFindingsWithContext(ctx aws.Context, input *ListAuditFindingsInput, opts ...request.Option) (*ListAuditFindingsOutput, error) { + req, out := c.ListAuditFindingsRequest(input) + req.SetContext(ctx) + req.ApplyOptions(opts...) + return out, req.Send() +} + +const opListAuditTasks = "ListAuditTasks" + +// ListAuditTasksRequest generates a "aws/request.Request" representing the +// client's request for the ListAuditTasks operation. The "output" return +// value will be populated with the request's response once the request completes +// successfuly. +// +// Use "Send" method on the returned Request to send the API call to the service. +// the "output" return value is not valid until after Send returns without error. +// +// See ListAuditTasks for more information on using the ListAuditTasks +// API call, and error handling. +// +// This method is useful when you want to inject custom logic or configuration +// into the SDK's request lifecycle. Such as custom headers, or retry logic. +// +// +// // Example sending a request using the ListAuditTasksRequest method. +// req, resp := client.ListAuditTasksRequest(params) +// +// err := req.Send() +// if err == nil { // resp is now filled +// fmt.Println(resp) +// } +func (c *IoT) ListAuditTasksRequest(input *ListAuditTasksInput) (req *request.Request, output *ListAuditTasksOutput) { + op := &request.Operation{ + Name: opListAuditTasks, + HTTPMethod: "GET", + HTTPPath: "/audit/tasks", + } + + if input == nil { + input = &ListAuditTasksInput{} + } + + output = &ListAuditTasksOutput{} + req = c.newRequest(op, input, output) + return +} + +// ListAuditTasks API operation for AWS IoT. +// +// Lists the Device Defender audits that have been performed during a given +// time period. +// +// Returns awserr.Error for service API and SDK errors. Use runtime type assertions +// with awserr.Error's Code and Message methods to get detailed information about +// the error. +// +// See the AWS API reference guide for AWS IoT's +// API operation ListAuditTasks for usage and error information. +// +// Returned Error Codes: +// * ErrCodeInvalidRequestException "InvalidRequestException" +// The request is not valid. +// +// * ErrCodeThrottlingException "ThrottlingException" +// The rate exceeds the limit. +// +// * ErrCodeInternalFailureException "InternalFailureException" +// An unexpected error has occurred. +// +func (c *IoT) ListAuditTasks(input *ListAuditTasksInput) (*ListAuditTasksOutput, error) { + req, out := c.ListAuditTasksRequest(input) + return out, req.Send() +} + +// ListAuditTasksWithContext is the same as ListAuditTasks with the addition of +// the ability to pass a context and additional request options. +// +// See ListAuditTasks for details on how to use this API operation. +// +// The context must be non-nil and will be used for request cancellation. If +// the context is nil a panic will occur. In the future the SDK may create +// sub-contexts for http.Requests. See https://golang.org/pkg/context/ +// for more information on using Contexts. +func (c *IoT) ListAuditTasksWithContext(ctx aws.Context, input *ListAuditTasksInput, opts ...request.Option) (*ListAuditTasksOutput, error) { + req, out := c.ListAuditTasksRequest(input) + req.SetContext(ctx) + req.ApplyOptions(opts...) + return out, req.Send() +} + const opListAuthorizers = "ListAuthorizers" // ListAuthorizersRequest generates a "aws/request.Request" representing the @@ -7563,6 +8876,8 @@ const opListPolicyPrincipals = "ListPolicyPrincipals" // if err == nil { // resp is now filled // fmt.Println(resp) // } +// +// Deprecated: ListPolicyPrincipals has been deprecated func (c *IoT) ListPolicyPrincipalsRequest(input *ListPolicyPrincipalsInput) (req *request.Request, output *ListPolicyPrincipalsOutput) { if c.Client.Config.Logger != nil { c.Client.Config.Logger.Log("This operation, ListPolicyPrincipals, has been deprecated") @@ -7614,6 +8929,8 @@ func (c *IoT) ListPolicyPrincipalsRequest(input *ListPolicyPrincipalsInput) (req // * ErrCodeInternalFailureException "InternalFailureException" // An unexpected error has occurred. // +// +// Deprecated: ListPolicyPrincipals has been deprecated func (c *IoT) ListPolicyPrincipals(input *ListPolicyPrincipalsInput) (*ListPolicyPrincipalsOutput, error) { req, out := c.ListPolicyPrincipalsRequest(input) return out, req.Send() @@ -7628,6 +8945,8 @@ func (c *IoT) ListPolicyPrincipals(input *ListPolicyPrincipalsInput) (*ListPolic // the context is nil a panic will occur. In the future the SDK may create // sub-contexts for http.Requests. See https://golang.org/pkg/context/ // for more information on using Contexts. +// +// Deprecated: ListPolicyPrincipalsWithContext has been deprecated func (c *IoT) ListPolicyPrincipalsWithContext(ctx aws.Context, input *ListPolicyPrincipalsInput, opts ...request.Option) (*ListPolicyPrincipalsOutput, error) { req, out := c.ListPolicyPrincipalsRequest(input) req.SetContext(ctx) @@ -7750,6 +9069,8 @@ const opListPrincipalPolicies = "ListPrincipalPolicies" // if err == nil { // resp is now filled // fmt.Println(resp) // } +// +// Deprecated: ListPrincipalPolicies has been deprecated func (c *IoT) ListPrincipalPoliciesRequest(input *ListPrincipalPoliciesInput) (req *request.Request, output *ListPrincipalPoliciesOutput) { if c.Client.Config.Logger != nil { c.Client.Config.Logger.Log("This operation, ListPrincipalPolicies, has been deprecated") @@ -7802,6 +9123,8 @@ func (c *IoT) ListPrincipalPoliciesRequest(input *ListPrincipalPoliciesInput) (r // * ErrCodeInternalFailureException "InternalFailureException" // An unexpected error has occurred. // +// +// Deprecated: ListPrincipalPolicies has been deprecated func (c *IoT) ListPrincipalPolicies(input *ListPrincipalPoliciesInput) (*ListPrincipalPoliciesOutput, error) { req, out := c.ListPrincipalPoliciesRequest(input) return out, req.Send() @@ -7816,6 +9139,8 @@ func (c *IoT) ListPrincipalPolicies(input *ListPrincipalPoliciesInput) (*ListPri // the context is nil a panic will occur. In the future the SDK may create // sub-contexts for http.Requests. See https://golang.org/pkg/context/ // for more information on using Contexts. +// +// Deprecated: ListPrincipalPoliciesWithContext has been deprecated func (c *IoT) ListPrincipalPoliciesWithContext(ctx aws.Context, input *ListPrincipalPoliciesInput, opts ...request.Option) (*ListPrincipalPoliciesOutput, error) { req, out := c.ListPrincipalPoliciesRequest(input) req.SetContext(ctx) @@ -8002,6 +9327,257 @@ func (c *IoT) ListRoleAliasesWithContext(ctx aws.Context, input *ListRoleAliases return out, req.Send() } +const opListScheduledAudits = "ListScheduledAudits" + +// ListScheduledAuditsRequest generates a "aws/request.Request" representing the +// client's request for the ListScheduledAudits operation. The "output" return +// value will be populated with the request's response once the request completes +// successfuly. +// +// Use "Send" method on the returned Request to send the API call to the service. +// the "output" return value is not valid until after Send returns without error. +// +// See ListScheduledAudits for more information on using the ListScheduledAudits +// API call, and error handling. +// +// This method is useful when you want to inject custom logic or configuration +// into the SDK's request lifecycle. Such as custom headers, or retry logic. +// +// +// // Example sending a request using the ListScheduledAuditsRequest method. +// req, resp := client.ListScheduledAuditsRequest(params) +// +// err := req.Send() +// if err == nil { // resp is now filled +// fmt.Println(resp) +// } +func (c *IoT) ListScheduledAuditsRequest(input *ListScheduledAuditsInput) (req *request.Request, output *ListScheduledAuditsOutput) { + op := &request.Operation{ + Name: opListScheduledAudits, + HTTPMethod: "GET", + HTTPPath: "/audit/scheduledaudits", + } + + if input == nil { + input = &ListScheduledAuditsInput{} + } + + output = &ListScheduledAuditsOutput{} + req = c.newRequest(op, input, output) + return +} + +// ListScheduledAudits API operation for AWS IoT. +// +// Lists all of your scheduled audits. +// +// Returns awserr.Error for service API and SDK errors. Use runtime type assertions +// with awserr.Error's Code and Message methods to get detailed information about +// the error. +// +// See the AWS API reference guide for AWS IoT's +// API operation ListScheduledAudits for usage and error information. +// +// Returned Error Codes: +// * ErrCodeInvalidRequestException "InvalidRequestException" +// The request is not valid. +// +// * ErrCodeThrottlingException "ThrottlingException" +// The rate exceeds the limit. +// +// * ErrCodeInternalFailureException "InternalFailureException" +// An unexpected error has occurred. +// +func (c *IoT) ListScheduledAudits(input *ListScheduledAuditsInput) (*ListScheduledAuditsOutput, error) { + req, out := c.ListScheduledAuditsRequest(input) + return out, req.Send() +} + +// ListScheduledAuditsWithContext is the same as ListScheduledAudits with the addition of +// the ability to pass a context and additional request options. +// +// See ListScheduledAudits for details on how to use this API operation. +// +// The context must be non-nil and will be used for request cancellation. If +// the context is nil a panic will occur. In the future the SDK may create +// sub-contexts for http.Requests. See https://golang.org/pkg/context/ +// for more information on using Contexts. +func (c *IoT) ListScheduledAuditsWithContext(ctx aws.Context, input *ListScheduledAuditsInput, opts ...request.Option) (*ListScheduledAuditsOutput, error) { + req, out := c.ListScheduledAuditsRequest(input) + req.SetContext(ctx) + req.ApplyOptions(opts...) + return out, req.Send() +} + +const opListSecurityProfiles = "ListSecurityProfiles" + +// ListSecurityProfilesRequest generates a "aws/request.Request" representing the +// client's request for the ListSecurityProfiles operation. The "output" return +// value will be populated with the request's response once the request completes +// successfuly. +// +// Use "Send" method on the returned Request to send the API call to the service. +// the "output" return value is not valid until after Send returns without error. +// +// See ListSecurityProfiles for more information on using the ListSecurityProfiles +// API call, and error handling. +// +// This method is useful when you want to inject custom logic or configuration +// into the SDK's request lifecycle. Such as custom headers, or retry logic. +// +// +// // Example sending a request using the ListSecurityProfilesRequest method. +// req, resp := client.ListSecurityProfilesRequest(params) +// +// err := req.Send() +// if err == nil { // resp is now filled +// fmt.Println(resp) +// } +func (c *IoT) ListSecurityProfilesRequest(input *ListSecurityProfilesInput) (req *request.Request, output *ListSecurityProfilesOutput) { + op := &request.Operation{ + Name: opListSecurityProfiles, + HTTPMethod: "GET", + HTTPPath: "/security-profiles", + } + + if input == nil { + input = &ListSecurityProfilesInput{} + } + + output = &ListSecurityProfilesOutput{} + req = c.newRequest(op, input, output) + return +} + +// ListSecurityProfiles API operation for AWS IoT. +// +// Lists the Device Defender security profiles you have created. You can use +// filters to list only those security profiles associated with a thing group +// or only those associated with your account. +// +// Returns awserr.Error for service API and SDK errors. Use runtime type assertions +// with awserr.Error's Code and Message methods to get detailed information about +// the error. +// +// See the AWS API reference guide for AWS IoT's +// API operation ListSecurityProfiles for usage and error information. +// +// Returned Error Codes: +// * ErrCodeInvalidRequestException "InvalidRequestException" +// The request is not valid. +// +// * ErrCodeThrottlingException "ThrottlingException" +// The rate exceeds the limit. +// +// * ErrCodeInternalFailureException "InternalFailureException" +// An unexpected error has occurred. +// +func (c *IoT) ListSecurityProfiles(input *ListSecurityProfilesInput) (*ListSecurityProfilesOutput, error) { + req, out := c.ListSecurityProfilesRequest(input) + return out, req.Send() +} + +// ListSecurityProfilesWithContext is the same as ListSecurityProfiles with the addition of +// the ability to pass a context and additional request options. +// +// See ListSecurityProfiles for details on how to use this API operation. +// +// The context must be non-nil and will be used for request cancellation. If +// the context is nil a panic will occur. In the future the SDK may create +// sub-contexts for http.Requests. See https://golang.org/pkg/context/ +// for more information on using Contexts. +func (c *IoT) ListSecurityProfilesWithContext(ctx aws.Context, input *ListSecurityProfilesInput, opts ...request.Option) (*ListSecurityProfilesOutput, error) { + req, out := c.ListSecurityProfilesRequest(input) + req.SetContext(ctx) + req.ApplyOptions(opts...) + return out, req.Send() +} + +const opListSecurityProfilesForTarget = "ListSecurityProfilesForTarget" + +// ListSecurityProfilesForTargetRequest generates a "aws/request.Request" representing the +// client's request for the ListSecurityProfilesForTarget operation. The "output" return +// value will be populated with the request's response once the request completes +// successfuly. +// +// Use "Send" method on the returned Request to send the API call to the service. +// the "output" return value is not valid until after Send returns without error. +// +// See ListSecurityProfilesForTarget for more information on using the ListSecurityProfilesForTarget +// API call, and error handling. +// +// This method is useful when you want to inject custom logic or configuration +// into the SDK's request lifecycle. Such as custom headers, or retry logic. +// +// +// // Example sending a request using the ListSecurityProfilesForTargetRequest method. +// req, resp := client.ListSecurityProfilesForTargetRequest(params) +// +// err := req.Send() +// if err == nil { // resp is now filled +// fmt.Println(resp) +// } +func (c *IoT) ListSecurityProfilesForTargetRequest(input *ListSecurityProfilesForTargetInput) (req *request.Request, output *ListSecurityProfilesForTargetOutput) { + op := &request.Operation{ + Name: opListSecurityProfilesForTarget, + HTTPMethod: "GET", + HTTPPath: "/security-profiles-for-target", + } + + if input == nil { + input = &ListSecurityProfilesForTargetInput{} + } + + output = &ListSecurityProfilesForTargetOutput{} + req = c.newRequest(op, input, output) + return +} + +// ListSecurityProfilesForTarget API operation for AWS IoT. +// +// Lists the Device Defender security profiles attached to a target (thing group). +// +// Returns awserr.Error for service API and SDK errors. Use runtime type assertions +// with awserr.Error's Code and Message methods to get detailed information about +// the error. +// +// See the AWS API reference guide for AWS IoT's +// API operation ListSecurityProfilesForTarget for usage and error information. +// +// Returned Error Codes: +// * ErrCodeInvalidRequestException "InvalidRequestException" +// The request is not valid. +// +// * ErrCodeThrottlingException "ThrottlingException" +// The rate exceeds the limit. +// +// * ErrCodeInternalFailureException "InternalFailureException" +// An unexpected error has occurred. +// +// * ErrCodeResourceNotFoundException "ResourceNotFoundException" +// The specified resource does not exist. +// +func (c *IoT) ListSecurityProfilesForTarget(input *ListSecurityProfilesForTargetInput) (*ListSecurityProfilesForTargetOutput, error) { + req, out := c.ListSecurityProfilesForTargetRequest(input) + return out, req.Send() +} + +// ListSecurityProfilesForTargetWithContext is the same as ListSecurityProfilesForTarget with the addition of +// the ability to pass a context and additional request options. +// +// See ListSecurityProfilesForTarget for details on how to use this API operation. +// +// The context must be non-nil and will be used for request cancellation. If +// the context is nil a panic will occur. In the future the SDK may create +// sub-contexts for http.Requests. See https://golang.org/pkg/context/ +// for more information on using Contexts. +func (c *IoT) ListSecurityProfilesForTargetWithContext(ctx aws.Context, input *ListSecurityProfilesForTargetInput, opts ...request.Option) (*ListSecurityProfilesForTargetOutput, error) { + req, out := c.ListSecurityProfilesForTargetRequest(input) + req.SetContext(ctx) + req.ApplyOptions(opts...) + return out, req.Send() +} + const opListStreams = "ListStreams" // ListStreamsRequest generates a "aws/request.Request" representing the @@ -8184,6 +9760,92 @@ func (c *IoT) ListTargetsForPolicyWithContext(ctx aws.Context, input *ListTarget return out, req.Send() } +const opListTargetsForSecurityProfile = "ListTargetsForSecurityProfile" + +// ListTargetsForSecurityProfileRequest generates a "aws/request.Request" representing the +// client's request for the ListTargetsForSecurityProfile operation. The "output" return +// value will be populated with the request's response once the request completes +// successfuly. +// +// Use "Send" method on the returned Request to send the API call to the service. +// the "output" return value is not valid until after Send returns without error. +// +// See ListTargetsForSecurityProfile for more information on using the ListTargetsForSecurityProfile +// API call, and error handling. +// +// This method is useful when you want to inject custom logic or configuration +// into the SDK's request lifecycle. Such as custom headers, or retry logic. +// +// +// // Example sending a request using the ListTargetsForSecurityProfileRequest method. +// req, resp := client.ListTargetsForSecurityProfileRequest(params) +// +// err := req.Send() +// if err == nil { // resp is now filled +// fmt.Println(resp) +// } +func (c *IoT) ListTargetsForSecurityProfileRequest(input *ListTargetsForSecurityProfileInput) (req *request.Request, output *ListTargetsForSecurityProfileOutput) { + op := &request.Operation{ + Name: opListTargetsForSecurityProfile, + HTTPMethod: "GET", + HTTPPath: "/security-profiles/{securityProfileName}/targets", + } + + if input == nil { + input = &ListTargetsForSecurityProfileInput{} + } + + output = &ListTargetsForSecurityProfileOutput{} + req = c.newRequest(op, input, output) + return +} + +// ListTargetsForSecurityProfile API operation for AWS IoT. +// +// Lists the targets (thing groups) associated with a given Device Defender +// security profile. +// +// Returns awserr.Error for service API and SDK errors. Use runtime type assertions +// with awserr.Error's Code and Message methods to get detailed information about +// the error. +// +// See the AWS API reference guide for AWS IoT's +// API operation ListTargetsForSecurityProfile for usage and error information. +// +// Returned Error Codes: +// * ErrCodeInvalidRequestException "InvalidRequestException" +// The request is not valid. +// +// * ErrCodeResourceNotFoundException "ResourceNotFoundException" +// The specified resource does not exist. +// +// * ErrCodeThrottlingException "ThrottlingException" +// The rate exceeds the limit. +// +// * ErrCodeInternalFailureException "InternalFailureException" +// An unexpected error has occurred. +// +func (c *IoT) ListTargetsForSecurityProfile(input *ListTargetsForSecurityProfileInput) (*ListTargetsForSecurityProfileOutput, error) { + req, out := c.ListTargetsForSecurityProfileRequest(input) + return out, req.Send() +} + +// ListTargetsForSecurityProfileWithContext is the same as ListTargetsForSecurityProfile with the addition of +// the ability to pass a context and additional request options. +// +// See ListTargetsForSecurityProfile for details on how to use this API operation. +// +// The context must be non-nil and will be used for request cancellation. If +// the context is nil a panic will occur. In the future the SDK may create +// sub-contexts for http.Requests. See https://golang.org/pkg/context/ +// for more information on using Contexts. +func (c *IoT) ListTargetsForSecurityProfileWithContext(ctx aws.Context, input *ListTargetsForSecurityProfileInput, opts ...request.Option) (*ListTargetsForSecurityProfileOutput, error) { + req, out := c.ListTargetsForSecurityProfileRequest(input) + req.SetContext(ctx) + req.ApplyOptions(opts...) + return out, req.Send() +} + const opListThingGroups = "ListThingGroups" // ListThingGroupsRequest generates a "aws/request.Request" representing the @@ -9037,6 +10699,90 @@ func (c *IoT) ListV2LoggingLevelsWithContext(ctx aws.Context, input *ListV2Loggi return out, req.Send() } +const opListViolationEvents = "ListViolationEvents" + +// ListViolationEventsRequest generates a "aws/request.Request" representing the +// client's request for the ListViolationEvents operation. The "output" return +// value will be populated with the request's response once the request completes +// successfuly. +// +// Use "Send" method on the returned Request to send the API call to the service. +// the "output" return value is not valid until after Send returns without error. +// +// See ListViolationEvents for more information on using the ListViolationEvents +// API call, and error handling. +// +// This method is useful when you want to inject custom logic or configuration +// into the SDK's request lifecycle. Such as custom headers, or retry logic. +// +// +// // Example sending a request using the ListViolationEventsRequest method. +// req, resp := client.ListViolationEventsRequest(params) +// +// err := req.Send() +// if err == nil { // resp is now filled +// fmt.Println(resp) +// } +func (c *IoT) ListViolationEventsRequest(input *ListViolationEventsInput) (req *request.Request, output *ListViolationEventsOutput) { + op := &request.Operation{ + Name: opListViolationEvents, + HTTPMethod: "GET", + HTTPPath: "/violation-events", + } + + if input == nil { + input = &ListViolationEventsInput{} + } + + output = &ListViolationEventsOutput{} + req = c.newRequest(op, input, output) + return +} + +// ListViolationEvents API operation for AWS IoT. +// +// Lists the Device Defender security profile violations discovered during the +// given time period. You can use filters to limit the results to those alerts +// issued for a particular security profile, behavior or thing (device). +// +// Returns awserr.Error for service API and SDK errors. Use runtime type assertions +// with awserr.Error's Code and Message methods to get detailed information about +// the error. +// +// See the AWS API reference guide for AWS IoT's +// API operation ListViolationEvents for usage and error information. +// +// Returned Error Codes: +// * ErrCodeInvalidRequestException "InvalidRequestException" +// The request is not valid. +// +// * ErrCodeThrottlingException "ThrottlingException" +// The rate exceeds the limit. +// +// * ErrCodeInternalFailureException "InternalFailureException" +// An unexpected error has occurred. +// +func (c *IoT) ListViolationEvents(input *ListViolationEventsInput) (*ListViolationEventsOutput, error) { + req, out := c.ListViolationEventsRequest(input) + return out, req.Send() +} + +// ListViolationEventsWithContext is the same as ListViolationEvents with the addition of +// the ability to pass a context and additional request options. +// +// See ListViolationEvents for details on how to use this API operation. +// +// The context must be non-nil and will be used for request cancellation. If +// the context is nil a panic will occur. In the future the SDK may create +// sub-contexts for http.Requests. See https://golang.org/pkg/context/ +// for more information on using Contexts. +func (c *IoT) ListViolationEventsWithContext(ctx aws.Context, input *ListViolationEventsInput, opts ...request.Option) (*ListViolationEventsOutput, error) { + req, out := c.ListViolationEventsRequest(input) + req.SetContext(ctx) + req.ApplyOptions(opts...) + return out, req.Send() +} + const opRegisterCACertificate = "RegisterCACertificate" // RegisterCACertificateRequest generates a "aws/request.Request" representing the @@ -9958,6 +11704,8 @@ func (c *IoT) SetLoggingOptionsRequest(input *SetLoggingOptionsInput) (req *requ // // Sets the logging options. // +// NOTE: use of this command is not recommended. Use SetV2LoggingOptions instead. +// // Returns awserr.Error for service API and SDK errors. Use runtime type assertions // with awserr.Error's Code and Message methods to get detailed information about // the error. @@ -10167,6 +11915,91 @@ func (c *IoT) SetV2LoggingOptionsWithContext(ctx aws.Context, input *SetV2Loggin return out, req.Send() } +const opStartOnDemandAuditTask = "StartOnDemandAuditTask" + +// StartOnDemandAuditTaskRequest generates a "aws/request.Request" representing the +// client's request for the StartOnDemandAuditTask operation. The "output" return +// value will be populated with the request's response once the request completes +// successfuly. +// +// Use "Send" method on the returned Request to send the API call to the service. +// the "output" return value is not valid until after Send returns without error. +// +// See StartOnDemandAuditTask for more information on using the StartOnDemandAuditTask +// API call, and error handling. +// +// This method is useful when you want to inject custom logic or configuration +// into the SDK's request lifecycle. Such as custom headers, or retry logic. +// +// +// // Example sending a request using the StartOnDemandAuditTaskRequest method. +// req, resp := client.StartOnDemandAuditTaskRequest(params) +// +// err := req.Send() +// if err == nil { // resp is now filled +// fmt.Println(resp) +// } +func (c *IoT) StartOnDemandAuditTaskRequest(input *StartOnDemandAuditTaskInput) (req *request.Request, output *StartOnDemandAuditTaskOutput) { + op := &request.Operation{ + Name: opStartOnDemandAuditTask, + HTTPMethod: "POST", + HTTPPath: "/audit/tasks", + } + + if input == nil { + input = &StartOnDemandAuditTaskInput{} + } + + output = &StartOnDemandAuditTaskOutput{} + req = c.newRequest(op, input, output) + return +} + +// StartOnDemandAuditTask API operation for AWS IoT. +// +// Starts an on-demand Device Defender audit. +// +// Returns awserr.Error for service API and SDK errors. Use runtime type assertions +// with awserr.Error's Code and Message methods to get detailed information about +// the error. +// +// See the AWS API reference guide for AWS IoT's +// API operation StartOnDemandAuditTask for usage and error information. +// +// Returned Error Codes: +// * ErrCodeInvalidRequestException "InvalidRequestException" +// The request is not valid. +// +// * ErrCodeThrottlingException "ThrottlingException" +// The rate exceeds the limit. +// +// * ErrCodeInternalFailureException "InternalFailureException" +// An unexpected error has occurred. +// +// * ErrCodeLimitExceededException "LimitExceededException" +// A limit has been exceeded. +// +func (c *IoT) StartOnDemandAuditTask(input *StartOnDemandAuditTaskInput) (*StartOnDemandAuditTaskOutput, error) { + req, out := c.StartOnDemandAuditTaskRequest(input) + return out, req.Send() +} + +// StartOnDemandAuditTaskWithContext is the same as StartOnDemandAuditTask with the addition of +// the ability to pass a context and additional request options. +// +// See StartOnDemandAuditTask for details on how to use this API operation. +// +// The context must be non-nil and will be used for request cancellation. If +// the context is nil a panic will occur. In the future the SDK may create +// sub-contexts for http.Requests. See https://golang.org/pkg/context/ +// for more information on using Contexts. +func (c *IoT) StartOnDemandAuditTaskWithContext(ctx aws.Context, input *StartOnDemandAuditTaskInput, opts ...request.Option) (*StartOnDemandAuditTaskOutput, error) { + req, out := c.StartOnDemandAuditTaskRequest(input) + req.SetContext(ctx) + req.ApplyOptions(opts...) + return out, req.Send() +} + const opStartThingRegistrationTask = "StartThingRegistrationTask" // StartThingRegistrationTaskRequest generates a "aws/request.Request" representing the @@ -10641,6 +12474,90 @@ func (c *IoT) TransferCertificateWithContext(ctx aws.Context, input *TransferCer return out, req.Send() } +const opUpdateAccountAuditConfiguration = "UpdateAccountAuditConfiguration" + +// UpdateAccountAuditConfigurationRequest generates a "aws/request.Request" representing the +// client's request for the UpdateAccountAuditConfiguration operation. The "output" return +// value will be populated with the request's response once the request completes +// successfuly. +// +// Use "Send" method on the returned Request to send the API call to the service. +// the "output" return value is not valid until after Send returns without error. +// +// See UpdateAccountAuditConfiguration for more information on using the UpdateAccountAuditConfiguration +// API call, and error handling. +// +// This method is useful when you want to inject custom logic or configuration +// into the SDK's request lifecycle. Such as custom headers, or retry logic. +// +// +// // Example sending a request using the UpdateAccountAuditConfigurationRequest method. +// req, resp := client.UpdateAccountAuditConfigurationRequest(params) +// +// err := req.Send() +// if err == nil { // resp is now filled +// fmt.Println(resp) +// } +func (c *IoT) UpdateAccountAuditConfigurationRequest(input *UpdateAccountAuditConfigurationInput) (req *request.Request, output *UpdateAccountAuditConfigurationOutput) { + op := &request.Operation{ + Name: opUpdateAccountAuditConfiguration, + HTTPMethod: "PATCH", + HTTPPath: "/audit/configuration", + } + + if input == nil { + input = &UpdateAccountAuditConfigurationInput{} + } + + output = &UpdateAccountAuditConfigurationOutput{} + req = c.newRequest(op, input, output) + return +} + +// UpdateAccountAuditConfiguration API operation for AWS IoT. +// +// Configures or reconfigures the Device Defender audit settings for this account. +// Settings include how audit notifications are sent and which audit checks +// are enabled or disabled. +// +// Returns awserr.Error for service API and SDK errors. Use runtime type assertions +// with awserr.Error's Code and Message methods to get detailed information about +// the error. +// +// See the AWS API reference guide for AWS IoT's +// API operation UpdateAccountAuditConfiguration for usage and error information. +// +// Returned Error Codes: +// * ErrCodeInvalidRequestException "InvalidRequestException" +// The request is not valid. +// +// * ErrCodeThrottlingException "ThrottlingException" +// The rate exceeds the limit. +// +// * ErrCodeInternalFailureException "InternalFailureException" +// An unexpected error has occurred. +// +func (c *IoT) UpdateAccountAuditConfiguration(input *UpdateAccountAuditConfigurationInput) (*UpdateAccountAuditConfigurationOutput, error) { + req, out := c.UpdateAccountAuditConfigurationRequest(input) + return out, req.Send() +} + +// UpdateAccountAuditConfigurationWithContext is the same as UpdateAccountAuditConfiguration with the addition of +// the ability to pass a context and additional request options. +// +// See UpdateAccountAuditConfiguration for details on how to use this API operation. +// +// The context must be non-nil and will be used for request cancellation. If +// the context is nil a panic will occur. In the future the SDK may create +// sub-contexts for http.Requests. See https://golang.org/pkg/context/ +// for more information on using Contexts. +func (c *IoT) UpdateAccountAuditConfigurationWithContext(ctx aws.Context, input *UpdateAccountAuditConfigurationInput, opts ...request.Option) (*UpdateAccountAuditConfigurationOutput, error) { + req, out := c.UpdateAccountAuditConfigurationRequest(input) + req.SetContext(ctx) + req.ApplyOptions(opts...) + return out, req.Send() +} + const opUpdateAuthorizer = "UpdateAuthorizer" // UpdateAuthorizerRequest generates a "aws/request.Request" representing the @@ -11191,6 +13108,181 @@ func (c *IoT) UpdateRoleAliasWithContext(ctx aws.Context, input *UpdateRoleAlias return out, req.Send() } +const opUpdateScheduledAudit = "UpdateScheduledAudit" + +// UpdateScheduledAuditRequest generates a "aws/request.Request" representing the +// client's request for the UpdateScheduledAudit operation. The "output" return +// value will be populated with the request's response once the request completes +// successfuly. +// +// Use "Send" method on the returned Request to send the API call to the service. +// the "output" return value is not valid until after Send returns without error. +// +// See UpdateScheduledAudit for more information on using the UpdateScheduledAudit +// API call, and error handling. +// +// This method is useful when you want to inject custom logic or configuration +// into the SDK's request lifecycle. Such as custom headers, or retry logic. +// +// +// // Example sending a request using the UpdateScheduledAuditRequest method. +// req, resp := client.UpdateScheduledAuditRequest(params) +// +// err := req.Send() +// if err == nil { // resp is now filled +// fmt.Println(resp) +// } +func (c *IoT) UpdateScheduledAuditRequest(input *UpdateScheduledAuditInput) (req *request.Request, output *UpdateScheduledAuditOutput) { + op := &request.Operation{ + Name: opUpdateScheduledAudit, + HTTPMethod: "PATCH", + HTTPPath: "/audit/scheduledaudits/{scheduledAuditName}", + } + + if input == nil { + input = &UpdateScheduledAuditInput{} + } + + output = &UpdateScheduledAuditOutput{} + req = c.newRequest(op, input, output) + return +} + +// UpdateScheduledAudit API operation for AWS IoT. +// +// Updates a scheduled audit, including what checks are performed and how often +// the audit takes place. +// +// Returns awserr.Error for service API and SDK errors. Use runtime type assertions +// with awserr.Error's Code and Message methods to get detailed information about +// the error. +// +// See the AWS API reference guide for AWS IoT's +// API operation UpdateScheduledAudit for usage and error information. +// +// Returned Error Codes: +// * ErrCodeInvalidRequestException "InvalidRequestException" +// The request is not valid. +// +// * ErrCodeResourceNotFoundException "ResourceNotFoundException" +// The specified resource does not exist. +// +// * ErrCodeThrottlingException "ThrottlingException" +// The rate exceeds the limit. +// +// * ErrCodeInternalFailureException "InternalFailureException" +// An unexpected error has occurred. +// +func (c *IoT) UpdateScheduledAudit(input *UpdateScheduledAuditInput) (*UpdateScheduledAuditOutput, error) { + req, out := c.UpdateScheduledAuditRequest(input) + return out, req.Send() +} + +// UpdateScheduledAuditWithContext is the same as UpdateScheduledAudit with the addition of +// the ability to pass a context and additional request options. +// +// See UpdateScheduledAudit for details on how to use this API operation. +// +// The context must be non-nil and will be used for request cancellation. If +// the context is nil a panic will occur. In the future the SDK may create +// sub-contexts for http.Requests. See https://golang.org/pkg/context/ +// for more information on using Contexts. +func (c *IoT) UpdateScheduledAuditWithContext(ctx aws.Context, input *UpdateScheduledAuditInput, opts ...request.Option) (*UpdateScheduledAuditOutput, error) { + req, out := c.UpdateScheduledAuditRequest(input) + req.SetContext(ctx) + req.ApplyOptions(opts...) + return out, req.Send() +} + +const opUpdateSecurityProfile = "UpdateSecurityProfile" + +// UpdateSecurityProfileRequest generates a "aws/request.Request" representing the +// client's request for the UpdateSecurityProfile operation. The "output" return +// value will be populated with the request's response once the request completes +// successfuly. +// +// Use "Send" method on the returned Request to send the API call to the service. +// the "output" return value is not valid until after Send returns without error. +// +// See UpdateSecurityProfile for more information on using the UpdateSecurityProfile +// API call, and error handling. +// +// This method is useful when you want to inject custom logic or configuration +// into the SDK's request lifecycle. Such as custom headers, or retry logic. +// +// +// // Example sending a request using the UpdateSecurityProfileRequest method. +// req, resp := client.UpdateSecurityProfileRequest(params) +// +// err := req.Send() +// if err == nil { // resp is now filled +// fmt.Println(resp) +// } +func (c *IoT) UpdateSecurityProfileRequest(input *UpdateSecurityProfileInput) (req *request.Request, output *UpdateSecurityProfileOutput) { + op := &request.Operation{ + Name: opUpdateSecurityProfile, + HTTPMethod: "PATCH", + HTTPPath: "/security-profiles/{securityProfileName}", + } + + if input == nil { + input = &UpdateSecurityProfileInput{} + } + + output = &UpdateSecurityProfileOutput{} + req = c.newRequest(op, input, output) + return +} + +// UpdateSecurityProfile API operation for AWS IoT. +// +// Updates a Device Defender security profile. +// +// Returns awserr.Error for service API and SDK errors. Use runtime type assertions +// with awserr.Error's Code and Message methods to get detailed information about +// the error. +// +// See the AWS API reference guide for AWS IoT's +// API operation UpdateSecurityProfile for usage and error information. +// +// Returned Error Codes: +// * ErrCodeInvalidRequestException "InvalidRequestException" +// The request is not valid. +// +// * ErrCodeResourceNotFoundException "ResourceNotFoundException" +// The specified resource does not exist. +// +// * ErrCodeVersionConflictException "VersionConflictException" +// An exception thrown when the version of an entity specified with the expectedVersion +// parameter does not match the latest version in the system. +// +// * ErrCodeThrottlingException "ThrottlingException" +// The rate exceeds the limit. +// +// * ErrCodeInternalFailureException "InternalFailureException" +// An unexpected error has occurred. +// +func (c *IoT) UpdateSecurityProfile(input *UpdateSecurityProfileInput) (*UpdateSecurityProfileOutput, error) { + req, out := c.UpdateSecurityProfileRequest(input) + return out, req.Send() +} + +// UpdateSecurityProfileWithContext is the same as UpdateSecurityProfile with the addition of +// the ability to pass a context and additional request options. +// +// See UpdateSecurityProfile for details on how to use this API operation. +// +// The context must be non-nil and will be used for request cancellation. If +// the context is nil a panic will occur. In the future the SDK may create +// sub-contexts for http.Requests. See https://golang.org/pkg/context/ +// for more information on using Contexts. +func (c *IoT) UpdateSecurityProfileWithContext(ctx aws.Context, input *UpdateSecurityProfileInput, opts ...request.Option) (*UpdateSecurityProfileOutput, error) { + req, out := c.UpdateSecurityProfileRequest(input) + req.SetContext(ctx) + req.ApplyOptions(opts...) + return out, req.Send() +} + const opUpdateStream = "UpdateStream" // UpdateStreamRequest generates a "aws/request.Request" representing the @@ -11551,6 +13643,88 @@ func (c *IoT) UpdateThingGroupsForThingWithContext(ctx aws.Context, input *Updat return out, req.Send() } +const opValidateSecurityProfileBehaviors = "ValidateSecurityProfileBehaviors" + +// ValidateSecurityProfileBehaviorsRequest generates a "aws/request.Request" representing the +// client's request for the ValidateSecurityProfileBehaviors operation. The "output" return +// value will be populated with the request's response once the request completes +// successfuly. +// +// Use "Send" method on the returned Request to send the API call to the service. +// the "output" return value is not valid until after Send returns without error. +// +// See ValidateSecurityProfileBehaviors for more information on using the ValidateSecurityProfileBehaviors +// API call, and error handling. +// +// This method is useful when you want to inject custom logic or configuration +// into the SDK's request lifecycle. Such as custom headers, or retry logic. +// +// +// // Example sending a request using the ValidateSecurityProfileBehaviorsRequest method. +// req, resp := client.ValidateSecurityProfileBehaviorsRequest(params) +// +// err := req.Send() +// if err == nil { // resp is now filled +// fmt.Println(resp) +// } +func (c *IoT) ValidateSecurityProfileBehaviorsRequest(input *ValidateSecurityProfileBehaviorsInput) (req *request.Request, output *ValidateSecurityProfileBehaviorsOutput) { + op := &request.Operation{ + Name: opValidateSecurityProfileBehaviors, + HTTPMethod: "POST", + HTTPPath: "/security-profile-behaviors/validate", + } + + if input == nil { + input = &ValidateSecurityProfileBehaviorsInput{} + } + + output = &ValidateSecurityProfileBehaviorsOutput{} + req = c.newRequest(op, input, output) + return +} + +// ValidateSecurityProfileBehaviors API operation for AWS IoT. +// +// Validates a Device Defender security profile behaviors specification. +// +// Returns awserr.Error for service API and SDK errors. Use runtime type assertions +// with awserr.Error's Code and Message methods to get detailed information about +// the error. +// +// See the AWS API reference guide for AWS IoT's +// API operation ValidateSecurityProfileBehaviors for usage and error information. +// +// Returned Error Codes: +// * ErrCodeInvalidRequestException "InvalidRequestException" +// The request is not valid. +// +// * ErrCodeThrottlingException "ThrottlingException" +// The rate exceeds the limit. +// +// * ErrCodeInternalFailureException "InternalFailureException" +// An unexpected error has occurred. +// +func (c *IoT) ValidateSecurityProfileBehaviors(input *ValidateSecurityProfileBehaviorsInput) (*ValidateSecurityProfileBehaviorsOutput, error) { + req, out := c.ValidateSecurityProfileBehaviorsRequest(input) + return out, req.Send() +} + +// ValidateSecurityProfileBehaviorsWithContext is the same as ValidateSecurityProfileBehaviors with the addition of +// the ability to pass a context and additional request options. +// +// See ValidateSecurityProfileBehaviors for details on how to use this API operation. +// +// The context must be non-nil and will be used for request cancellation. If +// the context is nil a panic will occur. In the future the SDK may create +// sub-contexts for http.Requests. See https://golang.org/pkg/context/ +// for more information on using Contexts. +func (c *IoT) ValidateSecurityProfileBehaviorsWithContext(ctx aws.Context, input *ValidateSecurityProfileBehaviorsInput, opts ...request.Option) (*ValidateSecurityProfileBehaviorsOutput, error) { + req, out := c.ValidateSecurityProfileBehaviorsRequest(input) + req.SetContext(ctx) + req.ApplyOptions(opts...) + return out, req.Send() +} + // The input for the AcceptCertificateTransfer operation. type AcceptCertificateTransferInput struct { _ struct{} `type:"structure"` @@ -11664,6 +13838,9 @@ type Action struct { // Publish to an Amazon SQS queue. Sqs *SqsAction `locationName:"sqs" type:"structure"` + + // Starts execution of a Step Functions state machine. + StepFunctions *StepFunctionsAction `locationName:"stepFunctions" type:"structure"` } // String returns the string representation @@ -11744,6 +13921,11 @@ func (s *Action) Validate() error { invalidParams.AddNested("Sqs", err.(request.ErrInvalidParams)) } } + if s.StepFunctions != nil { + if err := s.StepFunctions.Validate(); err != nil { + invalidParams.AddNested("StepFunctions", err.(request.ErrInvalidParams)) + } + } if invalidParams.Len() > 0 { return invalidParams @@ -11835,6 +14017,90 @@ func (s *Action) SetSqs(v *SqsAction) *Action { return s } +// SetStepFunctions sets the StepFunctions field's value. +func (s *Action) SetStepFunctions(v *StepFunctionsAction) *Action { + s.StepFunctions = v + return s +} + +// Information about an active Device Defender security profile behavior violation. +type ActiveViolation struct { + _ struct{} `type:"structure"` + + // The behavior which is being violated. + Behavior *Behavior `locationName:"behavior" type:"structure"` + + // The time the most recent violation occurred. + LastViolationTime *time.Time `locationName:"lastViolationTime" type:"timestamp"` + + // The value of the metric (the measurement) which caused the most recent violation. + LastViolationValue *MetricValue `locationName:"lastViolationValue" type:"structure"` + + // The security profile whose behavior is in violation. + SecurityProfileName *string `locationName:"securityProfileName" min:"1" type:"string"` + + // The name of the thing responsible for the active violation. + ThingName *string `locationName:"thingName" min:"1" type:"string"` + + // The ID of the active violation. + ViolationId *string `locationName:"violationId" min:"1" type:"string"` + + // The time the violation started. + ViolationStartTime *time.Time `locationName:"violationStartTime" type:"timestamp"` +} + +// String returns the string representation +func (s ActiveViolation) String() string { + return awsutil.Prettify(s) +} + +// GoString returns the string representation +func (s ActiveViolation) GoString() string { + return s.String() +} + +// SetBehavior sets the Behavior field's value. +func (s *ActiveViolation) SetBehavior(v *Behavior) *ActiveViolation { + s.Behavior = v + return s +} + +// SetLastViolationTime sets the LastViolationTime field's value. +func (s *ActiveViolation) SetLastViolationTime(v time.Time) *ActiveViolation { + s.LastViolationTime = &v + return s +} + +// SetLastViolationValue sets the LastViolationValue field's value. +func (s *ActiveViolation) SetLastViolationValue(v *MetricValue) *ActiveViolation { + s.LastViolationValue = v + return s +} + +// SetSecurityProfileName sets the SecurityProfileName field's value. +func (s *ActiveViolation) SetSecurityProfileName(v string) *ActiveViolation { + s.SecurityProfileName = &v + return s +} + +// SetThingName sets the ThingName field's value. +func (s *ActiveViolation) SetThingName(v string) *ActiveViolation { + s.ThingName = &v + return s +} + +// SetViolationId sets the ViolationId field's value. +func (s *ActiveViolation) SetViolationId(v string) *ActiveViolation { + s.ViolationId = &v + return s +} + +// SetViolationStartTime sets the ViolationStartTime field's value. +func (s *ActiveViolation) SetViolationStartTime(v time.Time) *ActiveViolation { + s.ViolationStartTime = &v + return s +} + type AddThingToThingGroupInput struct { _ struct{} `type:"structure"` @@ -11915,6 +14181,63 @@ func (s AddThingToThingGroupOutput) GoString() string { return s.String() } +// A structure containing the alert target ARN and the role ARN. +type AlertTarget struct { + _ struct{} `type:"structure"` + + // The ARN of the notification target to which alerts are sent. + // + // AlertTargetArn is a required field + AlertTargetArn *string `locationName:"alertTargetArn" type:"string" required:"true"` + + // The ARN of the role that grants permission to send alerts to the notification + // target. + // + // RoleArn is a required field + RoleArn *string `locationName:"roleArn" min:"20" type:"string" required:"true"` +} + +// String returns the string representation +func (s AlertTarget) String() string { + return awsutil.Prettify(s) +} + +// GoString returns the string representation +func (s AlertTarget) GoString() string { + return s.String() +} + +// Validate inspects the fields of the type to determine if they are valid. +func (s *AlertTarget) Validate() error { + invalidParams := request.ErrInvalidParams{Context: "AlertTarget"} + if s.AlertTargetArn == nil { + invalidParams.Add(request.NewErrParamRequired("AlertTargetArn")) + } + if s.RoleArn == nil { + invalidParams.Add(request.NewErrParamRequired("RoleArn")) + } + if s.RoleArn != nil && len(*s.RoleArn) < 20 { + invalidParams.Add(request.NewErrParamMinLen("RoleArn", 20)) + } + + if invalidParams.Len() > 0 { + return invalidParams + } + return nil +} + +// SetAlertTargetArn sets the AlertTargetArn field's value. +func (s *AlertTarget) SetAlertTargetArn(v string) *AlertTarget { + s.AlertTargetArn = &v + return s +} + +// SetRoleArn sets the RoleArn field's value. +func (s *AlertTarget) SetRoleArn(v string) *AlertTarget { + s.RoleArn = &v + return s +} + // Contains information that allowed the authorization. type Allowed struct { _ struct{} `type:"structure"` @@ -12188,6 +14511,75 @@ func (s AttachPrincipalPolicyOutput) GoString() string { return s.String() } +type AttachSecurityProfileInput struct { + _ struct{} `type:"structure"` + + // The security profile that is attached. + // + // SecurityProfileName is a required field + SecurityProfileName *string `location:"uri" locationName:"securityProfileName" min:"1" type:"string" required:"true"` + + // The ARN of the target (thing group) to which the security profile is attached. + // + // SecurityProfileTargetArn is a required field + SecurityProfileTargetArn *string `location:"querystring" locationName:"securityProfileTargetArn" type:"string" required:"true"` +} + +// String returns the string representation +func (s AttachSecurityProfileInput) String() string { + return awsutil.Prettify(s) +} + +// GoString returns the string representation +func (s AttachSecurityProfileInput) GoString() string { + return s.String() +} + +// Validate inspects the fields of the type to determine if they are valid. +func (s *AttachSecurityProfileInput) Validate() error { + invalidParams := request.ErrInvalidParams{Context: "AttachSecurityProfileInput"} + if s.SecurityProfileName == nil { + invalidParams.Add(request.NewErrParamRequired("SecurityProfileName")) + } + if s.SecurityProfileName != nil && len(*s.SecurityProfileName) < 1 { + invalidParams.Add(request.NewErrParamMinLen("SecurityProfileName", 1)) + } + if s.SecurityProfileTargetArn == nil { + invalidParams.Add(request.NewErrParamRequired("SecurityProfileTargetArn")) + } + + if invalidParams.Len() > 0 { + return invalidParams + } + return nil +} + +// SetSecurityProfileName sets the SecurityProfileName field's value. +func (s *AttachSecurityProfileInput) SetSecurityProfileName(v string) *AttachSecurityProfileInput { + s.SecurityProfileName = &v + return s +} + +// SetSecurityProfileTargetArn sets the SecurityProfileTargetArn field's value. +func (s *AttachSecurityProfileInput) SetSecurityProfileTargetArn(v string) *AttachSecurityProfileInput { + s.SecurityProfileTargetArn = &v + return s +} + +type AttachSecurityProfileOutput struct { + _ struct{} `type:"structure"` +} + +// String returns the string representation +func (s AttachSecurityProfileOutput) String() string { + return awsutil.Prettify(s) +} + +// GoString returns the string representation +func (s AttachSecurityProfileOutput) GoString() string { + return s.String() +} + // The input for the AttachThingPrincipal operation. type AttachThingPrincipalInput struct { _ struct{} `type:"structure"` @@ -12300,6 +14692,296 @@ func (s *AttributePayload) SetMerge(v bool) *AttributePayload { return s } +// Which audit checks are enabled and disabled for this account. +type AuditCheckConfiguration struct { + _ struct{} `type:"structure"` + + // True if this audit check is enabled for this account. + Enabled *bool `locationName:"enabled" type:"boolean"` +} + +// String returns the string representation +func (s AuditCheckConfiguration) String() string { + return awsutil.Prettify(s) +} + +// GoString returns the string representation +func (s AuditCheckConfiguration) GoString() string { + return s.String() +} + +// SetEnabled sets the Enabled field's value. +func (s *AuditCheckConfiguration) SetEnabled(v bool) *AuditCheckConfiguration { + s.Enabled = &v + return s +} + +// Information about the audit check. +type AuditCheckDetails struct { + _ struct{} `type:"structure"` + + // True if the check completed and found all resources compliant. + CheckCompliant *bool `locationName:"checkCompliant" type:"boolean"` + + // The completion status of this check, one of "IN_PROGRESS", "WAITING_FOR_DATA_COLLECTION", + // "CANCELED", "COMPLETED_COMPLIANT", "COMPLETED_NON_COMPLIANT", or "FAILED". + CheckRunStatus *string `locationName:"checkRunStatus" type:"string" enum:"AuditCheckRunStatus"` + + // The code of any error encountered when performing this check during this + // audit. One of "INSUFFICIENT_PERMISSIONS", or "AUDIT_CHECK_DISABLED". + ErrorCode *string `locationName:"errorCode" type:"string"` + + // The message associated with any error encountered when performing this check + // during this audit. + Message *string `locationName:"message" type:"string"` + + // The number of resources that the check found non-compliant. + NonCompliantResourcesCount *int64 `locationName:"nonCompliantResourcesCount" type:"long"` + + // The number of resources on which the check was performed. + TotalResourcesCount *int64 `locationName:"totalResourcesCount" type:"long"` +} + +// String returns the string representation +func (s AuditCheckDetails) String() string { + return awsutil.Prettify(s) +} + +// GoString returns the string representation +func (s AuditCheckDetails) GoString() string { + return s.String() +} + +// SetCheckCompliant sets the CheckCompliant field's value. +func (s *AuditCheckDetails) SetCheckCompliant(v bool) *AuditCheckDetails { + s.CheckCompliant = &v + return s +} + +// SetCheckRunStatus sets the CheckRunStatus field's value. +func (s *AuditCheckDetails) SetCheckRunStatus(v string) *AuditCheckDetails { + s.CheckRunStatus = &v + return s +} + +// SetErrorCode sets the ErrorCode field's value. +func (s *AuditCheckDetails) SetErrorCode(v string) *AuditCheckDetails { + s.ErrorCode = &v + return s +} + +// SetMessage sets the Message field's value. +func (s *AuditCheckDetails) SetMessage(v string) *AuditCheckDetails { + s.Message = &v + return s +} + +// SetNonCompliantResourcesCount sets the NonCompliantResourcesCount field's value. +func (s *AuditCheckDetails) SetNonCompliantResourcesCount(v int64) *AuditCheckDetails { + s.NonCompliantResourcesCount = &v + return s +} + +// SetTotalResourcesCount sets the TotalResourcesCount field's value. +func (s *AuditCheckDetails) SetTotalResourcesCount(v int64) *AuditCheckDetails { + s.TotalResourcesCount = &v + return s +} + +// The findings (results) of the audit. +type AuditFinding struct { + _ struct{} `type:"structure"` + + // The audit check that generated this result. + CheckName *string `locationName:"checkName" type:"string"` + + // The time the result (finding) was discovered. + FindingTime *time.Time `locationName:"findingTime" type:"timestamp"` + + // The resource that was found to be non-compliant with the audit check. + NonCompliantResource *NonCompliantResource `locationName:"nonCompliantResource" type:"structure"` + + // The reason the resource was non-compliant. + ReasonForNonCompliance *string `locationName:"reasonForNonCompliance" type:"string"` + + // A code which indicates the reason that the resource was non-compliant. + ReasonForNonComplianceCode *string `locationName:"reasonForNonComplianceCode" type:"string"` + + // The list of related resources. + RelatedResources []*RelatedResource `locationName:"relatedResources" type:"list"` + + // The severity of the result (finding). + Severity *string `locationName:"severity" type:"string" enum:"AuditFindingSeverity"` + + // The ID of the audit that generated this result (finding) + TaskId *string `locationName:"taskId" min:"1" type:"string"` + + // The time the audit started. + TaskStartTime *time.Time `locationName:"taskStartTime" type:"timestamp"` +} + +// String returns the string representation +func (s AuditFinding) String() string { + return awsutil.Prettify(s) +} + +// GoString returns the string representation +func (s AuditFinding) GoString() string { + return s.String() +} + +// SetCheckName sets the CheckName field's value. +func (s *AuditFinding) SetCheckName(v string) *AuditFinding { + s.CheckName = &v + return s +} + +// SetFindingTime sets the FindingTime field's value. +func (s *AuditFinding) SetFindingTime(v time.Time) *AuditFinding { + s.FindingTime = &v + return s +} + +// SetNonCompliantResource sets the NonCompliantResource field's value. +func (s *AuditFinding) SetNonCompliantResource(v *NonCompliantResource) *AuditFinding { + s.NonCompliantResource = v + return s +} + +// SetReasonForNonCompliance sets the ReasonForNonCompliance field's value. +func (s *AuditFinding) SetReasonForNonCompliance(v string) *AuditFinding { + s.ReasonForNonCompliance = &v + return s +} + +// SetReasonForNonComplianceCode sets the ReasonForNonComplianceCode field's value. +func (s *AuditFinding) SetReasonForNonComplianceCode(v string) *AuditFinding { + s.ReasonForNonComplianceCode = &v + return s +} + +// SetRelatedResources sets the RelatedResources field's value. +func (s *AuditFinding) SetRelatedResources(v []*RelatedResource) *AuditFinding { + s.RelatedResources = v + return s +} + +// SetSeverity sets the Severity field's value. +func (s *AuditFinding) SetSeverity(v string) *AuditFinding { + s.Severity = &v + return s +} + +// SetTaskId sets the TaskId field's value. +func (s *AuditFinding) SetTaskId(v string) *AuditFinding { + s.TaskId = &v + return s +} + +// SetTaskStartTime sets the TaskStartTime field's value. +func (s *AuditFinding) SetTaskStartTime(v time.Time) *AuditFinding { + s.TaskStartTime = &v + return s +} + +// Information about the targets to which audit notifications are sent. +type AuditNotificationTarget struct { + _ struct{} `type:"structure"` + + // True if notifications to the target are enabled. + Enabled *bool `locationName:"enabled" type:"boolean"` + + // The ARN of the role that grants permission to send notifications to the target. + RoleArn *string `locationName:"roleArn" min:"20" type:"string"` + + // The ARN of the target (SNS topic) to which audit notifications are sent. + TargetArn *string `locationName:"targetArn" type:"string"` +} + +// String returns the string representation +func (s AuditNotificationTarget) String() string { + return awsutil.Prettify(s) +} + +// GoString returns the string representation +func (s AuditNotificationTarget) GoString() string { + return s.String() +} + +// Validate inspects the fields of the type to determine if they are valid. +func (s *AuditNotificationTarget) Validate() error { + invalidParams := request.ErrInvalidParams{Context: "AuditNotificationTarget"} + if s.RoleArn != nil && len(*s.RoleArn) < 20 { + invalidParams.Add(request.NewErrParamMinLen("RoleArn", 20)) + } + + if invalidParams.Len() > 0 { + return invalidParams + } + return nil +} + +// SetEnabled sets the Enabled field's value. +func (s *AuditNotificationTarget) SetEnabled(v bool) *AuditNotificationTarget { + s.Enabled = &v + return s +} + +// SetRoleArn sets the RoleArn field's value. +func (s *AuditNotificationTarget) SetRoleArn(v string) *AuditNotificationTarget { + s.RoleArn = &v + return s +} + +// SetTargetArn sets the TargetArn field's value. +func (s *AuditNotificationTarget) SetTargetArn(v string) *AuditNotificationTarget { + s.TargetArn = &v + return s +} + +// The audits that were performed. +type AuditTaskMetadata struct { + _ struct{} `type:"structure"` + + // The ID of this audit. + TaskId *string `locationName:"taskId" min:"1" type:"string"` + + // The status of this audit: one of "IN_PROGRESS", "COMPLETED", "FAILED" or + // "CANCELED". + TaskStatus *string `locationName:"taskStatus" type:"string" enum:"AuditTaskStatus"` + + // The type of this audit: one of "ON_DEMAND_AUDIT_TASK" or "SCHEDULED_AUDIT_TASK". + TaskType *string `locationName:"taskType" type:"string" enum:"AuditTaskType"` +} + +// String returns the string representation +func (s AuditTaskMetadata) String() string { + return awsutil.Prettify(s) +} + +// GoString returns the string representation +func (s AuditTaskMetadata) GoString() string { + return s.String() +} + +// SetTaskId sets the TaskId field's value. +func (s *AuditTaskMetadata) SetTaskId(v string) *AuditTaskMetadata { + s.TaskId = &v + return s +} + +// SetTaskStatus sets the TaskStatus field's value. +func (s *AuditTaskMetadata) SetTaskStatus(v string) *AuditTaskMetadata { + s.TaskStatus = &v + return s +} + +// SetTaskType sets the TaskType field's value. +func (s *AuditTaskMetadata) SetTaskType(v string) *AuditTaskMetadata { + s.TaskType = &v + return s +} + // A collection of authorization information. type AuthInfo struct { _ struct{} `type:"structure"` @@ -12517,6 +15199,147 @@ func (s *AuthorizerSummary) SetAuthorizerName(v string) *AuthorizerSummary { return s } +// Configuration for the rollout of OTA updates. +type AwsJobExecutionsRolloutConfig struct { + _ struct{} `type:"structure"` + + // The maximum number of OTA update job executions started per minute. + MaximumPerMinute *int64 `locationName:"maximumPerMinute" min:"1" type:"integer"` +} + +// String returns the string representation +func (s AwsJobExecutionsRolloutConfig) String() string { + return awsutil.Prettify(s) +} + +// GoString returns the string representation +func (s AwsJobExecutionsRolloutConfig) GoString() string { + return s.String() +} + +// Validate inspects the fields of the type to determine if they are valid. +func (s *AwsJobExecutionsRolloutConfig) Validate() error { + invalidParams := request.ErrInvalidParams{Context: "AwsJobExecutionsRolloutConfig"} + if s.MaximumPerMinute != nil && *s.MaximumPerMinute < 1 { + invalidParams.Add(request.NewErrParamMinValue("MaximumPerMinute", 1)) + } + + if invalidParams.Len() > 0 { + return invalidParams + } + return nil +} + +// SetMaximumPerMinute sets the MaximumPerMinute field's value. +func (s *AwsJobExecutionsRolloutConfig) SetMaximumPerMinute(v int64) *AwsJobExecutionsRolloutConfig { + s.MaximumPerMinute = &v + return s +} + +// A Device Defender security profile behavior. +type Behavior struct { + _ struct{} `type:"structure"` + + // The criteria that determine if a device is behaving normally in regard to + // the metric. + Criteria *BehaviorCriteria `locationName:"criteria" type:"structure"` + + // What is measured by the behavior. + Metric *string `locationName:"metric" type:"string"` + + // The name you have given to the behavior. + // + // Name is a required field + Name *string `locationName:"name" min:"1" type:"string" required:"true"` +} + +// String returns the string representation +func (s Behavior) String() string { + return awsutil.Prettify(s) +} + +// GoString returns the string representation +func (s Behavior) GoString() string { + return s.String() +} + +// Validate inspects the fields of the type to determine if they are valid. +func (s *Behavior) Validate() error { + invalidParams := request.ErrInvalidParams{Context: "Behavior"} + if s.Name == nil { + invalidParams.Add(request.NewErrParamRequired("Name")) + } + if s.Name != nil && len(*s.Name) < 1 { + invalidParams.Add(request.NewErrParamMinLen("Name", 1)) + } + + if invalidParams.Len() > 0 { + return invalidParams + } + return nil +} + +// SetCriteria sets the Criteria field's value. +func (s *Behavior) SetCriteria(v *BehaviorCriteria) *Behavior { + s.Criteria = v + return s +} + +// SetMetric sets the Metric field's value. +func (s *Behavior) SetMetric(v string) *Behavior { + s.Metric = &v + return s +} + +// SetName sets the Name field's value. +func (s *Behavior) SetName(v string) *Behavior { + s.Name = &v + return s +} + +// The criteria by which the behavior is determined to be normal. +type BehaviorCriteria struct { + _ struct{} `type:"structure"` + + // The operator that relates the thing measured (metric) to the criteria (value). + ComparisonOperator *string `locationName:"comparisonOperator" type:"string" enum:"ComparisonOperator"` + + // Use this to specify the period of time over which the behavior is evaluated, + // for those criteria which have a time dimension (for example, NUM_MESSAGES_SENT). + DurationSeconds *int64 `locationName:"durationSeconds" type:"integer"` + + // The value to be compared with the metric. + Value *MetricValue `locationName:"value" type:"structure"` +} + +// String returns the string representation +func (s BehaviorCriteria) String() string { + return awsutil.Prettify(s) +} + +// GoString returns the string representation +func (s BehaviorCriteria) GoString() string { + return s.String() +} + +// SetComparisonOperator sets the ComparisonOperator field's value. +func (s *BehaviorCriteria) SetComparisonOperator(v string) *BehaviorCriteria { + s.ComparisonOperator = &v + return s +} + +// SetDurationSeconds sets the DurationSeconds field's value. +func (s *BehaviorCriteria) SetDurationSeconds(v int64) *BehaviorCriteria { + s.DurationSeconds = &v + return s +} + +// SetValue sets the Value field's value. +func (s *BehaviorCriteria) SetValue(v *MetricValue) *BehaviorCriteria { + s.Value = v + return s +} + // A CA certificate. type CACertificate struct { _ struct{} `type:"structure"` @@ -12600,10 +15423,13 @@ type CACertificateDescription struct { LastModifiedDate *time.Time `locationName:"lastModifiedDate" type:"timestamp"` // The owner of the CA certificate. - OwnedBy *string `locationName:"ownedBy" type:"string"` + OwnedBy *string `locationName:"ownedBy" min:"12" type:"string"` // The status of a CA certificate. Status *string `locationName:"status" type:"string" enum:"CACertificateStatus"` + + // When the CA certificate is valid. + Validity *CertificateValidity `locationName:"validity" type:"structure"` } // String returns the string representation @@ -12676,6 +15502,68 @@ func (s *CACertificateDescription) SetStatus(v string) *CACertificateDescription return s } +// SetValidity sets the Validity field's value. +func (s *CACertificateDescription) SetValidity(v *CertificateValidity) *CACertificateDescription { + s.Validity = v + return s +} + +type CancelAuditTaskInput struct { + _ struct{} `type:"structure"` + + // The ID of the audit you want to cancel. You can only cancel an audit that + // is "IN_PROGRESS". + // + // TaskId is a required field + TaskId *string `location:"uri" locationName:"taskId" min:"1" type:"string" required:"true"` +} + +// String returns the string representation +func (s CancelAuditTaskInput) String() string { + return awsutil.Prettify(s) +} + +// GoString returns the string representation +func (s CancelAuditTaskInput) GoString() string { + return s.String() +} + +// Validate inspects the fields of the type to determine if they are valid. +func (s *CancelAuditTaskInput) Validate() error { + invalidParams := request.ErrInvalidParams{Context: "CancelAuditTaskInput"} + if s.TaskId == nil { + invalidParams.Add(request.NewErrParamRequired("TaskId")) + } + if s.TaskId != nil && len(*s.TaskId) < 1 { + invalidParams.Add(request.NewErrParamMinLen("TaskId", 1)) + } + + if invalidParams.Len() > 0 { + return invalidParams + } + return nil +} + +// SetTaskId sets the TaskId field's value. +func (s *CancelAuditTaskInput) SetTaskId(v string) *CancelAuditTaskInput { + s.TaskId = &v + return s +} + +type CancelAuditTaskOutput struct { + _ struct{} `type:"structure"` +} + +// String returns the string representation +func (s CancelAuditTaskOutput) String() string { + return awsutil.Prettify(s) +} + +// GoString returns the string representation +func (s CancelAuditTaskOutput) GoString() string { + return s.String() +} + // The input for the CancelCertificateTransfer operation. type CancelCertificateTransferInput struct { _ struct{} `type:"structure"` @@ -13038,16 +15926,19 @@ type CertificateDescription struct { LastModifiedDate *time.Time `locationName:"lastModifiedDate" type:"timestamp"` // The ID of the AWS account that owns the certificate. - OwnedBy *string `locationName:"ownedBy" type:"string"` + OwnedBy *string `locationName:"ownedBy" min:"12" type:"string"` // The ID of the AWS account of the previous owner of the certificate. - PreviousOwnedBy *string `locationName:"previousOwnedBy" type:"string"` + PreviousOwnedBy *string `locationName:"previousOwnedBy" min:"12" type:"string"` // The status of the certificate. Status *string `locationName:"status" type:"string" enum:"CertificateStatus"` // The transfer data. TransferData *TransferData `locationName:"transferData" type:"structure"` + + // When the certificate is valid. + Validity *CertificateValidity `locationName:"validity" type:"structure"` } // String returns the string representation @@ -13132,6 +16023,45 @@ func (s *CertificateDescription) SetTransferData(v *TransferData) *CertificateDe return s } +// SetValidity sets the Validity field's value. +func (s *CertificateDescription) SetValidity(v *CertificateValidity) *CertificateDescription { + s.Validity = v + return s +} + +// When the certificate is valid. +type CertificateValidity struct { + _ struct{} `type:"structure"` + + // The certificate is not valid after this date. + NotAfter *time.Time `locationName:"notAfter" type:"timestamp"` + + // The certificate is not valid before this date. + NotBefore *time.Time `locationName:"notBefore" type:"timestamp"` +} + +// String returns the string representation +func (s CertificateValidity) String() string { + return awsutil.Prettify(s) +} + +// GoString returns the string representation +func (s CertificateValidity) GoString() string { + return s.String() +} + +// SetNotAfter sets the NotAfter field's value. +func (s *CertificateValidity) SetNotAfter(v time.Time) *CertificateValidity { + s.NotAfter = &v + return s +} + +// SetNotBefore sets the NotBefore field's value. +func (s *CertificateValidity) SetNotBefore(v time.Time) *CertificateValidity { + s.NotBefore = &v + return s +} + type ClearDefaultAuthorizerInput struct { _ struct{} `type:"structure"` } @@ -13355,6 +16285,9 @@ type CodeSigning struct { // A custom method for code signing a file. CustomCodeSigning *CustomCodeSigning `locationName:"customCodeSigning" type:"structure"` + + // Describes the code-signing job. + StartSigningJobParameter *StartSigningJobParameter `locationName:"startSigningJobParameter" type:"structure"` } // String returns the string representation @@ -13370,9 +16303,9 @@ func (s CodeSigning) GoString() string { // Validate inspects the fields of the type to determine if they are valid. func (s *CodeSigning) Validate() error { invalidParams := request.ErrInvalidParams{Context: "CodeSigning"} - if s.CustomCodeSigning != nil { - if err := s.CustomCodeSigning.Validate(); err != nil { - invalidParams.AddNested("CustomCodeSigning", err.(request.ErrInvalidParams)) + if s.StartSigningJobParameter != nil { + if err := s.StartSigningJobParameter.Validate(); err != nil { + invalidParams.AddNested("StartSigningJobParameter", err.(request.ErrInvalidParams)) } } @@ -13394,6 +16327,12 @@ func (s *CodeSigning) SetCustomCodeSigning(v *CustomCodeSigning) *CodeSigning { return s } +// SetStartSigningJobParameter sets the StartSigningJobParameter field's value. +func (s *CodeSigning) SetStartSigningJobParameter(v *StartSigningJobParameter) *CodeSigning { + s.StartSigningJobParameter = v + return s +} + // Describes the certificate chain being used when code signing a file. type CodeSigningCertificateChain struct { _ struct{} `type:"structure"` @@ -13403,9 +16342,6 @@ type CodeSigningCertificateChain struct { // A base64 encoded binary representation of the code signing certificate chain. InlineDocument *string `locationName:"inlineDocument" type:"string"` - - // A stream of the certificate chain files. - Stream *Stream `locationName:"stream" type:"structure"` } // String returns the string representation @@ -13418,21 +16354,6 @@ func (s CodeSigningCertificateChain) GoString() string { return s.String() } -// Validate inspects the fields of the type to determine if they are valid. -func (s *CodeSigningCertificateChain) Validate() error { - invalidParams := request.ErrInvalidParams{Context: "CodeSigningCertificateChain"} - if s.Stream != nil { - if err := s.Stream.Validate(); err != nil { - invalidParams.AddNested("Stream", err.(request.ErrInvalidParams)) - } - } - - if invalidParams.Len() > 0 { - return invalidParams - } - return nil -} - // SetCertificateName sets the CertificateName field's value. func (s *CodeSigningCertificateChain) SetCertificateName(v string) *CodeSigningCertificateChain { s.CertificateName = &v @@ -13445,12 +16366,6 @@ func (s *CodeSigningCertificateChain) SetInlineDocument(v string) *CodeSigningCe return s } -// SetStream sets the Stream field's value. -func (s *CodeSigningCertificateChain) SetStream(v *Stream) *CodeSigningCertificateChain { - s.Stream = v - return s -} - // Describes the signature for a file. type CodeSigningSignature struct { _ struct{} `type:"structure"` @@ -13459,9 +16374,6 @@ type CodeSigningSignature struct { // // InlineDocument is automatically base64 encoded/decoded by the SDK. InlineDocument []byte `locationName:"inlineDocument" type:"blob"` - - // A stream of the code signing signature. - Stream *Stream `locationName:"stream" type:"structure"` } // String returns the string representation @@ -13474,33 +16386,12 @@ func (s CodeSigningSignature) GoString() string { return s.String() } -// Validate inspects the fields of the type to determine if they are valid. -func (s *CodeSigningSignature) Validate() error { - invalidParams := request.ErrInvalidParams{Context: "CodeSigningSignature"} - if s.Stream != nil { - if err := s.Stream.Validate(); err != nil { - invalidParams.AddNested("Stream", err.(request.ErrInvalidParams)) - } - } - - if invalidParams.Len() > 0 { - return invalidParams - } - return nil -} - // SetInlineDocument sets the InlineDocument field's value. func (s *CodeSigningSignature) SetInlineDocument(v []byte) *CodeSigningSignature { s.InlineDocument = v return s } -// SetStream sets the Stream field's value. -func (s *CodeSigningSignature) SetStream(v *Stream) *CodeSigningSignature { - s.Stream = v - return s -} - // Configuration. type Configuration struct { _ struct{} `type:"structure"` @@ -13757,9 +16648,6 @@ type CreateJobInput struct { // The job document. Document *string `locationName:"document" type:"string"` - // Parameters for the job document. - DocumentParameters map[string]*string `locationName:"documentParameters" type:"map"` - // An S3 link to the job document. DocumentSource *string `locationName:"documentSource" min:"1" type:"string"` @@ -13846,12 +16734,6 @@ func (s *CreateJobInput) SetDocument(v string) *CreateJobInput { return s } -// SetDocumentParameters sets the DocumentParameters field's value. -func (s *CreateJobInput) SetDocumentParameters(v map[string]*string) *CreateJobInput { - s.DocumentParameters = v - return s -} - // SetDocumentSource sets the DocumentSource field's value. func (s *CreateJobInput) SetDocumentSource(v string) *CreateJobInput { s.DocumentSource = &v @@ -14011,6 +16893,9 @@ type CreateOTAUpdateInput struct { // A list of additional OTA update parameters which are name-value pairs. AdditionalParameters map[string]*string `locationName:"additionalParameters" type:"map"` + // Configuration for the rollout of OTA updates. + AwsJobExecutionsRolloutConfig *AwsJobExecutionsRolloutConfig `locationName:"awsJobExecutionsRolloutConfig" type:"structure"` + // The description of the OTA update. Description *string `locationName:"description" type:"string"` @@ -14080,6 +16965,11 @@ func (s *CreateOTAUpdateInput) Validate() error { if s.Targets != nil && len(s.Targets) < 1 { invalidParams.Add(request.NewErrParamMinLen("Targets", 1)) } + if s.AwsJobExecutionsRolloutConfig != nil { + if err := s.AwsJobExecutionsRolloutConfig.Validate(); err != nil { + invalidParams.AddNested("AwsJobExecutionsRolloutConfig", err.(request.ErrInvalidParams)) + } + } if s.Files != nil { for i, v := range s.Files { if v == nil { @@ -14103,6 +16993,12 @@ func (s *CreateOTAUpdateInput) SetAdditionalParameters(v map[string]*string) *Cr return s } +// SetAwsJobExecutionsRolloutConfig sets the AwsJobExecutionsRolloutConfig field's value. +func (s *CreateOTAUpdateInput) SetAwsJobExecutionsRolloutConfig(v *AwsJobExecutionsRolloutConfig) *CreateOTAUpdateInput { + s.AwsJobExecutionsRolloutConfig = v + return s +} + // SetDescription sets the Description field's value. func (s *CreateOTAUpdateInput) SetDescription(v string) *CreateOTAUpdateInput { s.Description = &v @@ -14528,6 +17424,253 @@ func (s *CreateRoleAliasOutput) SetRoleAliasArn(v string) *CreateRoleAliasOutput return s } +type CreateScheduledAuditInput struct { + _ struct{} `type:"structure"` + + // The day of the month on which the scheduled audit takes place. Can be "1" + // through "31" or "LAST". This field is required if the "frequency" parameter + // is set to "MONTHLY". If days 29-31 are specified, and the month does not + // have that many days, the audit takes place on the "LAST" day of the month. + DayOfMonth *string `locationName:"dayOfMonth" type:"string"` + + // The day of the week on which the scheduled audit takes place. Can be one + // of "SUN", "MON", "TUE", "WED", "THU", "FRI" or "SAT". This field is required + // if the "frequency" parameter is set to "WEEKLY" or "BIWEEKLY". + DayOfWeek *string `locationName:"dayOfWeek" type:"string" enum:"DayOfWeek"` + + // How often the scheduled audit takes place. Can be one of "DAILY", "WEEKLY", + // "BIWEEKLY" or "MONTHLY". The actual start time of each audit is determined + // by the system. + // + // Frequency is a required field + Frequency *string `locationName:"frequency" type:"string" required:"true" enum:"AuditFrequency"` + + // The name you want to give to the scheduled audit. (Max. 128 chars) + // + // ScheduledAuditName is a required field + ScheduledAuditName *string `location:"uri" locationName:"scheduledAuditName" min:"1" type:"string" required:"true"` + + // Which checks are performed during the scheduled audit. Checks must be enabled + // for your account. (Use DescribeAccountAuditConfiguration to see the list + // of all checks including those that are enabled or UpdateAccountAuditConfiguration + // to select which checks are enabled.) + // + // TargetCheckNames is a required field + TargetCheckNames []*string `locationName:"targetCheckNames" type:"list" required:"true"` +} + +// String returns the string representation +func (s CreateScheduledAuditInput) String() string { + return awsutil.Prettify(s) +} + +// GoString returns the string representation +func (s CreateScheduledAuditInput) GoString() string { + return s.String() +} + +// Validate inspects the fields of the type to determine if they are valid. +func (s *CreateScheduledAuditInput) Validate() error { + invalidParams := request.ErrInvalidParams{Context: "CreateScheduledAuditInput"} + if s.Frequency == nil { + invalidParams.Add(request.NewErrParamRequired("Frequency")) + } + if s.ScheduledAuditName == nil { + invalidParams.Add(request.NewErrParamRequired("ScheduledAuditName")) + } + if s.ScheduledAuditName != nil && len(*s.ScheduledAuditName) < 1 { + invalidParams.Add(request.NewErrParamMinLen("ScheduledAuditName", 1)) + } + if s.TargetCheckNames == nil { + invalidParams.Add(request.NewErrParamRequired("TargetCheckNames")) + } + + if invalidParams.Len() > 0 { + return invalidParams + } + return nil +} + +// SetDayOfMonth sets the DayOfMonth field's value. +func (s *CreateScheduledAuditInput) SetDayOfMonth(v string) *CreateScheduledAuditInput { + s.DayOfMonth = &v + return s +} + +// SetDayOfWeek sets the DayOfWeek field's value. +func (s *CreateScheduledAuditInput) SetDayOfWeek(v string) *CreateScheduledAuditInput { + s.DayOfWeek = &v + return s +} + +// SetFrequency sets the Frequency field's value. +func (s *CreateScheduledAuditInput) SetFrequency(v string) *CreateScheduledAuditInput { + s.Frequency = &v + return s +} + +// SetScheduledAuditName sets the ScheduledAuditName field's value. +func (s *CreateScheduledAuditInput) SetScheduledAuditName(v string) *CreateScheduledAuditInput { + s.ScheduledAuditName = &v + return s +} + +// SetTargetCheckNames sets the TargetCheckNames field's value. +func (s *CreateScheduledAuditInput) SetTargetCheckNames(v []*string) *CreateScheduledAuditInput { + s.TargetCheckNames = v + return s +} + +type CreateScheduledAuditOutput struct { + _ struct{} `type:"structure"` + + // The ARN of the scheduled audit. + ScheduledAuditArn *string `locationName:"scheduledAuditArn" type:"string"` +} + +// String returns the string representation +func (s CreateScheduledAuditOutput) String() string { + return awsutil.Prettify(s) +} + +// GoString returns the string representation +func (s CreateScheduledAuditOutput) GoString() string { + return s.String() +} + +// SetScheduledAuditArn sets the ScheduledAuditArn field's value. +func (s *CreateScheduledAuditOutput) SetScheduledAuditArn(v string) *CreateScheduledAuditOutput { + s.ScheduledAuditArn = &v + return s +} + +type CreateSecurityProfileInput struct { + _ struct{} `type:"structure"` + + // Specifies the destinations to which alerts are sent. (Alerts are always sent + // to the console.) Alerts are generated when a device (thing) violates a behavior. + AlertTargets map[string]*AlertTarget `locationName:"alertTargets" type:"map"` + + // Specifies the behaviors that, when violated by a device (thing), cause an + // alert. + // + // Behaviors is a required field + Behaviors []*Behavior `locationName:"behaviors" type:"list" required:"true"` + + // A description of the security profile. + SecurityProfileDescription *string `locationName:"securityProfileDescription" type:"string"` + + // The name you are giving to the security profile. + // + // SecurityProfileName is a required field + SecurityProfileName *string `location:"uri" locationName:"securityProfileName" min:"1" type:"string" required:"true"` +} + +// String returns the string representation +func (s CreateSecurityProfileInput) String() string { + return awsutil.Prettify(s) +} + +// GoString returns the string representation +func (s CreateSecurityProfileInput) GoString() string { + return s.String() +} + +// Validate inspects the fields of the type to determine if they are valid. +func (s *CreateSecurityProfileInput) Validate() error { + invalidParams := request.ErrInvalidParams{Context: "CreateSecurityProfileInput"} + if s.Behaviors == nil { + invalidParams.Add(request.NewErrParamRequired("Behaviors")) + } + if s.SecurityProfileName == nil { + invalidParams.Add(request.NewErrParamRequired("SecurityProfileName")) + } + if s.SecurityProfileName != nil && len(*s.SecurityProfileName) < 1 { + invalidParams.Add(request.NewErrParamMinLen("SecurityProfileName", 1)) + } + if s.AlertTargets != nil { + for i, v := range s.AlertTargets { + if v == nil { + continue + } + if err := v.Validate(); err != nil { + invalidParams.AddNested(fmt.Sprintf("%s[%v]", "AlertTargets", i), err.(request.ErrInvalidParams)) + } + } + } + if s.Behaviors != nil { + for i, v := range s.Behaviors { + if v == nil { + continue + } + if err := v.Validate(); err != nil { + invalidParams.AddNested(fmt.Sprintf("%s[%v]", "Behaviors", i), err.(request.ErrInvalidParams)) + } + } + } + + if invalidParams.Len() > 0 { + return invalidParams + } + return nil +} + +// SetAlertTargets sets the AlertTargets field's value. +func (s *CreateSecurityProfileInput) SetAlertTargets(v map[string]*AlertTarget) *CreateSecurityProfileInput { + s.AlertTargets = v + return s +} + +// SetBehaviors sets the Behaviors field's value. +func (s *CreateSecurityProfileInput) SetBehaviors(v []*Behavior) *CreateSecurityProfileInput { + s.Behaviors = v + return s +} + +// SetSecurityProfileDescription sets the SecurityProfileDescription field's value. +func (s *CreateSecurityProfileInput) SetSecurityProfileDescription(v string) *CreateSecurityProfileInput { + s.SecurityProfileDescription = &v + return s +} + +// SetSecurityProfileName sets the SecurityProfileName field's value. +func (s *CreateSecurityProfileInput) SetSecurityProfileName(v string) *CreateSecurityProfileInput { + s.SecurityProfileName = &v + return s +} + +type CreateSecurityProfileOutput struct { + _ struct{} `type:"structure"` + + // The ARN of the security profile. + SecurityProfileArn *string `locationName:"securityProfileArn" type:"string"` + + // The name you gave to the security profile. + SecurityProfileName *string `locationName:"securityProfileName" min:"1" type:"string"` +} + +// String returns the string representation +func (s CreateSecurityProfileOutput) String() string { + return awsutil.Prettify(s) +} + +// GoString returns the string representation +func (s CreateSecurityProfileOutput) GoString() string { + return s.String() +} + +// SetSecurityProfileArn sets the SecurityProfileArn field's value. +func (s *CreateSecurityProfileOutput) SetSecurityProfileArn(v string) *CreateSecurityProfileOutput { + s.SecurityProfileArn = &v + return s +} + +// SetSecurityProfileName sets the SecurityProfileName field's value. +func (s *CreateSecurityProfileOutput) SetSecurityProfileName(v string) *CreateSecurityProfileOutput { + s.SecurityProfileName = &v + return s +} + type CreateStreamInput struct { _ struct{} `type:"structure"` @@ -15081,26 +18224,6 @@ func (s CustomCodeSigning) GoString() string { return s.String() } -// Validate inspects the fields of the type to determine if they are valid. -func (s *CustomCodeSigning) Validate() error { - invalidParams := request.ErrInvalidParams{Context: "CustomCodeSigning"} - if s.CertificateChain != nil { - if err := s.CertificateChain.Validate(); err != nil { - invalidParams.AddNested("CertificateChain", err.(request.ErrInvalidParams)) - } - } - if s.Signature != nil { - if err := s.Signature.Validate(); err != nil { - invalidParams.AddNested("Signature", err.(request.ErrInvalidParams)) - } - } - - if invalidParams.Len() > 0 { - return invalidParams - } - return nil -} - // SetCertificateChain sets the CertificateChain field's value. func (s *CustomCodeSigning) SetCertificateChain(v *CodeSigningCertificateChain) *CustomCodeSigning { s.CertificateChain = v @@ -15125,6 +18248,43 @@ func (s *CustomCodeSigning) SetSignatureAlgorithm(v string) *CustomCodeSigning { return s } +type DeleteAccountAuditConfigurationInput struct { + _ struct{} `type:"structure"` + + // If true, all scheduled audits are deleted. + DeleteScheduledAudits *bool `location:"querystring" locationName:"deleteScheduledAudits" type:"boolean"` +} + +// String returns the string representation +func (s DeleteAccountAuditConfigurationInput) String() string { + return awsutil.Prettify(s) +} + +// GoString returns the string representation +func (s DeleteAccountAuditConfigurationInput) GoString() string { + return s.String() +} + +// SetDeleteScheduledAudits sets the DeleteScheduledAudits field's value. +func (s *DeleteAccountAuditConfigurationInput) SetDeleteScheduledAudits(v bool) *DeleteAccountAuditConfigurationInput { + s.DeleteScheduledAudits = &v + return s +} + +type DeleteAccountAuditConfigurationOutput struct { + _ struct{} `type:"structure"` +} + +// String returns the string representation +func (s DeleteAccountAuditConfigurationOutput) String() string { + return awsutil.Prettify(s) +} + +// GoString returns the string representation +func (s DeleteAccountAuditConfigurationOutput) GoString() string { + return s.String() +} + type DeleteAuthorizerInput struct { _ struct{} `type:"structure"` @@ -15488,6 +18648,14 @@ func (s DeleteJobOutput) GoString() string { type DeleteOTAUpdateInput struct { _ struct{} `type:"structure"` + // Specifies if the stream associated with an OTA update should be deleted when + // the OTA update is deleted. + DeleteStream *bool `location:"querystring" locationName:"deleteStream" type:"boolean"` + + // Specifies if the AWS Job associated with the OTA update should be deleted + // with the OTA update is deleted. + ForceDeleteAWSJob *bool `location:"querystring" locationName:"forceDeleteAWSJob" type:"boolean"` + // The OTA update ID to delete. // // OtaUpdateId is a required field @@ -15520,6 +18688,18 @@ func (s *DeleteOTAUpdateInput) Validate() error { return nil } +// SetDeleteStream sets the DeleteStream field's value. +func (s *DeleteOTAUpdateInput) SetDeleteStream(v bool) *DeleteOTAUpdateInput { + s.DeleteStream = &v + return s +} + +// SetForceDeleteAWSJob sets the ForceDeleteAWSJob field's value. +func (s *DeleteOTAUpdateInput) SetForceDeleteAWSJob(v bool) *DeleteOTAUpdateInput { + s.ForceDeleteAWSJob = &v + return s +} + // SetOtaUpdateId sets the OtaUpdateId field's value. func (s *DeleteOTAUpdateInput) SetOtaUpdateId(v string) *DeleteOTAUpdateInput { s.OtaUpdateId = &v @@ -15751,6 +18931,127 @@ func (s DeleteRoleAliasOutput) GoString() string { return s.String() } +type DeleteScheduledAuditInput struct { + _ struct{} `type:"structure"` + + // The name of the scheduled audit you want to delete. + // + // ScheduledAuditName is a required field + ScheduledAuditName *string `location:"uri" locationName:"scheduledAuditName" min:"1" type:"string" required:"true"` +} + +// String returns the string representation +func (s DeleteScheduledAuditInput) String() string { + return awsutil.Prettify(s) +} + +// GoString returns the string representation +func (s DeleteScheduledAuditInput) GoString() string { + return s.String() +} + +// Validate inspects the fields of the type to determine if they are valid. +func (s *DeleteScheduledAuditInput) Validate() error { + invalidParams := request.ErrInvalidParams{Context: "DeleteScheduledAuditInput"} + if s.ScheduledAuditName == nil { + invalidParams.Add(request.NewErrParamRequired("ScheduledAuditName")) + } + if s.ScheduledAuditName != nil && len(*s.ScheduledAuditName) < 1 { + invalidParams.Add(request.NewErrParamMinLen("ScheduledAuditName", 1)) + } + + if invalidParams.Len() > 0 { + return invalidParams + } + return nil +} + +// SetScheduledAuditName sets the ScheduledAuditName field's value. +func (s *DeleteScheduledAuditInput) SetScheduledAuditName(v string) *DeleteScheduledAuditInput { + s.ScheduledAuditName = &v + return s +} + +type DeleteScheduledAuditOutput struct { + _ struct{} `type:"structure"` +} + +// String returns the string representation +func (s DeleteScheduledAuditOutput) String() string { + return awsutil.Prettify(s) +} + +// GoString returns the string representation +func (s DeleteScheduledAuditOutput) GoString() string { + return s.String() +} + +type DeleteSecurityProfileInput struct { + _ struct{} `type:"structure"` + + // The expected version of the security profile. A new version is generated + // whenever the security profile is updated. If you specify a value that is + // different than the actual version, a VersionConflictException is thrown. + ExpectedVersion *int64 `location:"querystring" locationName:"expectedVersion" type:"long"` + + // The name of the security profile to be deleted. + // + // SecurityProfileName is a required field + SecurityProfileName *string `location:"uri" locationName:"securityProfileName" min:"1" type:"string" required:"true"` +} + +// String returns the string representation +func (s DeleteSecurityProfileInput) String() string { + return awsutil.Prettify(s) +} + +// GoString returns the string representation +func (s DeleteSecurityProfileInput) GoString() string { + return s.String() +} + +// Validate inspects the fields of the type to determine if they are valid. +func (s *DeleteSecurityProfileInput) Validate() error { + invalidParams := request.ErrInvalidParams{Context: "DeleteSecurityProfileInput"} + if s.SecurityProfileName == nil { + invalidParams.Add(request.NewErrParamRequired("SecurityProfileName")) + } + if s.SecurityProfileName != nil && len(*s.SecurityProfileName) < 1 { + invalidParams.Add(request.NewErrParamMinLen("SecurityProfileName", 1)) + } + + if invalidParams.Len() > 0 { + return invalidParams + } + return nil +} + +// SetExpectedVersion sets the ExpectedVersion field's value. +func (s *DeleteSecurityProfileInput) SetExpectedVersion(v int64) *DeleteSecurityProfileInput { + s.ExpectedVersion = &v + return s +} + +// SetSecurityProfileName sets the SecurityProfileName field's value. +func (s *DeleteSecurityProfileInput) SetSecurityProfileName(v string) *DeleteSecurityProfileInput { + s.SecurityProfileName = &v + return s +} + +type DeleteSecurityProfileOutput struct { + _ struct{} `type:"structure"` +} + +// String returns the string representation +func (s DeleteSecurityProfileOutput) String() string { + return awsutil.Prettify(s) +} + +// GoString returns the string representation +func (s DeleteSecurityProfileOutput) GoString() string { + return s.String() +} + type DeleteStreamInput struct { _ struct{} `type:"structure"` @@ -16219,6 +19520,176 @@ func (s DeprecateThingTypeOutput) GoString() string { return s.String() } +type DescribeAccountAuditConfigurationInput struct { + _ struct{} `type:"structure"` +} + +// String returns the string representation +func (s DescribeAccountAuditConfigurationInput) String() string { + return awsutil.Prettify(s) +} + +// GoString returns the string representation +func (s DescribeAccountAuditConfigurationInput) GoString() string { + return s.String() +} + +type DescribeAccountAuditConfigurationOutput struct { + _ struct{} `type:"structure"` + + // Which audit checks are enabled and disabled for this account. + AuditCheckConfigurations map[string]*AuditCheckConfiguration `locationName:"auditCheckConfigurations" type:"map"` + + // Information about the targets to which audit notifications are sent for this + // account. + AuditNotificationTargetConfigurations map[string]*AuditNotificationTarget `locationName:"auditNotificationTargetConfigurations" type:"map"` + + // The ARN of the role that grants permission to AWS IoT to access information + // about your devices, policies, certificates and other items as necessary when + // performing an audit. + // + // On the first call to UpdateAccountAuditConfiguration this parameter is required. + RoleArn *string `locationName:"roleArn" min:"20" type:"string"` +} + +// String returns the string representation +func (s DescribeAccountAuditConfigurationOutput) String() string { + return awsutil.Prettify(s) +} + +// GoString returns the string representation +func (s DescribeAccountAuditConfigurationOutput) GoString() string { + return s.String() +} + +// SetAuditCheckConfigurations sets the AuditCheckConfigurations field's value. +func (s *DescribeAccountAuditConfigurationOutput) SetAuditCheckConfigurations(v map[string]*AuditCheckConfiguration) *DescribeAccountAuditConfigurationOutput { + s.AuditCheckConfigurations = v + return s +} + +// SetAuditNotificationTargetConfigurations sets the AuditNotificationTargetConfigurations field's value. +func (s *DescribeAccountAuditConfigurationOutput) SetAuditNotificationTargetConfigurations(v map[string]*AuditNotificationTarget) *DescribeAccountAuditConfigurationOutput { + s.AuditNotificationTargetConfigurations = v + return s +} + +// SetRoleArn sets the RoleArn field's value. +func (s *DescribeAccountAuditConfigurationOutput) SetRoleArn(v string) *DescribeAccountAuditConfigurationOutput { + s.RoleArn = &v + return s +} + +type DescribeAuditTaskInput struct { + _ struct{} `type:"structure"` + + // The ID of the audit whose information you want to get. + // + // TaskId is a required field + TaskId *string `location:"uri" locationName:"taskId" min:"1" type:"string" required:"true"` +} + +// String returns the string representation +func (s DescribeAuditTaskInput) String() string { + return awsutil.Prettify(s) +} + +// GoString returns the string representation +func (s DescribeAuditTaskInput) GoString() string { + return s.String() +} + +// Validate inspects the fields of the type to determine if they are valid. +func (s *DescribeAuditTaskInput) Validate() error { + invalidParams := request.ErrInvalidParams{Context: "DescribeAuditTaskInput"} + if s.TaskId == nil { + invalidParams.Add(request.NewErrParamRequired("TaskId")) + } + if s.TaskId != nil && len(*s.TaskId) < 1 { + invalidParams.Add(request.NewErrParamMinLen("TaskId", 1)) + } + + if invalidParams.Len() > 0 { + return invalidParams + } + return nil +} + +// SetTaskId sets the TaskId field's value. +func (s *DescribeAuditTaskInput) SetTaskId(v string) *DescribeAuditTaskInput { + s.TaskId = &v + return s +} + +type DescribeAuditTaskOutput struct { + _ struct{} `type:"structure"` + + // Detailed information about each check performed during this audit. + AuditDetails map[string]*AuditCheckDetails `locationName:"auditDetails" type:"map"` + + // The name of the scheduled audit (only if the audit was a scheduled audit). + ScheduledAuditName *string `locationName:"scheduledAuditName" min:"1" type:"string"` + + // The time the audit started. + TaskStartTime *time.Time `locationName:"taskStartTime" type:"timestamp"` + + // Statistical information about the audit. + TaskStatistics *TaskStatistics `locationName:"taskStatistics" type:"structure"` + + // The status of the audit: one of "IN_PROGRESS", "COMPLETED", "FAILED", or + // "CANCELED". + TaskStatus *string `locationName:"taskStatus" type:"string" enum:"AuditTaskStatus"` + + // The type of audit: "ON_DEMAND_AUDIT_TASK" or "SCHEDULED_AUDIT_TASK". + TaskType *string `locationName:"taskType" type:"string" enum:"AuditTaskType"` +} + +// String returns the string representation +func (s DescribeAuditTaskOutput) String() string { + return awsutil.Prettify(s) +} + +// GoString returns the string representation +func (s DescribeAuditTaskOutput) GoString() string { + return s.String() +} + +// SetAuditDetails sets the AuditDetails field's value. +func (s *DescribeAuditTaskOutput) SetAuditDetails(v map[string]*AuditCheckDetails) *DescribeAuditTaskOutput { + s.AuditDetails = v + return s +} + +// SetScheduledAuditName sets the ScheduledAuditName field's value. +func (s *DescribeAuditTaskOutput) SetScheduledAuditName(v string) *DescribeAuditTaskOutput { + s.ScheduledAuditName = &v + return s +} + +// SetTaskStartTime sets the TaskStartTime field's value. +func (s *DescribeAuditTaskOutput) SetTaskStartTime(v time.Time) *DescribeAuditTaskOutput { + s.TaskStartTime = &v + return s +} + +// SetTaskStatistics sets the TaskStatistics field's value. +func (s *DescribeAuditTaskOutput) SetTaskStatistics(v *TaskStatistics) *DescribeAuditTaskOutput { + s.TaskStatistics = v + return s +} + +// SetTaskStatus sets the TaskStatus field's value. +func (s *DescribeAuditTaskOutput) SetTaskStatus(v string) *DescribeAuditTaskOutput { + s.TaskStatus = &v + return s +} + +// SetTaskType sets the TaskType field's value. +func (s *DescribeAuditTaskOutput) SetTaskType(v string) *DescribeAuditTaskOutput { + s.TaskType = &v + return s +} + type DescribeAuthorizerInput struct { _ struct{} `type:"structure"` @@ -16466,7 +19937,7 @@ func (s *DescribeDefaultAuthorizerOutput) SetAuthorizerDescription(v *Authorizer type DescribeEndpointInput struct { _ struct{} `type:"structure"` - // The endpoint type. + // The endpoint type (such as iot:Data, iot:CredentialProvider and iot:Jobs). EndpointType *string `location:"querystring" locationName:"endpointType" type:"string"` } @@ -16880,6 +20351,252 @@ func (s *DescribeRoleAliasOutput) SetRoleAliasDescription(v *RoleAliasDescriptio return s } +type DescribeScheduledAuditInput struct { + _ struct{} `type:"structure"` + + // The name of the scheduled audit whose information you want to get. + // + // ScheduledAuditName is a required field + ScheduledAuditName *string `location:"uri" locationName:"scheduledAuditName" min:"1" type:"string" required:"true"` +} + +// String returns the string representation +func (s DescribeScheduledAuditInput) String() string { + return awsutil.Prettify(s) +} + +// GoString returns the string representation +func (s DescribeScheduledAuditInput) GoString() string { + return s.String() +} + +// Validate inspects the fields of the type to determine if they are valid. +func (s *DescribeScheduledAuditInput) Validate() error { + invalidParams := request.ErrInvalidParams{Context: "DescribeScheduledAuditInput"} + if s.ScheduledAuditName == nil { + invalidParams.Add(request.NewErrParamRequired("ScheduledAuditName")) + } + if s.ScheduledAuditName != nil && len(*s.ScheduledAuditName) < 1 { + invalidParams.Add(request.NewErrParamMinLen("ScheduledAuditName", 1)) + } + + if invalidParams.Len() > 0 { + return invalidParams + } + return nil +} + +// SetScheduledAuditName sets the ScheduledAuditName field's value. +func (s *DescribeScheduledAuditInput) SetScheduledAuditName(v string) *DescribeScheduledAuditInput { + s.ScheduledAuditName = &v + return s +} + +type DescribeScheduledAuditOutput struct { + _ struct{} `type:"structure"` + + // The day of the month on which the scheduled audit takes place. Will be "1" + // through "31" or "LAST". If days 29-31 are specified, and the month does not + // have that many days, the audit takes place on the "LAST" day of the month. + DayOfMonth *string `locationName:"dayOfMonth" type:"string"` + + // The day of the week on which the scheduled audit takes place. One of "SUN", + // "MON", "TUE", "WED", "THU", "FRI" or "SAT". + DayOfWeek *string `locationName:"dayOfWeek" type:"string" enum:"DayOfWeek"` + + // How often the scheduled audit takes place. One of "DAILY", "WEEKLY", "BIWEEKLY" + // or "MONTHLY". The actual start time of each audit is determined by the system. + Frequency *string `locationName:"frequency" type:"string" enum:"AuditFrequency"` + + // The ARN of the scheduled audit. + ScheduledAuditArn *string `locationName:"scheduledAuditArn" type:"string"` + + // The name of the scheduled audit. + ScheduledAuditName *string `locationName:"scheduledAuditName" min:"1" type:"string"` + + // Which checks are performed during the scheduled audit. (Note that checks + // must be enabled for your account. (Use DescribeAccountAuditConfiguration + // to see the list of all checks including those that are enabled or UpdateAccountAuditConfiguration + // to select which checks are enabled.) + TargetCheckNames []*string `locationName:"targetCheckNames" type:"list"` +} + +// String returns the string representation +func (s DescribeScheduledAuditOutput) String() string { + return awsutil.Prettify(s) +} + +// GoString returns the string representation +func (s DescribeScheduledAuditOutput) GoString() string { + return s.String() +} + +// SetDayOfMonth sets the DayOfMonth field's value. +func (s *DescribeScheduledAuditOutput) SetDayOfMonth(v string) *DescribeScheduledAuditOutput { + s.DayOfMonth = &v + return s +} + +// SetDayOfWeek sets the DayOfWeek field's value. +func (s *DescribeScheduledAuditOutput) SetDayOfWeek(v string) *DescribeScheduledAuditOutput { + s.DayOfWeek = &v + return s +} + +// SetFrequency sets the Frequency field's value. +func (s *DescribeScheduledAuditOutput) SetFrequency(v string) *DescribeScheduledAuditOutput { + s.Frequency = &v + return s +} + +// SetScheduledAuditArn sets the ScheduledAuditArn field's value. +func (s *DescribeScheduledAuditOutput) SetScheduledAuditArn(v string) *DescribeScheduledAuditOutput { + s.ScheduledAuditArn = &v + return s +} + +// SetScheduledAuditName sets the ScheduledAuditName field's value. +func (s *DescribeScheduledAuditOutput) SetScheduledAuditName(v string) *DescribeScheduledAuditOutput { + s.ScheduledAuditName = &v + return s +} + +// SetTargetCheckNames sets the TargetCheckNames field's value. +func (s *DescribeScheduledAuditOutput) SetTargetCheckNames(v []*string) *DescribeScheduledAuditOutput { + s.TargetCheckNames = v + return s +} + +type DescribeSecurityProfileInput struct { + _ struct{} `type:"structure"` + + // The name of the security profile whose information you want to get. + // + // SecurityProfileName is a required field + SecurityProfileName *string `location:"uri" locationName:"securityProfileName" min:"1" type:"string" required:"true"` +} + +// String returns the string representation +func (s DescribeSecurityProfileInput) String() string { + return awsutil.Prettify(s) +} + +// GoString returns the string representation +func (s DescribeSecurityProfileInput) GoString() string { + return s.String() +} + +// Validate inspects the fields of the type to determine if they are valid. +func (s *DescribeSecurityProfileInput) Validate() error { + invalidParams := request.ErrInvalidParams{Context: "DescribeSecurityProfileInput"} + if s.SecurityProfileName == nil { + invalidParams.Add(request.NewErrParamRequired("SecurityProfileName")) + } + if s.SecurityProfileName != nil && len(*s.SecurityProfileName) < 1 { + invalidParams.Add(request.NewErrParamMinLen("SecurityProfileName", 1)) + } + + if invalidParams.Len() > 0 { + return invalidParams + } + return nil +} + +// SetSecurityProfileName sets the SecurityProfileName field's value. +func (s *DescribeSecurityProfileInput) SetSecurityProfileName(v string) *DescribeSecurityProfileInput { + s.SecurityProfileName = &v + return s +} + +type DescribeSecurityProfileOutput struct { + _ struct{} `type:"structure"` + + // Where the alerts are sent. (Alerts are always sent to the console.) + AlertTargets map[string]*AlertTarget `locationName:"alertTargets" type:"map"` + + // Specifies the behaviors that, when violated by a device (thing), cause an + // alert. + Behaviors []*Behavior `locationName:"behaviors" type:"list"` + + // The time the security profile was created. + CreationDate *time.Time `locationName:"creationDate" type:"timestamp"` + + // The time the security profile was last modified. + LastModifiedDate *time.Time `locationName:"lastModifiedDate" type:"timestamp"` + + // The ARN of the security profile. + SecurityProfileArn *string `locationName:"securityProfileArn" type:"string"` + + // A description of the security profile (associated with the security profile + // when it was created or updated). + SecurityProfileDescription *string `locationName:"securityProfileDescription" type:"string"` + + // The name of the security profile. + SecurityProfileName *string `locationName:"securityProfileName" min:"1" type:"string"` + + // The version of the security profile. A new version is generated whenever + // the security profile is updated. + Version *int64 `locationName:"version" type:"long"` +} + +// String returns the string representation +func (s DescribeSecurityProfileOutput) String() string { + return awsutil.Prettify(s) +} + +// GoString returns the string representation +func (s DescribeSecurityProfileOutput) GoString() string { + return s.String() +} + +// SetAlertTargets sets the AlertTargets field's value. +func (s *DescribeSecurityProfileOutput) SetAlertTargets(v map[string]*AlertTarget) *DescribeSecurityProfileOutput { + s.AlertTargets = v + return s +} + +// SetBehaviors sets the Behaviors field's value. +func (s *DescribeSecurityProfileOutput) SetBehaviors(v []*Behavior) *DescribeSecurityProfileOutput { + s.Behaviors = v + return s +} + +// SetCreationDate sets the CreationDate field's value. +func (s *DescribeSecurityProfileOutput) SetCreationDate(v time.Time) *DescribeSecurityProfileOutput { + s.CreationDate = &v + return s +} + +// SetLastModifiedDate sets the LastModifiedDate field's value. +func (s *DescribeSecurityProfileOutput) SetLastModifiedDate(v time.Time) *DescribeSecurityProfileOutput { + s.LastModifiedDate = &v + return s +} + +// SetSecurityProfileArn sets the SecurityProfileArn field's value. +func (s *DescribeSecurityProfileOutput) SetSecurityProfileArn(v string) *DescribeSecurityProfileOutput { + s.SecurityProfileArn = &v + return s +} + +// SetSecurityProfileDescription sets the SecurityProfileDescription field's value. +func (s *DescribeSecurityProfileOutput) SetSecurityProfileDescription(v string) *DescribeSecurityProfileOutput { + s.SecurityProfileDescription = &v + return s +} + +// SetSecurityProfileName sets the SecurityProfileName field's value. +func (s *DescribeSecurityProfileOutput) SetSecurityProfileName(v string) *DescribeSecurityProfileOutput { + s.SecurityProfileName = &v + return s +} + +// SetVersion sets the Version field's value. +func (s *DescribeSecurityProfileOutput) SetVersion(v int64) *DescribeSecurityProfileOutput { + s.Version = &v + return s +} + type DescribeStreamInput struct { _ struct{} `type:"structure"` @@ -17442,6 +21159,45 @@ func (s *DescribeThingTypeOutput) SetThingTypeProperties(v *ThingTypeProperties) return s } +// Describes the location of the updated firmware. +type Destination struct { + _ struct{} `type:"structure"` + + // Describes the location in S3 of the updated firmware. + S3Destination *S3Destination `locationName:"s3Destination" type:"structure"` +} + +// String returns the string representation +func (s Destination) String() string { + return awsutil.Prettify(s) +} + +// GoString returns the string representation +func (s Destination) GoString() string { + return s.String() +} + +// Validate inspects the fields of the type to determine if they are valid. +func (s *Destination) Validate() error { + invalidParams := request.ErrInvalidParams{Context: "Destination"} + if s.S3Destination != nil { + if err := s.S3Destination.Validate(); err != nil { + invalidParams.AddNested("S3Destination", err.(request.ErrInvalidParams)) + } + } + + if invalidParams.Len() > 0 { + return invalidParams + } + return nil +} + +// SetS3Destination sets the S3Destination field's value. +func (s *Destination) SetS3Destination(v *S3Destination) *Destination { + s.S3Destination = v + return s +} + type DetachPolicyInput struct { _ struct{} `type:"structure"` @@ -17584,6 +21340,75 @@ func (s DetachPrincipalPolicyOutput) GoString() string { return s.String() } +type DetachSecurityProfileInput struct { + _ struct{} `type:"structure"` + + // The security profile that is detached. + // + // SecurityProfileName is a required field + SecurityProfileName *string `location:"uri" locationName:"securityProfileName" min:"1" type:"string" required:"true"` + + // The ARN of the thing group from which the security profile is detached. + // + // SecurityProfileTargetArn is a required field + SecurityProfileTargetArn *string `location:"querystring" locationName:"securityProfileTargetArn" type:"string" required:"true"` +} + +// String returns the string representation +func (s DetachSecurityProfileInput) String() string { + return awsutil.Prettify(s) +} + +// GoString returns the string representation +func (s DetachSecurityProfileInput) GoString() string { + return s.String() +} + +// Validate inspects the fields of the type to determine if they are valid. +func (s *DetachSecurityProfileInput) Validate() error { + invalidParams := request.ErrInvalidParams{Context: "DetachSecurityProfileInput"} + if s.SecurityProfileName == nil { + invalidParams.Add(request.NewErrParamRequired("SecurityProfileName")) + } + if s.SecurityProfileName != nil && len(*s.SecurityProfileName) < 1 { + invalidParams.Add(request.NewErrParamMinLen("SecurityProfileName", 1)) + } + if s.SecurityProfileTargetArn == nil { + invalidParams.Add(request.NewErrParamRequired("SecurityProfileTargetArn")) + } + + if invalidParams.Len() > 0 { + return invalidParams + } + return nil +} + +// SetSecurityProfileName sets the SecurityProfileName field's value. +func (s *DetachSecurityProfileInput) SetSecurityProfileName(v string) *DetachSecurityProfileInput { + s.SecurityProfileName = &v + return s +} + +// SetSecurityProfileTargetArn sets the SecurityProfileTargetArn field's value. +func (s *DetachSecurityProfileInput) SetSecurityProfileTargetArn(v string) *DetachSecurityProfileInput { + s.SecurityProfileTargetArn = &v + return s +} + +type DetachSecurityProfileOutput struct { + _ struct{} `type:"structure"` +} + +// String returns the string representation +func (s DetachSecurityProfileOutput) String() string { + return awsutil.Prettify(s) +} + +// GoString returns the string representation +func (s DetachSecurityProfileOutput) GoString() string { + return s.String() +} + // The input for the DetachThingPrincipal operation. type DetachThingPrincipalInput struct { _ struct{} `type:"structure"` @@ -18174,6 +21999,59 @@ func (s *ExplicitDeny) SetPolicies(v []*Policy) *ExplicitDeny { return s } +// The location of the OTA update. +type FileLocation struct { + _ struct{} `type:"structure"` + + // The location of the updated firmware in S3. + S3Location *S3Location `locationName:"s3Location" type:"structure"` + + // The stream that contains the OTA update. + Stream *Stream `locationName:"stream" type:"structure"` +} + +// String returns the string representation +func (s FileLocation) String() string { + return awsutil.Prettify(s) +} + +// GoString returns the string representation +func (s FileLocation) GoString() string { + return s.String() +} + +// Validate inspects the fields of the type to determine if they are valid. +func (s *FileLocation) Validate() error { + invalidParams := request.ErrInvalidParams{Context: "FileLocation"} + if s.S3Location != nil { + if err := s.S3Location.Validate(); err != nil { + invalidParams.AddNested("S3Location", err.(request.ErrInvalidParams)) + } + } + if s.Stream != nil { + if err := s.Stream.Validate(); err != nil { + invalidParams.AddNested("Stream", err.(request.ErrInvalidParams)) + } + } + + if invalidParams.Len() > 0 { + return invalidParams + } + return nil +} + +// SetS3Location sets the S3Location field's value. +func (s *FileLocation) SetS3Location(v *S3Location) *FileLocation { + s.S3Location = v + return s +} + +// SetStream sets the Stream field's value. +func (s *FileLocation) SetStream(v *Stream) *FileLocation { + s.Stream = v + return s +} + // Describes an action that writes data to an Amazon Kinesis Firehose stream. type FirehoseAction struct { _ struct{} `type:"structure"` @@ -18332,6 +22210,9 @@ func (s GetIndexingConfigurationInput) GoString() string { type GetIndexingConfigurationOutput struct { _ struct{} `type:"structure"` + // The index configuration. + ThingGroupIndexingConfiguration *ThingGroupIndexingConfiguration `locationName:"thingGroupIndexingConfiguration" type:"structure"` + // Thing indexing configuration. ThingIndexingConfiguration *ThingIndexingConfiguration `locationName:"thingIndexingConfiguration" type:"structure"` } @@ -18346,6 +22227,12 @@ func (s GetIndexingConfigurationOutput) GoString() string { return s.String() } +// SetThingGroupIndexingConfiguration sets the ThingGroupIndexingConfiguration field's value. +func (s *GetIndexingConfigurationOutput) SetThingGroupIndexingConfiguration(v *ThingGroupIndexingConfiguration) *GetIndexingConfigurationOutput { + s.ThingGroupIndexingConfiguration = v + return s +} + // SetThingIndexingConfiguration sets the ThingIndexingConfiguration field's value. func (s *GetIndexingConfigurationOutput) SetThingIndexingConfiguration(v *ThingIndexingConfiguration) *GetIndexingConfigurationOutput { s.ThingIndexingConfiguration = v @@ -19079,9 +22966,6 @@ type Job struct { // A short text description of the job. Description *string `locationName:"description" type:"string"` - // The parameters specified for the job document. - DocumentParameters map[string]*string `locationName:"documentParameters" type:"map"` - // Will be true if the job was canceled with the optional force parameter set // to true. ForceCanceled *bool `locationName:"forceCanceled" type:"boolean"` @@ -19153,12 +23037,6 @@ func (s *Job) SetDescription(v string) *Job { return s } -// SetDocumentParameters sets the DocumentParameters field's value. -func (s *Job) SetDocumentParameters(v map[string]*string) *Job { - s.DocumentParameters = v - return s -} - // SetForceCanceled sets the ForceCanceled field's value. func (s *Job) SetForceCanceled(v bool) *Job { s.ForceCanceled = &v @@ -19839,6 +23717,109 @@ func (s *LambdaAction) SetFunctionArn(v string) *LambdaAction { return s } +type ListActiveViolationsInput struct { + _ struct{} `type:"structure"` + + // The maximum number of results to return at one time. + MaxResults *int64 `location:"querystring" locationName:"maxResults" min:"1" type:"integer"` + + // The token for the next set of results. + NextToken *string `location:"querystring" locationName:"nextToken" type:"string"` + + // The name of the Device Defender security profile for which violations are + // listed. + SecurityProfileName *string `location:"querystring" locationName:"securityProfileName" min:"1" type:"string"` + + // The name of the thing whose active violations are listed. + ThingName *string `location:"querystring" locationName:"thingName" min:"1" type:"string"` +} + +// String returns the string representation +func (s ListActiveViolationsInput) String() string { + return awsutil.Prettify(s) +} + +// GoString returns the string representation +func (s ListActiveViolationsInput) GoString() string { + return s.String() +} + +// Validate inspects the fields of the type to determine if they are valid. +func (s *ListActiveViolationsInput) Validate() error { + invalidParams := request.ErrInvalidParams{Context: "ListActiveViolationsInput"} + if s.MaxResults != nil && *s.MaxResults < 1 { + invalidParams.Add(request.NewErrParamMinValue("MaxResults", 1)) + } + if s.SecurityProfileName != nil && len(*s.SecurityProfileName) < 1 { + invalidParams.Add(request.NewErrParamMinLen("SecurityProfileName", 1)) + } + if s.ThingName != nil && len(*s.ThingName) < 1 { + invalidParams.Add(request.NewErrParamMinLen("ThingName", 1)) + } + + if invalidParams.Len() > 0 { + return invalidParams + } + return nil +} + +// SetMaxResults sets the MaxResults field's value. +func (s *ListActiveViolationsInput) SetMaxResults(v int64) *ListActiveViolationsInput { + s.MaxResults = &v + return s +} + +// SetNextToken sets the NextToken field's value. +func (s *ListActiveViolationsInput) SetNextToken(v string) *ListActiveViolationsInput { + s.NextToken = &v + return s +} + +// SetSecurityProfileName sets the SecurityProfileName field's value. +func (s *ListActiveViolationsInput) SetSecurityProfileName(v string) *ListActiveViolationsInput { + s.SecurityProfileName = &v + return s +} + +// SetThingName sets the ThingName field's value. +func (s *ListActiveViolationsInput) SetThingName(v string) *ListActiveViolationsInput { + s.ThingName = &v + return s +} + +type ListActiveViolationsOutput struct { + _ struct{} `type:"structure"` + + // The list of active violations. + ActiveViolations []*ActiveViolation `locationName:"activeViolations" type:"list"` + + // A token that can be used to retrieve the next set of results, or null if + // there are no additional results. + NextToken *string `locationName:"nextToken" type:"string"` +} + +// String returns the string representation +func (s ListActiveViolationsOutput) String() string { + return awsutil.Prettify(s) +} + +// GoString returns the string representation +func (s ListActiveViolationsOutput) GoString() string { + return s.String() +} + +// SetActiveViolations sets the ActiveViolations field's value. +func (s *ListActiveViolationsOutput) SetActiveViolations(v []*ActiveViolation) *ListActiveViolationsOutput { + s.ActiveViolations = v + return s +} + +// SetNextToken sets the NextToken field's value. +func (s *ListActiveViolationsOutput) SetNextToken(v string) *ListActiveViolationsOutput { + s.NextToken = &v + return s +} + type ListAttachedPoliciesInput struct { _ struct{} `type:"structure"` @@ -19940,6 +23921,268 @@ func (s *ListAttachedPoliciesOutput) SetPolicies(v []*Policy) *ListAttachedPolic return s } +type ListAuditFindingsInput struct { + _ struct{} `type:"structure"` + + // A filter to limit results to the findings for the specified audit check. + CheckName *string `locationName:"checkName" type:"string"` + + // A filter to limit results to those found before the specified time. You must + // specify either the startTime and endTime or the taskId, but not both. + EndTime *time.Time `locationName:"endTime" type:"timestamp"` + + // The maximum number of results to return at one time. The default is 25. + MaxResults *int64 `locationName:"maxResults" min:"1" type:"integer"` + + // The token for the next set of results. + NextToken *string `locationName:"nextToken" type:"string"` + + // Information identifying the non-compliant resource. + ResourceIdentifier *ResourceIdentifier `locationName:"resourceIdentifier" type:"structure"` + + // A filter to limit results to those found after the specified time. You must + // specify either the startTime and endTime or the taskId, but not both. + StartTime *time.Time `locationName:"startTime" type:"timestamp"` + + // A filter to limit results to the audit with the specified ID. You must specify + // either the taskId or the startTime and endTime, but not both. + TaskId *string `locationName:"taskId" min:"1" type:"string"` +} + +// String returns the string representation +func (s ListAuditFindingsInput) String() string { + return awsutil.Prettify(s) +} + +// GoString returns the string representation +func (s ListAuditFindingsInput) GoString() string { + return s.String() +} + +// Validate inspects the fields of the type to determine if they are valid. +func (s *ListAuditFindingsInput) Validate() error { + invalidParams := request.ErrInvalidParams{Context: "ListAuditFindingsInput"} + if s.MaxResults != nil && *s.MaxResults < 1 { + invalidParams.Add(request.NewErrParamMinValue("MaxResults", 1)) + } + if s.TaskId != nil && len(*s.TaskId) < 1 { + invalidParams.Add(request.NewErrParamMinLen("TaskId", 1)) + } + if s.ResourceIdentifier != nil { + if err := s.ResourceIdentifier.Validate(); err != nil { + invalidParams.AddNested("ResourceIdentifier", err.(request.ErrInvalidParams)) + } + } + + if invalidParams.Len() > 0 { + return invalidParams + } + return nil +} + +// SetCheckName sets the CheckName field's value. +func (s *ListAuditFindingsInput) SetCheckName(v string) *ListAuditFindingsInput { + s.CheckName = &v + return s +} + +// SetEndTime sets the EndTime field's value. +func (s *ListAuditFindingsInput) SetEndTime(v time.Time) *ListAuditFindingsInput { + s.EndTime = &v + return s +} + +// SetMaxResults sets the MaxResults field's value. +func (s *ListAuditFindingsInput) SetMaxResults(v int64) *ListAuditFindingsInput { + s.MaxResults = &v + return s +} + +// SetNextToken sets the NextToken field's value. +func (s *ListAuditFindingsInput) SetNextToken(v string) *ListAuditFindingsInput { + s.NextToken = &v + return s +} + +// SetResourceIdentifier sets the ResourceIdentifier field's value. +func (s *ListAuditFindingsInput) SetResourceIdentifier(v *ResourceIdentifier) *ListAuditFindingsInput { + s.ResourceIdentifier = v + return s +} + +// SetStartTime sets the StartTime field's value. +func (s *ListAuditFindingsInput) SetStartTime(v time.Time) *ListAuditFindingsInput { + s.StartTime = &v + return s +} + +// SetTaskId sets the TaskId field's value. +func (s *ListAuditFindingsInput) SetTaskId(v string) *ListAuditFindingsInput { + s.TaskId = &v + return s +} + +type ListAuditFindingsOutput struct { + _ struct{} `type:"structure"` + + // The findings (results) of the audit. + Findings []*AuditFinding `locationName:"findings" type:"list"` + + // A token that can be used to retrieve the next set of results, or null if + // there are no additional results. + NextToken *string `locationName:"nextToken" type:"string"` +} + +// String returns the string representation +func (s ListAuditFindingsOutput) String() string { + return awsutil.Prettify(s) +} + +// GoString returns the string representation +func (s ListAuditFindingsOutput) GoString() string { + return s.String() +} + +// SetFindings sets the Findings field's value. +func (s *ListAuditFindingsOutput) SetFindings(v []*AuditFinding) *ListAuditFindingsOutput { + s.Findings = v + return s +} + +// SetNextToken sets the NextToken field's value. +func (s *ListAuditFindingsOutput) SetNextToken(v string) *ListAuditFindingsOutput { + s.NextToken = &v + return s +} + +type ListAuditTasksInput struct { + _ struct{} `type:"structure"` + + // The end of the time period. + // + // EndTime is a required field + EndTime *time.Time `location:"querystring" locationName:"endTime" type:"timestamp" required:"true"` + + // The maximum number of results to return at one time. The default is 25. + MaxResults *int64 `location:"querystring" locationName:"maxResults" min:"1" type:"integer"` + + // The token for the next set of results. + NextToken *string `location:"querystring" locationName:"nextToken" type:"string"` + + // The beginning of the time period. Note that audit information is retained + // for a limited time (180 days). Requesting a start time prior to what is retained + // results in an "InvalidRequestException". + // + // StartTime is a required field + StartTime *time.Time `location:"querystring" locationName:"startTime" type:"timestamp" required:"true"` + + // A filter to limit the output to audits with the specified completion status: + // can be one of "IN_PROGRESS", "COMPLETED", "FAILED" or "CANCELED". + TaskStatus *string `location:"querystring" locationName:"taskStatus" type:"string" enum:"AuditTaskStatus"` + + // A filter to limit the output to the specified type of audit: can be one of + // "ON_DEMAND_AUDIT_TASK" or "SCHEDULED__AUDIT_TASK". + TaskType *string `location:"querystring" locationName:"taskType" type:"string" enum:"AuditTaskType"` +} + +// String returns the string representation +func (s ListAuditTasksInput) String() string { + return awsutil.Prettify(s) +} + +// GoString returns the string representation +func (s ListAuditTasksInput) GoString() string { + return s.String() +} + +// Validate inspects the fields of the type to determine if they are valid. +func (s *ListAuditTasksInput) Validate() error { + invalidParams := request.ErrInvalidParams{Context: "ListAuditTasksInput"} + if s.EndTime == nil { + invalidParams.Add(request.NewErrParamRequired("EndTime")) + } + if s.MaxResults != nil && *s.MaxResults < 1 { + invalidParams.Add(request.NewErrParamMinValue("MaxResults", 1)) + } + if s.StartTime == nil { + invalidParams.Add(request.NewErrParamRequired("StartTime")) + } + + if invalidParams.Len() > 0 { + return invalidParams + } + return nil +} + +// SetEndTime sets the EndTime field's value. +func (s *ListAuditTasksInput) SetEndTime(v time.Time) *ListAuditTasksInput { + s.EndTime = &v + return s +} + +// SetMaxResults sets the MaxResults field's value. +func (s *ListAuditTasksInput) SetMaxResults(v int64) *ListAuditTasksInput { + s.MaxResults = &v + return s +} + +// SetNextToken sets the NextToken field's value. +func (s *ListAuditTasksInput) SetNextToken(v string) *ListAuditTasksInput { + s.NextToken = &v + return s +} + +// SetStartTime sets the StartTime field's value. +func (s *ListAuditTasksInput) SetStartTime(v time.Time) *ListAuditTasksInput { + s.StartTime = &v + return s +} + +// SetTaskStatus sets the TaskStatus field's value. +func (s *ListAuditTasksInput) SetTaskStatus(v string) *ListAuditTasksInput { + s.TaskStatus = &v + return s +} + +// SetTaskType sets the TaskType field's value. +func (s *ListAuditTasksInput) SetTaskType(v string) *ListAuditTasksInput { + s.TaskType = &v + return s +} + +type ListAuditTasksOutput struct { + _ struct{} `type:"structure"` + + // A token that can be used to retrieve the next set of results, or null if + // there are no additional results. + NextToken *string `locationName:"nextToken" type:"string"` + + // The audits that were performed during the specified time period. + Tasks []*AuditTaskMetadata `locationName:"tasks" type:"list"` +} + +// String returns the string representation +func (s ListAuditTasksOutput) String() string { + return awsutil.Prettify(s) +} + +// GoString returns the string representation +func (s ListAuditTasksOutput) GoString() string { + return s.String() +} + +// SetNextToken sets the NextToken field's value. +func (s *ListAuditTasksOutput) SetNextToken(v string) *ListAuditTasksOutput { + s.NextToken = &v + return s +} + +// SetTasks sets the Tasks field's value. +func (s *ListAuditTasksOutput) SetTasks(v []*AuditTaskMetadata) *ListAuditTasksOutput { + s.Tasks = v + return s +} + type ListAuthorizersInput struct { _ struct{} `type:"structure"` @@ -21284,8 +25527,7 @@ type ListPrincipalThingsInput struct { // The maximum number of results to return in this operation. MaxResults *int64 `location:"querystring" locationName:"maxResults" min:"1" type:"integer"` - // The token used to get the next set of results, or null if there are no additional - // results. + // The token to retrieve the next set of results. NextToken *string `location:"querystring" locationName:"nextToken" type:"string"` // The principal. @@ -21458,6 +25700,264 @@ func (s *ListRoleAliasesOutput) SetRoleAliases(v []*string) *ListRoleAliasesOutp return s } +type ListScheduledAuditsInput struct { + _ struct{} `type:"structure"` + + // The maximum number of results to return at one time. The default is 25. + MaxResults *int64 `location:"querystring" locationName:"maxResults" min:"1" type:"integer"` + + // The token for the next set of results. + NextToken *string `location:"querystring" locationName:"nextToken" type:"string"` +} + +// String returns the string representation +func (s ListScheduledAuditsInput) String() string { + return awsutil.Prettify(s) +} + +// GoString returns the string representation +func (s ListScheduledAuditsInput) GoString() string { + return s.String() +} + +// Validate inspects the fields of the type to determine if they are valid. +func (s *ListScheduledAuditsInput) Validate() error { + invalidParams := request.ErrInvalidParams{Context: "ListScheduledAuditsInput"} + if s.MaxResults != nil && *s.MaxResults < 1 { + invalidParams.Add(request.NewErrParamMinValue("MaxResults", 1)) + } + + if invalidParams.Len() > 0 { + return invalidParams + } + return nil +} + +// SetMaxResults sets the MaxResults field's value. +func (s *ListScheduledAuditsInput) SetMaxResults(v int64) *ListScheduledAuditsInput { + s.MaxResults = &v + return s +} + +// SetNextToken sets the NextToken field's value. +func (s *ListScheduledAuditsInput) SetNextToken(v string) *ListScheduledAuditsInput { + s.NextToken = &v + return s +} + +type ListScheduledAuditsOutput struct { + _ struct{} `type:"structure"` + + // A token that can be used to retrieve the next set of results, or null if + // there are no additional results. + NextToken *string `locationName:"nextToken" type:"string"` + + // The list of scheduled audits. + ScheduledAudits []*ScheduledAuditMetadata `locationName:"scheduledAudits" type:"list"` +} + +// String returns the string representation +func (s ListScheduledAuditsOutput) String() string { + return awsutil.Prettify(s) +} + +// GoString returns the string representation +func (s ListScheduledAuditsOutput) GoString() string { + return s.String() +} + +// SetNextToken sets the NextToken field's value. +func (s *ListScheduledAuditsOutput) SetNextToken(v string) *ListScheduledAuditsOutput { + s.NextToken = &v + return s +} + +// SetScheduledAudits sets the ScheduledAudits field's value. +func (s *ListScheduledAuditsOutput) SetScheduledAudits(v []*ScheduledAuditMetadata) *ListScheduledAuditsOutput { + s.ScheduledAudits = v + return s +} + +type ListSecurityProfilesForTargetInput struct { + _ struct{} `type:"structure"` + + // The maximum number of results to return at one time. + MaxResults *int64 `location:"querystring" locationName:"maxResults" min:"1" type:"integer"` + + // The token for the next set of results. + NextToken *string `location:"querystring" locationName:"nextToken" type:"string"` + + // If true, return child groups as well. + Recursive *bool `location:"querystring" locationName:"recursive" type:"boolean"` + + // The ARN of the target (thing group) whose attached security profiles you + // want to get. + // + // SecurityProfileTargetArn is a required field + SecurityProfileTargetArn *string `location:"querystring" locationName:"securityProfileTargetArn" type:"string" required:"true"` +} + +// String returns the string representation +func (s ListSecurityProfilesForTargetInput) String() string { + return awsutil.Prettify(s) +} + +// GoString returns the string representation +func (s ListSecurityProfilesForTargetInput) GoString() string { + return s.String() +} + +// Validate inspects the fields of the type to determine if they are valid. +func (s *ListSecurityProfilesForTargetInput) Validate() error { + invalidParams := request.ErrInvalidParams{Context: "ListSecurityProfilesForTargetInput"} + if s.MaxResults != nil && *s.MaxResults < 1 { + invalidParams.Add(request.NewErrParamMinValue("MaxResults", 1)) + } + if s.SecurityProfileTargetArn == nil { + invalidParams.Add(request.NewErrParamRequired("SecurityProfileTargetArn")) + } + + if invalidParams.Len() > 0 { + return invalidParams + } + return nil +} + +// SetMaxResults sets the MaxResults field's value. +func (s *ListSecurityProfilesForTargetInput) SetMaxResults(v int64) *ListSecurityProfilesForTargetInput { + s.MaxResults = &v + return s +} + +// SetNextToken sets the NextToken field's value. +func (s *ListSecurityProfilesForTargetInput) SetNextToken(v string) *ListSecurityProfilesForTargetInput { + s.NextToken = &v + return s +} + +// SetRecursive sets the Recursive field's value. +func (s *ListSecurityProfilesForTargetInput) SetRecursive(v bool) *ListSecurityProfilesForTargetInput { + s.Recursive = &v + return s +} + +// SetSecurityProfileTargetArn sets the SecurityProfileTargetArn field's value. +func (s *ListSecurityProfilesForTargetInput) SetSecurityProfileTargetArn(v string) *ListSecurityProfilesForTargetInput { + s.SecurityProfileTargetArn = &v + return s +} + +type ListSecurityProfilesForTargetOutput struct { + _ struct{} `type:"structure"` + + // A token that can be used to retrieve the next set of results, or null if + // there are no additional results. + NextToken *string `locationName:"nextToken" type:"string"` + + // A list of security profiles and their associated targets. + SecurityProfileTargetMappings []*SecurityProfileTargetMapping `locationName:"securityProfileTargetMappings" type:"list"` +} + +// String returns the string representation +func (s ListSecurityProfilesForTargetOutput) String() string { + return awsutil.Prettify(s) +} + +// GoString returns the string representation +func (s ListSecurityProfilesForTargetOutput) GoString() string { + return s.String() +} + +// SetNextToken sets the NextToken field's value. +func (s *ListSecurityProfilesForTargetOutput) SetNextToken(v string) *ListSecurityProfilesForTargetOutput { + s.NextToken = &v + return s +} + +// SetSecurityProfileTargetMappings sets the SecurityProfileTargetMappings field's value. +func (s *ListSecurityProfilesForTargetOutput) SetSecurityProfileTargetMappings(v []*SecurityProfileTargetMapping) *ListSecurityProfilesForTargetOutput { + s.SecurityProfileTargetMappings = v + return s +} + +type ListSecurityProfilesInput struct { + _ struct{} `type:"structure"` + + // The maximum number of results to return at one time. + MaxResults *int64 `location:"querystring" locationName:"maxResults" min:"1" type:"integer"` + + // The token for the next set of results. + NextToken *string `location:"querystring" locationName:"nextToken" type:"string"` +} + +// String returns the string representation +func (s ListSecurityProfilesInput) String() string { + return awsutil.Prettify(s) +} + +// GoString returns the string representation +func (s ListSecurityProfilesInput) GoString() string { + return s.String() +} + +// Validate inspects the fields of the type to determine if they are valid. +func (s *ListSecurityProfilesInput) Validate() error { + invalidParams := request.ErrInvalidParams{Context: "ListSecurityProfilesInput"} + if s.MaxResults != nil && *s.MaxResults < 1 { + invalidParams.Add(request.NewErrParamMinValue("MaxResults", 1)) + } + + if invalidParams.Len() > 0 { + return invalidParams + } + return nil +} + +// SetMaxResults sets the MaxResults field's value. +func (s *ListSecurityProfilesInput) SetMaxResults(v int64) *ListSecurityProfilesInput { + s.MaxResults = &v + return s +} + +// SetNextToken sets the NextToken field's value. +func (s *ListSecurityProfilesInput) SetNextToken(v string) *ListSecurityProfilesInput { + s.NextToken = &v + return s +} + +type ListSecurityProfilesOutput struct { + _ struct{} `type:"structure"` + + // A token that can be used to retrieve the next set of results, or null if + // there are no additional results. + NextToken *string `locationName:"nextToken" type:"string"` + + // A list of security profile identifiers (names and ARNs). + SecurityProfileIdentifiers []*SecurityProfileIdentifier `locationName:"securityProfileIdentifiers" type:"list"` +} + +// String returns the string representation +func (s ListSecurityProfilesOutput) String() string { + return awsutil.Prettify(s) +} + +// GoString returns the string representation +func (s ListSecurityProfilesOutput) GoString() string { + return s.String() +} + +// SetNextToken sets the NextToken field's value. +func (s *ListSecurityProfilesOutput) SetNextToken(v string) *ListSecurityProfilesOutput { + s.NextToken = &v + return s +} + +// SetSecurityProfileIdentifiers sets the SecurityProfileIdentifiers field's value. +func (s *ListSecurityProfilesOutput) SetSecurityProfileIdentifiers(v []*SecurityProfileIdentifier) *ListSecurityProfilesOutput { + s.SecurityProfileIdentifiers = v + return s +} + type ListStreamsInput struct { _ struct{} `type:"structure"` @@ -21638,14 +26138,108 @@ func (s *ListTargetsForPolicyOutput) SetTargets(v []*string) *ListTargetsForPoli return s } +type ListTargetsForSecurityProfileInput struct { + _ struct{} `type:"structure"` + + // The maximum number of results to return at one time. + MaxResults *int64 `location:"querystring" locationName:"maxResults" min:"1" type:"integer"` + + // The token for the next set of results. + NextToken *string `location:"querystring" locationName:"nextToken" type:"string"` + + // The security profile. + // + // SecurityProfileName is a required field + SecurityProfileName *string `location:"uri" locationName:"securityProfileName" min:"1" type:"string" required:"true"` +} + +// String returns the string representation +func (s ListTargetsForSecurityProfileInput) String() string { + return awsutil.Prettify(s) +} + +// GoString returns the string representation +func (s ListTargetsForSecurityProfileInput) GoString() string { + return s.String() +} + +// Validate inspects the fields of the type to determine if they are valid. +func (s *ListTargetsForSecurityProfileInput) Validate() error { + invalidParams := request.ErrInvalidParams{Context: "ListTargetsForSecurityProfileInput"} + if s.MaxResults != nil && *s.MaxResults < 1 { + invalidParams.Add(request.NewErrParamMinValue("MaxResults", 1)) + } + if s.SecurityProfileName == nil { + invalidParams.Add(request.NewErrParamRequired("SecurityProfileName")) + } + if s.SecurityProfileName != nil && len(*s.SecurityProfileName) < 1 { + invalidParams.Add(request.NewErrParamMinLen("SecurityProfileName", 1)) + } + + if invalidParams.Len() > 0 { + return invalidParams + } + return nil +} + +// SetMaxResults sets the MaxResults field's value. +func (s *ListTargetsForSecurityProfileInput) SetMaxResults(v int64) *ListTargetsForSecurityProfileInput { + s.MaxResults = &v + return s +} + +// SetNextToken sets the NextToken field's value. +func (s *ListTargetsForSecurityProfileInput) SetNextToken(v string) *ListTargetsForSecurityProfileInput { + s.NextToken = &v + return s +} + +// SetSecurityProfileName sets the SecurityProfileName field's value. +func (s *ListTargetsForSecurityProfileInput) SetSecurityProfileName(v string) *ListTargetsForSecurityProfileInput { + s.SecurityProfileName = &v + return s +} + +type ListTargetsForSecurityProfileOutput struct { + _ struct{} `type:"structure"` + + // A token that can be used to retrieve the next set of results, or null if + // there are no additional results. + NextToken *string `locationName:"nextToken" type:"string"` + + // The thing groups to which the security profile is attached. + SecurityProfileTargets []*SecurityProfileTarget `locationName:"securityProfileTargets" type:"list"` +} + +// String returns the string representation +func (s ListTargetsForSecurityProfileOutput) String() string { + return awsutil.Prettify(s) +} + +// GoString returns the string representation +func (s ListTargetsForSecurityProfileOutput) GoString() string { + return s.String() +} + +// SetNextToken sets the NextToken field's value. +func (s *ListTargetsForSecurityProfileOutput) SetNextToken(v string) *ListTargetsForSecurityProfileOutput { + s.NextToken = &v + return s +} + +// SetSecurityProfileTargets sets the SecurityProfileTargets field's value. +func (s *ListTargetsForSecurityProfileOutput) SetSecurityProfileTargets(v []*SecurityProfileTarget) *ListTargetsForSecurityProfileOutput { + s.SecurityProfileTargets = v + return s +} + type ListThingGroupsForThingInput struct { _ struct{} `type:"structure"` // The maximum number of results to return at one time. MaxResults *int64 `location:"querystring" locationName:"maxResults" min:"1" type:"integer"` - // The token used to get the next set of results, or null if there are no additional - // results. + // The token to retrieve the next set of results. NextToken *string `location:"querystring" locationName:"nextToken" type:"string"` // The thing name. @@ -21743,8 +26337,7 @@ type ListThingGroupsInput struct { // A filter that limits the results to those with the specified name prefix. NamePrefixFilter *string `location:"querystring" locationName:"namePrefixFilter" min:"1" type:"string"` - // The token used to get the next set of results, or null if there are no additional - // results. + // The token to retrieve the next set of results. NextToken *string `location:"querystring" locationName:"nextToken" type:"string"` // A filter that limits the results to those with the specified parent group. @@ -21988,7 +26581,8 @@ func (s *ListThingRegistrationTaskReportsInput) SetTaskId(v string) *ListThingRe type ListThingRegistrationTaskReportsOutput struct { _ struct{} `type:"structure"` - // The token to retrieve the next set of results. + // The token used to get the next set of results, or null if there are no additional + // results. NextToken *string `locationName:"nextToken" type:"string"` // The type of task report. @@ -22032,8 +26626,7 @@ type ListThingRegistrationTasksInput struct { // The maximum number of results to return at one time. MaxResults *int64 `location:"querystring" locationName:"maxResults" min:"1" type:"integer"` - // The token used to get the next set of results, or null if there are no additional - // results. + // The token to retrieve the next set of results. NextToken *string `location:"querystring" locationName:"nextToken" type:"string"` // The status of the bulk thing provisioning task. @@ -22121,8 +26714,7 @@ type ListThingTypesInput struct { // The maximum number of results to return in this operation. MaxResults *int64 `location:"querystring" locationName:"maxResults" min:"1" type:"integer"` - // The token for the next set of results, or null if there are no additional - // results. + // The token to retrieve the next set of results. NextToken *string `location:"querystring" locationName:"nextToken" type:"string"` // The name of the thing type. @@ -22213,8 +26805,7 @@ type ListThingsInThingGroupInput struct { // The maximum number of results to return at one time. MaxResults *int64 `location:"querystring" locationName:"maxResults" min:"1" type:"integer"` - // The token used to get the next set of results, or null if there are no additional - // results. + // The token to retrieve the next set of results. NextToken *string `location:"querystring" locationName:"nextToken" type:"string"` // When true, list things in this thing group and in all child groups as well. @@ -22325,8 +26916,7 @@ type ListThingsInput struct { // The maximum number of results to return in this operation. MaxResults *int64 `location:"querystring" locationName:"maxResults" min:"1" type:"integer"` - // The token used to get the next set of results, or null if there are no additional - // results. + // The token to retrieve the next set of results. NextToken *string `location:"querystring" locationName:"nextToken" type:"string"` // The name of the thing type used to search for things. @@ -22608,6 +27198,139 @@ func (s *ListV2LoggingLevelsOutput) SetNextToken(v string) *ListV2LoggingLevelsO return s } +type ListViolationEventsInput struct { + _ struct{} `type:"structure"` + + // The end time for the alerts to be listed. + // + // EndTime is a required field + EndTime *time.Time `location:"querystring" locationName:"endTime" type:"timestamp" required:"true"` + + // The maximum number of results to return at one time. + MaxResults *int64 `location:"querystring" locationName:"maxResults" min:"1" type:"integer"` + + // The token for the next set of results. + NextToken *string `location:"querystring" locationName:"nextToken" type:"string"` + + // A filter to limit results to those alerts generated by the specified security + // profile. + SecurityProfileName *string `location:"querystring" locationName:"securityProfileName" min:"1" type:"string"` + + // The start time for the alerts to be listed. + // + // StartTime is a required field + StartTime *time.Time `location:"querystring" locationName:"startTime" type:"timestamp" required:"true"` + + // A filter to limit results to those alerts caused by the specified thing. + ThingName *string `location:"querystring" locationName:"thingName" min:"1" type:"string"` +} + +// String returns the string representation +func (s ListViolationEventsInput) String() string { + return awsutil.Prettify(s) +} + +// GoString returns the string representation +func (s ListViolationEventsInput) GoString() string { + return s.String() +} + +// Validate inspects the fields of the type to determine if they are valid. +func (s *ListViolationEventsInput) Validate() error { + invalidParams := request.ErrInvalidParams{Context: "ListViolationEventsInput"} + if s.EndTime == nil { + invalidParams.Add(request.NewErrParamRequired("EndTime")) + } + if s.MaxResults != nil && *s.MaxResults < 1 { + invalidParams.Add(request.NewErrParamMinValue("MaxResults", 1)) + } + if s.SecurityProfileName != nil && len(*s.SecurityProfileName) < 1 { + invalidParams.Add(request.NewErrParamMinLen("SecurityProfileName", 1)) + } + if s.StartTime == nil { + invalidParams.Add(request.NewErrParamRequired("StartTime")) + } + if s.ThingName != nil && len(*s.ThingName) < 1 { + invalidParams.Add(request.NewErrParamMinLen("ThingName", 1)) + } + + if invalidParams.Len() > 0 { + return invalidParams + } + return nil +} + +// SetEndTime sets the EndTime field's value. +func (s *ListViolationEventsInput) SetEndTime(v time.Time) *ListViolationEventsInput { + s.EndTime = &v + return s +} + +// SetMaxResults sets the MaxResults field's value. +func (s *ListViolationEventsInput) SetMaxResults(v int64) *ListViolationEventsInput { + s.MaxResults = &v + return s +} + +// SetNextToken sets the NextToken field's value. +func (s *ListViolationEventsInput) SetNextToken(v string) *ListViolationEventsInput { + s.NextToken = &v + return s +} + +// SetSecurityProfileName sets the SecurityProfileName field's value. +func (s *ListViolationEventsInput) SetSecurityProfileName(v string) *ListViolationEventsInput { + s.SecurityProfileName = &v + return s +} + +// SetStartTime sets the StartTime field's value. +func (s *ListViolationEventsInput) SetStartTime(v time.Time) *ListViolationEventsInput { + s.StartTime = &v + return s +} + +// SetThingName sets the ThingName field's value. +func (s *ListViolationEventsInput) SetThingName(v string) *ListViolationEventsInput { + s.ThingName = &v + return s +} + +type ListViolationEventsOutput struct { + _ struct{} `type:"structure"` + + // A token that can be used to retrieve the next set of results, or null if + // there are no additional results. + NextToken *string `locationName:"nextToken" type:"string"` + + // The security profile violation alerts issued for this account during the + // given time frame, potentially filtered by security profile, behavior violated, + // or thing (device) violating. + ViolationEvents []*ViolationEvent `locationName:"violationEvents" type:"list"` +} + +// String returns the string representation +func (s ListViolationEventsOutput) String() string { + return awsutil.Prettify(s) +} + +// GoString returns the string representation +func (s ListViolationEventsOutput) GoString() string { + return s.String() +} + +// SetNextToken sets the NextToken field's value. +func (s *ListViolationEventsOutput) SetNextToken(v string) *ListViolationEventsOutput { + s.NextToken = &v + return s +} + +// SetViolationEvents sets the ViolationEvents field's value. +func (s *ListViolationEventsOutput) SetViolationEvents(v []*ViolationEvent) *ListViolationEventsOutput { + s.ViolationEvents = v + return s +} + // A log target. type LogTarget struct { _ struct{} `type:"structure"` @@ -22737,6 +27460,93 @@ func (s *LoggingOptionsPayload) SetRoleArn(v string) *LoggingOptionsPayload { return s } +// The value to be compared with the metric. +type MetricValue struct { + _ struct{} `type:"structure"` + + // If the comparisonOperator calls for a set of CIDRs, use this to specify that + // set to be compared with the metric. + Cidrs []*string `locationName:"cidrs" type:"list"` + + // If the comparisonOperator calls for a numeric value, use this to specify + // that numeric value to be compared with the metric. + Count *int64 `locationName:"count" type:"long"` + + // If the comparisonOperator calls for a set of ports, use this to specify that + // set to be compared with the metric. + Ports []*int64 `locationName:"ports" type:"list"` +} + +// String returns the string representation +func (s MetricValue) String() string { + return awsutil.Prettify(s) +} + +// GoString returns the string representation +func (s MetricValue) GoString() string { + return s.String() +} + +// SetCidrs sets the Cidrs field's value. +func (s *MetricValue) SetCidrs(v []*string) *MetricValue { + s.Cidrs = v + return s +} + +// SetCount sets the Count field's value. +func (s *MetricValue) SetCount(v int64) *MetricValue { + s.Count = &v + return s +} + +// SetPorts sets the Ports field's value. +func (s *MetricValue) SetPorts(v []*int64) *MetricValue { + s.Ports = v + return s +} + +// Information about the resource that was non-compliant with the audit check. +type NonCompliantResource struct { + _ struct{} `type:"structure"` + + // Additional information about the non-compliant resource. + AdditionalInfo map[string]*string `locationName:"additionalInfo" type:"map"` + + // Information identifying the non-compliant resource. + ResourceIdentifier *ResourceIdentifier `locationName:"resourceIdentifier" type:"structure"` + + // The type of the non-compliant resource. + ResourceType *string `locationName:"resourceType" type:"string" enum:"ResourceType"` +} + +// String returns the string representation +func (s NonCompliantResource) String() string { + return awsutil.Prettify(s) +} + +// GoString returns the string representation +func (s NonCompliantResource) GoString() string { + return s.String() +} + +// SetAdditionalInfo sets the AdditionalInfo field's value. +func (s *NonCompliantResource) SetAdditionalInfo(v map[string]*string) *NonCompliantResource { + s.AdditionalInfo = v + return s +} + +// SetResourceIdentifier sets the ResourceIdentifier field's value. +func (s *NonCompliantResource) SetResourceIdentifier(v *ResourceIdentifier) *NonCompliantResource { + s.ResourceIdentifier = v + return s +} + +// SetResourceType sets the ResourceType field's value. +func (s *NonCompliantResource) SetResourceType(v string) *NonCompliantResource { + s.ResourceType = &v + return s +} + // Describes a file to be associated with an OTA update. type OTAUpdateFile struct { _ struct{} `type:"structure"` @@ -22747,12 +27557,12 @@ type OTAUpdateFile struct { // The code signing method of the file. CodeSigning *CodeSigning `locationName:"codeSigning" type:"structure"` + // The location of the updated firmware. + FileLocation *FileLocation `locationName:"fileLocation" type:"structure"` + // The name of the file. FileName *string `locationName:"fileName" type:"string"` - // The source of the file. - FileSource *Stream `locationName:"fileSource" type:"structure"` - // The file version. FileVersion *string `locationName:"fileVersion" type:"string"` } @@ -22775,9 +27585,9 @@ func (s *OTAUpdateFile) Validate() error { invalidParams.AddNested("CodeSigning", err.(request.ErrInvalidParams)) } } - if s.FileSource != nil { - if err := s.FileSource.Validate(); err != nil { - invalidParams.AddNested("FileSource", err.(request.ErrInvalidParams)) + if s.FileLocation != nil { + if err := s.FileLocation.Validate(); err != nil { + invalidParams.AddNested("FileLocation", err.(request.ErrInvalidParams)) } } @@ -22799,15 +27609,15 @@ func (s *OTAUpdateFile) SetCodeSigning(v *CodeSigning) *OTAUpdateFile { return s } -// SetFileName sets the FileName field's value. -func (s *OTAUpdateFile) SetFileName(v string) *OTAUpdateFile { - s.FileName = &v +// SetFileLocation sets the FileLocation field's value. +func (s *OTAUpdateFile) SetFileLocation(v *FileLocation) *OTAUpdateFile { + s.FileLocation = v return s } -// SetFileSource sets the FileSource field's value. -func (s *OTAUpdateFile) SetFileSource(v *Stream) *OTAUpdateFile { - s.FileSource = v +// SetFileName sets the FileName field's value. +func (s *OTAUpdateFile) SetFileName(v string) *OTAUpdateFile { + s.FileName = &v return s } @@ -22830,6 +27640,9 @@ type OTAUpdateInfo struct { // The AWS IoT job ID associated with the OTA update. AwsIotJobId *string `locationName:"awsIotJobId" type:"string"` + // Configuration for the rollout of OTA updates. + AwsJobExecutionsRolloutConfig *AwsJobExecutionsRolloutConfig `locationName:"awsJobExecutionsRolloutConfig" type:"structure"` + // The date when the OTA update was created. CreationDate *time.Time `locationName:"creationDate" type:"timestamp"` @@ -22894,6 +27707,12 @@ func (s *OTAUpdateInfo) SetAwsIotJobId(v string) *OTAUpdateInfo { return s } +// SetAwsJobExecutionsRolloutConfig sets the AwsJobExecutionsRolloutConfig field's value. +func (s *OTAUpdateInfo) SetAwsJobExecutionsRolloutConfig(v *AwsJobExecutionsRolloutConfig) *OTAUpdateInfo { + s.AwsJobExecutionsRolloutConfig = v + return s +} + // SetCreationDate sets the CreationDate field's value. func (s *OTAUpdateInfo) SetCreationDate(v time.Time) *OTAUpdateInfo { s.CreationDate = &v @@ -23016,7 +27835,7 @@ type OutgoingCertificate struct { TransferMessage *string `locationName:"transferMessage" type:"string"` // The AWS account to which the transfer was made. - TransferredTo *string `locationName:"transferredTo" type:"string"` + TransferredTo *string `locationName:"transferredTo" min:"12" type:"string"` } // String returns the string representation @@ -23140,6 +27959,52 @@ func (s *PolicyVersion) SetVersionId(v string) *PolicyVersion { return s } +// Information about the version of the policy associated with the resource. +type PolicyVersionIdentifier struct { + _ struct{} `type:"structure"` + + // The name of the policy. + PolicyName *string `locationName:"policyName" min:"1" type:"string"` + + // The ID of the version of the policy associated with the resource. + PolicyVersionId *string `locationName:"policyVersionId" type:"string"` +} + +// String returns the string representation +func (s PolicyVersionIdentifier) String() string { + return awsutil.Prettify(s) +} + +// GoString returns the string representation +func (s PolicyVersionIdentifier) GoString() string { + return s.String() +} + +// Validate inspects the fields of the type to determine if they are valid. +func (s *PolicyVersionIdentifier) Validate() error { + invalidParams := request.ErrInvalidParams{Context: "PolicyVersionIdentifier"} + if s.PolicyName != nil && len(*s.PolicyName) < 1 { + invalidParams.Add(request.NewErrParamMinLen("PolicyName", 1)) + } + + if invalidParams.Len() > 0 { + return invalidParams + } + return nil +} + +// SetPolicyName sets the PolicyName field's value. +func (s *PolicyVersionIdentifier) SetPolicyName(v string) *PolicyVersionIdentifier { + s.PolicyName = &v + return s +} + +// SetPolicyVersionId sets the PolicyVersionId field's value. +func (s *PolicyVersionIdentifier) SetPolicyVersionId(v string) *PolicyVersionIdentifier { + s.PolicyVersionId = &v + return s +} + // Configuration for pre-signed S3 URLs. type PresignedUrlConfig struct { _ struct{} `type:"structure"` @@ -23370,6 +28235,8 @@ type RegisterCertificateInput struct { CertificatePem *string `locationName:"certificatePem" min:"1" type:"string" required:"true"` // A boolean value that specifies if the CA certificate is set to active. + // + // Deprecated: SetAsActive has been deprecated SetAsActive *bool `location:"querystring" locationName:"setAsActive" deprecated:"true" type:"boolean"` // The status of the register certificate request. @@ -23514,7 +28381,7 @@ func (s *RegisterThingInput) SetTemplateBody(v string) *RegisterThingInput { type RegisterThingOutput struct { _ struct{} `type:"structure"` - // The PEM of a certificate. + // . CertificatePem *string `locationName:"certificatePem" min:"1" type:"string"` // ARNs for the generated resources. @@ -23655,6 +28522,48 @@ func (s RejectCertificateTransferOutput) GoString() string { return s.String() } +// Information about a related resource. +type RelatedResource struct { + _ struct{} `type:"structure"` + + // Additional information about the resource. + AdditionalInfo map[string]*string `locationName:"additionalInfo" type:"map"` + + // Information identifying the resource. + ResourceIdentifier *ResourceIdentifier `locationName:"resourceIdentifier" type:"structure"` + + // The type of resource. + ResourceType *string `locationName:"resourceType" type:"string" enum:"ResourceType"` +} + +// String returns the string representation +func (s RelatedResource) String() string { + return awsutil.Prettify(s) +} + +// GoString returns the string representation +func (s RelatedResource) GoString() string { + return s.String() +} + +// SetAdditionalInfo sets the AdditionalInfo field's value. +func (s *RelatedResource) SetAdditionalInfo(v map[string]*string) *RelatedResource { + s.AdditionalInfo = v + return s +} + +// SetResourceIdentifier sets the ResourceIdentifier field's value. +func (s *RelatedResource) SetResourceIdentifier(v *ResourceIdentifier) *RelatedResource { + s.ResourceIdentifier = v + return s +} + +// SetResourceType sets the ResourceType field's value. +func (s *RelatedResource) SetResourceType(v string) *RelatedResource { + s.ResourceType = &v + return s +} + type RemoveThingFromThingGroupInput struct { _ struct{} `type:"structure"` @@ -23863,6 +28772,99 @@ func (s *RepublishAction) SetTopic(v string) *RepublishAction { return s } +// Information identifying the non-compliant resource. +type ResourceIdentifier struct { + _ struct{} `type:"structure"` + + // The account with which the resource is associated. + Account *string `locationName:"account" min:"12" type:"string"` + + // The ID of the CA certificate used to authorize the certificate. + CaCertificateId *string `locationName:"caCertificateId" min:"64" type:"string"` + + // The client ID. + ClientId *string `locationName:"clientId" type:"string"` + + // The ID of the Cognito Identity Pool. + CognitoIdentityPoolId *string `locationName:"cognitoIdentityPoolId" type:"string"` + + // The ID of the certificate attached to the resource. + DeviceCertificateId *string `locationName:"deviceCertificateId" min:"64" type:"string"` + + // The version of the policy associated with the resource. + PolicyVersionIdentifier *PolicyVersionIdentifier `locationName:"policyVersionIdentifier" type:"structure"` +} + +// String returns the string representation +func (s ResourceIdentifier) String() string { + return awsutil.Prettify(s) +} + +// GoString returns the string representation +func (s ResourceIdentifier) GoString() string { + return s.String() +} + +// Validate inspects the fields of the type to determine if they are valid. +func (s *ResourceIdentifier) Validate() error { + invalidParams := request.ErrInvalidParams{Context: "ResourceIdentifier"} + if s.Account != nil && len(*s.Account) < 12 { + invalidParams.Add(request.NewErrParamMinLen("Account", 12)) + } + if s.CaCertificateId != nil && len(*s.CaCertificateId) < 64 { + invalidParams.Add(request.NewErrParamMinLen("CaCertificateId", 64)) + } + if s.DeviceCertificateId != nil && len(*s.DeviceCertificateId) < 64 { + invalidParams.Add(request.NewErrParamMinLen("DeviceCertificateId", 64)) + } + if s.PolicyVersionIdentifier != nil { + if err := s.PolicyVersionIdentifier.Validate(); err != nil { + invalidParams.AddNested("PolicyVersionIdentifier", err.(request.ErrInvalidParams)) + } + } + + if invalidParams.Len() > 0 { + return invalidParams + } + return nil +} + +// SetAccount sets the Account field's value. +func (s *ResourceIdentifier) SetAccount(v string) *ResourceIdentifier { + s.Account = &v + return s +} + +// SetCaCertificateId sets the CaCertificateId field's value. +func (s *ResourceIdentifier) SetCaCertificateId(v string) *ResourceIdentifier { + s.CaCertificateId = &v + return s +} + +// SetClientId sets the ClientId field's value. +func (s *ResourceIdentifier) SetClientId(v string) *ResourceIdentifier { + s.ClientId = &v + return s +} + +// SetCognitoIdentityPoolId sets the CognitoIdentityPoolId field's value. +func (s *ResourceIdentifier) SetCognitoIdentityPoolId(v string) *ResourceIdentifier { + s.CognitoIdentityPoolId = &v + return s +} + +// SetDeviceCertificateId sets the DeviceCertificateId field's value. +func (s *ResourceIdentifier) SetDeviceCertificateId(v string) *ResourceIdentifier { + s.DeviceCertificateId = &v + return s +} + +// SetPolicyVersionIdentifier sets the PolicyVersionIdentifier field's value. +func (s *ResourceIdentifier) SetPolicyVersionIdentifier(v *PolicyVersionIdentifier) *ResourceIdentifier { + s.PolicyVersionIdentifier = v + return s +} + // Role alias description. type RoleAliasDescription struct { _ struct{} `type:"structure"` @@ -23877,7 +28879,7 @@ type RoleAliasDescription struct { LastModifiedDate *time.Time `locationName:"lastModifiedDate" type:"timestamp"` // The role alias owner. - Owner *string `locationName:"owner" type:"string"` + Owner *string `locationName:"owner" min:"12" type:"string"` // The role alias. RoleAlias *string `locationName:"roleAlias" min:"1" type:"string"` @@ -24018,21 +29020,63 @@ func (s *S3Action) SetRoleArn(v string) *S3Action { return s } -// The location in S3 the contains the files to stream. +// Describes the location of updated firmware in S3. +type S3Destination struct { + _ struct{} `type:"structure"` + + // The S3 bucket that contains the updated firmware. + Bucket *string `locationName:"bucket" min:"1" type:"string"` + + // The S3 prefix. + Prefix *string `locationName:"prefix" type:"string"` +} + +// String returns the string representation +func (s S3Destination) String() string { + return awsutil.Prettify(s) +} + +// GoString returns the string representation +func (s S3Destination) GoString() string { + return s.String() +} + +// Validate inspects the fields of the type to determine if they are valid. +func (s *S3Destination) Validate() error { + invalidParams := request.ErrInvalidParams{Context: "S3Destination"} + if s.Bucket != nil && len(*s.Bucket) < 1 { + invalidParams.Add(request.NewErrParamMinLen("Bucket", 1)) + } + + if invalidParams.Len() > 0 { + return invalidParams + } + return nil +} + +// SetBucket sets the Bucket field's value. +func (s *S3Destination) SetBucket(v string) *S3Destination { + s.Bucket = &v + return s +} + +// SetPrefix sets the Prefix field's value. +func (s *S3Destination) SetPrefix(v string) *S3Destination { + s.Prefix = &v + return s +} + +// The S3 location. type S3Location struct { _ struct{} `type:"structure"` - // The S3 bucket that contains the file to stream. - // - // Bucket is a required field - Bucket *string `locationName:"bucket" min:"1" type:"string" required:"true"` + // The S3 bucket. + Bucket *string `locationName:"bucket" min:"1" type:"string"` - // The name of the file within the S3 bucket to stream. - // - // Key is a required field - Key *string `locationName:"key" min:"1" type:"string" required:"true"` + // The S3 key. + Key *string `locationName:"key" min:"1" type:"string"` - // The file version. + // The S3 bucket version. Version *string `locationName:"version" type:"string"` } @@ -24049,15 +29093,9 @@ func (s S3Location) GoString() string { // Validate inspects the fields of the type to determine if they are valid. func (s *S3Location) Validate() error { invalidParams := request.ErrInvalidParams{Context: "S3Location"} - if s.Bucket == nil { - invalidParams.Add(request.NewErrParamRequired("Bucket")) - } if s.Bucket != nil && len(*s.Bucket) < 1 { invalidParams.Add(request.NewErrParamMinLen("Bucket", 1)) } - if s.Key == nil { - invalidParams.Add(request.NewErrParamRequired("Key")) - } if s.Key != nil && len(*s.Key) < 1 { invalidParams.Add(request.NewErrParamMinLen("Key", 1)) } @@ -24145,6 +29183,69 @@ func (s *SalesforceAction) SetUrl(v string) *SalesforceAction { return s } +// Information about the scheduled audit. +type ScheduledAuditMetadata struct { + _ struct{} `type:"structure"` + + // The day of the month on which the scheduled audit is run (if the frequency + // is "MONTHLY"). If days 29-31 are specified, and the month does not have that + // many days, the audit takes place on the "LAST" day of the month. + DayOfMonth *string `locationName:"dayOfMonth" type:"string"` + + // The day of the week on which the scheduled audit is run (if the frequency + // is "WEEKLY" or "BIWEEKLY"). + DayOfWeek *string `locationName:"dayOfWeek" type:"string" enum:"DayOfWeek"` + + // How often the scheduled audit takes place. + Frequency *string `locationName:"frequency" type:"string" enum:"AuditFrequency"` + + // The ARN of the scheduled audit. + ScheduledAuditArn *string `locationName:"scheduledAuditArn" type:"string"` + + // The name of the scheduled audit. + ScheduledAuditName *string `locationName:"scheduledAuditName" min:"1" type:"string"` +} + +// String returns the string representation +func (s ScheduledAuditMetadata) String() string { + return awsutil.Prettify(s) +} + +// GoString returns the string representation +func (s ScheduledAuditMetadata) GoString() string { + return s.String() +} + +// SetDayOfMonth sets the DayOfMonth field's value. +func (s *ScheduledAuditMetadata) SetDayOfMonth(v string) *ScheduledAuditMetadata { + s.DayOfMonth = &v + return s +} + +// SetDayOfWeek sets the DayOfWeek field's value. +func (s *ScheduledAuditMetadata) SetDayOfWeek(v string) *ScheduledAuditMetadata { + s.DayOfWeek = &v + return s +} + +// SetFrequency sets the Frequency field's value. +func (s *ScheduledAuditMetadata) SetFrequency(v string) *ScheduledAuditMetadata { + s.Frequency = &v + return s +} + +// SetScheduledAuditArn sets the ScheduledAuditArn field's value. +func (s *ScheduledAuditMetadata) SetScheduledAuditArn(v string) *ScheduledAuditMetadata { + s.ScheduledAuditArn = &v + return s +} + +// SetScheduledAuditName sets the ScheduledAuditName field's value. +func (s *ScheduledAuditMetadata) SetScheduledAuditName(v string) *ScheduledAuditMetadata { + s.ScheduledAuditName = &v + return s +} + type SearchIndexInput struct { _ struct{} `type:"structure"` @@ -24236,6 +29337,9 @@ type SearchIndexOutput struct { // results. NextToken *string `locationName:"nextToken" type:"string"` + // The thing groups that match the search query. + ThingGroups []*ThingGroupDocument `locationName:"thingGroups" type:"list"` + // The things that match the search query. Things []*ThingDocument `locationName:"things" type:"list"` } @@ -24256,12 +29360,114 @@ func (s *SearchIndexOutput) SetNextToken(v string) *SearchIndexOutput { return s } +// SetThingGroups sets the ThingGroups field's value. +func (s *SearchIndexOutput) SetThingGroups(v []*ThingGroupDocument) *SearchIndexOutput { + s.ThingGroups = v + return s +} + // SetThings sets the Things field's value. func (s *SearchIndexOutput) SetThings(v []*ThingDocument) *SearchIndexOutput { s.Things = v return s } +// Identifying information for a Device Defender security profile. +type SecurityProfileIdentifier struct { + _ struct{} `type:"structure"` + + // The ARN of the security profile. + // + // Arn is a required field + Arn *string `locationName:"arn" type:"string" required:"true"` + + // The name you have given to the security profile. + // + // Name is a required field + Name *string `locationName:"name" min:"1" type:"string" required:"true"` +} + +// String returns the string representation +func (s SecurityProfileIdentifier) String() string { + return awsutil.Prettify(s) +} + +// GoString returns the string representation +func (s SecurityProfileIdentifier) GoString() string { + return s.String() +} + +// SetArn sets the Arn field's value. +func (s *SecurityProfileIdentifier) SetArn(v string) *SecurityProfileIdentifier { + s.Arn = &v + return s +} + +// SetName sets the Name field's value. +func (s *SecurityProfileIdentifier) SetName(v string) *SecurityProfileIdentifier { + s.Name = &v + return s +} + +// A target to which an alert is sent when a security profile behavior is violated. +type SecurityProfileTarget struct { + _ struct{} `type:"structure"` + + // The ARN of the security profile. + // + // Arn is a required field + Arn *string `locationName:"arn" type:"string" required:"true"` +} + +// String returns the string representation +func (s SecurityProfileTarget) String() string { + return awsutil.Prettify(s) +} + +// GoString returns the string representation +func (s SecurityProfileTarget) GoString() string { + return s.String() +} + +// SetArn sets the Arn field's value. +func (s *SecurityProfileTarget) SetArn(v string) *SecurityProfileTarget { + s.Arn = &v + return s +} + +// Information about a security profile and the target associated with it. +type SecurityProfileTargetMapping struct { + _ struct{} `type:"structure"` + + // Information that identifies the security profile. + SecurityProfileIdentifier *SecurityProfileIdentifier `locationName:"securityProfileIdentifier" type:"structure"` + + // Information about the target (thing group) associated with the security profile. + Target *SecurityProfileTarget `locationName:"target" type:"structure"` +} + +// String returns the string representation +func (s SecurityProfileTargetMapping) String() string { + return awsutil.Prettify(s) +} + +// GoString returns the string representation +func (s SecurityProfileTargetMapping) GoString() string { + return s.String() +} + +// SetSecurityProfileIdentifier sets the SecurityProfileIdentifier field's value. +func (s *SecurityProfileTargetMapping) SetSecurityProfileIdentifier(v *SecurityProfileIdentifier) *SecurityProfileTargetMapping { + s.SecurityProfileIdentifier = v + return s +} + +// SetTarget sets the Target field's value. +func (s *SecurityProfileTargetMapping) SetTarget(v *SecurityProfileTarget) *SecurityProfileTargetMapping { + s.Target = v + return s +} + type SetDefaultAuthorizerInput struct { _ struct{} `type:"structure"` @@ -24540,10 +29746,10 @@ type SetV2LoggingOptionsInput struct { // The default logging level. DefaultLogLevel *string `locationName:"defaultLogLevel" type:"string" enum:"LogLevel"` - // Set to true to disable all logs, otherwise set to false. + // If true all logs are disabled. The default is false. DisableAllLogs *bool `locationName:"disableAllLogs" type:"boolean"` - // The role ARN that allows IoT to write to Cloudwatch logs. + // The ARN of the role that allows IoT to write to Cloudwatch logs. RoleArn *string `locationName:"roleArn" type:"string"` } @@ -24589,6 +29795,48 @@ func (s SetV2LoggingOptionsOutput) GoString() string { return s.String() } +// Describes the code-signing profile. +type SigningProfileParameter struct { + _ struct{} `type:"structure"` + + // Certificate ARN. + CertificateArn *string `locationName:"certificateArn" type:"string"` + + // The location of the code-signing certificate on your device. + CertificatePathOnDevice *string `locationName:"certificatePathOnDevice" type:"string"` + + // The hardware platform of your device. + Platform *string `locationName:"platform" type:"string"` +} + +// String returns the string representation +func (s SigningProfileParameter) String() string { + return awsutil.Prettify(s) +} + +// GoString returns the string representation +func (s SigningProfileParameter) GoString() string { + return s.String() +} + +// SetCertificateArn sets the CertificateArn field's value. +func (s *SigningProfileParameter) SetCertificateArn(v string) *SigningProfileParameter { + s.CertificateArn = &v + return s +} + +// SetCertificatePathOnDevice sets the CertificatePathOnDevice field's value. +func (s *SigningProfileParameter) SetCertificatePathOnDevice(v string) *SigningProfileParameter { + s.CertificatePathOnDevice = &v + return s +} + +// SetPlatform sets the Platform field's value. +func (s *SigningProfileParameter) SetPlatform(v string) *SigningProfileParameter { + s.Platform = &v + return s +} + // Describes an action to publish to an Amazon SNS topic. type SnsAction struct { _ struct{} `type:"structure"` @@ -24718,6 +29966,127 @@ func (s *SqsAction) SetUseBase64(v bool) *SqsAction { return s } +type StartOnDemandAuditTaskInput struct { + _ struct{} `type:"structure"` + + // Which checks are performed during the audit. The checks you specify must + // be enabled for your account or an exception occurs. Use DescribeAccountAuditConfiguration + // to see the list of all checks including those that are enabled or UpdateAccountAuditConfiguration + // to select which checks are enabled. + // + // TargetCheckNames is a required field + TargetCheckNames []*string `locationName:"targetCheckNames" type:"list" required:"true"` +} + +// String returns the string representation +func (s StartOnDemandAuditTaskInput) String() string { + return awsutil.Prettify(s) +} + +// GoString returns the string representation +func (s StartOnDemandAuditTaskInput) GoString() string { + return s.String() +} + +// Validate inspects the fields of the type to determine if they are valid. +func (s *StartOnDemandAuditTaskInput) Validate() error { + invalidParams := request.ErrInvalidParams{Context: "StartOnDemandAuditTaskInput"} + if s.TargetCheckNames == nil { + invalidParams.Add(request.NewErrParamRequired("TargetCheckNames")) + } + + if invalidParams.Len() > 0 { + return invalidParams + } + return nil +} + +// SetTargetCheckNames sets the TargetCheckNames field's value. +func (s *StartOnDemandAuditTaskInput) SetTargetCheckNames(v []*string) *StartOnDemandAuditTaskInput { + s.TargetCheckNames = v + return s +} + +type StartOnDemandAuditTaskOutput struct { + _ struct{} `type:"structure"` + + // The ID of the on-demand audit you started. + TaskId *string `locationName:"taskId" min:"1" type:"string"` +} + +// String returns the string representation +func (s StartOnDemandAuditTaskOutput) String() string { + return awsutil.Prettify(s) +} + +// GoString returns the string representation +func (s StartOnDemandAuditTaskOutput) GoString() string { + return s.String() +} + +// SetTaskId sets the TaskId field's value. +func (s *StartOnDemandAuditTaskOutput) SetTaskId(v string) *StartOnDemandAuditTaskOutput { + s.TaskId = &v + return s +} + +// Information required to start a signing job. +type StartSigningJobParameter struct { + _ struct{} `type:"structure"` + + // The location to write the code-signed file. + Destination *Destination `locationName:"destination" type:"structure"` + + // The code-signing profile name. + SigningProfileName *string `locationName:"signingProfileName" type:"string"` + + // Describes the code-signing profile. + SigningProfileParameter *SigningProfileParameter `locationName:"signingProfileParameter" type:"structure"` +} + +// String returns the string representation +func (s StartSigningJobParameter) String() string { + return awsutil.Prettify(s) +} + +// GoString returns the string representation +func (s StartSigningJobParameter) GoString() string { + return s.String() +} + +// Validate inspects the fields of the type to determine if they are valid. +func (s *StartSigningJobParameter) Validate() error { + invalidParams := request.ErrInvalidParams{Context: "StartSigningJobParameter"} + if s.Destination != nil { + if err := s.Destination.Validate(); err != nil { + invalidParams.AddNested("Destination", err.(request.ErrInvalidParams)) + } + } + + if invalidParams.Len() > 0 { + return invalidParams + } + return nil +} + +// SetDestination sets the Destination field's value. +func (s *StartSigningJobParameter) SetDestination(v *Destination) *StartSigningJobParameter { + s.Destination = v + return s +} + +// SetSigningProfileName sets the SigningProfileName field's value. +func (s *StartSigningJobParameter) SetSigningProfileName(v string) *StartSigningJobParameter { + s.SigningProfileName = &v + return s +} + +// SetSigningProfileParameter sets the SigningProfileParameter field's value. +func (s *StartSigningJobParameter) SetSigningProfileParameter(v *SigningProfileParameter) *StartSigningJobParameter { + s.SigningProfileParameter = v + return s +} + type StartThingRegistrationTaskInput struct { _ struct{} `type:"structure"` @@ -24832,6 +30201,71 @@ func (s *StartThingRegistrationTaskOutput) SetTaskId(v string) *StartThingRegist return s } +// Starts execution of a Step Functions state machine. +type StepFunctionsAction struct { + _ struct{} `type:"structure"` + + // (Optional) A name will be given to the state machine execution consisting + // of this prefix followed by a UUID. Step Functions automatically creates a + // unique name for each state machine execution if one is not provided. + ExecutionNamePrefix *string `locationName:"executionNamePrefix" type:"string"` + + // The ARN of the role that grants IoT permission to start execution of a state + // machine ("Action":"states:StartExecution"). + // + // RoleArn is a required field + RoleArn *string `locationName:"roleArn" type:"string" required:"true"` + + // The name of the Step Functions state machine whose execution will be started. + // + // StateMachineName is a required field + StateMachineName *string `locationName:"stateMachineName" type:"string" required:"true"` +} + +// String returns the string representation +func (s StepFunctionsAction) String() string { + return awsutil.Prettify(s) +} + +// GoString returns the string representation +func (s StepFunctionsAction) GoString() string { + return s.String() +} + +// Validate inspects the fields of the type to determine if they are valid. +func (s *StepFunctionsAction) Validate() error { + invalidParams := request.ErrInvalidParams{Context: "StepFunctionsAction"} + if s.RoleArn == nil { + invalidParams.Add(request.NewErrParamRequired("RoleArn")) + } + if s.StateMachineName == nil { + invalidParams.Add(request.NewErrParamRequired("StateMachineName")) + } + + if invalidParams.Len() > 0 { + return invalidParams + } + return nil +} + +// SetExecutionNamePrefix sets the ExecutionNamePrefix field's value. +func (s *StepFunctionsAction) SetExecutionNamePrefix(v string) *StepFunctionsAction { + s.ExecutionNamePrefix = &v + return s +} + +// SetRoleArn sets the RoleArn field's value. +func (s *StepFunctionsAction) SetRoleArn(v string) *StepFunctionsAction { + s.RoleArn = &v + return s +} + +// SetStateMachineName sets the StateMachineName field's value. +func (s *StepFunctionsAction) SetStateMachineName(v string) *StepFunctionsAction { + s.StateMachineName = &v + return s +} + type StopThingRegistrationTaskInput struct { _ struct{} `type:"structure"` @@ -25116,6 +30550,84 @@ func (s *StreamSummary) SetStreamVersion(v int64) *StreamSummary { return s } +// Statistics for the checks performed during the audit. +type TaskStatistics struct { + _ struct{} `type:"structure"` + + // The number of checks that did not run because the audit was canceled. + CanceledChecks *int64 `locationName:"canceledChecks" type:"integer"` + + // The number of checks that found compliant resources. + CompliantChecks *int64 `locationName:"compliantChecks" type:"integer"` + + // The number of checks + FailedChecks *int64 `locationName:"failedChecks" type:"integer"` + + // The number of checks in progress. + InProgressChecks *int64 `locationName:"inProgressChecks" type:"integer"` + + // The number of checks that found non-compliant resources. + NonCompliantChecks *int64 `locationName:"nonCompliantChecks" type:"integer"` + + // The number of checks in this audit. + TotalChecks *int64 `locationName:"totalChecks" type:"integer"` + + // The number of checks waiting for data collection. + WaitingForDataCollectionChecks *int64 `locationName:"waitingForDataCollectionChecks" type:"integer"` +} + +// String returns the string representation +func (s TaskStatistics) String() string { + return awsutil.Prettify(s) +} + +// GoString returns the string representation +func (s TaskStatistics) GoString() string { + return s.String() +} + +// SetCanceledChecks sets the CanceledChecks field's value. +func (s *TaskStatistics) SetCanceledChecks(v int64) *TaskStatistics { + s.CanceledChecks = &v + return s +} + +// SetCompliantChecks sets the CompliantChecks field's value. +func (s *TaskStatistics) SetCompliantChecks(v int64) *TaskStatistics { + s.CompliantChecks = &v + return s +} + +// SetFailedChecks sets the FailedChecks field's value. +func (s *TaskStatistics) SetFailedChecks(v int64) *TaskStatistics { + s.FailedChecks = &v + return s +} + +// SetInProgressChecks sets the InProgressChecks field's value. +func (s *TaskStatistics) SetInProgressChecks(v int64) *TaskStatistics { + s.InProgressChecks = &v + return s +} + +// SetNonCompliantChecks sets the NonCompliantChecks field's value. +func (s *TaskStatistics) SetNonCompliantChecks(v int64) *TaskStatistics { + s.NonCompliantChecks = &v + return s +} + +// SetTotalChecks sets the TotalChecks field's value. +func (s *TaskStatistics) SetTotalChecks(v int64) *TaskStatistics { + s.TotalChecks = &v + return s +} + +// SetWaitingForDataCollectionChecks sets the WaitingForDataCollectionChecks field's value. +func (s *TaskStatistics) SetWaitingForDataCollectionChecks(v int64) *TaskStatistics { + s.WaitingForDataCollectionChecks = &v + return s +} + type TestAuthorizationInput struct { _ struct{} `type:"structure"` @@ -25493,6 +31005,105 @@ func (s *ThingDocument) SetThingTypeName(v string) *ThingDocument { return s } +// The thing group search index document. +type ThingGroupDocument struct { + _ struct{} `type:"structure"` + + // The thing group attributes. + Attributes map[string]*string `locationName:"attributes" type:"map"` + + // Parent group names. + ParentGroupNames []*string `locationName:"parentGroupNames" type:"list"` + + // The thing group description. + ThingGroupDescription *string `locationName:"thingGroupDescription" type:"string"` + + // The thing group ID. + ThingGroupId *string `locationName:"thingGroupId" min:"1" type:"string"` + + // The thing group name. + ThingGroupName *string `locationName:"thingGroupName" min:"1" type:"string"` +} + +// String returns the string representation +func (s ThingGroupDocument) String() string { + return awsutil.Prettify(s) +} + +// GoString returns the string representation +func (s ThingGroupDocument) GoString() string { + return s.String() +} + +// SetAttributes sets the Attributes field's value. +func (s *ThingGroupDocument) SetAttributes(v map[string]*string) *ThingGroupDocument { + s.Attributes = v + return s +} + +// SetParentGroupNames sets the ParentGroupNames field's value. +func (s *ThingGroupDocument) SetParentGroupNames(v []*string) *ThingGroupDocument { + s.ParentGroupNames = v + return s +} + +// SetThingGroupDescription sets the ThingGroupDescription field's value. +func (s *ThingGroupDocument) SetThingGroupDescription(v string) *ThingGroupDocument { + s.ThingGroupDescription = &v + return s +} + +// SetThingGroupId sets the ThingGroupId field's value. +func (s *ThingGroupDocument) SetThingGroupId(v string) *ThingGroupDocument { + s.ThingGroupId = &v + return s +} + +// SetThingGroupName sets the ThingGroupName field's value. +func (s *ThingGroupDocument) SetThingGroupName(v string) *ThingGroupDocument { + s.ThingGroupName = &v + return s +} + +// Thing group indexing configuration. +type ThingGroupIndexingConfiguration struct { + _ struct{} `type:"structure"` + + // Thing group indexing mode. + // + // ThingGroupIndexingMode is a required field + ThingGroupIndexingMode *string `locationName:"thingGroupIndexingMode" type:"string" required:"true" enum:"ThingGroupIndexingMode"` +} + +// String returns the string representation +func (s ThingGroupIndexingConfiguration) String() string { + return awsutil.Prettify(s) +} + +// GoString returns the string representation +func (s ThingGroupIndexingConfiguration) GoString() string { + return s.String() +} + +// Validate inspects the fields of the type to determine if they are valid. +func (s *ThingGroupIndexingConfiguration) Validate() error { + invalidParams := request.ErrInvalidParams{Context: "ThingGroupIndexingConfiguration"} + if s.ThingGroupIndexingMode == nil { + invalidParams.Add(request.NewErrParamRequired("ThingGroupIndexingMode")) + } + + if invalidParams.Len() > 0 { + return invalidParams + } + return nil +} + +// SetThingGroupIndexingMode sets the ThingGroupIndexingMode field's value. +func (s *ThingGroupIndexingConfiguration) SetThingGroupIndexingMode(v string) *ThingGroupIndexingConfiguration { + s.ThingGroupIndexingMode = &v + return s +} + // Thing group metadata. type ThingGroupMetadata struct { _ struct{} `type:"structure"` @@ -25580,7 +31191,9 @@ type ThingIndexingConfiguration struct { // data. // // * OFF - Thing indexing is disabled. - ThingIndexingMode *string `locationName:"thingIndexingMode" type:"string" enum:"ThingIndexingMode"` + // + // ThingIndexingMode is a required field + ThingIndexingMode *string `locationName:"thingIndexingMode" type:"string" required:"true" enum:"ThingIndexingMode"` } // String returns the string representation @@ -25593,6 +31206,19 @@ func (s ThingIndexingConfiguration) GoString() string { return s.String() } +// Validate inspects the fields of the type to determine if they are valid. +func (s *ThingIndexingConfiguration) Validate() error { + invalidParams := request.ErrInvalidParams{Context: "ThingIndexingConfiguration"} + if s.ThingIndexingMode == nil { + invalidParams.Add(request.NewErrParamRequired("ThingIndexingMode")) + } + + if invalidParams.Len() > 0 { + return invalidParams + } + return nil +} + // SetThingIndexingMode sets the ThingIndexingMode field's value. func (s *ThingIndexingConfiguration) SetThingIndexingMode(v string) *ThingIndexingConfiguration { s.ThingIndexingMode = &v @@ -25998,7 +31624,7 @@ type TransferCertificateInput struct { // The AWS account. // // TargetAwsAccount is a required field - TargetAwsAccount *string `location:"querystring" locationName:"targetAwsAccount" type:"string" required:"true"` + TargetAwsAccount *string `location:"querystring" locationName:"targetAwsAccount" min:"12" type:"string" required:"true"` // The transfer message. TransferMessage *string `locationName:"transferMessage" type:"string"` @@ -26026,6 +31652,9 @@ func (s *TransferCertificateInput) Validate() error { if s.TargetAwsAccount == nil { invalidParams.Add(request.NewErrParamRequired("TargetAwsAccount")) } + if s.TargetAwsAccount != nil && len(*s.TargetAwsAccount) < 12 { + invalidParams.Add(request.NewErrParamMinLen("TargetAwsAccount", 12)) + } if invalidParams.Len() > 0 { return invalidParams @@ -26135,6 +31764,99 @@ func (s *TransferData) SetTransferMessage(v string) *TransferData { return s } +type UpdateAccountAuditConfigurationInput struct { + _ struct{} `type:"structure"` + + // Specifies which audit checks are enabled and disabled for this account. Use + // DescribeAccountAuditConfiguration to see the list of all checks including + // those that are currently enabled. + // + // Note that some data collection may begin immediately when certain checks + // are enabled. When a check is disabled, any data collected so far in relation + // to the check is deleted. + // + // You cannot disable a check if it is used by any scheduled audit. You must + // first delete the check from the scheduled audit or delete the scheduled audit + // itself. + // + // On the first call to UpdateAccountAuditConfiguration this parameter is required + // and must specify at least one enabled check. + AuditCheckConfigurations map[string]*AuditCheckConfiguration `locationName:"auditCheckConfigurations" type:"map"` + + // Information about the targets to which audit notifications are sent. + AuditNotificationTargetConfigurations map[string]*AuditNotificationTarget `locationName:"auditNotificationTargetConfigurations" type:"map"` + + // The ARN of the role that grants permission to AWS IoT to access information + // about your devices, policies, certificates and other items as necessary when + // performing an audit. + RoleArn *string `locationName:"roleArn" min:"20" type:"string"` +} + +// String returns the string representation +func (s UpdateAccountAuditConfigurationInput) String() string { + return awsutil.Prettify(s) +} + +// GoString returns the string representation +func (s UpdateAccountAuditConfigurationInput) GoString() string { + return s.String() +} + +// Validate inspects the fields of the type to determine if they are valid. +func (s *UpdateAccountAuditConfigurationInput) Validate() error { + invalidParams := request.ErrInvalidParams{Context: "UpdateAccountAuditConfigurationInput"} + if s.RoleArn != nil && len(*s.RoleArn) < 20 { + invalidParams.Add(request.NewErrParamMinLen("RoleArn", 20)) + } + if s.AuditNotificationTargetConfigurations != nil { + for i, v := range s.AuditNotificationTargetConfigurations { + if v == nil { + continue + } + if err := v.Validate(); err != nil { + invalidParams.AddNested(fmt.Sprintf("%s[%v]", "AuditNotificationTargetConfigurations", i), err.(request.ErrInvalidParams)) + } + } + } + + if invalidParams.Len() > 0 { + return invalidParams + } + return nil +} + +// SetAuditCheckConfigurations sets the AuditCheckConfigurations field's value. +func (s *UpdateAccountAuditConfigurationInput) SetAuditCheckConfigurations(v map[string]*AuditCheckConfiguration) *UpdateAccountAuditConfigurationInput { + s.AuditCheckConfigurations = v + return s +} + +// SetAuditNotificationTargetConfigurations sets the AuditNotificationTargetConfigurations field's value. +func (s *UpdateAccountAuditConfigurationInput) SetAuditNotificationTargetConfigurations(v map[string]*AuditNotificationTarget) *UpdateAccountAuditConfigurationInput { + s.AuditNotificationTargetConfigurations = v + return s +} + +// SetRoleArn sets the RoleArn field's value. +func (s *UpdateAccountAuditConfigurationInput) SetRoleArn(v string) *UpdateAccountAuditConfigurationInput { + s.RoleArn = &v + return s +} + +type UpdateAccountAuditConfigurationOutput struct { + _ struct{} `type:"structure"` +} + +// String returns the string representation +func (s UpdateAccountAuditConfigurationOutput) String() string { + return awsutil.Prettify(s) +} + +// GoString returns the string representation +func (s UpdateAccountAuditConfigurationOutput) GoString() string { + return s.String() +} + type UpdateAuthorizerInput struct { _ struct{} `type:"structure"` @@ -26466,6 +32188,9 @@ func (s UpdateEventConfigurationsOutput) GoString() string { type UpdateIndexingConfigurationInput struct { _ struct{} `type:"structure"` + // Thing group indexing configuration. + ThingGroupIndexingConfiguration *ThingGroupIndexingConfiguration `locationName:"thingGroupIndexingConfiguration" type:"structure"` + // Thing indexing configuration. ThingIndexingConfiguration *ThingIndexingConfiguration `locationName:"thingIndexingConfiguration" type:"structure"` } @@ -26480,6 +32205,32 @@ func (s UpdateIndexingConfigurationInput) GoString() string { return s.String() } +// Validate inspects the fields of the type to determine if they are valid. +func (s *UpdateIndexingConfigurationInput) Validate() error { + invalidParams := request.ErrInvalidParams{Context: "UpdateIndexingConfigurationInput"} + if s.ThingGroupIndexingConfiguration != nil { + if err := s.ThingGroupIndexingConfiguration.Validate(); err != nil { + invalidParams.AddNested("ThingGroupIndexingConfiguration", err.(request.ErrInvalidParams)) + } + } + if s.ThingIndexingConfiguration != nil { + if err := s.ThingIndexingConfiguration.Validate(); err != nil { + invalidParams.AddNested("ThingIndexingConfiguration", err.(request.ErrInvalidParams)) + } + } + + if invalidParams.Len() > 0 { + return invalidParams + } + return nil +} + +// SetThingGroupIndexingConfiguration sets the ThingGroupIndexingConfiguration field's value. +func (s *UpdateIndexingConfigurationInput) SetThingGroupIndexingConfiguration(v *ThingGroupIndexingConfiguration) *UpdateIndexingConfigurationInput { + s.ThingGroupIndexingConfiguration = v + return s +} + // SetThingIndexingConfiguration sets the ThingIndexingConfiguration field's value. func (s *UpdateIndexingConfigurationInput) SetThingIndexingConfiguration(v *ThingIndexingConfiguration) *UpdateIndexingConfigurationInput { s.ThingIndexingConfiguration = v @@ -26597,6 +32348,303 @@ func (s *UpdateRoleAliasOutput) SetRoleAliasArn(v string) *UpdateRoleAliasOutput return s } +type UpdateScheduledAuditInput struct { + _ struct{} `type:"structure"` + + // The day of the month on which the scheduled audit takes place. Can be "1" + // through "31" or "LAST". This field is required if the "frequency" parameter + // is set to "MONTHLY". If days 29-31 are specified, and the month does not + // have that many days, the audit takes place on the "LAST" day of the month. + DayOfMonth *string `locationName:"dayOfMonth" type:"string"` + + // The day of the week on which the scheduled audit takes place. Can be one + // of "SUN", "MON", "TUE", "WED", "THU", "FRI" or "SAT". This field is required + // if the "frequency" parameter is set to "WEEKLY" or "BIWEEKLY". + DayOfWeek *string `locationName:"dayOfWeek" type:"string" enum:"DayOfWeek"` + + // How often the scheduled audit takes place. Can be one of "DAILY", "WEEKLY", + // "BIWEEKLY" or "MONTHLY". The actual start time of each audit is determined + // by the system. + Frequency *string `locationName:"frequency" type:"string" enum:"AuditFrequency"` + + // The name of the scheduled audit. (Max. 128 chars) + // + // ScheduledAuditName is a required field + ScheduledAuditName *string `location:"uri" locationName:"scheduledAuditName" min:"1" type:"string" required:"true"` + + // Which checks are performed during the scheduled audit. Checks must be enabled + // for your account. (Use DescribeAccountAuditConfiguration to see the list + // of all checks including those that are enabled or UpdateAccountAuditConfiguration + // to select which checks are enabled.) + TargetCheckNames []*string `locationName:"targetCheckNames" type:"list"` +} + +// String returns the string representation +func (s UpdateScheduledAuditInput) String() string { + return awsutil.Prettify(s) +} + +// GoString returns the string representation +func (s UpdateScheduledAuditInput) GoString() string { + return s.String() +} + +// Validate inspects the fields of the type to determine if they are valid. +func (s *UpdateScheduledAuditInput) Validate() error { + invalidParams := request.ErrInvalidParams{Context: "UpdateScheduledAuditInput"} + if s.ScheduledAuditName == nil { + invalidParams.Add(request.NewErrParamRequired("ScheduledAuditName")) + } + if s.ScheduledAuditName != nil && len(*s.ScheduledAuditName) < 1 { + invalidParams.Add(request.NewErrParamMinLen("ScheduledAuditName", 1)) + } + + if invalidParams.Len() > 0 { + return invalidParams + } + return nil +} + +// SetDayOfMonth sets the DayOfMonth field's value. +func (s *UpdateScheduledAuditInput) SetDayOfMonth(v string) *UpdateScheduledAuditInput { + s.DayOfMonth = &v + return s +} + +// SetDayOfWeek sets the DayOfWeek field's value. +func (s *UpdateScheduledAuditInput) SetDayOfWeek(v string) *UpdateScheduledAuditInput { + s.DayOfWeek = &v + return s +} + +// SetFrequency sets the Frequency field's value. +func (s *UpdateScheduledAuditInput) SetFrequency(v string) *UpdateScheduledAuditInput { + s.Frequency = &v + return s +} + +// SetScheduledAuditName sets the ScheduledAuditName field's value. +func (s *UpdateScheduledAuditInput) SetScheduledAuditName(v string) *UpdateScheduledAuditInput { + s.ScheduledAuditName = &v + return s +} + +// SetTargetCheckNames sets the TargetCheckNames field's value. +func (s *UpdateScheduledAuditInput) SetTargetCheckNames(v []*string) *UpdateScheduledAuditInput { + s.TargetCheckNames = v + return s +} + +type UpdateScheduledAuditOutput struct { + _ struct{} `type:"structure"` + + // The ARN of the scheduled audit. + ScheduledAuditArn *string `locationName:"scheduledAuditArn" type:"string"` +} + +// String returns the string representation +func (s UpdateScheduledAuditOutput) String() string { + return awsutil.Prettify(s) +} + +// GoString returns the string representation +func (s UpdateScheduledAuditOutput) GoString() string { + return s.String() +} + +// SetScheduledAuditArn sets the ScheduledAuditArn field's value. +func (s *UpdateScheduledAuditOutput) SetScheduledAuditArn(v string) *UpdateScheduledAuditOutput { + s.ScheduledAuditArn = &v + return s +} + +type UpdateSecurityProfileInput struct { + _ struct{} `type:"structure"` + + // Where the alerts are sent. (Alerts are always sent to the console.) + AlertTargets map[string]*AlertTarget `locationName:"alertTargets" type:"map"` + + // Specifies the behaviors that, when violated by a device (thing), cause an + // alert. + Behaviors []*Behavior `locationName:"behaviors" type:"list"` + + // The expected version of the security profile. A new version is generated + // whenever the security profile is updated. If you specify a value that is + // different than the actual version, a VersionConflictException is thrown. + ExpectedVersion *int64 `location:"querystring" locationName:"expectedVersion" type:"long"` + + // A description of the security profile. + SecurityProfileDescription *string `locationName:"securityProfileDescription" type:"string"` + + // The name of the security profile you want to update. + // + // SecurityProfileName is a required field + SecurityProfileName *string `location:"uri" locationName:"securityProfileName" min:"1" type:"string" required:"true"` +} + +// String returns the string representation +func (s UpdateSecurityProfileInput) String() string { + return awsutil.Prettify(s) +} + +// GoString returns the string representation +func (s UpdateSecurityProfileInput) GoString() string { + return s.String() +} + +// Validate inspects the fields of the type to determine if they are valid. +func (s *UpdateSecurityProfileInput) Validate() error { + invalidParams := request.ErrInvalidParams{Context: "UpdateSecurityProfileInput"} + if s.SecurityProfileName == nil { + invalidParams.Add(request.NewErrParamRequired("SecurityProfileName")) + } + if s.SecurityProfileName != nil && len(*s.SecurityProfileName) < 1 { + invalidParams.Add(request.NewErrParamMinLen("SecurityProfileName", 1)) + } + if s.AlertTargets != nil { + for i, v := range s.AlertTargets { + if v == nil { + continue + } + if err := v.Validate(); err != nil { + invalidParams.AddNested(fmt.Sprintf("%s[%v]", "AlertTargets", i), err.(request.ErrInvalidParams)) + } + } + } + if s.Behaviors != nil { + for i, v := range s.Behaviors { + if v == nil { + continue + } + if err := v.Validate(); err != nil { + invalidParams.AddNested(fmt.Sprintf("%s[%v]", "Behaviors", i), err.(request.ErrInvalidParams)) + } + } + } + + if invalidParams.Len() > 0 { + return invalidParams + } + return nil +} + +// SetAlertTargets sets the AlertTargets field's value. +func (s *UpdateSecurityProfileInput) SetAlertTargets(v map[string]*AlertTarget) *UpdateSecurityProfileInput { + s.AlertTargets = v + return s +} + +// SetBehaviors sets the Behaviors field's value. +func (s *UpdateSecurityProfileInput) SetBehaviors(v []*Behavior) *UpdateSecurityProfileInput { + s.Behaviors = v + return s +} + +// SetExpectedVersion sets the ExpectedVersion field's value. +func (s *UpdateSecurityProfileInput) SetExpectedVersion(v int64) *UpdateSecurityProfileInput { + s.ExpectedVersion = &v + return s +} + +// SetSecurityProfileDescription sets the SecurityProfileDescription field's value. +func (s *UpdateSecurityProfileInput) SetSecurityProfileDescription(v string) *UpdateSecurityProfileInput { + s.SecurityProfileDescription = &v + return s +} + +// SetSecurityProfileName sets the SecurityProfileName field's value. +func (s *UpdateSecurityProfileInput) SetSecurityProfileName(v string) *UpdateSecurityProfileInput { + s.SecurityProfileName = &v + return s +} + +type UpdateSecurityProfileOutput struct { + _ struct{} `type:"structure"` + + // Where the alerts are sent. (Alerts are always sent to the console.) + AlertTargets map[string]*AlertTarget `locationName:"alertTargets" type:"map"` + + // Specifies the behaviors that, when violated by a device (thing), cause an + // alert. + Behaviors []*Behavior `locationName:"behaviors" type:"list"` + + // The time the security profile was created. + CreationDate *time.Time `locationName:"creationDate" type:"timestamp"` + + // The time the security profile was last modified. + LastModifiedDate *time.Time `locationName:"lastModifiedDate" type:"timestamp"` + + // The ARN of the security profile that was updated. + SecurityProfileArn *string `locationName:"securityProfileArn" type:"string"` + + // The description of the security profile. + SecurityProfileDescription *string `locationName:"securityProfileDescription" type:"string"` + + // The name of the security profile that was updated. + SecurityProfileName *string `locationName:"securityProfileName" min:"1" type:"string"` + + // The updated version of the security profile. + Version *int64 `locationName:"version" type:"long"` +} + +// String returns the string representation +func (s UpdateSecurityProfileOutput) String() string { + return awsutil.Prettify(s) +} + +// GoString returns the string representation +func (s UpdateSecurityProfileOutput) GoString() string { + return s.String() +} + +// SetAlertTargets sets the AlertTargets field's value. +func (s *UpdateSecurityProfileOutput) SetAlertTargets(v map[string]*AlertTarget) *UpdateSecurityProfileOutput { + s.AlertTargets = v + return s +} + +// SetBehaviors sets the Behaviors field's value. +func (s *UpdateSecurityProfileOutput) SetBehaviors(v []*Behavior) *UpdateSecurityProfileOutput { + s.Behaviors = v + return s +} + +// SetCreationDate sets the CreationDate field's value. +func (s *UpdateSecurityProfileOutput) SetCreationDate(v time.Time) *UpdateSecurityProfileOutput { + s.CreationDate = &v + return s +} + +// SetLastModifiedDate sets the LastModifiedDate field's value. +func (s *UpdateSecurityProfileOutput) SetLastModifiedDate(v time.Time) *UpdateSecurityProfileOutput { + s.LastModifiedDate = &v + return s +} + +// SetSecurityProfileArn sets the SecurityProfileArn field's value. +func (s *UpdateSecurityProfileOutput) SetSecurityProfileArn(v string) *UpdateSecurityProfileOutput { + s.SecurityProfileArn = &v + return s +} + +// SetSecurityProfileDescription sets the SecurityProfileDescription field's value. +func (s *UpdateSecurityProfileOutput) SetSecurityProfileDescription(v string) *UpdateSecurityProfileOutput { + s.SecurityProfileDescription = &v + return s +} + +// SetSecurityProfileName sets the SecurityProfileName field's value. +func (s *UpdateSecurityProfileOutput) SetSecurityProfileName(v string) *UpdateSecurityProfileOutput { + s.SecurityProfileName = &v + return s +} + +// SetVersion sets the Version field's value. +func (s *UpdateSecurityProfileOutput) SetVersion(v int64) *UpdateSecurityProfileOutput { + s.Version = &v + return s +} + type UpdateStreamInput struct { _ struct{} `type:"structure"` @@ -26991,6 +33039,189 @@ func (s UpdateThingOutput) GoString() string { return s.String() } +type ValidateSecurityProfileBehaviorsInput struct { + _ struct{} `type:"structure"` + + // Specifies the behaviors that, when violated by a device (thing), cause an + // alert. + // + // Behaviors is a required field + Behaviors []*Behavior `locationName:"behaviors" type:"list" required:"true"` +} + +// String returns the string representation +func (s ValidateSecurityProfileBehaviorsInput) String() string { + return awsutil.Prettify(s) +} + +// GoString returns the string representation +func (s ValidateSecurityProfileBehaviorsInput) GoString() string { + return s.String() +} + +// Validate inspects the fields of the type to determine if they are valid. +func (s *ValidateSecurityProfileBehaviorsInput) Validate() error { + invalidParams := request.ErrInvalidParams{Context: "ValidateSecurityProfileBehaviorsInput"} + if s.Behaviors == nil { + invalidParams.Add(request.NewErrParamRequired("Behaviors")) + } + if s.Behaviors != nil { + for i, v := range s.Behaviors { + if v == nil { + continue + } + if err := v.Validate(); err != nil { + invalidParams.AddNested(fmt.Sprintf("%s[%v]", "Behaviors", i), err.(request.ErrInvalidParams)) + } + } + } + + if invalidParams.Len() > 0 { + return invalidParams + } + return nil +} + +// SetBehaviors sets the Behaviors field's value. +func (s *ValidateSecurityProfileBehaviorsInput) SetBehaviors(v []*Behavior) *ValidateSecurityProfileBehaviorsInput { + s.Behaviors = v + return s +} + +type ValidateSecurityProfileBehaviorsOutput struct { + _ struct{} `type:"structure"` + + // True if the behaviors were valid. + Valid *bool `locationName:"valid" type:"boolean"` + + // The list of any errors found in the behaviors. + ValidationErrors []*ValidationError `locationName:"validationErrors" type:"list"` +} + +// String returns the string representation +func (s ValidateSecurityProfileBehaviorsOutput) String() string { + return awsutil.Prettify(s) +} + +// GoString returns the string representation +func (s ValidateSecurityProfileBehaviorsOutput) GoString() string { + return s.String() +} + +// SetValid sets the Valid field's value. +func (s *ValidateSecurityProfileBehaviorsOutput) SetValid(v bool) *ValidateSecurityProfileBehaviorsOutput { + s.Valid = &v + return s +} + +// SetValidationErrors sets the ValidationErrors field's value. +func (s *ValidateSecurityProfileBehaviorsOutput) SetValidationErrors(v []*ValidationError) *ValidateSecurityProfileBehaviorsOutput { + s.ValidationErrors = v + return s +} + +// Information about an error found in a behavior specification. +type ValidationError struct { + _ struct{} `type:"structure"` + + // The description of an error found in the behaviors. + ErrorMessage *string `locationName:"errorMessage" type:"string"` +} + +// String returns the string representation +func (s ValidationError) String() string { + return awsutil.Prettify(s) +} + +// GoString returns the string representation +func (s ValidationError) GoString() string { + return s.String() +} + +// SetErrorMessage sets the ErrorMessage field's value. +func (s *ValidationError) SetErrorMessage(v string) *ValidationError { + s.ErrorMessage = &v + return s +} + +// Information about a Device Defender security profile behavior violation. +type ViolationEvent struct { + _ struct{} `type:"structure"` + + // The behavior which was violated. + Behavior *Behavior `locationName:"behavior" type:"structure"` + + // The value of the metric (the measurement). + MetricValue *MetricValue `locationName:"metricValue" type:"structure"` + + // The name of the security profile whose behavior was violated. + SecurityProfileName *string `locationName:"securityProfileName" min:"1" type:"string"` + + // The name of the thing responsible for the violation event. + ThingName *string `locationName:"thingName" min:"1" type:"string"` + + // The time the violation event occurred. + ViolationEventTime *time.Time `locationName:"violationEventTime" type:"timestamp"` + + // The type of violation event. + ViolationEventType *string `locationName:"violationEventType" type:"string" enum:"ViolationEventType"` + + // The ID of the violation event. + ViolationId *string `locationName:"violationId" min:"1" type:"string"` +} + +// String returns the string representation +func (s ViolationEvent) String() string { + return awsutil.Prettify(s) +} + +// GoString returns the string representation +func (s ViolationEvent) GoString() string { + return s.String() +} + +// SetBehavior sets the Behavior field's value. +func (s *ViolationEvent) SetBehavior(v *Behavior) *ViolationEvent { + s.Behavior = v + return s +} + +// SetMetricValue sets the MetricValue field's value. +func (s *ViolationEvent) SetMetricValue(v *MetricValue) *ViolationEvent { + s.MetricValue = v + return s +} + +// SetSecurityProfileName sets the SecurityProfileName field's value. +func (s *ViolationEvent) SetSecurityProfileName(v string) *ViolationEvent { + s.SecurityProfileName = &v + return s +} + +// SetThingName sets the ThingName field's value. +func (s *ViolationEvent) SetThingName(v string) *ViolationEvent { + s.ThingName = &v + return s +} + +// SetViolationEventTime sets the ViolationEventTime field's value. +func (s *ViolationEvent) SetViolationEventTime(v time.Time) *ViolationEvent { + s.ViolationEventTime = &v + return s +} + +// SetViolationEventType sets the ViolationEventType field's value. +func (s *ViolationEvent) SetViolationEventType(v string) *ViolationEvent { + s.ViolationEventType = &v + return s +} + +// SetViolationId sets the ViolationId field's value. +func (s *ViolationEvent) SetViolationId(v string) *ViolationEvent { + s.ViolationId = &v + return s +} + const ( // ActionTypePublish is a ActionType enum value ActionTypePublish = "PUBLISH" @@ -27005,6 +33236,87 @@ const ( ActionTypeConnect = "CONNECT" ) +// The type of alert target: one of "SNS". +const ( + // AlertTargetTypeSns is a AlertTargetType enum value + AlertTargetTypeSns = "SNS" +) + +const ( + // AuditCheckRunStatusInProgress is a AuditCheckRunStatus enum value + AuditCheckRunStatusInProgress = "IN_PROGRESS" + + // AuditCheckRunStatusWaitingForDataCollection is a AuditCheckRunStatus enum value + AuditCheckRunStatusWaitingForDataCollection = "WAITING_FOR_DATA_COLLECTION" + + // AuditCheckRunStatusCanceled is a AuditCheckRunStatus enum value + AuditCheckRunStatusCanceled = "CANCELED" + + // AuditCheckRunStatusCompletedCompliant is a AuditCheckRunStatus enum value + AuditCheckRunStatusCompletedCompliant = "COMPLETED_COMPLIANT" + + // AuditCheckRunStatusCompletedNonCompliant is a AuditCheckRunStatus enum value + AuditCheckRunStatusCompletedNonCompliant = "COMPLETED_NON_COMPLIANT" + + // AuditCheckRunStatusFailed is a AuditCheckRunStatus enum value + AuditCheckRunStatusFailed = "FAILED" +) + +const ( + // AuditFindingSeverityCritical is a AuditFindingSeverity enum value + AuditFindingSeverityCritical = "CRITICAL" + + // AuditFindingSeverityHigh is a AuditFindingSeverity enum value + AuditFindingSeverityHigh = "HIGH" + + // AuditFindingSeverityMedium is a AuditFindingSeverity enum value + AuditFindingSeverityMedium = "MEDIUM" + + // AuditFindingSeverityLow is a AuditFindingSeverity enum value + AuditFindingSeverityLow = "LOW" +) + +const ( + // AuditFrequencyDaily is a AuditFrequency enum value + AuditFrequencyDaily = "DAILY" + + // AuditFrequencyWeekly is a AuditFrequency enum value + AuditFrequencyWeekly = "WEEKLY" + + // AuditFrequencyBiweekly is a AuditFrequency enum value + AuditFrequencyBiweekly = "BIWEEKLY" + + // AuditFrequencyMonthly is a AuditFrequency enum value + AuditFrequencyMonthly = "MONTHLY" +) + +const ( + // AuditNotificationTypeSns is a AuditNotificationType enum value + AuditNotificationTypeSns = "SNS" +) + +const ( + // AuditTaskStatusInProgress is a AuditTaskStatus enum value + AuditTaskStatusInProgress = "IN_PROGRESS" + + // AuditTaskStatusCompleted is a AuditTaskStatus enum value + AuditTaskStatusCompleted = "COMPLETED" + + // AuditTaskStatusFailed is a AuditTaskStatus enum value + AuditTaskStatusFailed = "FAILED" + + // AuditTaskStatusCanceled is a AuditTaskStatus enum value + AuditTaskStatusCanceled = "CANCELED" +) + +const ( + // AuditTaskTypeOnDemandAuditTask is a AuditTaskType enum value + AuditTaskTypeOnDemandAuditTask = "ON_DEMAND_AUDIT_TASK" + + // AuditTaskTypeScheduledAuditTask is a AuditTaskType enum value + AuditTaskTypeScheduledAuditTask = "SCHEDULED_AUDIT_TASK" +) + const ( // AuthDecisionAllowed is a AuthDecision enum value AuthDecisionAllowed = "ALLOWED" @@ -27086,6 +33398,55 @@ const ( CertificateStatusPendingActivation = "PENDING_ACTIVATION" ) +const ( + // ComparisonOperatorLessThan is a ComparisonOperator enum value + ComparisonOperatorLessThan = "less-than" + + // ComparisonOperatorLessThanEquals is a ComparisonOperator enum value + ComparisonOperatorLessThanEquals = "less-than-equals" + + // ComparisonOperatorGreaterThan is a ComparisonOperator enum value + ComparisonOperatorGreaterThan = "greater-than" + + // ComparisonOperatorGreaterThanEquals is a ComparisonOperator enum value + ComparisonOperatorGreaterThanEquals = "greater-than-equals" + + // ComparisonOperatorInCidrSet is a ComparisonOperator enum value + ComparisonOperatorInCidrSet = "in-cidr-set" + + // ComparisonOperatorNotInCidrSet is a ComparisonOperator enum value + ComparisonOperatorNotInCidrSet = "not-in-cidr-set" + + // ComparisonOperatorInPortSet is a ComparisonOperator enum value + ComparisonOperatorInPortSet = "in-port-set" + + // ComparisonOperatorNotInPortSet is a ComparisonOperator enum value + ComparisonOperatorNotInPortSet = "not-in-port-set" +) + +const ( + // DayOfWeekSun is a DayOfWeek enum value + DayOfWeekSun = "SUN" + + // DayOfWeekMon is a DayOfWeek enum value + DayOfWeekMon = "MON" + + // DayOfWeekTue is a DayOfWeek enum value + DayOfWeekTue = "TUE" + + // DayOfWeekWed is a DayOfWeek enum value + DayOfWeekWed = "WED" + + // DayOfWeekThu is a DayOfWeek enum value + DayOfWeekThu = "THU" + + // DayOfWeekFri is a DayOfWeek enum value + DayOfWeekFri = "FRI" + + // DayOfWeekSat is a DayOfWeek enum value + DayOfWeekSat = "SAT" +) + const ( // DynamoKeyTypeString is a DynamoKeyType enum value DynamoKeyTypeString = "STRING" @@ -27118,6 +33479,15 @@ const ( // EventTypeJobExecution is a EventType enum value EventTypeJobExecution = "JOB_EXECUTION" + + // EventTypePolicy is a EventType enum value + EventTypePolicy = "POLICY" + + // EventTypeCertificate is a EventType enum value + EventTypeCertificate = "CERTIFICATE" + + // EventTypeCaCertificate is a EventType enum value + EventTypeCaCertificate = "CA_CERTIFICATE" ) const ( @@ -27223,6 +33593,26 @@ const ( ReportTypeResults = "RESULTS" ) +const ( + // ResourceTypeDeviceCertificate is a ResourceType enum value + ResourceTypeDeviceCertificate = "DEVICE_CERTIFICATE" + + // ResourceTypeCaCertificate is a ResourceType enum value + ResourceTypeCaCertificate = "CA_CERTIFICATE" + + // ResourceTypeIotPolicy is a ResourceType enum value + ResourceTypeIotPolicy = "IOT_POLICY" + + // ResourceTypeCognitoIdentityPool is a ResourceType enum value + ResourceTypeCognitoIdentityPool = "COGNITO_IDENTITY_POOL" + + // ResourceTypeClientId is a ResourceType enum value + ResourceTypeClientId = "CLIENT_ID" + + // ResourceTypeAccountSettings is a ResourceType enum value + ResourceTypeAccountSettings = "ACCOUNT_SETTINGS" +) + const ( // StatusInProgress is a Status enum value StatusInProgress = "InProgress" @@ -27248,6 +33638,14 @@ const ( TargetSelectionSnapshot = "SNAPSHOT" ) +const ( + // ThingGroupIndexingModeOff is a ThingGroupIndexingMode enum value + ThingGroupIndexingModeOff = "OFF" + + // ThingGroupIndexingModeOn is a ThingGroupIndexingMode enum value + ThingGroupIndexingModeOn = "ON" +) + const ( // ThingIndexingModeOff is a ThingIndexingMode enum value ThingIndexingModeOff = "OFF" @@ -27258,3 +33656,14 @@ const ( // ThingIndexingModeRegistryAndShadow is a ThingIndexingMode enum value ThingIndexingModeRegistryAndShadow = "REGISTRY_AND_SHADOW" ) + +const ( + // ViolationEventTypeInAlarm is a ViolationEventType enum value + ViolationEventTypeInAlarm = "in-alarm" + + // ViolationEventTypeAlarmCleared is a ViolationEventType enum value + ViolationEventTypeAlarmCleared = "alarm-cleared" + + // ViolationEventTypeAlarmInvalidated is a ViolationEventType enum value + ViolationEventTypeAlarmInvalidated = "alarm-invalidated" +) diff --git a/vendor/github.com/aws/aws-sdk-go/service/iot/doc.go b/vendor/github.com/aws/aws-sdk-go/service/iot/doc.go index c07210185..ce15b4e96 100644 --- a/vendor/github.com/aws/aws-sdk-go/service/iot/doc.go +++ b/vendor/github.com/aws/aws-sdk-go/service/iot/doc.go @@ -12,6 +12,9 @@ // // For more information about how AWS IoT works, see the Developer Guide (http://docs.aws.amazon.com/iot/latest/developerguide/aws-iot-how-it-works.html). // +// For information about how to use the credentials provider for AWS IoT, see +// Authorizing Direct Calls to AWS Services (http://docs.aws.amazon.com/iot/latest/developerguide/authorizing-direct-aws.html). +// // See iot package documentation for more information. // https://docs.aws.amazon.com/sdk-for-go/api/service/iot/ // diff --git a/vendor/github.com/aws/aws-sdk-go/service/kinesis/api.go b/vendor/github.com/aws/aws-sdk-go/service/kinesis/api.go index b13e6f677..b56891383 100644 --- a/vendor/github.com/aws/aws-sdk-go/service/kinesis/api.go +++ b/vendor/github.com/aws/aws-sdk-go/service/kinesis/api.go @@ -59,8 +59,10 @@ func (c *Kinesis) AddTagsToStreamRequest(input *AddTagsToStreamInput) (req *requ // AddTagsToStream API operation for Amazon Kinesis. // -// Adds or updates tags for the specified Kinesis data stream. Each stream can -// have up to 10 tags. +// Adds or updates tags for the specified Kinesis data stream. Each time you +// invoke this operation, you can specify up to 10 tags. If you want to add +// more than 10 tags to your stream, you can invoke this operation multiple +// times. In total, each stream can have up to 50 tags. // // If tags have already been assigned to the stream, AddTagsToStream overwrites // any existing tags that correspond to the specified tag keys. @@ -424,6 +426,10 @@ func (c *Kinesis) DeleteStreamRequest(input *DeleteStreamInput) (req *request.Re // The requested resource exceeds the maximum number allowed, or the number // of concurrent stream requests exceeds the maximum number allowed. // +// * ErrCodeResourceInUseException "ResourceInUseException" +// The resource is not available for this operation. For successful operation, +// the resource must be in the ACTIVE state. +// // See also, https://docs.aws.amazon.com/goto/WebAPI/kinesis-2013-12-02/DeleteStream func (c *Kinesis) DeleteStream(input *DeleteStreamInput) (*DeleteStreamOutput, error) { req, out := c.DeleteStreamRequest(input) @@ -446,6 +452,105 @@ func (c *Kinesis) DeleteStreamWithContext(ctx aws.Context, input *DeleteStreamIn return out, req.Send() } +const opDeregisterStreamConsumer = "DeregisterStreamConsumer" + +// DeregisterStreamConsumerRequest generates a "aws/request.Request" representing the +// client's request for the DeregisterStreamConsumer operation. The "output" return +// value will be populated with the request's response once the request completes +// successfuly. +// +// Use "Send" method on the returned Request to send the API call to the service. +// the "output" return value is not valid until after Send returns without error. +// +// See DeregisterStreamConsumer for more information on using the DeregisterStreamConsumer +// API call, and error handling. +// +// This method is useful when you want to inject custom logic or configuration +// into the SDK's request lifecycle. Such as custom headers, or retry logic. +// +// +// // Example sending a request using the DeregisterStreamConsumerRequest method. +// req, resp := client.DeregisterStreamConsumerRequest(params) +// +// err := req.Send() +// if err == nil { // resp is now filled +// fmt.Println(resp) +// } +// +// See also, https://docs.aws.amazon.com/goto/WebAPI/kinesis-2013-12-02/DeregisterStreamConsumer +func (c *Kinesis) DeregisterStreamConsumerRequest(input *DeregisterStreamConsumerInput) (req *request.Request, output *DeregisterStreamConsumerOutput) { + op := &request.Operation{ + Name: opDeregisterStreamConsumer, + HTTPMethod: "POST", + HTTPPath: "/", + } + + if input == nil { + input = &DeregisterStreamConsumerInput{} + } + + output = &DeregisterStreamConsumerOutput{} + req = c.newRequest(op, input, output) + req.Handlers.Unmarshal.Remove(jsonrpc.UnmarshalHandler) + req.Handlers.Unmarshal.PushBackNamed(protocol.UnmarshalDiscardBodyHandler) + return +} + +// DeregisterStreamConsumer API operation for Amazon Kinesis. +// +// To deregister a consumer, provide its ARN. Alternatively, you can provide +// the ARN of the data stream and the name you gave the consumer when you registered +// it. You may also provide all three parameters, as long as they don't conflict +// with each other. If you don't know the name or ARN of the consumer that you +// want to deregister, you can use the ListStreamConsumers operation to get +// a list of the descriptions of all the consumers that are currently registered +// with a given data stream. The description of a consumer contains its name +// and ARN. +// +// This operation has a limit of five transactions per second per account. +// +// Returns awserr.Error for service API and SDK errors. Use runtime type assertions +// with awserr.Error's Code and Message methods to get detailed information about +// the error. +// +// See the AWS API reference guide for Amazon Kinesis's +// API operation DeregisterStreamConsumer for usage and error information. +// +// Returned Error Codes: +// * ErrCodeLimitExceededException "LimitExceededException" +// The requested resource exceeds the maximum number allowed, or the number +// of concurrent stream requests exceeds the maximum number allowed. +// +// * ErrCodeResourceNotFoundException "ResourceNotFoundException" +// The requested resource could not be found. The stream might not be specified +// correctly. +// +// * ErrCodeInvalidArgumentException "InvalidArgumentException" +// A specified parameter exceeds its restrictions, is not supported, or can't +// be used. For more information, see the returned message. +// +// See also, https://docs.aws.amazon.com/goto/WebAPI/kinesis-2013-12-02/DeregisterStreamConsumer +func (c *Kinesis) DeregisterStreamConsumer(input *DeregisterStreamConsumerInput) (*DeregisterStreamConsumerOutput, error) { + req, out := c.DeregisterStreamConsumerRequest(input) + return out, req.Send() +} + +// DeregisterStreamConsumerWithContext is the same as DeregisterStreamConsumer with the addition of +// the ability to pass a context and additional request options. +// +// See DeregisterStreamConsumer for details on how to use this API operation. +// +// The context must be non-nil and will be used for request cancellation. If +// the context is nil a panic will occur. In the future the SDK may create +// sub-contexts for http.Requests. See https://golang.org/pkg/context/ +// for more information on using Contexts. +func (c *Kinesis) DeregisterStreamConsumerWithContext(ctx aws.Context, input *DeregisterStreamConsumerInput, opts ...request.Option) (*DeregisterStreamConsumerOutput, error) { + req, out := c.DeregisterStreamConsumerRequest(input) + req.SetContext(ctx) + req.ApplyOptions(opts...) + return out, req.Send() +} + const opDescribeLimits = "DescribeLimits" // DescribeLimitsRequest generates a "aws/request.Request" representing the @@ -689,6 +794,102 @@ func (c *Kinesis) DescribeStreamPagesWithContext(ctx aws.Context, input *Describ return p.Err() } +const opDescribeStreamConsumer = "DescribeStreamConsumer" + +// DescribeStreamConsumerRequest generates a "aws/request.Request" representing the +// client's request for the DescribeStreamConsumer operation. The "output" return +// value will be populated with the request's response once the request completes +// successfuly. +// +// Use "Send" method on the returned Request to send the API call to the service. +// the "output" return value is not valid until after Send returns without error. +// +// See DescribeStreamConsumer for more information on using the DescribeStreamConsumer +// API call, and error handling. +// +// This method is useful when you want to inject custom logic or configuration +// into the SDK's request lifecycle. Such as custom headers, or retry logic. +// +// +// // Example sending a request using the DescribeStreamConsumerRequest method. +// req, resp := client.DescribeStreamConsumerRequest(params) +// +// err := req.Send() +// if err == nil { // resp is now filled +// fmt.Println(resp) +// } +// +// See also, https://docs.aws.amazon.com/goto/WebAPI/kinesis-2013-12-02/DescribeStreamConsumer +func (c *Kinesis) DescribeStreamConsumerRequest(input *DescribeStreamConsumerInput) (req *request.Request, output *DescribeStreamConsumerOutput) { + op := &request.Operation{ + Name: opDescribeStreamConsumer, + HTTPMethod: "POST", + HTTPPath: "/", + } + + if input == nil { + input = &DescribeStreamConsumerInput{} + } + + output = &DescribeStreamConsumerOutput{} + req = c.newRequest(op, input, output) + return +} + +// DescribeStreamConsumer API operation for Amazon Kinesis. +// +// To get the description of a registered consumer, provide the ARN of the consumer. +// Alternatively, you can provide the ARN of the data stream and the name you +// gave the consumer when you registered it. You may also provide all three +// parameters, as long as they don't conflict with each other. If you don't +// know the name or ARN of the consumer that you want to describe, you can use +// the ListStreamConsumers operation to get a list of the descriptions of all +// the consumers that are currently registered with a given data stream. +// +// This operation has a limit of 20 transactions per second per account. +// +// Returns awserr.Error for service API and SDK errors. Use runtime type assertions +// with awserr.Error's Code and Message methods to get detailed information about +// the error. +// +// See the AWS API reference guide for Amazon Kinesis's +// API operation DescribeStreamConsumer for usage and error information. +// +// Returned Error Codes: +// * ErrCodeLimitExceededException "LimitExceededException" +// The requested resource exceeds the maximum number allowed, or the number +// of concurrent stream requests exceeds the maximum number allowed. +// +// * ErrCodeResourceNotFoundException "ResourceNotFoundException" +// The requested resource could not be found. The stream might not be specified +// correctly. +// +// * ErrCodeInvalidArgumentException "InvalidArgumentException" +// A specified parameter exceeds its restrictions, is not supported, or can't +// be used. For more information, see the returned message. +// +// See also, https://docs.aws.amazon.com/goto/WebAPI/kinesis-2013-12-02/DescribeStreamConsumer +func (c *Kinesis) DescribeStreamConsumer(input *DescribeStreamConsumerInput) (*DescribeStreamConsumerOutput, error) { + req, out := c.DescribeStreamConsumerRequest(input) + return out, req.Send() +} + +// DescribeStreamConsumerWithContext is the same as DescribeStreamConsumer with the addition of +// the ability to pass a context and additional request options. +// +// See DescribeStreamConsumer for details on how to use this API operation. +// +// The context must be non-nil and will be used for request cancellation. If +// the context is nil a panic will occur. In the future the SDK may create +// sub-contexts for http.Requests. See https://golang.org/pkg/context/ +// for more information on using Contexts. +func (c *Kinesis) DescribeStreamConsumerWithContext(ctx aws.Context, input *DescribeStreamConsumerInput, opts ...request.Option) (*DescribeStreamConsumerOutput, error) { + req, out := c.DescribeStreamConsumerRequest(input) + req.SetContext(ctx) + req.ApplyOptions(opts...) + return out, req.Send() +} + const opDescribeStreamSummary = "DescribeStreamSummary" // DescribeStreamSummaryRequest generates a "aws/request.Request" representing the @@ -1029,20 +1230,21 @@ func (c *Kinesis) GetRecordsRequest(input *GetRecordsInput) (req *request.Reques // is closed, or when the shard iterator reaches the record with the sequence // number or other attribute that marks it as the last record to process. // -// Each data record can be up to 1 MB in size, and each shard can read up to -// 2 MB per second. You can ensure that your calls don't exceed the maximum +// Each data record can be up to 1 MiB in size, and each shard can read up to +// 2 MiB per second. You can ensure that your calls don't exceed the maximum // supported size or throughput by using the Limit parameter to specify the // maximum number of records that GetRecords can return. Consider your average -// record size when determining this limit. +// record size when determining this limit. The maximum number of records that +// can be returned per call is 10,000. // // The size of the data returned by GetRecords varies depending on the utilization -// of the shard. The maximum size of data that GetRecords can return is 10 MB. +// of the shard. The maximum size of data that GetRecords can return is 10 MiB. // If a call returns this amount of data, subsequent calls made within the next -// five seconds throw ProvisionedThroughputExceededException. If there is insufficient +// 5 seconds throw ProvisionedThroughputExceededException. If there is insufficient // provisioned throughput on the stream, subsequent calls made within the next -// one second throw ProvisionedThroughputExceededException. GetRecords won't +// 1 second throw ProvisionedThroughputExceededException. GetRecords doesn't // return any data when it throws an exception. For this reason, we recommend -// that you wait one second between calls to GetRecords; however, it's possible +// that you wait 1 second between calls to GetRecords. However, it's possible // that the application will get exceptions for longer than 1 second. // // To detect whether the application is falling behind in processing, you can @@ -1060,6 +1262,8 @@ func (c *Kinesis) GetRecordsRequest(input *GetRecordsInput) (req *request.Reques // always increasing. For example, records in a shard or across a stream might // have time stamps that are out of order. // +// This operation has a limit of five transactions per second per account. +// // Returns awserr.Error for service API and SDK errors. Use runtime type assertions // with awserr.Error's Code and Message methods to get detailed information about // the error. @@ -1179,7 +1383,7 @@ func (c *Kinesis) GetShardIteratorRequest(input *GetShardIteratorInput) (req *re // GetShardIterator API operation for Amazon Kinesis. // -// Gets an Amazon Kinesis shard iterator. A shard iterator expires five minutes +// Gets an Amazon Kinesis shard iterator. A shard iterator expires 5 minutes // after it is returned to the requester. // // A shard iterator specifies the shard position from which to start reading @@ -1413,7 +1617,8 @@ func (c *Kinesis) ListShardsRequest(input *ListShardsInput) (req *request.Reques // ListShards API operation for Amazon Kinesis. // -// Lists the shards in a stream and provides information about each shard. +// Lists the shards in a stream and provides information about each shard. This +// operation has a limit of 100 transactions per second per data stream. // // This API is a new operation that is used by the Amazon Kinesis Client Library // (KCL). If you have a fine-grained IAM policy that only allows specific operations, @@ -1442,8 +1647,7 @@ func (c *Kinesis) ListShardsRequest(input *ListShardsInput) (req *request.Reques // of concurrent stream requests exceeds the maximum number allowed. // // * ErrCodeExpiredNextTokenException "ExpiredNextTokenException" -// The pagination token passed to the ListShards operation is expired. For more -// information, see ListShardsInput$NextToken. +// The pagination token passed to the operation is expired. // // * ErrCodeResourceInUseException "ResourceInUseException" // The resource is not available for this operation. For successful operation, @@ -1471,6 +1675,160 @@ func (c *Kinesis) ListShardsWithContext(ctx aws.Context, input *ListShardsInput, return out, req.Send() } +const opListStreamConsumers = "ListStreamConsumers" + +// ListStreamConsumersRequest generates a "aws/request.Request" representing the +// client's request for the ListStreamConsumers operation. The "output" return +// value will be populated with the request's response once the request completes +// successfuly. +// +// Use "Send" method on the returned Request to send the API call to the service. +// the "output" return value is not valid until after Send returns without error. +// +// See ListStreamConsumers for more information on using the ListStreamConsumers +// API call, and error handling. +// +// This method is useful when you want to inject custom logic or configuration +// into the SDK's request lifecycle. Such as custom headers, or retry logic. +// +// +// // Example sending a request using the ListStreamConsumersRequest method. +// req, resp := client.ListStreamConsumersRequest(params) +// +// err := req.Send() +// if err == nil { // resp is now filled +// fmt.Println(resp) +// } +// +// See also, https://docs.aws.amazon.com/goto/WebAPI/kinesis-2013-12-02/ListStreamConsumers +func (c *Kinesis) ListStreamConsumersRequest(input *ListStreamConsumersInput) (req *request.Request, output *ListStreamConsumersOutput) { + op := &request.Operation{ + Name: opListStreamConsumers, + HTTPMethod: "POST", + HTTPPath: "/", + Paginator: &request.Paginator{ + InputTokens: []string{"NextToken"}, + OutputTokens: []string{"NextToken"}, + LimitToken: "MaxResults", + TruncationToken: "", + }, + } + + if input == nil { + input = &ListStreamConsumersInput{} + } + + output = &ListStreamConsumersOutput{} + req = c.newRequest(op, input, output) + return +} + +// ListStreamConsumers API operation for Amazon Kinesis. +// +// Lists the consumers registered to receive data from a stream using enhanced +// fan-out, and provides information about each consumer. +// +// This operation has a limit of 10 transactions per second per account. +// +// Returns awserr.Error for service API and SDK errors. Use runtime type assertions +// with awserr.Error's Code and Message methods to get detailed information about +// the error. +// +// See the AWS API reference guide for Amazon Kinesis's +// API operation ListStreamConsumers for usage and error information. +// +// Returned Error Codes: +// * ErrCodeResourceNotFoundException "ResourceNotFoundException" +// The requested resource could not be found. The stream might not be specified +// correctly. +// +// * ErrCodeInvalidArgumentException "InvalidArgumentException" +// A specified parameter exceeds its restrictions, is not supported, or can't +// be used. For more information, see the returned message. +// +// * ErrCodeLimitExceededException "LimitExceededException" +// The requested resource exceeds the maximum number allowed, or the number +// of concurrent stream requests exceeds the maximum number allowed. +// +// * ErrCodeExpiredNextTokenException "ExpiredNextTokenException" +// The pagination token passed to the operation is expired. +// +// * ErrCodeResourceInUseException "ResourceInUseException" +// The resource is not available for this operation. For successful operation, +// the resource must be in the ACTIVE state. +// +// See also, https://docs.aws.amazon.com/goto/WebAPI/kinesis-2013-12-02/ListStreamConsumers +func (c *Kinesis) ListStreamConsumers(input *ListStreamConsumersInput) (*ListStreamConsumersOutput, error) { + req, out := c.ListStreamConsumersRequest(input) + return out, req.Send() +} + +// ListStreamConsumersWithContext is the same as ListStreamConsumers with the addition of +// the ability to pass a context and additional request options. +// +// See ListStreamConsumers for details on how to use this API operation. +// +// The context must be non-nil and will be used for request cancellation. If +// the context is nil a panic will occur. In the future the SDK may create +// sub-contexts for http.Requests. See https://golang.org/pkg/context/ +// for more information on using Contexts. +func (c *Kinesis) ListStreamConsumersWithContext(ctx aws.Context, input *ListStreamConsumersInput, opts ...request.Option) (*ListStreamConsumersOutput, error) { + req, out := c.ListStreamConsumersRequest(input) + req.SetContext(ctx) + req.ApplyOptions(opts...) + return out, req.Send() +} + +// ListStreamConsumersPages iterates over the pages of a ListStreamConsumers operation, +// calling the "fn" function with the response data for each page. To stop +// iterating, return false from the fn function. +// +// See ListStreamConsumers method for more information on how to use this operation. +// +// Note: This operation can generate multiple requests to a service. +// +// // Example iterating over at most 3 pages of a ListStreamConsumers operation. +// pageNum := 0 +// err := client.ListStreamConsumersPages(params, +// func(page *ListStreamConsumersOutput, lastPage bool) bool { +// pageNum++ +// fmt.Println(page) +// return pageNum <= 3 +// }) +// +func (c *Kinesis) ListStreamConsumersPages(input *ListStreamConsumersInput, fn func(*ListStreamConsumersOutput, bool) bool) error { + return c.ListStreamConsumersPagesWithContext(aws.BackgroundContext(), input, fn) +} + +// ListStreamConsumersPagesWithContext same as ListStreamConsumersPages except +// it takes a Context and allows setting request options on the pages. +// +// The context must be non-nil and will be used for request cancellation. If +// the context is nil a panic will occur. In the future the SDK may create +// sub-contexts for http.Requests. See https://golang.org/pkg/context/ +// for more information on using Contexts. +func (c *Kinesis) ListStreamConsumersPagesWithContext(ctx aws.Context, input *ListStreamConsumersInput, fn func(*ListStreamConsumersOutput, bool) bool, opts ...request.Option) error { + p := request.Pagination{ + NewRequest: func() (*request.Request, error) { + var inCpy *ListStreamConsumersInput + if input != nil { + tmp := *input + inCpy = &tmp + } + req, _ := c.ListStreamConsumersRequest(inCpy) + req.SetContext(ctx) + req.ApplyOptions(opts...) + return req, nil + }, + } + + cont := true + for p.Next() && cont { + cont = fn(p.Page().(*ListStreamConsumersOutput), !p.HasNextPage()) + } + return p.Err() +} + const opListStreams = "ListStreams" // ListStreamsRequest generates a "aws/request.Request" representing the @@ -2172,6 +2530,106 @@ func (c *Kinesis) PutRecordsWithContext(ctx aws.Context, input *PutRecordsInput, return out, req.Send() } +const opRegisterStreamConsumer = "RegisterStreamConsumer" + +// RegisterStreamConsumerRequest generates a "aws/request.Request" representing the +// client's request for the RegisterStreamConsumer operation. The "output" return +// value will be populated with the request's response once the request completes +// successfuly. +// +// Use "Send" method on the returned Request to send the API call to the service. +// the "output" return value is not valid until after Send returns without error. +// +// See RegisterStreamConsumer for more information on using the RegisterStreamConsumer +// API call, and error handling. +// +// This method is useful when you want to inject custom logic or configuration +// into the SDK's request lifecycle. Such as custom headers, or retry logic. +// +// +// // Example sending a request using the RegisterStreamConsumerRequest method. +// req, resp := client.RegisterStreamConsumerRequest(params) +// +// err := req.Send() +// if err == nil { // resp is now filled +// fmt.Println(resp) +// } +// +// See also, https://docs.aws.amazon.com/goto/WebAPI/kinesis-2013-12-02/RegisterStreamConsumer +func (c *Kinesis) RegisterStreamConsumerRequest(input *RegisterStreamConsumerInput) (req *request.Request, output *RegisterStreamConsumerOutput) { + op := &request.Operation{ + Name: opRegisterStreamConsumer, + HTTPMethod: "POST", + HTTPPath: "/", + } + + if input == nil { + input = &RegisterStreamConsumerInput{} + } + + output = &RegisterStreamConsumerOutput{} + req = c.newRequest(op, input, output) + return +} + +// RegisterStreamConsumer API operation for Amazon Kinesis. +// +// Registers a consumer with a Kinesis data stream. When you use this operation, +// the consumer you register can read data from the stream at a rate of up to +// 2 MiB per second. This rate is unaffected by the total number of consumers +// that read from the same stream. +// +// You can register up to 5 consumers per stream. A given consumer can only +// be registered with one stream. +// +// This operation has a limit of five transactions per second per account. +// +// Returns awserr.Error for service API and SDK errors. Use runtime type assertions +// with awserr.Error's Code and Message methods to get detailed information about +// the error. +// +// See the AWS API reference guide for Amazon Kinesis's +// API operation RegisterStreamConsumer for usage and error information. +// +// Returned Error Codes: +// * ErrCodeInvalidArgumentException "InvalidArgumentException" +// A specified parameter exceeds its restrictions, is not supported, or can't +// be used. For more information, see the returned message. +// +// * ErrCodeLimitExceededException "LimitExceededException" +// The requested resource exceeds the maximum number allowed, or the number +// of concurrent stream requests exceeds the maximum number allowed. +// +// * ErrCodeResourceInUseException "ResourceInUseException" +// The resource is not available for this operation. For successful operation, +// the resource must be in the ACTIVE state. +// +// * ErrCodeResourceNotFoundException "ResourceNotFoundException" +// The requested resource could not be found. The stream might not be specified +// correctly. +// +// See also, https://docs.aws.amazon.com/goto/WebAPI/kinesis-2013-12-02/RegisterStreamConsumer +func (c *Kinesis) RegisterStreamConsumer(input *RegisterStreamConsumerInput) (*RegisterStreamConsumerOutput, error) { + req, out := c.RegisterStreamConsumerRequest(input) + return out, req.Send() +} + +// RegisterStreamConsumerWithContext is the same as RegisterStreamConsumer with the addition of +// the ability to pass a context and additional request options. +// +// See RegisterStreamConsumer for details on how to use this API operation. +// +// The context must be non-nil and will be used for request cancellation. If +// the context is nil a panic will occur. In the future the SDK may create +// sub-contexts for http.Requests. See https://golang.org/pkg/context/ +// for more information on using Contexts. +func (c *Kinesis) RegisterStreamConsumerWithContext(ctx aws.Context, input *RegisterStreamConsumerInput, opts ...request.Option) (*RegisterStreamConsumerOutput, error) { + req, out := c.RegisterStreamConsumerRequest(input) + req.SetContext(ctx) + req.ApplyOptions(opts...) + return out, req.Send() +} + const opRemoveTagsFromStream = "RemoveTagsFromStream" // RemoveTagsFromStreamRequest generates a "aws/request.Request" representing the @@ -2354,7 +2812,8 @@ func (c *Kinesis) SplitShardRequest(input *SplitShardInput) (req *request.Reques // If you try to create more shards than are authorized for your account, you // receive a LimitExceededException. // -// For the default shard limit for an AWS account, see Streams Limits (http://docs.aws.amazon.com/kinesis/latest/dev/service-sizes-and-limits.html) +// For the default shard limit for an AWS account, see Kinesis Data Streams +// Limits (http://docs.aws.amazon.com/kinesis/latest/dev/service-sizes-and-limits.html) // in the Amazon Kinesis Data Streams Developer Guide. To increase this limit, // contact AWS Support (http://docs.aws.amazon.com/general/latest/gr/aws_service_limits.html). // @@ -2470,7 +2929,7 @@ func (c *Kinesis) StartStreamEncryptionRequest(input *StartStreamEncryptionInput // API Limits: You can successfully apply a new AWS KMS key for server-side // encryption 25 times in a rolling 24-hour period. // -// Note: It can take up to five seconds after the stream is in an ACTIVE status +// Note: It can take up to 5 seconds after the stream is in an ACTIVE status // before all records written to the stream are encrypted. After you enable // encryption, you can verify that encryption is applied by inspecting the API // response from PutRecord or PutRecords. @@ -2607,7 +3066,7 @@ func (c *Kinesis) StopStreamEncryptionRequest(input *StopStreamEncryptionInput) // API Limits: You can successfully disable server-side encryption 25 times // in a rolling 24-hour period. // -// Note: It can take up to five seconds after the stream is in an ACTIVE status +// Note: It can take up to 5 seconds after the stream is in an ACTIVE status // before all records written to the stream are no longer subject to encryption. // After you disabled encryption, you can verify that encryption is not applied // by inspecting the API response from PutRecord or PutRecords. @@ -2717,7 +3176,8 @@ func (c *Kinesis) UpdateShardCountRequest(input *UpdateShardCountInput) (req *re // addition to the final shards. We recommend that you double or halve the shard // count, as this results in the fewest number of splits or merges. // -// This operation has the following limits. You cannot do the following: +// This operation has the following default limits. By default, you cannot do +// the following: // // * Scale more than twice per rolling 24-hour period per stream // @@ -2792,7 +3252,7 @@ type AddTagsToStreamInput struct { // StreamName is a required field StreamName *string `min:"1" type:"string" required:"true"` - // The set of key-value pairs to use to create the tags. + // A set of up to 10 key-value pairs to use to create the tags. // // Tags is a required field Tags map[string]*string `min:"1" type:"map" required:"true"` @@ -2856,6 +3316,143 @@ func (s AddTagsToStreamOutput) GoString() string { return s.String() } +// An object that represents the details of the consumer you registered. +type Consumer struct { + _ struct{} `type:"structure"` + + // When you register a consumer, Kinesis Data Streams generates an ARN for it. + // You need this ARN to be able to call SubscribeToShard. + // + // If you delete a consumer and then create a new one with the same name, it + // won't have the same ARN. That's because consumer ARNs contain the creation + // timestamp. This is important to keep in mind if you have IAM policies that + // reference consumer ARNs. + // + // ConsumerARN is a required field + ConsumerARN *string `min:"1" type:"string" required:"true"` + + // ConsumerCreationTimestamp is a required field + ConsumerCreationTimestamp *time.Time `type:"timestamp" required:"true"` + + // The name of the consumer is something you choose when you register the consumer. + // + // ConsumerName is a required field + ConsumerName *string `min:"1" type:"string" required:"true"` + + // A consumer can't read data while in the CREATING or DELETING states. + // + // ConsumerStatus is a required field + ConsumerStatus *string `type:"string" required:"true" enum:"ConsumerStatus"` +} + +// String returns the string representation +func (s Consumer) String() string { + return awsutil.Prettify(s) +} + +// GoString returns the string representation +func (s Consumer) GoString() string { + return s.String() +} + +// SetConsumerARN sets the ConsumerARN field's value. +func (s *Consumer) SetConsumerARN(v string) *Consumer { + s.ConsumerARN = &v + return s +} + +// SetConsumerCreationTimestamp sets the ConsumerCreationTimestamp field's value. +func (s *Consumer) SetConsumerCreationTimestamp(v time.Time) *Consumer { + s.ConsumerCreationTimestamp = &v + return s +} + +// SetConsumerName sets the ConsumerName field's value. +func (s *Consumer) SetConsumerName(v string) *Consumer { + s.ConsumerName = &v + return s +} + +// SetConsumerStatus sets the ConsumerStatus field's value. +func (s *Consumer) SetConsumerStatus(v string) *Consumer { + s.ConsumerStatus = &v + return s +} + +// An object that represents the details of a registered consumer. +type ConsumerDescription struct { + _ struct{} `type:"structure"` + + // When you register a consumer, Kinesis Data Streams generates an ARN for it. + // You need this ARN to be able to call SubscribeToShard. + // + // If you delete a consumer and then create a new one with the same name, it + // won't have the same ARN. That's because consumer ARNs contain the creation + // timestamp. This is important to keep in mind if you have IAM policies that + // reference consumer ARNs. + // + // ConsumerARN is a required field + ConsumerARN *string `min:"1" type:"string" required:"true"` + + // ConsumerCreationTimestamp is a required field + ConsumerCreationTimestamp *time.Time `type:"timestamp" required:"true"` + + // The name of the consumer is something you choose when you register the consumer. + // + // ConsumerName is a required field + ConsumerName *string `min:"1" type:"string" required:"true"` + + // A consumer can't read data while in the CREATING or DELETING states. + // + // ConsumerStatus is a required field + ConsumerStatus *string `type:"string" required:"true" enum:"ConsumerStatus"` + + // The ARN of the stream with which you registered the consumer. + // + // StreamARN is a required field + StreamARN *string `min:"1" type:"string" required:"true"` +} + +// String returns the string representation +func (s ConsumerDescription) String() string { + return awsutil.Prettify(s) +} + +// GoString returns the string representation +func (s ConsumerDescription) GoString() string { + return s.String() +} + +// SetConsumerARN sets the ConsumerARN field's value. +func (s *ConsumerDescription) SetConsumerARN(v string) *ConsumerDescription { + s.ConsumerARN = &v + return s +} + +// SetConsumerCreationTimestamp sets the ConsumerCreationTimestamp field's value. +func (s *ConsumerDescription) SetConsumerCreationTimestamp(v time.Time) *ConsumerDescription { + s.ConsumerCreationTimestamp = &v + return s +} + +// SetConsumerName sets the ConsumerName field's value. +func (s *ConsumerDescription) SetConsumerName(v string) *ConsumerDescription { + s.ConsumerName = &v + return s +} + +// SetConsumerStatus sets the ConsumerStatus field's value. +func (s *ConsumerDescription) SetConsumerStatus(v string) *ConsumerDescription { + s.ConsumerStatus = &v + return s +} + +// SetStreamARN sets the StreamARN field's value. +func (s *ConsumerDescription) SetStreamARN(v string) *ConsumerDescription { + s.StreamARN = &v + return s +} + // Represents the input for CreateStream. type CreateStreamInput struct { _ struct{} `type:"structure"` @@ -3015,6 +3612,10 @@ func (s DecreaseStreamRetentionPeriodOutput) GoString() string { type DeleteStreamInput struct { _ struct{} `type:"structure"` + // If this parameter is unset (null) or if you set it to false, and the stream + // has registered consumers, the call to DeleteStream fails with a ResourceInUseException. + EnforceConsumerDeletion *bool `type:"boolean"` + // The name of the stream to delete. // // StreamName is a required field @@ -3047,6 +3648,12 @@ func (s *DeleteStreamInput) Validate() error { return nil } +// SetEnforceConsumerDeletion sets the EnforceConsumerDeletion field's value. +func (s *DeleteStreamInput) SetEnforceConsumerDeletion(v bool) *DeleteStreamInput { + s.EnforceConsumerDeletion = &v + return s +} + // SetStreamName sets the StreamName field's value. func (s *DeleteStreamInput) SetStreamName(v string) *DeleteStreamInput { s.StreamName = &v @@ -3067,6 +3674,86 @@ func (s DeleteStreamOutput) GoString() string { return s.String() } +type DeregisterStreamConsumerInput struct { + _ struct{} `type:"structure"` + + // The ARN returned by Kinesis Data Streams when you registered the consumer. + // If you don't know the ARN of the consumer that you want to deregister, you + // can use the ListStreamConsumers operation to get a list of the descriptions + // of all the consumers that are currently registered with a given data stream. + // The description of a consumer contains its ARN. + ConsumerARN *string `min:"1" type:"string"` + + // The name that you gave to the consumer. + ConsumerName *string `min:"1" type:"string"` + + // The ARN of the Kinesis data stream that the consumer is registered with. + // For more information, see Amazon Resource Names (ARNs) and AWS Service Namespaces + // (https://docs.aws.amazon.com/general/latest/gr/aws-arns-and-namespaces.html#arn-syntax-kinesis-streams). + StreamARN *string `min:"1" type:"string"` +} + +// String returns the string representation +func (s DeregisterStreamConsumerInput) String() string { + return awsutil.Prettify(s) +} + +// GoString returns the string representation +func (s DeregisterStreamConsumerInput) GoString() string { + return s.String() +} + +// Validate inspects the fields of the type to determine if they are valid. +func (s *DeregisterStreamConsumerInput) Validate() error { + invalidParams := request.ErrInvalidParams{Context: "DeregisterStreamConsumerInput"} + if s.ConsumerARN != nil && len(*s.ConsumerARN) < 1 { + invalidParams.Add(request.NewErrParamMinLen("ConsumerARN", 1)) + } + if s.ConsumerName != nil && len(*s.ConsumerName) < 1 { + invalidParams.Add(request.NewErrParamMinLen("ConsumerName", 1)) + } + if s.StreamARN != nil && len(*s.StreamARN) < 1 { + invalidParams.Add(request.NewErrParamMinLen("StreamARN", 1)) + } + + if invalidParams.Len() > 0 { + return invalidParams + } + return nil +} + +// SetConsumerARN sets the ConsumerARN field's value. +func (s *DeregisterStreamConsumerInput) SetConsumerARN(v string) *DeregisterStreamConsumerInput { + s.ConsumerARN = &v + return s +} + +// SetConsumerName sets the ConsumerName field's value. +func (s *DeregisterStreamConsumerInput) SetConsumerName(v string) *DeregisterStreamConsumerInput { + s.ConsumerName = &v + return s +} + +// SetStreamARN sets the StreamARN field's value. +func (s *DeregisterStreamConsumerInput) SetStreamARN(v string) *DeregisterStreamConsumerInput { + s.StreamARN = &v + return s +} + +type DeregisterStreamConsumerOutput struct { + _ struct{} `type:"structure"` +} + +// String returns the string representation +func (s DeregisterStreamConsumerOutput) String() string { + return awsutil.Prettify(s) +} + +// GoString returns the string representation +func (s DeregisterStreamConsumerOutput) GoString() string { + return s.String() +} + type DescribeLimitsInput struct { _ struct{} `type:"structure"` } @@ -3117,6 +3804,93 @@ func (s *DescribeLimitsOutput) SetShardLimit(v int64) *DescribeLimitsOutput { return s } +type DescribeStreamConsumerInput struct { + _ struct{} `type:"structure"` + + // The ARN returned by Kinesis Data Streams when you registered the consumer. + ConsumerARN *string `min:"1" type:"string"` + + // The name that you gave to the consumer. + ConsumerName *string `min:"1" type:"string"` + + // The ARN of the Kinesis data stream that the consumer is registered with. + // For more information, see Amazon Resource Names (ARNs) and AWS Service Namespaces + // (https://docs.aws.amazon.com/general/latest/gr/aws-arns-and-namespaces.html#arn-syntax-kinesis-streams). + StreamARN *string `min:"1" type:"string"` +} + +// String returns the string representation +func (s DescribeStreamConsumerInput) String() string { + return awsutil.Prettify(s) +} + +// GoString returns the string representation +func (s DescribeStreamConsumerInput) GoString() string { + return s.String() +} + +// Validate inspects the fields of the type to determine if they are valid. +func (s *DescribeStreamConsumerInput) Validate() error { + invalidParams := request.ErrInvalidParams{Context: "DescribeStreamConsumerInput"} + if s.ConsumerARN != nil && len(*s.ConsumerARN) < 1 { + invalidParams.Add(request.NewErrParamMinLen("ConsumerARN", 1)) + } + if s.ConsumerName != nil && len(*s.ConsumerName) < 1 { + invalidParams.Add(request.NewErrParamMinLen("ConsumerName", 1)) + } + if s.StreamARN != nil && len(*s.StreamARN) < 1 { + invalidParams.Add(request.NewErrParamMinLen("StreamARN", 1)) + } + + if invalidParams.Len() > 0 { + return invalidParams + } + return nil +} + +// SetConsumerARN sets the ConsumerARN field's value. +func (s *DescribeStreamConsumerInput) SetConsumerARN(v string) *DescribeStreamConsumerInput { + s.ConsumerARN = &v + return s +} + +// SetConsumerName sets the ConsumerName field's value. +func (s *DescribeStreamConsumerInput) SetConsumerName(v string) *DescribeStreamConsumerInput { + s.ConsumerName = &v + return s +} + +// SetStreamARN sets the StreamARN field's value. +func (s *DescribeStreamConsumerInput) SetStreamARN(v string) *DescribeStreamConsumerInput { + s.StreamARN = &v + return s +} + +type DescribeStreamConsumerOutput struct { + _ struct{} `type:"structure"` + + // An object that represents the details of the consumer. + // + // ConsumerDescription is a required field + ConsumerDescription *ConsumerDescription `type:"structure" required:"true"` +} + +// String returns the string representation +func (s DescribeStreamConsumerOutput) String() string { + return awsutil.Prettify(s) +} + +// GoString returns the string representation +func (s DescribeStreamConsumerOutput) GoString() string { + return s.String() +} + +// SetConsumerDescription sets the ConsumerDescription field's value. +func (s *DescribeStreamConsumerOutput) SetConsumerDescription(v *ConsumerDescription) *DescribeStreamConsumerOutput { + s.ConsumerDescription = v + return s +} + // Represents the input for DescribeStream. type DescribeStreamInput struct { _ struct{} `type:"structure"` @@ -3896,7 +4670,8 @@ func (s IncreaseStreamRetentionPeriodOutput) GoString() string { type ListShardsInput struct { _ struct{} `type:"structure"` - // The ID of the shard to start the list with. + // Specify this parameter to indicate that you want to list the shards starting + // with the shard whose ID immediately follows ExclusiveStartShardId. // // If you don't specify this parameter, the default behavior is for ListShards // to list the shards starting with the first one in the stream. @@ -4056,6 +4831,153 @@ func (s *ListShardsOutput) SetShards(v []*Shard) *ListShardsOutput { return s } +type ListStreamConsumersInput struct { + _ struct{} `type:"structure"` + + // The maximum number of consumers that you want a single call of ListStreamConsumers + // to return. + MaxResults *int64 `min:"1" type:"integer"` + + // When the number of consumers that are registered with the data stream is + // greater than the default value for the MaxResults parameter, or if you explicitly + // specify a value for MaxResults that is less than the number of consumers + // that are registered with the data stream, the response includes a pagination + // token named NextToken. You can specify this NextToken value in a subsequent + // call to ListStreamConsumers to list the next set of registered consumers. + // + // Don't specify StreamName or StreamCreationTimestamp if you specify NextToken + // because the latter unambiguously identifies the stream. + // + // You can optionally specify a value for the MaxResults parameter when you + // specify NextToken. If you specify a MaxResults value that is less than the + // number of consumers that the operation returns if you don't specify MaxResults, + // the response will contain a new NextToken value. You can use the new NextToken + // value in a subsequent call to the ListStreamConsumers operation to list the + // next set of consumers. + // + // Tokens expire after 300 seconds. When you obtain a value for NextToken in + // the response to a call to ListStreamConsumers, you have 300 seconds to use + // that value. If you specify an expired token in a call to ListStreamConsumers, + // you get ExpiredNextTokenException. + NextToken *string `min:"1" type:"string"` + + // The ARN of the Kinesis data stream for which you want to list the registered + // consumers. For more information, see Amazon Resource Names (ARNs) and AWS + // Service Namespaces (https://docs.aws.amazon.com/general/latest/gr/aws-arns-and-namespaces.html#arn-syntax-kinesis-streams). + // + // StreamARN is a required field + StreamARN *string `min:"1" type:"string" required:"true"` + + // Specify this input parameter to distinguish data streams that have the same + // name. For example, if you create a data stream and then delete it, and you + // later create another data stream with the same name, you can use this input + // parameter to specify which of the two streams you want to list the consumers + // for. + // + // You can't specify this parameter if you specify the NextToken parameter. + StreamCreationTimestamp *time.Time `type:"timestamp"` +} + +// String returns the string representation +func (s ListStreamConsumersInput) String() string { + return awsutil.Prettify(s) +} + +// GoString returns the string representation +func (s ListStreamConsumersInput) GoString() string { + return s.String() +} + +// Validate inspects the fields of the type to determine if they are valid. +func (s *ListStreamConsumersInput) Validate() error { + invalidParams := request.ErrInvalidParams{Context: "ListStreamConsumersInput"} + if s.MaxResults != nil && *s.MaxResults < 1 { + invalidParams.Add(request.NewErrParamMinValue("MaxResults", 1)) + } + if s.NextToken != nil && len(*s.NextToken) < 1 { + invalidParams.Add(request.NewErrParamMinLen("NextToken", 1)) + } + if s.StreamARN == nil { + invalidParams.Add(request.NewErrParamRequired("StreamARN")) + } + if s.StreamARN != nil && len(*s.StreamARN) < 1 { + invalidParams.Add(request.NewErrParamMinLen("StreamARN", 1)) + } + + if invalidParams.Len() > 0 { + return invalidParams + } + return nil +} + +// SetMaxResults sets the MaxResults field's value. +func (s *ListStreamConsumersInput) SetMaxResults(v int64) *ListStreamConsumersInput { + s.MaxResults = &v + return s +} + +// SetNextToken sets the NextToken field's value. +func (s *ListStreamConsumersInput) SetNextToken(v string) *ListStreamConsumersInput { + s.NextToken = &v + return s +} + +// SetStreamARN sets the StreamARN field's value. +func (s *ListStreamConsumersInput) SetStreamARN(v string) *ListStreamConsumersInput { + s.StreamARN = &v + return s +} + +// SetStreamCreationTimestamp sets the StreamCreationTimestamp field's value. +func (s *ListStreamConsumersInput) SetStreamCreationTimestamp(v time.Time) *ListStreamConsumersInput { + s.StreamCreationTimestamp = &v + return s +} + +type ListStreamConsumersOutput struct { + _ struct{} `type:"structure"` + + // An array of JSON objects. Each object represents one registered consumer. + Consumers []*Consumer `type:"list"` + + // When the number of consumers that are registered with the data stream is + // greater than the default value for the MaxResults parameter, or if you explicitly + // specify a value for MaxResults that is less than the number of registered + // consumers, the response includes a pagination token named NextToken. You + // can specify this NextToken value in a subsequent call to ListStreamConsumers + // to list the next set of registered consumers. For more information about + // the use of this pagination token when calling the ListStreamConsumers operation, + // see ListStreamConsumersInput$NextToken. + // + // Tokens expire after 300 seconds. When you obtain a value for NextToken in + // the response to a call to ListStreamConsumers, you have 300 seconds to use + // that value. If you specify an expired token in a call to ListStreamConsumers, + // you get ExpiredNextTokenException. + NextToken *string `min:"1" type:"string"` +} + +// String returns the string representation +func (s ListStreamConsumersOutput) String() string { + return awsutil.Prettify(s) +} + +// GoString returns the string representation +func (s ListStreamConsumersOutput) GoString() string { + return s.String() +} + +// SetConsumers sets the Consumers field's value. +func (s *ListStreamConsumersOutput) SetConsumers(v []*Consumer) *ListStreamConsumersOutput { + s.Consumers = v + return s +} + +// SetNextToken sets the NextToken field's value. +func (s *ListStreamConsumersOutput) SetNextToken(v string) *ListStreamConsumersOutput { + s.NextToken = &v + return s +} + // Represents the input for ListStreams. type ListStreamsInput struct { _ struct{} `type:"structure"` @@ -4842,6 +5764,94 @@ func (s *Record) SetSequenceNumber(v string) *Record { return s } +type RegisterStreamConsumerInput struct { + _ struct{} `type:"structure"` + + // For a given Kinesis data stream, each consumer must have a unique name. However, + // consumer names don't have to be unique across data streams. + // + // ConsumerName is a required field + ConsumerName *string `min:"1" type:"string" required:"true"` + + // The ARN of the Kinesis data stream that you want to register the consumer + // with. For more info, see Amazon Resource Names (ARNs) and AWS Service Namespaces + // (https://docs.aws.amazon.com/general/latest/gr/aws-arns-and-namespaces.html#arn-syntax-kinesis-streams). + // + // StreamARN is a required field + StreamARN *string `min:"1" type:"string" required:"true"` +} + +// String returns the string representation +func (s RegisterStreamConsumerInput) String() string { + return awsutil.Prettify(s) +} + +// GoString returns the string representation +func (s RegisterStreamConsumerInput) GoString() string { + return s.String() +} + +// Validate inspects the fields of the type to determine if they are valid. +func (s *RegisterStreamConsumerInput) Validate() error { + invalidParams := request.ErrInvalidParams{Context: "RegisterStreamConsumerInput"} + if s.ConsumerName == nil { + invalidParams.Add(request.NewErrParamRequired("ConsumerName")) + } + if s.ConsumerName != nil && len(*s.ConsumerName) < 1 { + invalidParams.Add(request.NewErrParamMinLen("ConsumerName", 1)) + } + if s.StreamARN == nil { + invalidParams.Add(request.NewErrParamRequired("StreamARN")) + } + if s.StreamARN != nil && len(*s.StreamARN) < 1 { + invalidParams.Add(request.NewErrParamMinLen("StreamARN", 1)) + } + + if invalidParams.Len() > 0 { + return invalidParams + } + return nil +} + +// SetConsumerName sets the ConsumerName field's value. +func (s *RegisterStreamConsumerInput) SetConsumerName(v string) *RegisterStreamConsumerInput { + s.ConsumerName = &v + return s +} + +// SetStreamARN sets the StreamARN field's value. +func (s *RegisterStreamConsumerInput) SetStreamARN(v string) *RegisterStreamConsumerInput { + s.StreamARN = &v + return s +} + +type RegisterStreamConsumerOutput struct { + _ struct{} `type:"structure"` + + // An object that represents the details of the consumer you registered. When + // you register a consumer, it gets an ARN that is generated by Kinesis Data + // Streams. + // + // Consumer is a required field + Consumer *Consumer `type:"structure" required:"true"` +} + +// String returns the string representation +func (s RegisterStreamConsumerOutput) String() string { + return awsutil.Prettify(s) +} + +// GoString returns the string representation +func (s RegisterStreamConsumerOutput) GoString() string { + return s.String() +} + +// SetConsumer sets the Consumer field's value. +func (s *RegisterStreamConsumerOutput) SetConsumer(v *Consumer) *RegisterStreamConsumerOutput { + s.Consumer = v + return s +} + // Represents the input for RemoveTagsFromStream. type RemoveTagsFromStreamInput struct { _ struct{} `type:"structure"` @@ -5363,7 +6373,7 @@ type StreamDescription struct { // The Amazon Resource Name (ARN) for the stream being described. // // StreamARN is a required field - StreamARN *string `type:"string" required:"true"` + StreamARN *string `min:"1" type:"string" required:"true"` // The approximate time that the stream was created. // @@ -5470,6 +6480,9 @@ func (s *StreamDescription) SetStreamStatus(v string) *StreamDescription { type StreamDescriptionSummary struct { _ struct{} `type:"structure"` + // The number of enhanced fan-out consumers registered with the stream. + ConsumerCount *int64 `type:"integer"` + // The encryption type used. This value is one of the following: // // * KMS @@ -5511,7 +6524,7 @@ type StreamDescriptionSummary struct { // The Amazon Resource Name (ARN) for the stream being described. // // StreamARN is a required field - StreamARN *string `type:"string" required:"true"` + StreamARN *string `min:"1" type:"string" required:"true"` // The approximate time that the stream was created. // @@ -5554,6 +6567,12 @@ func (s StreamDescriptionSummary) GoString() string { return s.String() } +// SetConsumerCount sets the ConsumerCount field's value. +func (s *StreamDescriptionSummary) SetConsumerCount(v int64) *StreamDescriptionSummary { + s.ConsumerCount = &v + return s +} + // SetEncryptionType sets the EncryptionType field's value. func (s *StreamDescriptionSummary) SetEncryptionType(v string) *StreamDescriptionSummary { s.EncryptionType = &v @@ -5759,6 +6778,17 @@ func (s *UpdateShardCountOutput) SetTargetShardCount(v int64) *UpdateShardCountO return s } +const ( + // ConsumerStatusCreating is a ConsumerStatus enum value + ConsumerStatusCreating = "CREATING" + + // ConsumerStatusDeleting is a ConsumerStatus enum value + ConsumerStatusDeleting = "DELETING" + + // ConsumerStatusActive is a ConsumerStatus enum value + ConsumerStatusActive = "ACTIVE" +) + const ( // EncryptionTypeNone is a EncryptionType enum value EncryptionTypeNone = "NONE" diff --git a/vendor/github.com/aws/aws-sdk-go/service/kinesis/errors.go b/vendor/github.com/aws/aws-sdk-go/service/kinesis/errors.go index a567a3d45..8c06c6f8c 100644 --- a/vendor/github.com/aws/aws-sdk-go/service/kinesis/errors.go +++ b/vendor/github.com/aws/aws-sdk-go/service/kinesis/errors.go @@ -13,8 +13,7 @@ const ( // ErrCodeExpiredNextTokenException for service response error code // "ExpiredNextTokenException". // - // The pagination token passed to the ListShards operation is expired. For more - // information, see ListShardsInput$NextToken. + // The pagination token passed to the operation is expired. ErrCodeExpiredNextTokenException = "ExpiredNextTokenException" // ErrCodeInvalidArgumentException for service response error code diff --git a/vendor/github.com/aws/aws-sdk-go/service/kms/api.go b/vendor/github.com/aws/aws-sdk-go/service/kms/api.go index 2c321f04e..98ff52938 100644 --- a/vendor/github.com/aws/aws-sdk-go/service/kms/api.go +++ b/vendor/github.com/aws/aws-sdk-go/service/kms/api.go @@ -66,6 +66,10 @@ func (c *KMS) CancelKeyDeletionRequest(input *CancelKeyDeletionInput) (req *requ // Deleting Customer Master Keys (http://docs.aws.amazon.com/kms/latest/developerguide/deleting-keys.html) // in the AWS Key Management Service Developer Guide. // +// The result of this operation varies with the key state of the CMK. For details, +// see How Key State Affects Use of a Customer Master Key (http://docs.aws.amazon.com/kms/latest/developerguide/key-state.html) +// in the AWS Key Management Service Developer Guide. +// // Returns awserr.Error for service API and SDK errors. Use runtime type assertions // with awserr.Error's Code and Message methods to get detailed information about // the error. @@ -165,8 +169,9 @@ func (c *KMS) CreateAliasRequest(input *CreateAliasInput) (req *request.Request, // CreateAlias API operation for AWS Key Management Service. // -// Creates a display name for a customer master key (CMK). You can use an alias -// to identify a CMK in selected operations, such as Encrypt and GenerateDataKey. +// Creates a display name for a customer-managed customer master key (CMK). +// You can use an alias to identify a CMK in selected operations, such as Encrypt +// and GenerateDataKey. // // Each CMK can have multiple aliases, but each alias points to only one CMK. // The alias name must be unique in the AWS account and region. To simplify @@ -178,10 +183,9 @@ func (c *KMS) CreateAliasRequest(input *CreateAliasInput) (req *request.Request, // the response from the DescribeKey operation. To get the aliases of all CMKs, // use the ListAliases operation. // -// An alias must start with the word alias followed by a forward slash (alias/). // The alias name can contain only alphanumeric characters, forward slashes -// (/), underscores (_), and dashes (-). Alias names cannot begin with aws; -// that alias name prefix is reserved by Amazon Web Services (AWS). +// (/), underscores (_), and dashes (-). Alias names cannot begin with aws/. +// That alias name prefix is reserved for AWS managed CMKs. // // The alias and the CMK it is mapped to must be in the same AWS account and // the same region. You cannot perform this operation on an alias in a different @@ -189,6 +193,10 @@ func (c *KMS) CreateAliasRequest(input *CreateAliasInput) (req *request.Request, // // To map an existing alias to a different CMK, call UpdateAlias. // +// The result of this operation varies with the key state of the CMK. For details, +// see How Key State Affects Use of a Customer Master Key (http://docs.aws.amazon.com/kms/latest/developerguide/key-state.html) +// in the AWS Key Management Service Developer Guide. +// // Returns awserr.Error for service API and SDK errors. Use runtime type assertions // with awserr.Error's Code and Message methods to get detailed information about // the error. @@ -304,6 +312,10 @@ func (c *KMS) CreateGrantRequest(input *CreateGrantInput) (req *request.Request, // see Grants (http://docs.aws.amazon.com/kms/latest/developerguide/grants.html) // in the AWS Key Management Service Developer Guide. // +// The result of this operation varies with the key state of the CMK. For details, +// see How Key State Affects Use of a Customer Master Key (http://docs.aws.amazon.com/kms/latest/developerguide/key-state.html) +// in the AWS Key Management Service Developer Guide. +// // Returns awserr.Error for service API and SDK errors. Use runtime type assertions // with awserr.Error's Code and Message methods to get detailed information about // the error. @@ -414,8 +426,8 @@ func (c *KMS) CreateKeyRequest(input *CreateKeyInput) (req *request.Request, out // // Creates a customer master key (CMK) in the caller's AWS account. // -// You can use a CMK to encrypt small amounts of data (4 KiB or less) directly, -// but CMKs are more commonly used to encrypt data encryption keys (DEKs), which +// You can use a CMK to encrypt small amounts of data (4 KiB or less) directly. +// But CMKs are more commonly used to encrypt data encryption keys (DEKs), which // are used to encrypt raw data. For more information about DEKs and the difference // between CMKs and DEKs, see the following: // @@ -536,14 +548,17 @@ func (c *KMS) DecryptRequest(input *DecryptInput) (req *request.Request, output // // * Encrypt // -// Note that if a caller has been granted access permissions to all keys (through, -// for example, IAM user policies that grant Decrypt permission on all resources), -// then ciphertext encrypted by using keys in other accounts where the key grants -// access to the caller can be decrypted. To remedy this, we recommend that -// you do not grant Decrypt access in an IAM user policy. Instead grant Decrypt -// access only in key policies. If you must grant Decrypt access in an IAM user -// policy, you should scope the resource to specific keys or to specific trusted -// accounts. +// Whenever possible, use key policies to give users permission to call the +// Decrypt operation on the CMK, instead of IAM policies. Otherwise, you might +// create an IAM user policy that gives the user Decrypt permission on all CMKs. +// This user could decrypt ciphertext that was encrypted by CMKs in other accounts +// if the key policy for the cross-account CMK permits it. If you must use an +// IAM policy for Decrypt permissions, limit the user to particular CMKs or +// particular trusted accounts. +// +// The result of this operation varies with the key state of the CMK. For details, +// see How Key State Affects Use of a Customer Master Key (http://docs.aws.amazon.com/kms/latest/developerguide/key-state.html) +// in the AWS Key Management Service Developer Guide. // // Returns awserr.Error for service API and SDK errors. Use runtime type assertions // with awserr.Error's Code and Message methods to get detailed information about @@ -776,6 +791,10 @@ func (c *KMS) DeleteImportedKeyMaterialRequest(input *DeleteImportedKeyMaterialI // After you delete key material, you can use ImportKeyMaterial to reimport // the same key material into the CMK. // +// The result of this operation varies with the key state of the CMK. For details, +// see How Key State Affects Use of a Customer Master Key (http://docs.aws.amazon.com/kms/latest/developerguide/key-state.html) +// in the AWS Key Management Service Developer Guide. +// // Returns awserr.Error for service API and SDK errors. Use runtime type assertions // with awserr.Error's Code and Message methods to get detailed information about // the error. @@ -879,6 +898,11 @@ func (c *KMS) DescribeKeyRequest(input *DescribeKeyInput) (req *request.Request, // // Provides detailed information about the specified customer master key (CMK). // +// You can use DescribeKey on a predefined AWS alias, that is, an AWS alias +// with no key ID. When you do, AWS KMS associates the alias with an AWS managed +// CMK (http://docs.aws.amazon.com/kms/latest/developerguide/concepts.html#master_keys) +// and returns its KeyId and Arn in the response. +// // To perform this operation on a CMK in a different AWS account, specify the // key ARN or alias ARN in the value of the KeyId parameter. // @@ -981,6 +1005,10 @@ func (c *KMS) DisableKeyRequest(input *DisableKeyInput) (req *request.Request, o // Key State Affects the Use of a Customer Master Key (http://docs.aws.amazon.com/kms/latest/developerguide/key-state.html) // in the AWS Key Management Service Developer Guide. // +// The result of this operation varies with the key state of the CMK. For details, +// see How Key State Affects Use of a Customer Master Key (http://docs.aws.amazon.com/kms/latest/developerguide/key-state.html) +// in the AWS Key Management Service Developer Guide. +// // Returns awserr.Error for service API and SDK errors. Use runtime type assertions // with awserr.Error's Code and Message methods to get detailed information about // the error. @@ -1080,9 +1108,13 @@ func (c *KMS) DisableKeyRotationRequest(input *DisableKeyRotationInput) (req *re // DisableKeyRotation API operation for AWS Key Management Service. // -// Disables automatic rotation of the key material for the specified customer -// master key (CMK). You cannot perform this operation on a CMK in a different -// AWS account. +// Disables automatic rotation of the key material (http://docs.aws.amazon.com/kms/latest/developerguide/rotate-keys.html) +// for the specified customer master key (CMK). You cannot perform this operation +// on a CMK in a different AWS account. +// +// The result of this operation varies with the key state of the CMK. For details, +// see How Key State Affects Use of a Customer Master Key (http://docs.aws.amazon.com/kms/latest/developerguide/key-state.html) +// in the AWS Key Management Service Developer Guide. // // Returns awserr.Error for service API and SDK errors. Use runtime type assertions // with awserr.Error's Code and Message methods to get detailed information about @@ -1194,6 +1226,10 @@ func (c *KMS) EnableKeyRequest(input *EnableKeyInput) (req *request.Request, out // its use for cryptographic operations. You cannot perform this operation on // a CMK in a different AWS account. // +// The result of this operation varies with the key state of the CMK. For details, +// see How Key State Affects Use of a Customer Master Key (http://docs.aws.amazon.com/kms/latest/developerguide/key-state.html) +// in the AWS Key Management Service Developer Guide. +// // Returns awserr.Error for service API and SDK errors. Use runtime type assertions // with awserr.Error's Code and Message methods to get detailed information about // the error. @@ -1298,9 +1334,13 @@ func (c *KMS) EnableKeyRotationRequest(input *EnableKeyRotationInput) (req *requ // EnableKeyRotation API operation for AWS Key Management Service. // -// Enables automatic rotation of the key material for the specified customer -// master key (CMK). You cannot perform this operation on a CMK in a different -// AWS account. +// Enables automatic rotation of the key material (http://docs.aws.amazon.com/kms/latest/developerguide/rotate-keys.html) +// for the specified customer master key (CMK). You cannot perform this operation +// on a CMK in a different AWS account. +// +// The result of this operation varies with the key state of the CMK. For details, +// see How Key State Affects Use of a Customer Master Key (http://docs.aws.amazon.com/kms/latest/developerguide/key-state.html) +// in the AWS Key Management Service Developer Guide. // // Returns awserr.Error for service API and SDK errors. Use runtime type assertions // with awserr.Error's Code and Message methods to get detailed information about @@ -1412,24 +1452,28 @@ func (c *KMS) EncryptRequest(input *EncryptInput) (req *request.Request, output // * You can encrypt up to 4 kilobytes (4096 bytes) of arbitrary data such // as an RSA key, a database password, or other sensitive information. // -// * To move encrypted data from one AWS region to another, you can use this -// operation to encrypt in the new region the plaintext data key that was -// used to encrypt the data in the original region. This provides you with -// an encrypted copy of the data key that can be decrypted in the new region -// and used there to decrypt the encrypted data. +// * You can use the Encrypt operation to move encrypted data from one AWS +// region to another. In the first region, generate a data key and use the +// plaintext key to encrypt the data. Then, in the new region, call the Encrypt +// method on same plaintext data key. Now, you can safely move the encrypted +// data and encrypted data key to the new region, and decrypt in the new +// region when necessary. +// +// You don't need use this operation to encrypt a data key within a region. +// The GenerateDataKey and GenerateDataKeyWithoutPlaintext operations return +// an encrypted data key. +// +// Also, you don't need to use this operation to encrypt data in your application. +// You can use the plaintext and encrypted data keys that the GenerateDataKey +// operation returns. +// +// The result of this operation varies with the key state of the CMK. For details, +// see How Key State Affects Use of a Customer Master Key (http://docs.aws.amazon.com/kms/latest/developerguide/key-state.html) +// in the AWS Key Management Service Developer Guide. // // To perform this operation on a CMK in a different AWS account, specify the // key ARN or alias ARN in the value of the KeyId parameter. // -// Unless you are moving encrypted data from one region to another, you don't -// use this operation to encrypt a generated data key within a region. To get -// data keys that are already encrypted, call the GenerateDataKey or GenerateDataKeyWithoutPlaintext -// operation. Data keys don't need to be encrypted again by calling Encrypt. -// -// To encrypt data locally in your application, use the GenerateDataKey operation -// to return a plaintext data encryption key and a copy of the key encrypted -// under the CMK of your choosing. -// // Returns awserr.Error for service API and SDK errors. Use runtime type assertions // with awserr.Error's Code and Message methods to get detailed information about // the error. @@ -1584,6 +1628,10 @@ func (c *KMS) GenerateDataKeyRequest(input *GenerateDataKeyInput) (req *request. // Context (http://docs.aws.amazon.com/kms/latest/developerguide/encryption-context.html) // in the AWS Key Management Service Developer Guide. // +// The result of this operation varies with the key state of the CMK. For details, +// see How Key State Affects Use of a Customer Master Key (http://docs.aws.amazon.com/kms/latest/developerguide/key-state.html) +// in the AWS Key Management Service Developer Guide. +// // Returns awserr.Error for service API and SDK errors. Use runtime type assertions // with awserr.Error's Code and Message methods to get detailed information about // the error. @@ -1706,9 +1754,14 @@ func (c *KMS) GenerateDataKeyWithoutPlaintextRequest(input *GenerateDataKeyWitho // (GenerateDataKeyWithoutPlaintext) to get an encrypted data key and then stores // it in the container. Later, a different component of the system, called the // data plane, puts encrypted data into the containers. To do this, it passes -// the encrypted data key to the Decrypt operation, then uses the returned plaintext -// data key to encrypt data, and finally stores the encrypted data in the container. -// In this system, the control plane never sees the plaintext data key. +// the encrypted data key to the Decrypt operation. It then uses the returned +// plaintext data key to encrypt data and finally stores the encrypted data +// in the container. In this system, the control plane never sees the plaintext +// data key. +// +// The result of this operation varies with the key state of the CMK. For details, +// see How Key State Affects Use of a Customer Master Key (http://docs.aws.amazon.com/kms/latest/developerguide/key-state.html) +// in the AWS Key Management Service Developer Guide. // // Returns awserr.Error for service API and SDK errors. Use runtime type assertions // with awserr.Error's Code and Message methods to get detailed information about @@ -2006,7 +2059,20 @@ func (c *KMS) GetKeyRotationStatusRequest(input *GetKeyRotationStatusInput) (req // GetKeyRotationStatus API operation for AWS Key Management Service. // // Gets a Boolean value that indicates whether automatic rotation of the key -// material is enabled for the specified customer master key (CMK). +// material (http://docs.aws.amazon.com/kms/latest/developerguide/rotate-keys.html) +// is enabled for the specified customer master key (CMK). +// +// The result of this operation varies with the key state of the CMK. For details, +// see How Key State Affects Use of a Customer Master Key (http://docs.aws.amazon.com/kms/latest/developerguide/key-state.html) +// in the AWS Key Management Service Developer Guide. +// +// * Disabled: The key rotation status does not change when you disable a +// CMK. However, while the CMK is disabled, AWS KMS does not rotate the backing +// key. +// +// * Pending deletion: While a CMK is pending deletion, its key rotation +// status is false and AWS KMS does not rotate the backing key. If you cancel +// the deletion, the original key rotation status is restored. // // To perform this operation on a CMK in a different AWS account, specify the // key ARN in the value of the KeyId parameter. @@ -2130,6 +2196,10 @@ func (c *KMS) GetParametersForImportRequest(input *GetParametersForImportInput) // they expire, they cannot be used for a subsequent ImportKeyMaterial request. // To get new ones, send another GetParametersForImport request. // +// The result of this operation varies with the key state of the CMK. For details, +// see How Key State Affects Use of a Customer Master Key (http://docs.aws.amazon.com/kms/latest/developerguide/key-state.html) +// in the AWS Key Management Service Developer Guide. +// // Returns awserr.Error for service API and SDK errors. Use runtime type assertions // with awserr.Error's Code and Message methods to get detailed information about // the error. @@ -2268,6 +2338,10 @@ func (c *KMS) ImportKeyMaterialRequest(input *ImportKeyMaterialInput) (req *requ // into a CMK, you can reimport the same key material into that CMK, but you // cannot import different key material. // +// The result of this operation varies with the key state of the CMK. For details, +// see How Key State Affects Use of a Customer Master Key (http://docs.aws.amazon.com/kms/latest/developerguide/key-state.html) +// in the AWS Key Management Service Developer Guide. +// // Returns awserr.Error for service API and SDK errors. Use runtime type assertions // with awserr.Error's Code and Message methods to get detailed information about // the error. @@ -2394,14 +2468,22 @@ func (c *KMS) ListAliasesRequest(input *ListAliasesInput) (req *request.Request, // ListAliases API operation for AWS Key Management Service. // -// Gets a list of all aliases in the caller's AWS account and region. You cannot +// Gets a list of aliases in the caller's AWS account and region. You cannot // list aliases in other accounts. For more information about aliases, see CreateAlias. // -// The response might include several aliases that do not have a TargetKeyId -// field because they are not associated with a CMK. These are predefined aliases -// that are reserved for CMKs managed by AWS services. If an alias is not associated -// with a CMK, the alias does not count against the alias limit (http://docs.aws.amazon.com/kms/latest/developerguide/limits.html#aliases-limit) -// for your account. +// By default, the ListAliases command returns all aliases in the account and +// region. To get only the aliases that point to a particular customer master +// key (CMK), use the KeyId parameter. +// +// The ListAliases response can include aliases that you created and associated +// with your customer managed CMKs, and aliases that AWS created and associated +// with AWS managed CMKs in your account. You can recognize AWS aliases because +// their names have the format aws/, such as aws/dynamodb. +// +// The response might also include aliases that have no TargetKeyId field. These +// are predefined aliases that AWS has created but has not yet associated with +// a CMK. Aliases that AWS creates in your account, including predefined aliases, +// do not count against your AWS KMS aliases limit (http://docs.aws.amazon.com/kms/latest/developerguide/limits.html#aliases-limit). // // Returns awserr.Error for service API and SDK errors. Use runtime type assertions // with awserr.Error's Code and Message methods to get detailed information about @@ -3325,10 +3407,14 @@ func (c *KMS) ReEncryptRequest(input *ReEncryptInput) (req *request.Request, out // on the source CMK and once as ReEncryptTo on the destination CMK. We recommend // that you include the "kms:ReEncrypt*" permission in your key policies (http://docs.aws.amazon.com/kms/latest/developerguide/key-policies.html) // to permit reencryption from or to the CMK. This permission is automatically -// included in the key policy when you create a CMK through the console, but +// included in the key policy when you create a CMK through the console. But // you must include it manually when you create a CMK programmatically or when // you set a key policy with the PutKeyPolicy operation. // +// The result of this operation varies with the key state of the CMK. For details, +// see How Key State Affects Use of a Customer Master Key (http://docs.aws.amazon.com/kms/latest/developerguide/key-state.html) +// in the AWS Key Management Service Developer Guide. +// // Returns awserr.Error for service API and SDK errors. Use runtime type assertions // with awserr.Error's Code and Message methods to get detailed information about // the error. @@ -3690,6 +3776,10 @@ func (c *KMS) ScheduleKeyDeletionRequest(input *ScheduleKeyDeletionInput) (req * // Master Keys (http://docs.aws.amazon.com/kms/latest/developerguide/deleting-keys.html) // in the AWS Key Management Service Developer Guide. // +// The result of this operation varies with the key state of the CMK. For details, +// see How Key State Affects Use of a Customer Master Key (http://docs.aws.amazon.com/kms/latest/developerguide/key-state.html) +// in the AWS Key Management Service Developer Guide. +// // Returns awserr.Error for service API and SDK errors. Use runtime type assertions // with awserr.Error's Code and Message methods to get detailed information about // the error. @@ -3789,22 +3879,23 @@ func (c *KMS) TagResourceRequest(input *TagResourceInput) (req *request.Request, // TagResource API operation for AWS Key Management Service. // -// Adds or overwrites one or more tags for the specified customer master key -// (CMK). You cannot perform this operation on a CMK in a different AWS account. +// Adds or edits tags for a customer master key (CMK). You cannot perform this +// operation on a CMK in a different AWS account. // // Each tag consists of a tag key and a tag value. Tag keys and tag values are // both required, but tag values can be empty (null) strings. // -// You cannot use the same tag key more than once per CMK. For example, consider -// a CMK with one tag whose tag key is Purpose and tag value is Test. If you -// send a TagResource request for this CMK with a tag key of Purpose and a tag -// value of Prod, it does not create a second tag. Instead, the original tag -// is overwritten with the new tag value. +// You can only use a tag key once for each CMK. If you use the tag key again, +// AWS KMS replaces the current tag value with the specified value. // // For information about the rules that apply to tag keys and tag values, see // User-Defined Tag Restrictions (http://docs.aws.amazon.com/awsaccountbilling/latest/aboutv2/allocation-tag-restrictions.html) // in the AWS Billing and Cost Management User Guide. // +// The result of this operation varies with the key state of the CMK. For details, +// see How Key State Affects Use of a Customer Master Key (http://docs.aws.amazon.com/kms/latest/developerguide/key-state.html) +// in the AWS Key Management Service Developer Guide. +// // Returns awserr.Error for service API and SDK errors. Use runtime type assertions // with awserr.Error's Code and Message methods to get detailed information about // the error. @@ -3908,12 +3999,15 @@ func (c *KMS) UntagResourceRequest(input *UntagResourceInput) (req *request.Requ // UntagResource API operation for AWS Key Management Service. // -// Removes the specified tag or tags from the specified customer master key -// (CMK). You cannot perform this operation on a CMK in a different AWS account. +// Removes the specified tags from the specified customer master key (CMK). +// You cannot perform this operation on a CMK in a different AWS account. // -// To remove a tag, you specify the tag key for each tag to remove. You do not -// specify the tag value. To overwrite the tag value for an existing tag, use -// TagResource. +// To remove a tag, specify the tag key. To change the tag value of an existing +// tag key, use TagResource. +// +// The result of this operation varies with the key state of the CMK. For details, +// see How Key State Affects Use of a Customer Master Key (http://docs.aws.amazon.com/kms/latest/developerguide/key-state.html) +// in the AWS Key Management Service Developer Guide. // // Returns awserr.Error for service API and SDK errors. Use runtime type assertions // with awserr.Error's Code and Message methods to get detailed information about @@ -4034,6 +4128,10 @@ func (c *KMS) UpdateAliasRequest(input *UpdateAliasInput) (req *request.Request, // cannot begin with aws; that alias name prefix is reserved by Amazon Web Services // (AWS). // +// The result of this operation varies with the key state of the CMK. For details, +// see How Key State Affects Use of a Customer Master Key (http://docs.aws.amazon.com/kms/latest/developerguide/key-state.html) +// in the AWS Key Management Service Developer Guide. +// // Returns awserr.Error for service API and SDK errors. Use runtime type assertions // with awserr.Error's Code and Message methods to get detailed information about // the error. @@ -4130,11 +4228,15 @@ func (c *KMS) UpdateKeyDescriptionRequest(input *UpdateKeyDescriptionInput) (req // UpdateKeyDescription API operation for AWS Key Management Service. // -// Updates the description of a customer master key (CMK). To see the decription +// Updates the description of a customer master key (CMK). To see the description // of a CMK, use DescribeKey. // // You cannot perform this operation on a CMK in a different AWS account. // +// The result of this operation varies with the key state of the CMK. For details, +// see How Key State Affects Use of a Customer Master Key (http://docs.aws.amazon.com/kms/latest/developerguide/key-state.html) +// in the AWS Key Management Service Developer Guide. +// // Returns awserr.Error for service API and SDK errors. Use runtime type assertions // with awserr.Error's Code and Message methods to get detailed information about // the error. @@ -4308,9 +4410,9 @@ func (s *CancelKeyDeletionOutput) SetKeyId(v string) *CancelKeyDeletionOutput { type CreateAliasInput struct { _ struct{} `type:"structure"` - // String that contains the display name. The name must start with the word - // "alias" followed by a forward slash (alias/). Aliases that begin with "alias/AWS" - // are reserved. + // Specifies the alias name. This value must begin with alias/ followed by the + // alias name, such as alias/ExampleAlias. The alias name cannot begin with + // aws/. The alias/aws/ prefix is reserved for AWS managed CMKs. // // AliasName is a required field AliasName *string `min:"1" type:"string" required:"true"` @@ -4435,8 +4537,8 @@ type CreateGrantInput struct { // KeyId is a required field KeyId *string `min:"1" type:"string" required:"true"` - // A friendly name for identifying the grant. Use this value to prevent unintended - // creation of duplicate grants when retrying this request. + // A friendly name for identifying the grant. Use this value to prevent the + // unintended creation of duplicate grants when retrying this request. // // When this value is absent, all CreateGrant requests result in a new grant // with a unique GrantId even if all the supplied parameters are identical. @@ -4642,9 +4744,9 @@ type CreateKeyInput struct { // The principals in the key policy must exist and be visible to AWS KMS. // When you create a new AWS principal (for example, an IAM user or role), // you might need to enforce a delay before including the new principal in - // a key policy because the new principal might not be immediately visible - // to AWS KMS. For more information, see Changes that I make are not always - // immediately visible (http://docs.aws.amazon.com/IAM/latest/UserGuide/troubleshoot_general.html#troubleshoot_general_eventual-consistency) + // a key policy. The reason for this is that the new principal might not + // be immediately visible to AWS KMS. For more information, see Changes that + // I make are not always immediately visible (http://docs.aws.amazon.com/IAM/latest/UserGuide/troubleshoot_general.html#troubleshoot_general_eventual-consistency) // in the AWS Identity and Access Management User Guide. // // If you do not provide a key policy, AWS KMS attaches a default key policy @@ -4987,7 +5089,11 @@ type DescribeKeyInput struct { // in the AWS Key Management Service Developer Guide. GrantTokens []*string `type:"list"` - // A unique identifier for the customer master key (CMK). + // Describes the specified customer master key (CMK). + // + // If you specify a predefined AWS alias (an AWS alias with no key ID), KMS + // associates the alias with an AWS managed CMK (http://docs.aws.amazon.com/kms/latest/developerguide/concepts.html#master_keys) + // and returns its KeyId and Arn in the response. // // To specify a CMK, use its key ID, Amazon Resource Name (ARN), alias name, // or alias ARN. When using an alias name, prefix it with "alias/". To specify @@ -6016,9 +6122,8 @@ type GetParametersForImportInput struct { // KeyId is a required field KeyId *string `min:"1" type:"string" required:"true"` - // The algorithm you will use to encrypt the key material before importing it - // with ImportKeyMaterial. For more information, see Encrypt the Key Material - // (http://docs.aws.amazon.com/kms/latest/developerguide/importing-keys-encrypt-key-material.html) + // The algorithm you use to encrypt the key material before importing it with + // ImportKeyMaterial. For more information, see Encrypt the Key Material (http://docs.aws.amazon.com/kms/latest/developerguide/importing-keys-encrypt-key-material.html) // in the AWS Key Management Service Developer Guide. // // WrappingAlgorithm is a required field @@ -6140,14 +6245,14 @@ func (s *GetParametersForImportOutput) SetPublicKey(v []byte) *GetParametersForI } // A structure that you can use to allow certain operations in the grant only -// when the desired encryption context is present. For more information about +// when the preferred encryption context is present. For more information about // encryption context, see Encryption Context (http://docs.aws.amazon.com/kms/latest/developerguide/encryption-context.html) // in the AWS Key Management Service Developer Guide. // // Grant constraints apply only to operations that accept encryption context // as input. For example, the DescribeKey operation does not accept encryption // context as input. A grant that allows the DescribeKey operation does so regardless -// of the grant constraints. In constrast, the Encrypt operation accepts encryption +// of the grant constraints. In contrast, the Encrypt operation accepts encryption // context as input. A grant that allows the Encrypt operation does so only // when the encryption context of the Encrypt operation satisfies the grant // constraints. @@ -6492,7 +6597,7 @@ type KeyMetadata struct { // KeyId is a required field KeyId *string `min:"1" type:"string" required:"true"` - // The CMK's manager. CMKs are either customer-managed or AWS-managed. For more + // The CMK's manager. CMKs are either customer managed or AWS managed. For more // information about the difference, see Customer Master Keys (http://docs.aws.amazon.com/kms/latest/developerguide/concepts.html#master_keys) // in the AWS Key Management Service Developer Guide. KeyManager *string `type:"string" enum:"KeyManagerType"` @@ -6613,6 +6718,14 @@ func (s *KeyMetadata) SetValidTo(v time.Time) *KeyMetadata { type ListAliasesInput struct { _ struct{} `type:"structure"` + // Lists only aliases that refer to the specified CMK. The value of this parameter + // can be the ID or Amazon Resource Name (ARN) of a CMK in the caller's account + // and region. You cannot use an alias name or alias ARN in this value. + // + // This parameter is optional. If you omit it, ListAliases returns all aliases + // in the account and region. + KeyId *string `min:"1" type:"string"` + // Use this parameter to specify the maximum number of items to return. When // this value is present, AWS KMS does not return more than the specified number // of items, but it might return fewer. @@ -6640,6 +6753,9 @@ func (s ListAliasesInput) GoString() string { // Validate inspects the fields of the type to determine if they are valid. func (s *ListAliasesInput) Validate() error { invalidParams := request.ErrInvalidParams{Context: "ListAliasesInput"} + if s.KeyId != nil && len(*s.KeyId) < 1 { + invalidParams.Add(request.NewErrParamMinLen("KeyId", 1)) + } if s.Limit != nil && *s.Limit < 1 { invalidParams.Add(request.NewErrParamMinValue("Limit", 1)) } @@ -6653,6 +6769,12 @@ func (s *ListAliasesInput) Validate() error { return nil } +// SetKeyId sets the KeyId field's value. +func (s *ListAliasesInput) SetKeyId(v string) *ListAliasesInput { + s.KeyId = &v + return s +} + // SetLimit sets the Limit field's value. func (s *ListAliasesInput) SetLimit(v int64) *ListAliasesInput { s.Limit = &v @@ -7326,9 +7448,9 @@ type PutKeyPolicyInput struct { // The principals in the key policy must exist and be visible to AWS KMS. // When you create a new AWS principal (for example, an IAM user or role), // you might need to enforce a delay before including the new principal in - // a key policy because the new principal might not be immediately visible - // to AWS KMS. For more information, see Changes that I make are not always - // immediately visible (http://docs.aws.amazon.com/IAM/latest/UserGuide/troubleshoot_general.html#troubleshoot_general_eventual-consistency) + // a key policy. The reason for this is that the new principal might not + // be immediately visible to AWS KMS. For more information, see Changes that + // I make are not always immediately visible (http://docs.aws.amazon.com/IAM/latest/UserGuide/troubleshoot_general.html#troubleshoot_general_eventual-consistency) // in the AWS Identity and Access Management User Guide. // // The key policy size limit is 32 kilobytes (32768 bytes). diff --git a/vendor/github.com/aws/aws-sdk-go/service/kms/doc.go b/vendor/github.com/aws/aws-sdk-go/service/kms/doc.go index 3bab059f3..cc3620ac7 100644 --- a/vendor/github.com/aws/aws-sdk-go/service/kms/doc.go +++ b/vendor/github.com/aws/aws-sdk-go/service/kms/doc.go @@ -9,7 +9,7 @@ // Management Service Developer Guide (http://docs.aws.amazon.com/kms/latest/developerguide/). // // AWS provides SDKs that consist of libraries and sample code for various programming -// languages and platforms (Java, Ruby, .Net, iOS, Android, etc.). The SDKs +// languages and platforms (Java, Ruby, .Net, macOS, Android, etc.). The SDKs // provide a convenient way to create programmatic access to AWS KMS and other // AWS services. For example, the SDKs take care of tasks such as signing requests // (see below), managing errors, and retrying requests automatically. For more @@ -30,7 +30,7 @@ // Requests must be signed by using an access key ID and a secret access key. // We strongly recommend that you do not use your AWS account (root) access // key ID and secret key for everyday work with AWS KMS. Instead, use the access -// key ID and secret access key for an IAM user, or you can use the AWS Security +// key ID and secret access key for an IAM user. You can also use the AWS Security // Token Service to generate temporary security credentials that you can use // to sign requests. // @@ -61,11 +61,11 @@ // - This set of topics walks you through the process of signing a request // using an access key ID and a secret access key. // -// Commonly Used APIs +// Commonly Used API Operations // -// Of the APIs discussed in this guide, the following will prove the most useful -// for most applications. You will likely perform actions other than these, -// such as creating keys and assigning policies, by using the console. +// Of the API operations discussed in this guide, the following will prove the +// most useful for most applications. You will likely perform operations other +// than these, such as creating keys and assigning policies, by using the console. // // * Encrypt // diff --git a/vendor/github.com/aws/aws-sdk-go/service/lambda/api.go b/vendor/github.com/aws/aws-sdk-go/service/lambda/api.go index cd81e4790..f5fd4eeac 100644 --- a/vendor/github.com/aws/aws-sdk-go/service/lambda/api.go +++ b/vendor/github.com/aws/aws-sdk-go/service/lambda/api.go @@ -1601,6 +1601,8 @@ const opInvokeAsync = "InvokeAsync" // } // // See also, https://docs.aws.amazon.com/goto/WebAPI/lambda-2015-03-31/InvokeAsync +// +// Deprecated: InvokeAsync has been deprecated func (c *Lambda) InvokeAsyncRequest(input *InvokeAsyncInput) (req *request.Request, output *InvokeAsyncOutput) { if c.Client.Config.Logger != nil { c.Client.Config.Logger.Log("This operation, InvokeAsync, has been deprecated") @@ -1652,6 +1654,8 @@ func (c *Lambda) InvokeAsyncRequest(input *InvokeAsyncInput) (req *request.Reque // The runtime or runtime version specified is not supported. // // See also, https://docs.aws.amazon.com/goto/WebAPI/lambda-2015-03-31/InvokeAsync +// +// Deprecated: InvokeAsync has been deprecated func (c *Lambda) InvokeAsync(input *InvokeAsyncInput) (*InvokeAsyncOutput, error) { req, out := c.InvokeAsyncRequest(input) return out, req.Send() @@ -1666,6 +1670,8 @@ func (c *Lambda) InvokeAsync(input *InvokeAsyncInput) (*InvokeAsyncOutput, error // the context is nil a panic will occur. In the future the SDK may create // sub-contexts for http.Requests. See https://golang.org/pkg/context/ // for more information on using Contexts. +// +// Deprecated: InvokeAsyncWithContext has been deprecated func (c *Lambda) InvokeAsyncWithContext(ctx aws.Context, input *InvokeAsyncInput, opts ...request.Option) (*InvokeAsyncOutput, error) { req, out := c.InvokeAsyncRequest(input) req.SetContext(ctx) @@ -5267,6 +5273,7 @@ func (s *GetPolicyOutput) SetRevisionId(v string) *GetPolicyOutput { return s } +// Deprecated: InvokeAsyncInput has been deprecated type InvokeAsyncInput struct { _ struct{} `deprecated:"true" type:"structure" payload:"InvokeArgs"` @@ -5325,6 +5332,8 @@ func (s *InvokeAsyncInput) SetInvokeArgs(v io.ReadSeeker) *InvokeAsyncInput { } // Upon success, it returns empty response. Otherwise, throws an exception. +// +// Deprecated: InvokeAsyncOutput has been deprecated type InvokeAsyncOutput struct { _ struct{} `deprecated:"true" type:"structure"` diff --git a/vendor/github.com/aws/aws-sdk-go/service/lexmodelbuildingservice/api.go b/vendor/github.com/aws/aws-sdk-go/service/lexmodelbuildingservice/api.go index f38a19571..121beb2d7 100644 --- a/vendor/github.com/aws/aws-sdk-go/service/lexmodelbuildingservice/api.go +++ b/vendor/github.com/aws/aws-sdk-go/service/lexmodelbuildingservice/api.go @@ -10771,6 +10771,9 @@ const ( // StatusReady is a Status enum value StatusReady = "READY" + // StatusReadyBasicTesting is a Status enum value + StatusReadyBasicTesting = "READY_BASIC_TESTING" + // StatusFailed is a Status enum value StatusFailed = "FAILED" diff --git a/vendor/github.com/aws/aws-sdk-go/service/lightsail/api.go b/vendor/github.com/aws/aws-sdk-go/service/lightsail/api.go index 8178113cf..8e8583195 100644 --- a/vendor/github.com/aws/aws-sdk-go/service/lightsail/api.go +++ b/vendor/github.com/aws/aws-sdk-go/service/lightsail/api.go @@ -8914,6 +8914,8 @@ type CreateInstancesInput struct { // // In releases prior to June 12, 2017, this parameter was ignored by the API. // It is now deprecated. + // + // Deprecated: CustomImageName has been deprecated CustomImageName *string `locationName:"customImageName" deprecated:"true" type:"string"` // The names to use for your new Lightsail instances. Separate multiple values @@ -10163,6 +10165,8 @@ type Disk struct { // In releases prior to November 14, 2017, this parameter returned attached // for system disks in the API response. It is now deprecated, but still included // in the response. Use isAttached instead. + // + // Deprecated: AttachmentState has been deprecated AttachmentState *string `locationName:"attachmentState" deprecated:"true" type:"string"` // The date when the disk was created. @@ -10172,6 +10176,8 @@ type Disk struct { // // In releases prior to November 14, 2017, this parameter was not included in // the API response. It is now deprecated. + // + // Deprecated: GbInUse has been deprecated GbInUse *int64 `locationName:"gbInUse" deprecated:"true" type:"integer"` // The input/output operations per second (IOPS) of the disk. @@ -10558,6 +10564,8 @@ type DomainEntry struct { // // In releases prior to November 29, 2017, this parameter was not included in // the API response. It is now deprecated. + // + // Deprecated: Options has been deprecated Options map[string]*string `locationName:"options" deprecated:"true" type:"map"` // The target AWS name server (e.g., ns-111.awsdns-22.com.). @@ -12548,6 +12556,8 @@ type GetOperationsForResourceOutput struct { // // In releases prior to June 12, 2017, this parameter returned null by the API. // It is now deprecated, and the API returns the nextPageToken parameter instead. + // + // Deprecated: NextPageCount has been deprecated NextPageCount *string `locationName:"nextPageCount" deprecated:"true" type:"string"` // An identifier that was returned from the previous call to this operation, diff --git a/vendor/github.com/aws/aws-sdk-go/service/mq/api.go b/vendor/github.com/aws/aws-sdk-go/service/mq/api.go index b083caf38..f86489fa1 100644 --- a/vendor/github.com/aws/aws-sdk-go/service/mq/api.go +++ b/vendor/github.com/aws/aws-sdk-go/service/mq/api.go @@ -3,6 +3,8 @@ package mq import ( + "time" + "github.com/aws/aws-sdk-go/aws" "github.com/aws/aws-sdk-go/aws/awsutil" "github.com/aws/aws-sdk-go/aws/request" @@ -65,10 +67,10 @@ func (c *MQ) CreateBrokerRequest(input *CreateBrokerRequest) (req *request.Reque // * ErrCodeBadRequestException "BadRequestException" // Returns information about an error. // -// * ErrCodeInternalServerErrorException "InternalServerErrorException" +// * ErrCodeUnauthorizedException "UnauthorizedException" // Returns information about an error. // -// * ErrCodeUnauthorizedException "UnauthorizedException" +// * ErrCodeInternalServerErrorException "InternalServerErrorException" // Returns information about an error. // // * ErrCodeConflictException "ConflictException" @@ -144,8 +146,7 @@ func (c *MQ) CreateConfigurationRequest(input *CreateConfigurationRequest) (req // CreateConfiguration API operation for AmazonMQ. // // Creates a new configuration for the specified configuration name. Amazon -// MQ uses the default configuration (the engine type and version). Note: If -// the configuration name already exists, Amazon MQ doesn't create a configuration. +// MQ uses the default configuration (the engine type and version). // // Returns awserr.Error for service API and SDK errors. Use runtime type assertions // with awserr.Error's Code and Message methods to get detailed information about @@ -1305,6 +1306,9 @@ func (c *MQ) UpdateBrokerRequest(input *UpdateBrokerRequest) (req *request.Reque // * ErrCodeInternalServerErrorException "InternalServerErrorException" // Returns information about an error. // +// * ErrCodeConflictException "ConflictException" +// Returns information about an error. +// // * ErrCodeForbiddenException "ForbiddenException" // Returns information about an error. // @@ -1521,6 +1525,9 @@ type BrokerInstance struct { // The broker's wire-level protocol endpoints. Endpoints []*string `locationName:"endpoints" type:"list"` + + // The IP address of the Elastic Network Interface (ENI) attached to the broker. + IpAddress *string `locationName:"ipAddress" type:"string"` } // String returns the string representation @@ -1545,6 +1552,12 @@ func (s *BrokerInstance) SetEndpoints(v []*string) *BrokerInstance { return s } +// SetIpAddress sets the IpAddress field's value. +func (s *BrokerInstance) SetIpAddress(v string) *BrokerInstance { + s.IpAddress = &v + return s +} + // The Amazon Resource Name (ARN) of the broker. type BrokerSummary struct { _ struct{} `type:"structure"` @@ -1561,17 +1574,16 @@ type BrokerSummary struct { // characters. BrokerName *string `locationName:"brokerName" type:"string"` - // The status of the broker. Possible values: CREATION_IN_PROGRESS, CREATION_FAILED, - // DELETION_IN_PROGRESS, RUNNING, REBOOT_IN_PROGRESS + // The status of the broker. BrokerState *string `locationName:"brokerState" type:"string" enum:"BrokerState"` - // Required. The deployment mode of the broker. Possible values: SINGLE_INSTANCE, - // ACTIVE_STANDBY_MULTI_AZ SINGLE_INSTANCE creates a single-instance broker - // in a single Availability Zone. ACTIVE_STANDBY_MULTI_AZ creates an active/standby - // broker for high availability. + // The time when the broker was created. + Created *time.Time `locationName:"created" type:"timestamp" timestampFormat:"iso8601"` + + // Required. The deployment mode of the broker. DeploymentMode *string `locationName:"deploymentMode" type:"string" enum:"DeploymentMode"` - // The broker's instance type. Possible values: mq.t2.micro, mq.m4.large + // The broker's instance type. HostInstanceType *string `locationName:"hostInstanceType" type:"string"` } @@ -1609,6 +1621,12 @@ func (s *BrokerSummary) SetBrokerState(v string) *BrokerSummary { return s } +// SetCreated sets the Created field's value. +func (s *BrokerSummary) SetCreated(v time.Time) *BrokerSummary { + s.Created = &v + return s +} + // SetDeploymentMode sets the DeploymentMode field's value. func (s *BrokerSummary) SetDeploymentMode(v string) *BrokerSummary { s.DeploymentMode = &v @@ -1628,6 +1646,9 @@ type Configuration struct { // Required. The ARN of the configuration. Arn *string `locationName:"arn" type:"string"` + // Required. The date and time of the configuration revision. + Created *time.Time `locationName:"created" type:"timestamp" timestampFormat:"iso8601"` + // Required. The description of the configuration. Description *string `locationName:"description" type:"string"` @@ -1666,6 +1687,12 @@ func (s *Configuration) SetArn(v string) *Configuration { return s } +// SetCreated sets the Created field's value. +func (s *Configuration) SetCreated(v time.Time) *Configuration { + s.Created = &v + return s +} + // SetDescription sets the Description field's value. func (s *Configuration) SetDescription(v string) *Configuration { s.Description = &v @@ -1709,7 +1736,7 @@ type ConfigurationId struct { // Required. The unique ID that Amazon MQ generates for the configuration. Id *string `locationName:"id" type:"string"` - // The Universally Unique Identifier (UUID) of the request. + // The revision number of the configuration. Revision *int64 `locationName:"revision" type:"integer"` } @@ -1739,10 +1766,13 @@ func (s *ConfigurationId) SetRevision(v int64) *ConfigurationId { type ConfigurationRevision struct { _ struct{} `type:"structure"` + // Required. The date and time of the configuration revision. + Created *time.Time `locationName:"created" type:"timestamp" timestampFormat:"iso8601"` + // The description of the configuration revision. Description *string `locationName:"description" type:"string"` - // Required. The revision of the configuration. + // Required. The revision number of the configuration. Revision *int64 `locationName:"revision" type:"integer"` } @@ -1756,6 +1786,12 @@ func (s ConfigurationRevision) GoString() string { return s.String() } +// SetCreated sets the Created field's value. +func (s *ConfigurationRevision) SetCreated(v time.Time) *ConfigurationRevision { + s.Created = &v + return s +} + // SetDescription sets the Description field's value. func (s *ConfigurationRevision) SetDescription(v string) *ConfigurationRevision { s.Description = &v @@ -1822,9 +1858,7 @@ type CreateBrokerRequest struct { CreatorRequestId *string `locationName:"creatorRequestId" type:"string" idempotencyToken:"true"` - // The deployment mode of the broker. Possible values: SINGLE_INSTANCE, ACTIVE_STANDBY_MULTI_AZ - // SINGLE_INSTANCE creates a single-instance broker in a single Availability - // Zone. ACTIVE_STANDBY_MULTI_AZ creates an active/standby broker for high availability. + // The deployment mode of the broker. DeploymentMode *string `locationName:"deploymentMode" type:"string" enum:"DeploymentMode"` // The type of broker engine. Note: Currently, Amazon MQ supports only ActiveMQ. @@ -1834,6 +1868,9 @@ type CreateBrokerRequest struct { HostInstanceType *string `locationName:"hostInstanceType" type:"string"` + // The list of information about logs to be enabled for the specified broker. + Logs *Logs `locationName:"logs" type:"structure"` + // The scheduled time period relative to UTC during which Amazon MQ begins to // apply pending updates or patches to the broker. MaintenanceWindowStartTime *WeeklyStartTime `locationName:"maintenanceWindowStartTime" type:"structure"` @@ -1905,6 +1942,12 @@ func (s *CreateBrokerRequest) SetHostInstanceType(v string) *CreateBrokerRequest return s } +// SetLogs sets the Logs field's value. +func (s *CreateBrokerRequest) SetLogs(v *Logs) *CreateBrokerRequest { + s.Logs = v + return s +} + // SetMaintenanceWindowStartTime sets the MaintenanceWindowStartTime field's value. func (s *CreateBrokerRequest) SetMaintenanceWindowStartTime(v *WeeklyStartTime) *CreateBrokerRequest { s.MaintenanceWindowStartTime = v @@ -2009,6 +2052,8 @@ type CreateConfigurationResponse struct { Arn *string `locationName:"arn" type:"string"` + Created *time.Time `locationName:"created" type:"timestamp" timestampFormat:"iso8601"` + Id *string `locationName:"id" type:"string"` // Returns information about the specified configuration revision. @@ -2033,6 +2078,12 @@ func (s *CreateConfigurationResponse) SetArn(v string) *CreateConfigurationRespo return s } +// SetCreated sets the Created field's value. +func (s *CreateConfigurationResponse) SetCreated(v time.Time) *CreateConfigurationResponse { + s.Created = &v + return s +} + // SetId sets the Id field's value. func (s *CreateConfigurationResponse) SetId(v string) *CreateConfigurationResponse { s.Id = &v @@ -2306,16 +2357,15 @@ type DescribeBrokerResponse struct { BrokerName *string `locationName:"brokerName" type:"string"` - // The status of the broker. Possible values: CREATION_IN_PROGRESS, CREATION_FAILED, - // DELETION_IN_PROGRESS, RUNNING, REBOOT_IN_PROGRESS + // The status of the broker. BrokerState *string `locationName:"brokerState" type:"string" enum:"BrokerState"` // Broker configuration information Configurations *Configurations `locationName:"configurations" type:"structure"` - // The deployment mode of the broker. Possible values: SINGLE_INSTANCE, ACTIVE_STANDBY_MULTI_AZ - // SINGLE_INSTANCE creates a single-instance broker in a single Availability - // Zone. ACTIVE_STANDBY_MULTI_AZ creates an active/standby broker for high availability. + Created *time.Time `locationName:"created" type:"timestamp" timestampFormat:"iso8601"` + + // The deployment mode of the broker. DeploymentMode *string `locationName:"deploymentMode" type:"string" enum:"DeploymentMode"` // The type of broker engine. Note: Currently, Amazon MQ supports only ActiveMQ. @@ -2325,10 +2375,16 @@ type DescribeBrokerResponse struct { HostInstanceType *string `locationName:"hostInstanceType" type:"string"` + // The list of information about logs currently enabled and pending to be deployed + // for the specified broker. + Logs *LogsSummary `locationName:"logs" type:"structure"` + // The scheduled time period relative to UTC during which Amazon MQ begins to // apply pending updates or patches to the broker. MaintenanceWindowStartTime *WeeklyStartTime `locationName:"maintenanceWindowStartTime" type:"structure"` + PendingEngineVersion *string `locationName:"pendingEngineVersion" type:"string"` + PubliclyAccessible *bool `locationName:"publiclyAccessible" type:"boolean"` SecurityGroups []*string `locationName:"securityGroups" type:"list"` @@ -2390,6 +2446,12 @@ func (s *DescribeBrokerResponse) SetConfigurations(v *Configurations) *DescribeB return s } +// SetCreated sets the Created field's value. +func (s *DescribeBrokerResponse) SetCreated(v time.Time) *DescribeBrokerResponse { + s.Created = &v + return s +} + // SetDeploymentMode sets the DeploymentMode field's value. func (s *DescribeBrokerResponse) SetDeploymentMode(v string) *DescribeBrokerResponse { s.DeploymentMode = &v @@ -2414,12 +2476,24 @@ func (s *DescribeBrokerResponse) SetHostInstanceType(v string) *DescribeBrokerRe return s } +// SetLogs sets the Logs field's value. +func (s *DescribeBrokerResponse) SetLogs(v *LogsSummary) *DescribeBrokerResponse { + s.Logs = v + return s +} + // SetMaintenanceWindowStartTime sets the MaintenanceWindowStartTime field's value. func (s *DescribeBrokerResponse) SetMaintenanceWindowStartTime(v *WeeklyStartTime) *DescribeBrokerResponse { s.MaintenanceWindowStartTime = v return s } +// SetPendingEngineVersion sets the PendingEngineVersion field's value. +func (s *DescribeBrokerResponse) SetPendingEngineVersion(v string) *DescribeBrokerResponse { + s.PendingEngineVersion = &v + return s +} + // SetPubliclyAccessible sets the PubliclyAccessible field's value. func (s *DescribeBrokerResponse) SetPubliclyAccessible(v bool) *DescribeBrokerResponse { s.PubliclyAccessible = &v @@ -2485,6 +2559,8 @@ type DescribeConfigurationOutput struct { Arn *string `locationName:"arn" type:"string"` + Created *time.Time `locationName:"created" type:"timestamp" timestampFormat:"iso8601"` + Description *string `locationName:"description" type:"string"` // The type of broker engine. Note: Currently, Amazon MQ supports only ActiveMQ. @@ -2516,6 +2592,12 @@ func (s *DescribeConfigurationOutput) SetArn(v string) *DescribeConfigurationOut return s } +// SetCreated sets the Created field's value. +func (s *DescribeConfigurationOutput) SetCreated(v time.Time) *DescribeConfigurationOutput { + s.Created = &v + return s +} + // SetDescription sets the Description field's value. func (s *DescribeConfigurationOutput) SetDescription(v string) *DescribeConfigurationOutput { s.Description = &v @@ -2605,6 +2687,8 @@ type DescribeConfigurationRevisionResponse struct { ConfigurationId *string `locationName:"configurationId" type:"string"` + Created *time.Time `locationName:"created" type:"timestamp" timestampFormat:"iso8601"` + Data *string `locationName:"data" type:"string"` Description *string `locationName:"description" type:"string"` @@ -2626,6 +2710,12 @@ func (s *DescribeConfigurationRevisionResponse) SetConfigurationId(v string) *De return s } +// SetCreated sets the Created field's value. +func (s *DescribeConfigurationRevisionResponse) SetCreated(v time.Time) *DescribeConfigurationRevisionResponse { + s.Created = &v + return s +} + // SetData sets the Data field's value. func (s *DescribeConfigurationRevisionResponse) SetData(v string) *DescribeConfigurationRevisionResponse { s.Data = &v @@ -3057,7 +3147,7 @@ type ListUsersResponse struct { BrokerId *string `locationName:"brokerId" type:"string"` - MaxResults *int64 `locationName:"maxResults" type:"integer"` + MaxResults *int64 `locationName:"maxResults" min:"5" type:"integer"` NextToken *string `locationName:"nextToken" type:"string"` @@ -3098,6 +3188,137 @@ func (s *ListUsersResponse) SetUsers(v []*UserSummary) *ListUsersResponse { return s } +// The list of information about logs to be enabled for the specified broker. +type Logs struct { + _ struct{} `type:"structure"` + + // Enables audit logging. Every user management action made using JMX or the + // ActiveMQ Web Console is logged. + Audit *bool `locationName:"audit" type:"boolean"` + + // Enables general logging. + General *bool `locationName:"general" type:"boolean"` +} + +// String returns the string representation +func (s Logs) String() string { + return awsutil.Prettify(s) +} + +// GoString returns the string representation +func (s Logs) GoString() string { + return s.String() +} + +// SetAudit sets the Audit field's value. +func (s *Logs) SetAudit(v bool) *Logs { + s.Audit = &v + return s +} + +// SetGeneral sets the General field's value. +func (s *Logs) SetGeneral(v bool) *Logs { + s.General = &v + return s +} + +// The list of information about logs currently enabled and pending to be deployed +// for the specified broker. +type LogsSummary struct { + _ struct{} `type:"structure"` + + // Enables audit logging. Every user management action made using JMX or the + // ActiveMQ Web Console is logged. + Audit *bool `locationName:"audit" type:"boolean"` + + // The location of the CloudWatch Logs log group where audit logs are sent. + AuditLogGroup *string `locationName:"auditLogGroup" type:"string"` + + // Enables general logging. + General *bool `locationName:"general" type:"boolean"` + + // The location of the CloudWatch Logs log group where general logs are sent. + GeneralLogGroup *string `locationName:"generalLogGroup" type:"string"` + + // The list of information about logs pending to be deployed for the specified + // broker. + Pending *PendingLogs `locationName:"pending" type:"structure"` +} + +// String returns the string representation +func (s LogsSummary) String() string { + return awsutil.Prettify(s) +} + +// GoString returns the string representation +func (s LogsSummary) GoString() string { + return s.String() +} + +// SetAudit sets the Audit field's value. +func (s *LogsSummary) SetAudit(v bool) *LogsSummary { + s.Audit = &v + return s +} + +// SetAuditLogGroup sets the AuditLogGroup field's value. +func (s *LogsSummary) SetAuditLogGroup(v string) *LogsSummary { + s.AuditLogGroup = &v + return s +} + +// SetGeneral sets the General field's value. +func (s *LogsSummary) SetGeneral(v bool) *LogsSummary { + s.General = &v + return s +} + +// SetGeneralLogGroup sets the GeneralLogGroup field's value. +func (s *LogsSummary) SetGeneralLogGroup(v string) *LogsSummary { + s.GeneralLogGroup = &v + return s +} + +// SetPending sets the Pending field's value. +func (s *LogsSummary) SetPending(v *PendingLogs) *LogsSummary { + s.Pending = v + return s +} + +// The list of information about logs to be enabled for the specified broker. +type PendingLogs struct { + _ struct{} `type:"structure"` + + // Enables audit logging. Every user management action made using JMX or the + // ActiveMQ Web Console is logged. + Audit *bool `locationName:"audit" type:"boolean"` + + // Enables general logging. + General *bool `locationName:"general" type:"boolean"` +} + +// String returns the string representation +func (s PendingLogs) String() string { + return awsutil.Prettify(s) +} + +// GoString returns the string representation +func (s PendingLogs) GoString() string { + return s.String() +} + +// SetAudit sets the Audit field's value. +func (s *PendingLogs) SetAudit(v bool) *PendingLogs { + s.Audit = &v + return s +} + +// SetGeneral sets the General field's value. +func (s *PendingLogs) SetGeneral(v bool) *PendingLogs { + s.General = &v + return s +} + type RebootBrokerInput struct { _ struct{} `type:"structure"` @@ -3160,12 +3381,6 @@ type SanitizationWarning struct { ElementName *string `locationName:"elementName" type:"string"` // Required. The reason for which the XML elements or attributes were sanitized. - // Possible values: DISALLOWED_ELEMENT_REMOVED, DISALLOWED_ATTRIBUTE_REMOVED, - // INVALID_ATTRIBUTE_VALUE_REMOVED DISALLOWED_ELEMENT_REMOVED shows that the - // provided element isn't allowed and has been removed. DISALLOWED_ATTRIBUTE_REMOVED - // shows that the provided attribute isn't allowed and has been removed. INVALID_ATTRIBUTE_VALUE_REMOVED - // shows that the provided value for the attribute isn't allowed and has been - // removed. Reason *string `locationName:"reason" type:"string" enum:"SanitizationWarningReason"` } @@ -3200,11 +3415,18 @@ func (s *SanitizationWarning) SetReason(v string) *SanitizationWarning { type UpdateBrokerRequest struct { _ struct{} `type:"structure"` + AutoMinorVersionUpgrade *bool `locationName:"autoMinorVersionUpgrade" type:"boolean"` + // BrokerId is a required field BrokerId *string `location:"uri" locationName:"broker-id" type:"string" required:"true"` // A list of information about the configuration. Configuration *ConfigurationId `locationName:"configuration" type:"structure"` + + EngineVersion *string `locationName:"engineVersion" type:"string"` + + // The list of information about logs to be enabled for the specified broker. + Logs *Logs `locationName:"logs" type:"structure"` } // String returns the string representation @@ -3230,6 +3452,12 @@ func (s *UpdateBrokerRequest) Validate() error { return nil } +// SetAutoMinorVersionUpgrade sets the AutoMinorVersionUpgrade field's value. +func (s *UpdateBrokerRequest) SetAutoMinorVersionUpgrade(v bool) *UpdateBrokerRequest { + s.AutoMinorVersionUpgrade = &v + return s +} + // SetBrokerId sets the BrokerId field's value. func (s *UpdateBrokerRequest) SetBrokerId(v string) *UpdateBrokerRequest { s.BrokerId = &v @@ -3242,13 +3470,32 @@ func (s *UpdateBrokerRequest) SetConfiguration(v *ConfigurationId) *UpdateBroker return s } +// SetEngineVersion sets the EngineVersion field's value. +func (s *UpdateBrokerRequest) SetEngineVersion(v string) *UpdateBrokerRequest { + s.EngineVersion = &v + return s +} + +// SetLogs sets the Logs field's value. +func (s *UpdateBrokerRequest) SetLogs(v *Logs) *UpdateBrokerRequest { + s.Logs = v + return s +} + type UpdateBrokerResponse struct { _ struct{} `type:"structure"` + AutoMinorVersionUpgrade *bool `locationName:"autoMinorVersionUpgrade" type:"boolean"` + BrokerId *string `locationName:"brokerId" type:"string"` // A list of information about the configuration. Configuration *ConfigurationId `locationName:"configuration" type:"structure"` + + EngineVersion *string `locationName:"engineVersion" type:"string"` + + // The list of information about logs to be enabled for the specified broker. + Logs *Logs `locationName:"logs" type:"structure"` } // String returns the string representation @@ -3261,6 +3508,12 @@ func (s UpdateBrokerResponse) GoString() string { return s.String() } +// SetAutoMinorVersionUpgrade sets the AutoMinorVersionUpgrade field's value. +func (s *UpdateBrokerResponse) SetAutoMinorVersionUpgrade(v bool) *UpdateBrokerResponse { + s.AutoMinorVersionUpgrade = &v + return s +} + // SetBrokerId sets the BrokerId field's value. func (s *UpdateBrokerResponse) SetBrokerId(v string) *UpdateBrokerResponse { s.BrokerId = &v @@ -3273,6 +3526,18 @@ func (s *UpdateBrokerResponse) SetConfiguration(v *ConfigurationId) *UpdateBroke return s } +// SetEngineVersion sets the EngineVersion field's value. +func (s *UpdateBrokerResponse) SetEngineVersion(v string) *UpdateBrokerResponse { + s.EngineVersion = &v + return s +} + +// SetLogs sets the Logs field's value. +func (s *UpdateBrokerResponse) SetLogs(v *Logs) *UpdateBrokerResponse { + s.Logs = v + return s +} + type UpdateConfigurationRequest struct { _ struct{} `type:"structure"` @@ -3330,6 +3595,8 @@ type UpdateConfigurationResponse struct { Arn *string `locationName:"arn" type:"string"` + Created *time.Time `locationName:"created" type:"timestamp" timestampFormat:"iso8601"` + Id *string `locationName:"id" type:"string"` // Returns information about the specified configuration revision. @@ -3356,6 +3623,12 @@ func (s *UpdateConfigurationResponse) SetArn(v string) *UpdateConfigurationRespo return s } +// SetCreated sets the Created field's value. +func (s *UpdateConfigurationResponse) SetCreated(v time.Time) *UpdateConfigurationResponse { + s.Created = &v + return s +} + // SetId sets the Id field's value. func (s *UpdateConfigurationResponse) SetId(v string) *UpdateConfigurationResponse { s.Id = &v @@ -3536,8 +3809,7 @@ type UserPendingChanges struct { // and tildes (- . _ ~). This value must be 2-100 characters long. Groups []*string `locationName:"groups" type:"list"` - // Required. The type of change pending for the ActiveMQ user. Possible values: - // CREATE, UPDATE, DELETE + // Required. The type of change pending for the ActiveMQ user. PendingChange *string `locationName:"pendingChange" type:"string" enum:"ChangeType"` } @@ -3573,8 +3845,7 @@ func (s *UserPendingChanges) SetPendingChange(v string) *UserPendingChanges { type UserSummary struct { _ struct{} `type:"structure"` - // The type of change pending for the ActiveMQ user. Possible values: CREATE, - // UPDATE, DELETE + // The type of change pending for the ActiveMQ user. PendingChange *string `locationName:"pendingChange" type:"string" enum:"ChangeType"` // Required. The username of the ActiveMQ user. This value can contain only @@ -3610,8 +3881,7 @@ func (s *UserSummary) SetUsername(v string) *UserSummary { type WeeklyStartTime struct { _ struct{} `type:"structure"` - // Required. The day of the week. Possible values: MONDAY, TUESDAY, WEDNESDAY, - // THURSDAY, FRIDAY, SATURDAY, SUNDAY + // Required. The day of the week. DayOfWeek *string `locationName:"dayOfWeek" type:"string" enum:"DayOfWeek"` // Required. The time, in 24-hour format. @@ -3650,8 +3920,7 @@ func (s *WeeklyStartTime) SetTimeZone(v string) *WeeklyStartTime { return s } -// The status of the broker. Possible values: CREATION_IN_PROGRESS, CREATION_FAILED, -// DELETION_IN_PROGRESS, RUNNING, REBOOT_IN_PROGRESS +// The status of the broker. const ( // BrokerStateCreationInProgress is a BrokerState enum value BrokerStateCreationInProgress = "CREATION_IN_PROGRESS" @@ -3669,8 +3938,7 @@ const ( BrokerStateRebootInProgress = "REBOOT_IN_PROGRESS" ) -// The type of change pending for the ActiveMQ user. Possible values: CREATE, -// UPDATE, DELETE +// The type of change pending for the ActiveMQ user. const ( // ChangeTypeCreate is a ChangeType enum value ChangeTypeCreate = "CREATE" @@ -3705,9 +3973,7 @@ const ( DayOfWeekSunday = "SUNDAY" ) -// The deployment mode of the broker. Possible values: SINGLE_INSTANCE, ACTIVE_STANDBY_MULTI_AZ -// SINGLE_INSTANCE creates a single-instance broker in a single Availability -// Zone. ACTIVE_STANDBY_MULTI_AZ creates an active/standby broker for high availability. +// The deployment mode of the broker. const ( // DeploymentModeSingleInstance is a DeploymentMode enum value DeploymentModeSingleInstance = "SINGLE_INSTANCE" @@ -3722,13 +3988,7 @@ const ( EngineTypeActivemq = "ACTIVEMQ" ) -// The reason for which the XML elements or attributes were sanitized. Possible -// values: DISALLOWED_ELEMENT_REMOVED, DISALLOWED_ATTRIBUTE_REMOVED, INVALID_ATTRIBUTE_VALUE_REMOVED -// DISALLOWED_ELEMENT_REMOVED shows that the provided element isn't allowed -// and has been removed. DISALLOWED_ATTRIBUTE_REMOVED shows that the provided -// attribute isn't allowed and has been removed. INVALID_ATTRIBUTE_VALUE_REMOVED -// shows that the provided value for the attribute isn't allowed and has been -// removed. +// The reason for which the XML elements or attributes were sanitized. const ( // SanitizationWarningReasonDisallowedElementRemoved is a SanitizationWarningReason enum value SanitizationWarningReasonDisallowedElementRemoved = "DISALLOWED_ELEMENT_REMOVED" diff --git a/vendor/github.com/aws/aws-sdk-go/service/neptune/api.go b/vendor/github.com/aws/aws-sdk-go/service/neptune/api.go index fc722da8e..be502aa90 100644 --- a/vendor/github.com/aws/aws-sdk-go/service/neptune/api.go +++ b/vendor/github.com/aws/aws-sdk-go/service/neptune/api.go @@ -7551,6 +7551,8 @@ type CreateDBInstanceInput struct { PromotionTier *int64 `type:"integer"` // This parameter is not supported. + // + // Deprecated: PubliclyAccessible has been deprecated PubliclyAccessible *bool `deprecated:"true" type:"boolean"` // Specifies whether the DB instance is encrypted. @@ -9396,6 +9398,8 @@ type DBInstance struct { PromotionTier *int64 `type:"integer"` // This parameter is not supported. + // + // Deprecated: PubliclyAccessible has been deprecated PubliclyAccessible *bool `deprecated:"true" type:"boolean"` // Contains one or more identifiers of DB clusters that are Read Replicas of @@ -14089,6 +14093,8 @@ type ModifyDBInstanceInput struct { PromotionTier *int64 `type:"integer"` // This parameter is not supported. + // + // Deprecated: PubliclyAccessible has been deprecated PubliclyAccessible *bool `deprecated:"true" type:"boolean"` // Specifies the storage type to be associated with the DB instance. diff --git a/vendor/github.com/aws/aws-sdk-go/service/organizations/api.go b/vendor/github.com/aws/aws-sdk-go/service/organizations/api.go index 104582b80..9873d5e51 100644 --- a/vendor/github.com/aws/aws-sdk-go/service/organizations/api.go +++ b/vendor/github.com/aws/aws-sdk-go/service/organizations/api.go @@ -68,7 +68,7 @@ func (c *Organizations) AcceptHandshakeRequest(input *AcceptHandshakeInput) (req // The user who calls the API for an invitation to join must have the organizations:AcceptHandshake // permission. If you enabled all features in the organization, then the // user must also have the iam:CreateServiceLinkedRole permission so that -// Organizations can create the required service-linked role named OrgsServiceLinkedRoleName. +// Organizations can create the required service-linked role named AWSServiceRoleForOrganizations. // For more information, see AWS Organizations and Service-Linked Roles (http://docs.aws.amazon.com/organizations/latest/userguide/orgs_integration_services.html#orgs_integration_service-linked-roles) // in the AWS Organizations User Guide. // @@ -101,7 +101,7 @@ func (c *Organizations) AcceptHandshakeRequest(input *AcceptHandshakeInput) (req // in the IAM User Guide. // // * ErrCodeAWSOrganizationsNotInUseException "AWSOrganizationsNotInUseException" -// Your account is not a member of an organization. To make this request, you +// Your account isn't a member of an organization. To make this request, you // must use the credentials of an account that belongs to an organization. // // * ErrCodeHandshakeConstraintViolationException "HandshakeConstraintViolationException" @@ -112,15 +112,15 @@ func (c *Organizations) AcceptHandshakeRequest(input *AcceptHandshakeInput) (req // specific API or operation: // // * ACCOUNT_NUMBER_LIMIT_EXCEEDED: You attempted to exceed the limit on -// the number of accounts in an organization. Note: deleted and closed accounts -// still count toward your limit. +// the number of accounts in an organization. Note that deleted and closed +// accounts still count toward your limit. // // If you get this exception immediately after creating the organization, wait // one hour and try again. If after an hour it continues to fail with this -// error, contact AWS Customer Support (https://console.aws.amazon.com/support/home#/). +// error, contact AWS Support (https://console.aws.amazon.com/support/home#/). // // * HANDSHAKE_RATE_LIMIT_EXCEEDED: You attempted to exceed the number of -// handshakes you can send in one day. +// handshakes that you can send in one day. // // * ALREADY_IN_AN_ORGANIZATION: The handshake request is invalid because // the invited account is already a member of an organization. @@ -128,13 +128,13 @@ func (c *Organizations) AcceptHandshakeRequest(input *AcceptHandshakeInput) (req // * ORGANIZATION_ALREADY_HAS_ALL_FEATURES: The handshake request is invalid // because the organization has already enabled all features. // -// * INVITE_DISABLED_DURING_ENABLE_ALL_FEATURES: You cannot issue new invitations -// to join an organization while it is in the process of enabling all features. +// * INVITE_DISABLED_DURING_ENABLE_ALL_FEATURES: You can't issue new invitations +// to join an organization while it's in the process of enabling all features. // You can resume inviting accounts after you finalize the process when all // accounts have agreed to the change. // -// * PAYMENT_INSTRUMENT_REQUIRED: You cannot complete the operation with -// an account that does not have a payment instrument, such as a credit card, +// * PAYMENT_INSTRUMENT_REQUIRED: You can't complete the operation with an +// account that doesn't have a payment instrument, such as a credit card, // associated with it. // // * ORGANIZATION_FROM_DIFFERENT_SELLER_OF_RECORD: The request failed because @@ -151,7 +151,7 @@ func (c *Organizations) AcceptHandshakeRequest(input *AcceptHandshakeInput) (req // // * ErrCodeInvalidHandshakeTransitionException "InvalidHandshakeTransitionException" // You can't perform the operation on the handshake in its current state. For -// example, you can't cancel a handshake that was already accepted, or accept +// example, you can't cancel a handshake that was already accepted or accept // a handshake that was already declined. // // * ErrCodeHandshakeAlreadyInStateException "HandshakeAlreadyInStateException" @@ -167,11 +167,11 @@ func (c *Organizations) AcceptHandshakeRequest(input *AcceptHandshakeInput) (req // specific API or operation: // // * IMMUTABLE_POLICY: You specified a policy that is managed by AWS and -// cannot be modified. +// can't be modified. // // * INPUT_REQUIRED: You must include a value for all required parameters. // -// * INVALID_ENUM: You specified a value that is not valid for that parameter. +// * INVALID_ENUM: You specified a value that isn't valid for that parameter. // // * INVALID_FULL_NAME_TARGET: You specified a full name that contains invalid // characters. @@ -191,11 +191,11 @@ func (c *Organizations) AcceptHandshakeRequest(input *AcceptHandshakeInput) (req // * INVALID_PATTERN_TARGET_ID: You specified a policy target ID that doesn't // match the required pattern. // -// * INVALID_ROLE_NAME: You provided a role name that is not valid. A role -// name can’t begin with the reserved prefix 'AWSServiceRoleFor'. +// * INVALID_ROLE_NAME: You provided a role name that isn't valid. A role +// name can't begin with the reserved prefix AWSServiceRoleFor. // -// * INVALID_SYNTAX_ORGANIZATION_ARN: You specified an invalid ARN for the -// organization. +// * INVALID_SYNTAX_ORGANIZATION_ARN: You specified an invalid Amazon Resource +// Name (ARN) for the organization. // // * INVALID_SYNTAX_POLICY_ID: You specified an invalid policy ID. // @@ -230,9 +230,9 @@ func (c *Organizations) AcceptHandshakeRequest(input *AcceptHandshakeInput) (req // protect against denial-of-service attacks. Try again later. // // * ErrCodeAccessDeniedForDependencyException "AccessDeniedForDependencyException" -// The operation you attempted requires you to have the iam:CreateServiceLinkedRole -// so that Organizations can create the required service-linked role. You do -// not have that permission. +// The operation that you attempted requires you to have the iam:CreateServiceLinkedRole +// so that AWS Organizations can create the required service-linked role. You +// don't have that permission. // // See also, https://docs.aws.amazon.com/goto/WebAPI/organizations-2016-11-28/AcceptHandshake func (c *Organizations) AcceptHandshake(input *AcceptHandshakeInput) (*AcceptHandshakeOutput, error) { @@ -358,7 +358,7 @@ func (c *Organizations) AttachPolicyRequest(input *AttachPolicyInput) (req *requ // in the IAM User Guide. // // * ErrCodeAWSOrganizationsNotInUseException "AWSOrganizationsNotInUseException" -// Your account is not a member of an organization. To make this request, you +// Your account isn't a member of an organization. To make this request, you // must use the credentials of an account that belongs to an organization. // // * ErrCodeConcurrentModificationException "ConcurrentModificationException" @@ -367,40 +367,42 @@ func (c *Organizations) AttachPolicyRequest(input *AttachPolicyInput) (req *requ // // * ErrCodeConstraintViolationException "ConstraintViolationException" // Performing this operation violates a minimum or maximum value limit. For -// example, attempting to removing the last SCP from an OU or root, inviting -// or creating too many accounts to the organization, or attaching too many -// policies to an account, OU, or root. This exception includes a reason that -// contains additional information about the violated limit: +// example, attempting to removing the last service control policy (SCP) from +// an OU or root, inviting or creating too many accounts to the organization, +// or attaching too many policies to an account, OU, or root. This exception +// includes a reason that contains additional information about the violated +// limit. // // Some of the reasons in the following list might not be applicable to this // specific API or operation: // -// ACCOUNT_NUMBER_LIMIT_EXCEEDED: You attempted to exceed the limit on the number -// of accounts in an organization. If you need more accounts, contact AWS Support -// to request an increase in your limit. +// * ACCOUNT_NUMBER_LIMIT_EXCEEDED: You attempted to exceed the limit on +// the number of accounts in an organization. If you need more accounts, +// contactAWS Support (https://console.aws.amazon.com/support/home#/) to +// request an increase in your limit. // -// Or, The number of invitations that you tried to send would cause you to exceed -// the limit of accounts in your organization. Send fewer invitations, or contact -// AWS Support to request an increase in the number of accounts. +// Or the number of invitations that you tried to send would cause you to exceed +// the limit of accounts in your organization. Send fewer invitations or +// contact AWS Support to request an increase in the number of accounts. // -// Note: deleted and closed accounts still count toward your limit. +// Deleted and closed accounts still count toward your limit. // // If you get receive this exception when running a command immediately after -// creating the organization, wait one hour and try again. If after an hour -// it continues to fail with this error, contact AWS Customer Support (https://console.aws.amazon.com/support/home#/). +// creating the organization, wait one hour and try again. If after an hour +// it continues to fail with this error, contact AWS Support (https://console.aws.amazon.com/support/home#/). // // * HANDSHAKE_RATE_LIMIT_EXCEEDED: You attempted to exceed the number of -// handshakes you can send in one day. +// handshakes that you can send in one day. // -// * OU_NUMBER_LIMIT_EXCEEDED: You attempted to exceed the number of organizational -// units you can have in an organization. +// * OU_NUMBER_LIMIT_EXCEEDED: You attempted to exceed the number of OUs +// that you can have in an organization. // -// * OU_DEPTH_LIMIT_EXCEEDED: You attempted to create an organizational unit -// tree that is too many levels deep. +// * OU_DEPTH_LIMIT_EXCEEDED: You attempted to create an OU tree that is +// too many levels deep. // // * ORGANIZATION_NOT_IN_ALL_FEATURES_MODE: You attempted to perform an operation // that requires the organization to be configured to support all features. -// An organization that supports consolidated billing features only cannot +// An organization that supports only consolidated billing features can't // perform this operation. // // * POLICY_NUMBER_LIMIT_EXCEEDED. You attempted to exceed the number of @@ -415,23 +417,24 @@ func (c *Organizations) AttachPolicyRequest(input *AttachPolicyInput) (req *requ // minimum number of policies of a certain type required. // // * ACCOUNT_CANNOT_LEAVE_WITHOUT_EULA: You attempted to remove an account -// from the organization that does not yet have enough information to exist -// as a stand-alone account. This account requires you to first agree to -// the AWS Customer Agreement. Follow the steps at To leave an organization -// when all required account information has not yet been provided (http://docs.aws.amazon.com/organizations/latest/userguide/orgs_manage_accounts_remove.html#leave-without-all-info) +// from the organization that doesn't yet have enough information to exist +// as a standalone account. This account requires you to first agree to the +// AWS Customer Agreement. Follow the steps at To leave an organization when +// all required account information has not yet been provided (http://docs.aws.amazon.com/organizations/latest/userguide/orgs_manage_accounts_remove.html#leave-without-all-info) // in the AWS Organizations User Guide. // // * ACCOUNT_CANNOT_LEAVE_WITHOUT_PHONE_VERIFICATION: You attempted to remove -// an account from the organization that does not yet have enough information -// to exist as a stand-alone account. This account requires you to first -// complete phone verification. Follow the steps at To leave an organization -// when all required account information has not yet been provided (http://docs.aws.amazon.com/organizations/latest/userguide/orgs_manage_accounts_remove.html#leave-without-all-info) +// an account from the organization that doesn't yet have enough information +// to exist as a standalone account. This account requires you to first complete +// phone verification. Follow the steps at To leave an organization when +// all required account information has not yet been provided (http://docs.aws.amazon.com/organizations/latest/userguide/orgs_manage_accounts_remove.html#leave-without-all-info) // in the AWS Organizations User Guide. // // * MASTER_ACCOUNT_PAYMENT_INSTRUMENT_REQUIRED: To create an organization -// with this account, you first must associate a payment instrument, such -// as a credit card, with the account. Follow the steps at To leave an organization -// when all required account information has not yet been provided (http://docs.aws.amazon.com/organizations/latest/userguide/orgs_manage_accounts_remove.html#leave-without-all-info) +// with this master account, you first must associate a payment instrument, +// such as a credit card, with the account. Follow the steps at To leave +// an organization when all required account information has not yet been +// provided (http://docs.aws.amazon.com/organizations/latest/userguide/orgs_manage_accounts_remove.html#leave-without-all-info) // in the AWS Organizations User Guide. // // * MEMBER_ACCOUNT_PAYMENT_INSTRUMENT_REQUIRED: To complete this operation @@ -467,11 +470,11 @@ func (c *Organizations) AttachPolicyRequest(input *AttachPolicyInput) (req *requ // specific API or operation: // // * IMMUTABLE_POLICY: You specified a policy that is managed by AWS and -// cannot be modified. +// can't be modified. // // * INPUT_REQUIRED: You must include a value for all required parameters. // -// * INVALID_ENUM: You specified a value that is not valid for that parameter. +// * INVALID_ENUM: You specified a value that isn't valid for that parameter. // // * INVALID_FULL_NAME_TARGET: You specified a full name that contains invalid // characters. @@ -491,11 +494,11 @@ func (c *Organizations) AttachPolicyRequest(input *AttachPolicyInput) (req *requ // * INVALID_PATTERN_TARGET_ID: You specified a policy target ID that doesn't // match the required pattern. // -// * INVALID_ROLE_NAME: You provided a role name that is not valid. A role -// name can’t begin with the reserved prefix 'AWSServiceRoleFor'. +// * INVALID_ROLE_NAME: You provided a role name that isn't valid. A role +// name can't begin with the reserved prefix AWSServiceRoleFor. // -// * INVALID_SYNTAX_ORGANIZATION_ARN: You specified an invalid ARN for the -// organization. +// * INVALID_SYNTAX_ORGANIZATION_ARN: You specified an invalid Amazon Resource +// Name (ARN) for the organization. // // * INVALID_SYNTAX_POLICY_ID: You specified an invalid policy ID. // @@ -521,7 +524,7 @@ func (c *Organizations) AttachPolicyRequest(input *AttachPolicyInput) (req *requ // We can't find a policy with the PolicyId that you specified. // // * ErrCodePolicyTypeNotEnabledException "PolicyTypeNotEnabledException" -// The specified policy type is not currently enabled in this root. You cannot +// The specified policy type isn't currently enabled in this root. You can't // attach policies of the specified type to entities in a root until you enable // that type in the root. For more information, see Enabling All Features in // Your Organization (http://docs.aws.amazon.com/organizations/latest/userguide/orgs_manage_org_support-all-features.html) @@ -638,7 +641,7 @@ func (c *Organizations) CancelHandshakeRequest(input *CancelHandshakeInput) (req // // * ErrCodeInvalidHandshakeTransitionException "InvalidHandshakeTransitionException" // You can't perform the operation on the handshake in its current state. For -// example, you can't cancel a handshake that was already accepted, or accept +// example, you can't cancel a handshake that was already accepted or accept // a handshake that was already declined. // // * ErrCodeHandshakeAlreadyInStateException "HandshakeAlreadyInStateException" @@ -654,11 +657,11 @@ func (c *Organizations) CancelHandshakeRequest(input *CancelHandshakeInput) (req // specific API or operation: // // * IMMUTABLE_POLICY: You specified a policy that is managed by AWS and -// cannot be modified. +// can't be modified. // // * INPUT_REQUIRED: You must include a value for all required parameters. // -// * INVALID_ENUM: You specified a value that is not valid for that parameter. +// * INVALID_ENUM: You specified a value that isn't valid for that parameter. // // * INVALID_FULL_NAME_TARGET: You specified a full name that contains invalid // characters. @@ -678,11 +681,11 @@ func (c *Organizations) CancelHandshakeRequest(input *CancelHandshakeInput) (req // * INVALID_PATTERN_TARGET_ID: You specified a policy target ID that doesn't // match the required pattern. // -// * INVALID_ROLE_NAME: You provided a role name that is not valid. A role -// name can’t begin with the reserved prefix 'AWSServiceRoleFor'. +// * INVALID_ROLE_NAME: You provided a role name that isn't valid. A role +// name can't begin with the reserved prefix AWSServiceRoleFor. // -// * INVALID_SYNTAX_ORGANIZATION_ARN: You specified an invalid ARN for the -// organization. +// * INVALID_SYNTAX_ORGANIZATION_ARN: You specified an invalid Amazon Resource +// Name (ARN) for the organization. // // * INVALID_SYNTAX_POLICY_ID: You specified an invalid policy ID. // @@ -780,57 +783,57 @@ func (c *Organizations) CreateAccountRequest(input *CreateAccountInput) (req *re // // Creates an AWS account that is automatically a member of the organization // whose credentials made the request. This is an asynchronous request that -// AWS performs in the background. If you want to check the status of the request -// later, you need the OperationId response element from this operation to provide -// as a parameter to the DescribeCreateAccountStatus operation. +// AWS performs in the background. Because CreateAccount operates asynchronously, +// it can return a successful completion message even though account initialization +// might still be in progress. You might need to wait a few minutes before you +// can successfully access the account. To check the status of the request, +// do one of the following: // -// The user who calls the API for an invitation to join must have the organizations:CreateAccount -// permission. If you enabled all features in the organization, then the user -// must also have the iam:CreateServiceLinkedRole permission so that Organizations -// can create the required service-linked role named OrgsServiceLinkedRoleName. -// For more information, see AWS Organizations and Service-Linked Roles (http://docs.aws.amazon.com/organizations/latest/userguide/orgs_integration_services.html#orgs_integration_service-linked-roles) -// in the AWS Organizations User Guide. +// * Use the OperationId response element from this operation to provide +// as a parameter to the DescribeCreateAccountStatus operation. // -// The user in the master account who calls this API must also have the iam:CreateRole -// permission because AWS Organizations preconfigures the new member account -// with a role (named OrganizationAccountAccessRole by default) that grants -// users in the master account administrator permissions in the new member account. -// Principals in the master account can assume the role. AWS Organizations clones -// the company name and address information for the new account from the organization's -// master account. +// * Check the AWS CloudTrail log for the CreateAccountResult event. For +// information on using AWS CloudTrail with Organizations, see Monitoring +// the Activity in Your Organization (http://docs.aws.amazon.com/organizations/latest/userguide/orgs_monitoring.html) +// in the AWS Organizations User Guide. +// +// The user who calls the API to create an account must have the organizations:CreateAccountpermission. If you enabled all features in the organization, AWS Organizations +// will create the required service-linked role named AWSServiceRoleForOrganizations. For more information, see AWS Organizations and Service-Linked Roles (http://docs.aws.amazon.com/organizations/latest/userguide/orgs_integrate_services.html#orgs_integrate_services-using_slrs)in the AWS Organizations User Guide. +// +// AWS Organizations preconfigures the new member account with a role (named +// OrganizationAccountAccessRoleby default) that grants users in the master account administrator permissions +// in the new member account. Principals in the master account can assume the +// role. AWS Organizations clones the company name and address information for +// the new account from the organization's master account. // // This operation can be called only from the organization's master account. // // For more information about creating accounts, see Creating an AWS Account -// in Your Organization (http://docs.aws.amazon.com/organizations/latest/userguide/orgs_manage_accounts_create.html) -// in the AWS Organizations User Guide. +// in Your Organization (http://docs.aws.amazon.com/organizations/latest/userguide/orgs_manage_accounts_create.html)in the AWS Organizations User Guide. // // When you create an account in an organization using the AWS Organizations // console, API, or CLI commands, the information required for the account to // operate as a standalone account, such as a payment method and signing the -// End User Licence Agreement (EULA) is not automatically collected. If you +// end user license agreement (EULA) is not automatically collected. If you // must remove an account from your organization later, you can do so only after // you provide the missing information. Follow the steps at To leave an organization -// when all required account information has not yet been provided (http://docs.aws.amazon.com/organizations/latest/userguide/orgs_manage_accounts_remove.html#leave-without-all-info) +// as a member account (http://docs.aws.amazon.com/organizations/latest/userguide/orgs_manage_accounts_remove.html#leave-without-all-info) // in the AWS Organizations User Guide. // // If you get an exception that indicates that you exceeded your account limits -// for the organization or that the operation failed because your organization -// is still initializing, wait one hour and then try again. If the error persists -// after an hour, then contact AWS Customer Support (https://console.aws.amazon.com/support/home#/). +// for the organization, contact AWS Support (https://console.aws.amazon.com/support/home#/). // -// Because CreateAccount operates asynchronously, it can return a successful -// completion message even though account initialization might still be in progress. -// You might need to wait a few minutes before you can successfully access the -// account. +// If you get an exception that indicates that the operation failed because +// your organization is still initializing, wait one hour and then try again. +// If the error persists, contact AWS Support (https://console.aws.amazon.com/support/home#/). // // When you create a member account with this operation, you can choose whether // to create the account with the IAM User and Role Access to Billing Information // switch enabled. If you enable it, IAM users and roles that have appropriate // permissions can view billing information for the account. If you disable -// this, then only the account root user can access billing information. For -// information about how to disable this for an account, see Granting Access -// to Your Billing Information and Tools (http://docs.aws.amazon.com/awsaccountbilling/latest/aboutv2/grantaccess.html). +// it, only the account root user can access billing information. For information +// about how to disable this switch for an account, see Granting Access to Your +// Billing Information and Tools (http://docs.aws.amazon.com/awsaccountbilling/latest/aboutv2/grantaccess.html). // // Returns awserr.Error for service API and SDK errors. Use runtime type assertions // with awserr.Error's Code and Message methods to get detailed information about @@ -848,7 +851,7 @@ func (c *Organizations) CreateAccountRequest(input *CreateAccountInput) (req *re // in the IAM User Guide. // // * ErrCodeAWSOrganizationsNotInUseException "AWSOrganizationsNotInUseException" -// Your account is not a member of an organization. To make this request, you +// Your account isn't a member of an organization. To make this request, you // must use the credentials of an account that belongs to an organization. // // * ErrCodeConcurrentModificationException "ConcurrentModificationException" @@ -857,40 +860,42 @@ func (c *Organizations) CreateAccountRequest(input *CreateAccountInput) (req *re // // * ErrCodeConstraintViolationException "ConstraintViolationException" // Performing this operation violates a minimum or maximum value limit. For -// example, attempting to removing the last SCP from an OU or root, inviting -// or creating too many accounts to the organization, or attaching too many -// policies to an account, OU, or root. This exception includes a reason that -// contains additional information about the violated limit: +// example, attempting to removing the last service control policy (SCP) from +// an OU or root, inviting or creating too many accounts to the organization, +// or attaching too many policies to an account, OU, or root. This exception +// includes a reason that contains additional information about the violated +// limit. // // Some of the reasons in the following list might not be applicable to this // specific API or operation: // -// ACCOUNT_NUMBER_LIMIT_EXCEEDED: You attempted to exceed the limit on the number -// of accounts in an organization. If you need more accounts, contact AWS Support -// to request an increase in your limit. +// * ACCOUNT_NUMBER_LIMIT_EXCEEDED: You attempted to exceed the limit on +// the number of accounts in an organization. If you need more accounts, +// contactAWS Support (https://console.aws.amazon.com/support/home#/) to +// request an increase in your limit. // -// Or, The number of invitations that you tried to send would cause you to exceed -// the limit of accounts in your organization. Send fewer invitations, or contact -// AWS Support to request an increase in the number of accounts. +// Or the number of invitations that you tried to send would cause you to exceed +// the limit of accounts in your organization. Send fewer invitations or +// contact AWS Support to request an increase in the number of accounts. // -// Note: deleted and closed accounts still count toward your limit. +// Deleted and closed accounts still count toward your limit. // // If you get receive this exception when running a command immediately after -// creating the organization, wait one hour and try again. If after an hour -// it continues to fail with this error, contact AWS Customer Support (https://console.aws.amazon.com/support/home#/). +// creating the organization, wait one hour and try again. If after an hour +// it continues to fail with this error, contact AWS Support (https://console.aws.amazon.com/support/home#/). // // * HANDSHAKE_RATE_LIMIT_EXCEEDED: You attempted to exceed the number of -// handshakes you can send in one day. +// handshakes that you can send in one day. // -// * OU_NUMBER_LIMIT_EXCEEDED: You attempted to exceed the number of organizational -// units you can have in an organization. +// * OU_NUMBER_LIMIT_EXCEEDED: You attempted to exceed the number of OUs +// that you can have in an organization. // -// * OU_DEPTH_LIMIT_EXCEEDED: You attempted to create an organizational unit -// tree that is too many levels deep. +// * OU_DEPTH_LIMIT_EXCEEDED: You attempted to create an OU tree that is +// too many levels deep. // // * ORGANIZATION_NOT_IN_ALL_FEATURES_MODE: You attempted to perform an operation // that requires the organization to be configured to support all features. -// An organization that supports consolidated billing features only cannot +// An organization that supports only consolidated billing features can't // perform this operation. // // * POLICY_NUMBER_LIMIT_EXCEEDED. You attempted to exceed the number of @@ -905,23 +910,24 @@ func (c *Organizations) CreateAccountRequest(input *CreateAccountInput) (req *re // minimum number of policies of a certain type required. // // * ACCOUNT_CANNOT_LEAVE_WITHOUT_EULA: You attempted to remove an account -// from the organization that does not yet have enough information to exist -// as a stand-alone account. This account requires you to first agree to -// the AWS Customer Agreement. Follow the steps at To leave an organization -// when all required account information has not yet been provided (http://docs.aws.amazon.com/organizations/latest/userguide/orgs_manage_accounts_remove.html#leave-without-all-info) +// from the organization that doesn't yet have enough information to exist +// as a standalone account. This account requires you to first agree to the +// AWS Customer Agreement. Follow the steps at To leave an organization when +// all required account information has not yet been provided (http://docs.aws.amazon.com/organizations/latest/userguide/orgs_manage_accounts_remove.html#leave-without-all-info) // in the AWS Organizations User Guide. // // * ACCOUNT_CANNOT_LEAVE_WITHOUT_PHONE_VERIFICATION: You attempted to remove -// an account from the organization that does not yet have enough information -// to exist as a stand-alone account. This account requires you to first -// complete phone verification. Follow the steps at To leave an organization -// when all required account information has not yet been provided (http://docs.aws.amazon.com/organizations/latest/userguide/orgs_manage_accounts_remove.html#leave-without-all-info) +// an account from the organization that doesn't yet have enough information +// to exist as a standalone account. This account requires you to first complete +// phone verification. Follow the steps at To leave an organization when +// all required account information has not yet been provided (http://docs.aws.amazon.com/organizations/latest/userguide/orgs_manage_accounts_remove.html#leave-without-all-info) // in the AWS Organizations User Guide. // // * MASTER_ACCOUNT_PAYMENT_INSTRUMENT_REQUIRED: To create an organization -// with this account, you first must associate a payment instrument, such -// as a credit card, with the account. Follow the steps at To leave an organization -// when all required account information has not yet been provided (http://docs.aws.amazon.com/organizations/latest/userguide/orgs_manage_accounts_remove.html#leave-without-all-info) +// with this master account, you first must associate a payment instrument, +// such as a credit card, with the account. Follow the steps at To leave +// an organization when all required account information has not yet been +// provided (http://docs.aws.amazon.com/organizations/latest/userguide/orgs_manage_accounts_remove.html#leave-without-all-info) // in the AWS Organizations User Guide. // // * MEMBER_ACCOUNT_PAYMENT_INSTRUMENT_REQUIRED: To complete this operation @@ -954,11 +960,11 @@ func (c *Organizations) CreateAccountRequest(input *CreateAccountInput) (req *re // specific API or operation: // // * IMMUTABLE_POLICY: You specified a policy that is managed by AWS and -// cannot be modified. +// can't be modified. // // * INPUT_REQUIRED: You must include a value for all required parameters. // -// * INVALID_ENUM: You specified a value that is not valid for that parameter. +// * INVALID_ENUM: You specified a value that isn't valid for that parameter. // // * INVALID_FULL_NAME_TARGET: You specified a full name that contains invalid // characters. @@ -978,11 +984,11 @@ func (c *Organizations) CreateAccountRequest(input *CreateAccountInput) (req *re // * INVALID_PATTERN_TARGET_ID: You specified a policy target ID that doesn't // match the required pattern. // -// * INVALID_ROLE_NAME: You provided a role name that is not valid. A role -// name can’t begin with the reserved prefix 'AWSServiceRoleFor'. +// * INVALID_ROLE_NAME: You provided a role name that isn't valid. A role +// name can't begin with the reserved prefix AWSServiceRoleFor. // -// * INVALID_SYNTAX_ORGANIZATION_ARN: You specified an invalid ARN for the -// organization. +// * INVALID_SYNTAX_ORGANIZATION_ARN: You specified an invalid Amazon Resource +// Name (ARN) for the organization. // // * INVALID_SYNTAX_POLICY_ID: You specified an invalid policy ID. // @@ -1005,10 +1011,10 @@ func (c *Organizations) CreateAccountRequest(input *CreateAccountInput) (req *re // between entities in the same root. // // * ErrCodeFinalizingOrganizationException "FinalizingOrganizationException" -// AWS Organizations could not perform the operation because your organization -// has not finished initializing. This can take up to an hour. Try again later. -// If after one hour you continue to receive this error, contact AWS Customer -// Support (https://console.aws.amazon.com/support/home#/). +// AWS Organizations couldn't perform the operation because your organization +// hasn't finished initializing. This can take up to an hour. Try again later. +// If after one hour you continue to receive this error, contact AWS Support +// (https://console.aws.amazon.com/support/home#/). // // * ErrCodeServiceException "ServiceException" // AWS Organizations can't complete your request because of an internal service @@ -1124,40 +1130,42 @@ func (c *Organizations) CreateOrganizationRequest(input *CreateOrganizationInput // // * ErrCodeConstraintViolationException "ConstraintViolationException" // Performing this operation violates a minimum or maximum value limit. For -// example, attempting to removing the last SCP from an OU or root, inviting -// or creating too many accounts to the organization, or attaching too many -// policies to an account, OU, or root. This exception includes a reason that -// contains additional information about the violated limit: +// example, attempting to removing the last service control policy (SCP) from +// an OU or root, inviting or creating too many accounts to the organization, +// or attaching too many policies to an account, OU, or root. This exception +// includes a reason that contains additional information about the violated +// limit. // // Some of the reasons in the following list might not be applicable to this // specific API or operation: // -// ACCOUNT_NUMBER_LIMIT_EXCEEDED: You attempted to exceed the limit on the number -// of accounts in an organization. If you need more accounts, contact AWS Support -// to request an increase in your limit. +// * ACCOUNT_NUMBER_LIMIT_EXCEEDED: You attempted to exceed the limit on +// the number of accounts in an organization. If you need more accounts, +// contactAWS Support (https://console.aws.amazon.com/support/home#/) to +// request an increase in your limit. // -// Or, The number of invitations that you tried to send would cause you to exceed -// the limit of accounts in your organization. Send fewer invitations, or contact -// AWS Support to request an increase in the number of accounts. +// Or the number of invitations that you tried to send would cause you to exceed +// the limit of accounts in your organization. Send fewer invitations or +// contact AWS Support to request an increase in the number of accounts. // -// Note: deleted and closed accounts still count toward your limit. +// Deleted and closed accounts still count toward your limit. // // If you get receive this exception when running a command immediately after -// creating the organization, wait one hour and try again. If after an hour -// it continues to fail with this error, contact AWS Customer Support (https://console.aws.amazon.com/support/home#/). +// creating the organization, wait one hour and try again. If after an hour +// it continues to fail with this error, contact AWS Support (https://console.aws.amazon.com/support/home#/). // // * HANDSHAKE_RATE_LIMIT_EXCEEDED: You attempted to exceed the number of -// handshakes you can send in one day. +// handshakes that you can send in one day. // -// * OU_NUMBER_LIMIT_EXCEEDED: You attempted to exceed the number of organizational -// units you can have in an organization. +// * OU_NUMBER_LIMIT_EXCEEDED: You attempted to exceed the number of OUs +// that you can have in an organization. // -// * OU_DEPTH_LIMIT_EXCEEDED: You attempted to create an organizational unit -// tree that is too many levels deep. +// * OU_DEPTH_LIMIT_EXCEEDED: You attempted to create an OU tree that is +// too many levels deep. // // * ORGANIZATION_NOT_IN_ALL_FEATURES_MODE: You attempted to perform an operation // that requires the organization to be configured to support all features. -// An organization that supports consolidated billing features only cannot +// An organization that supports only consolidated billing features can't // perform this operation. // // * POLICY_NUMBER_LIMIT_EXCEEDED. You attempted to exceed the number of @@ -1172,23 +1180,24 @@ func (c *Organizations) CreateOrganizationRequest(input *CreateOrganizationInput // minimum number of policies of a certain type required. // // * ACCOUNT_CANNOT_LEAVE_WITHOUT_EULA: You attempted to remove an account -// from the organization that does not yet have enough information to exist -// as a stand-alone account. This account requires you to first agree to -// the AWS Customer Agreement. Follow the steps at To leave an organization -// when all required account information has not yet been provided (http://docs.aws.amazon.com/organizations/latest/userguide/orgs_manage_accounts_remove.html#leave-without-all-info) +// from the organization that doesn't yet have enough information to exist +// as a standalone account. This account requires you to first agree to the +// AWS Customer Agreement. Follow the steps at To leave an organization when +// all required account information has not yet been provided (http://docs.aws.amazon.com/organizations/latest/userguide/orgs_manage_accounts_remove.html#leave-without-all-info) // in the AWS Organizations User Guide. // // * ACCOUNT_CANNOT_LEAVE_WITHOUT_PHONE_VERIFICATION: You attempted to remove -// an account from the organization that does not yet have enough information -// to exist as a stand-alone account. This account requires you to first -// complete phone verification. Follow the steps at To leave an organization -// when all required account information has not yet been provided (http://docs.aws.amazon.com/organizations/latest/userguide/orgs_manage_accounts_remove.html#leave-without-all-info) +// an account from the organization that doesn't yet have enough information +// to exist as a standalone account. This account requires you to first complete +// phone verification. Follow the steps at To leave an organization when +// all required account information has not yet been provided (http://docs.aws.amazon.com/organizations/latest/userguide/orgs_manage_accounts_remove.html#leave-without-all-info) // in the AWS Organizations User Guide. // // * MASTER_ACCOUNT_PAYMENT_INSTRUMENT_REQUIRED: To create an organization -// with this account, you first must associate a payment instrument, such -// as a credit card, with the account. Follow the steps at To leave an organization -// when all required account information has not yet been provided (http://docs.aws.amazon.com/organizations/latest/userguide/orgs_manage_accounts_remove.html#leave-without-all-info) +// with this master account, you first must associate a payment instrument, +// such as a credit card, with the account. Follow the steps at To leave +// an organization when all required account information has not yet been +// provided (http://docs.aws.amazon.com/organizations/latest/userguide/orgs_manage_accounts_remove.html#leave-without-all-info) // in the AWS Organizations User Guide. // // * MEMBER_ACCOUNT_PAYMENT_INSTRUMENT_REQUIRED: To complete this operation @@ -1221,11 +1230,11 @@ func (c *Organizations) CreateOrganizationRequest(input *CreateOrganizationInput // specific API or operation: // // * IMMUTABLE_POLICY: You specified a policy that is managed by AWS and -// cannot be modified. +// can't be modified. // // * INPUT_REQUIRED: You must include a value for all required parameters. // -// * INVALID_ENUM: You specified a value that is not valid for that parameter. +// * INVALID_ENUM: You specified a value that isn't valid for that parameter. // // * INVALID_FULL_NAME_TARGET: You specified a full name that contains invalid // characters. @@ -1245,11 +1254,11 @@ func (c *Organizations) CreateOrganizationRequest(input *CreateOrganizationInput // * INVALID_PATTERN_TARGET_ID: You specified a policy target ID that doesn't // match the required pattern. // -// * INVALID_ROLE_NAME: You provided a role name that is not valid. A role -// name can’t begin with the reserved prefix 'AWSServiceRoleFor'. +// * INVALID_ROLE_NAME: You provided a role name that isn't valid. A role +// name can't begin with the reserved prefix AWSServiceRoleFor. // -// * INVALID_SYNTAX_ORGANIZATION_ARN: You specified an invalid ARN for the -// organization. +// * INVALID_SYNTAX_ORGANIZATION_ARN: You specified an invalid Amazon Resource +// Name (ARN) for the organization. // // * INVALID_SYNTAX_POLICY_ID: You specified an invalid policy ID. // @@ -1280,9 +1289,9 @@ func (c *Organizations) CreateOrganizationRequest(input *CreateOrganizationInput // protect against denial-of-service attacks. Try again later. // // * ErrCodeAccessDeniedForDependencyException "AccessDeniedForDependencyException" -// The operation you attempted requires you to have the iam:CreateServiceLinkedRole -// so that Organizations can create the required service-linked role. You do -// not have that permission. +// The operation that you attempted requires you to have the iam:CreateServiceLinkedRole +// so that AWS Organizations can create the required service-linked role. You +// don't have that permission. // // See also, https://docs.aws.amazon.com/goto/WebAPI/organizations-2016-11-28/CreateOrganization func (c *Organizations) CreateOrganization(input *CreateOrganizationInput) (*CreateOrganizationOutput, error) { @@ -1377,7 +1386,7 @@ func (c *Organizations) CreateOrganizationalUnitRequest(input *CreateOrganizatio // in the IAM User Guide. // // * ErrCodeAWSOrganizationsNotInUseException "AWSOrganizationsNotInUseException" -// Your account is not a member of an organization. To make this request, you +// Your account isn't a member of an organization. To make this request, you // must use the credentials of an account that belongs to an organization. // // * ErrCodeConcurrentModificationException "ConcurrentModificationException" @@ -1386,40 +1395,42 @@ func (c *Organizations) CreateOrganizationalUnitRequest(input *CreateOrganizatio // // * ErrCodeConstraintViolationException "ConstraintViolationException" // Performing this operation violates a minimum or maximum value limit. For -// example, attempting to removing the last SCP from an OU or root, inviting -// or creating too many accounts to the organization, or attaching too many -// policies to an account, OU, or root. This exception includes a reason that -// contains additional information about the violated limit: +// example, attempting to removing the last service control policy (SCP) from +// an OU or root, inviting or creating too many accounts to the organization, +// or attaching too many policies to an account, OU, or root. This exception +// includes a reason that contains additional information about the violated +// limit. // // Some of the reasons in the following list might not be applicable to this // specific API or operation: // -// ACCOUNT_NUMBER_LIMIT_EXCEEDED: You attempted to exceed the limit on the number -// of accounts in an organization. If you need more accounts, contact AWS Support -// to request an increase in your limit. +// * ACCOUNT_NUMBER_LIMIT_EXCEEDED: You attempted to exceed the limit on +// the number of accounts in an organization. If you need more accounts, +// contactAWS Support (https://console.aws.amazon.com/support/home#/) to +// request an increase in your limit. // -// Or, The number of invitations that you tried to send would cause you to exceed -// the limit of accounts in your organization. Send fewer invitations, or contact -// AWS Support to request an increase in the number of accounts. +// Or the number of invitations that you tried to send would cause you to exceed +// the limit of accounts in your organization. Send fewer invitations or +// contact AWS Support to request an increase in the number of accounts. // -// Note: deleted and closed accounts still count toward your limit. +// Deleted and closed accounts still count toward your limit. // // If you get receive this exception when running a command immediately after -// creating the organization, wait one hour and try again. If after an hour -// it continues to fail with this error, contact AWS Customer Support (https://console.aws.amazon.com/support/home#/). +// creating the organization, wait one hour and try again. If after an hour +// it continues to fail with this error, contact AWS Support (https://console.aws.amazon.com/support/home#/). // // * HANDSHAKE_RATE_LIMIT_EXCEEDED: You attempted to exceed the number of -// handshakes you can send in one day. +// handshakes that you can send in one day. // -// * OU_NUMBER_LIMIT_EXCEEDED: You attempted to exceed the number of organizational -// units you can have in an organization. +// * OU_NUMBER_LIMIT_EXCEEDED: You attempted to exceed the number of OUs +// that you can have in an organization. // -// * OU_DEPTH_LIMIT_EXCEEDED: You attempted to create an organizational unit -// tree that is too many levels deep. +// * OU_DEPTH_LIMIT_EXCEEDED: You attempted to create an OU tree that is +// too many levels deep. // // * ORGANIZATION_NOT_IN_ALL_FEATURES_MODE: You attempted to perform an operation // that requires the organization to be configured to support all features. -// An organization that supports consolidated billing features only cannot +// An organization that supports only consolidated billing features can't // perform this operation. // // * POLICY_NUMBER_LIMIT_EXCEEDED. You attempted to exceed the number of @@ -1434,23 +1445,24 @@ func (c *Organizations) CreateOrganizationalUnitRequest(input *CreateOrganizatio // minimum number of policies of a certain type required. // // * ACCOUNT_CANNOT_LEAVE_WITHOUT_EULA: You attempted to remove an account -// from the organization that does not yet have enough information to exist -// as a stand-alone account. This account requires you to first agree to -// the AWS Customer Agreement. Follow the steps at To leave an organization -// when all required account information has not yet been provided (http://docs.aws.amazon.com/organizations/latest/userguide/orgs_manage_accounts_remove.html#leave-without-all-info) +// from the organization that doesn't yet have enough information to exist +// as a standalone account. This account requires you to first agree to the +// AWS Customer Agreement. Follow the steps at To leave an organization when +// all required account information has not yet been provided (http://docs.aws.amazon.com/organizations/latest/userguide/orgs_manage_accounts_remove.html#leave-without-all-info) // in the AWS Organizations User Guide. // // * ACCOUNT_CANNOT_LEAVE_WITHOUT_PHONE_VERIFICATION: You attempted to remove -// an account from the organization that does not yet have enough information -// to exist as a stand-alone account. This account requires you to first -// complete phone verification. Follow the steps at To leave an organization -// when all required account information has not yet been provided (http://docs.aws.amazon.com/organizations/latest/userguide/orgs_manage_accounts_remove.html#leave-without-all-info) +// an account from the organization that doesn't yet have enough information +// to exist as a standalone account. This account requires you to first complete +// phone verification. Follow the steps at To leave an organization when +// all required account information has not yet been provided (http://docs.aws.amazon.com/organizations/latest/userguide/orgs_manage_accounts_remove.html#leave-without-all-info) // in the AWS Organizations User Guide. // // * MASTER_ACCOUNT_PAYMENT_INSTRUMENT_REQUIRED: To create an organization -// with this account, you first must associate a payment instrument, such -// as a credit card, with the account. Follow the steps at To leave an organization -// when all required account information has not yet been provided (http://docs.aws.amazon.com/organizations/latest/userguide/orgs_manage_accounts_remove.html#leave-without-all-info) +// with this master account, you first must associate a payment instrument, +// such as a credit card, with the account. Follow the steps at To leave +// an organization when all required account information has not yet been +// provided (http://docs.aws.amazon.com/organizations/latest/userguide/orgs_manage_accounts_remove.html#leave-without-all-info) // in the AWS Organizations User Guide. // // * MEMBER_ACCOUNT_PAYMENT_INSTRUMENT_REQUIRED: To complete this operation @@ -1475,7 +1487,7 @@ func (c *Organizations) CreateOrganizationalUnitRequest(input *CreateOrganizatio // account. Then try the operation again. // // * ErrCodeDuplicateOrganizationalUnitException "DuplicateOrganizationalUnitException" -// An organizational unit (OU) with the same name already exists. +// An OU with the same name already exists. // // * ErrCodeInvalidInputException "InvalidInputException" // The requested operation failed because you provided invalid values for one @@ -1486,11 +1498,11 @@ func (c *Organizations) CreateOrganizationalUnitRequest(input *CreateOrganizatio // specific API or operation: // // * IMMUTABLE_POLICY: You specified a policy that is managed by AWS and -// cannot be modified. +// can't be modified. // // * INPUT_REQUIRED: You must include a value for all required parameters. // -// * INVALID_ENUM: You specified a value that is not valid for that parameter. +// * INVALID_ENUM: You specified a value that isn't valid for that parameter. // // * INVALID_FULL_NAME_TARGET: You specified a full name that contains invalid // characters. @@ -1510,11 +1522,11 @@ func (c *Organizations) CreateOrganizationalUnitRequest(input *CreateOrganizatio // * INVALID_PATTERN_TARGET_ID: You specified a policy target ID that doesn't // match the required pattern. // -// * INVALID_ROLE_NAME: You provided a role name that is not valid. A role -// name can’t begin with the reserved prefix 'AWSServiceRoleFor'. +// * INVALID_ROLE_NAME: You provided a role name that isn't valid. A role +// name can't begin with the reserved prefix AWSServiceRoleFor. // -// * INVALID_SYNTAX_ORGANIZATION_ARN: You specified an invalid ARN for the -// organization. +// * INVALID_SYNTAX_ORGANIZATION_ARN: You specified an invalid Amazon Resource +// Name (ARN) for the organization. // // * INVALID_SYNTAX_POLICY_ID: You specified an invalid policy ID. // @@ -1537,8 +1549,7 @@ func (c *Organizations) CreateOrganizationalUnitRequest(input *CreateOrganizatio // between entities in the same root. // // * ErrCodeParentNotFoundException "ParentNotFoundException" -// We can't find a root or organizational unit (OU) with the ParentId that you -// specified. +// We can't find a root or OU with the ParentId that you specified. // // * ErrCodeServiceException "ServiceException" // AWS Organizations can't complete your request because of an internal service @@ -1638,7 +1649,7 @@ func (c *Organizations) CreatePolicyRequest(input *CreatePolicyInput) (req *requ // in the IAM User Guide. // // * ErrCodeAWSOrganizationsNotInUseException "AWSOrganizationsNotInUseException" -// Your account is not a member of an organization. To make this request, you +// Your account isn't a member of an organization. To make this request, you // must use the credentials of an account that belongs to an organization. // // * ErrCodeConcurrentModificationException "ConcurrentModificationException" @@ -1647,40 +1658,42 @@ func (c *Organizations) CreatePolicyRequest(input *CreatePolicyInput) (req *requ // // * ErrCodeConstraintViolationException "ConstraintViolationException" // Performing this operation violates a minimum or maximum value limit. For -// example, attempting to removing the last SCP from an OU or root, inviting -// or creating too many accounts to the organization, or attaching too many -// policies to an account, OU, or root. This exception includes a reason that -// contains additional information about the violated limit: +// example, attempting to removing the last service control policy (SCP) from +// an OU or root, inviting or creating too many accounts to the organization, +// or attaching too many policies to an account, OU, or root. This exception +// includes a reason that contains additional information about the violated +// limit. // // Some of the reasons in the following list might not be applicable to this // specific API or operation: // -// ACCOUNT_NUMBER_LIMIT_EXCEEDED: You attempted to exceed the limit on the number -// of accounts in an organization. If you need more accounts, contact AWS Support -// to request an increase in your limit. +// * ACCOUNT_NUMBER_LIMIT_EXCEEDED: You attempted to exceed the limit on +// the number of accounts in an organization. If you need more accounts, +// contactAWS Support (https://console.aws.amazon.com/support/home#/) to +// request an increase in your limit. // -// Or, The number of invitations that you tried to send would cause you to exceed -// the limit of accounts in your organization. Send fewer invitations, or contact -// AWS Support to request an increase in the number of accounts. +// Or the number of invitations that you tried to send would cause you to exceed +// the limit of accounts in your organization. Send fewer invitations or +// contact AWS Support to request an increase in the number of accounts. // -// Note: deleted and closed accounts still count toward your limit. +// Deleted and closed accounts still count toward your limit. // // If you get receive this exception when running a command immediately after -// creating the organization, wait one hour and try again. If after an hour -// it continues to fail with this error, contact AWS Customer Support (https://console.aws.amazon.com/support/home#/). +// creating the organization, wait one hour and try again. If after an hour +// it continues to fail with this error, contact AWS Support (https://console.aws.amazon.com/support/home#/). // // * HANDSHAKE_RATE_LIMIT_EXCEEDED: You attempted to exceed the number of -// handshakes you can send in one day. +// handshakes that you can send in one day. // -// * OU_NUMBER_LIMIT_EXCEEDED: You attempted to exceed the number of organizational -// units you can have in an organization. +// * OU_NUMBER_LIMIT_EXCEEDED: You attempted to exceed the number of OUs +// that you can have in an organization. // -// * OU_DEPTH_LIMIT_EXCEEDED: You attempted to create an organizational unit -// tree that is too many levels deep. +// * OU_DEPTH_LIMIT_EXCEEDED: You attempted to create an OU tree that is +// too many levels deep. // // * ORGANIZATION_NOT_IN_ALL_FEATURES_MODE: You attempted to perform an operation // that requires the organization to be configured to support all features. -// An organization that supports consolidated billing features only cannot +// An organization that supports only consolidated billing features can't // perform this operation. // // * POLICY_NUMBER_LIMIT_EXCEEDED. You attempted to exceed the number of @@ -1695,23 +1708,24 @@ func (c *Organizations) CreatePolicyRequest(input *CreatePolicyInput) (req *requ // minimum number of policies of a certain type required. // // * ACCOUNT_CANNOT_LEAVE_WITHOUT_EULA: You attempted to remove an account -// from the organization that does not yet have enough information to exist -// as a stand-alone account. This account requires you to first agree to -// the AWS Customer Agreement. Follow the steps at To leave an organization -// when all required account information has not yet been provided (http://docs.aws.amazon.com/organizations/latest/userguide/orgs_manage_accounts_remove.html#leave-without-all-info) +// from the organization that doesn't yet have enough information to exist +// as a standalone account. This account requires you to first agree to the +// AWS Customer Agreement. Follow the steps at To leave an organization when +// all required account information has not yet been provided (http://docs.aws.amazon.com/organizations/latest/userguide/orgs_manage_accounts_remove.html#leave-without-all-info) // in the AWS Organizations User Guide. // // * ACCOUNT_CANNOT_LEAVE_WITHOUT_PHONE_VERIFICATION: You attempted to remove -// an account from the organization that does not yet have enough information -// to exist as a stand-alone account. This account requires you to first -// complete phone verification. Follow the steps at To leave an organization -// when all required account information has not yet been provided (http://docs.aws.amazon.com/organizations/latest/userguide/orgs_manage_accounts_remove.html#leave-without-all-info) +// an account from the organization that doesn't yet have enough information +// to exist as a standalone account. This account requires you to first complete +// phone verification. Follow the steps at To leave an organization when +// all required account information has not yet been provided (http://docs.aws.amazon.com/organizations/latest/userguide/orgs_manage_accounts_remove.html#leave-without-all-info) // in the AWS Organizations User Guide. // // * MASTER_ACCOUNT_PAYMENT_INSTRUMENT_REQUIRED: To create an organization -// with this account, you first must associate a payment instrument, such -// as a credit card, with the account. Follow the steps at To leave an organization -// when all required account information has not yet been provided (http://docs.aws.amazon.com/organizations/latest/userguide/orgs_manage_accounts_remove.html#leave-without-all-info) +// with this master account, you first must associate a payment instrument, +// such as a credit card, with the account. Follow the steps at To leave +// an organization when all required account information has not yet been +// provided (http://docs.aws.amazon.com/organizations/latest/userguide/orgs_manage_accounts_remove.html#leave-without-all-info) // in the AWS Organizations User Guide. // // * MEMBER_ACCOUNT_PAYMENT_INSTRUMENT_REQUIRED: To complete this operation @@ -1747,11 +1761,11 @@ func (c *Organizations) CreatePolicyRequest(input *CreatePolicyInput) (req *requ // specific API or operation: // // * IMMUTABLE_POLICY: You specified a policy that is managed by AWS and -// cannot be modified. +// can't be modified. // // * INPUT_REQUIRED: You must include a value for all required parameters. // -// * INVALID_ENUM: You specified a value that is not valid for that parameter. +// * INVALID_ENUM: You specified a value that isn't valid for that parameter. // // * INVALID_FULL_NAME_TARGET: You specified a full name that contains invalid // characters. @@ -1771,11 +1785,11 @@ func (c *Organizations) CreatePolicyRequest(input *CreatePolicyInput) (req *requ // * INVALID_PATTERN_TARGET_ID: You specified a policy target ID that doesn't // match the required pattern. // -// * INVALID_ROLE_NAME: You provided a role name that is not valid. A role -// name can’t begin with the reserved prefix 'AWSServiceRoleFor'. +// * INVALID_ROLE_NAME: You provided a role name that isn't valid. A role +// name can't begin with the reserved prefix AWSServiceRoleFor. // -// * INVALID_SYNTAX_ORGANIZATION_ARN: You specified an invalid ARN for the -// organization. +// * INVALID_SYNTAX_ORGANIZATION_ARN: You specified an invalid Amazon Resource +// Name (ARN) for the organization. // // * INVALID_SYNTAX_POLICY_ID: You specified an invalid policy ID. // @@ -1798,16 +1812,16 @@ func (c *Organizations) CreatePolicyRequest(input *CreatePolicyInput) (req *requ // between entities in the same root. // // * ErrCodeMalformedPolicyDocumentException "MalformedPolicyDocumentException" -// The provided policy document does not meet the requirements of the specified +// The provided policy document doesn't meet the requirements of the specified // policy type. For example, the syntax might be incorrect. For details about // service control policy syntax, see Service Control Policy Syntax (http://docs.aws.amazon.com/organizations/latest/userguide/orgs_reference_scp-syntax.html) // in the AWS Organizations User Guide. // // * ErrCodePolicyTypeNotAvailableForOrganizationException "PolicyTypeNotAvailableForOrganizationException" // You can't use the specified policy type with the feature set currently enabled -// for this organization. For example, you can enable service control policies -// (SCPs) only after you enable all features in the organization. For more information, -// see Enabling and Disabling a Policy Type on a Root (http://docs.aws.amazon.com/organizations/latest/userguide/orgs_manage_policies.html#enable_policies_on_root) +// for this organization. For example, you can enable SCPs only after you enable +// all features in the organization. For more information, see Enabling and +// Disabling a Policy Type on a Root (http://docs.aws.amazon.com/organizations/latest/userguide/orgs_manage_policies.html#enable_policies_on_root) // in the AWS Organizations User Guide. // // * ErrCodeServiceException "ServiceException" @@ -1919,7 +1933,7 @@ func (c *Organizations) DeclineHandshakeRequest(input *DeclineHandshakeInput) (r // // * ErrCodeInvalidHandshakeTransitionException "InvalidHandshakeTransitionException" // You can't perform the operation on the handshake in its current state. For -// example, you can't cancel a handshake that was already accepted, or accept +// example, you can't cancel a handshake that was already accepted or accept // a handshake that was already declined. // // * ErrCodeHandshakeAlreadyInStateException "HandshakeAlreadyInStateException" @@ -1935,11 +1949,11 @@ func (c *Organizations) DeclineHandshakeRequest(input *DeclineHandshakeInput) (r // specific API or operation: // // * IMMUTABLE_POLICY: You specified a policy that is managed by AWS and -// cannot be modified. +// can't be modified. // // * INPUT_REQUIRED: You must include a value for all required parameters. // -// * INVALID_ENUM: You specified a value that is not valid for that parameter. +// * INVALID_ENUM: You specified a value that isn't valid for that parameter. // // * INVALID_FULL_NAME_TARGET: You specified a full name that contains invalid // characters. @@ -1959,11 +1973,11 @@ func (c *Organizations) DeclineHandshakeRequest(input *DeclineHandshakeInput) (r // * INVALID_PATTERN_TARGET_ID: You specified a policy target ID that doesn't // match the required pattern. // -// * INVALID_ROLE_NAME: You provided a role name that is not valid. A role -// name can’t begin with the reserved prefix 'AWSServiceRoleFor'. +// * INVALID_ROLE_NAME: You provided a role name that isn't valid. A role +// name can't begin with the reserved prefix AWSServiceRoleFor. // -// * INVALID_SYNTAX_ORGANIZATION_ARN: You specified an invalid ARN for the -// organization. +// * INVALID_SYNTAX_ORGANIZATION_ARN: You specified an invalid Amazon Resource +// Name (ARN) for the organization. // // * INVALID_SYNTAX_POLICY_ID: You specified an invalid policy ID. // @@ -2062,8 +2076,7 @@ func (c *Organizations) DeleteOrganizationRequest(input *DeleteOrganizationInput // DeleteOrganization API operation for AWS Organizations. // // Deletes the organization. You can delete an organization only by using credentials -// from the master account. The organization must be empty of member accounts, -// organizational units (OUs), and policies. +// from the master account. The organization must be empty of member accounts. // // Returns awserr.Error for service API and SDK errors. Use runtime type assertions // with awserr.Error's Code and Message methods to get detailed information about @@ -2081,7 +2094,7 @@ func (c *Organizations) DeleteOrganizationRequest(input *DeleteOrganizationInput // in the IAM User Guide. // // * ErrCodeAWSOrganizationsNotInUseException "AWSOrganizationsNotInUseException" -// Your account is not a member of an organization. To make this request, you +// Your account isn't a member of an organization. To make this request, you // must use the credentials of an account that belongs to an organization. // // * ErrCodeConcurrentModificationException "ConcurrentModificationException" @@ -2097,11 +2110,11 @@ func (c *Organizations) DeleteOrganizationRequest(input *DeleteOrganizationInput // specific API or operation: // // * IMMUTABLE_POLICY: You specified a policy that is managed by AWS and -// cannot be modified. +// can't be modified. // // * INPUT_REQUIRED: You must include a value for all required parameters. // -// * INVALID_ENUM: You specified a value that is not valid for that parameter. +// * INVALID_ENUM: You specified a value that isn't valid for that parameter. // // * INVALID_FULL_NAME_TARGET: You specified a full name that contains invalid // characters. @@ -2121,11 +2134,11 @@ func (c *Organizations) DeleteOrganizationRequest(input *DeleteOrganizationInput // * INVALID_PATTERN_TARGET_ID: You specified a policy target ID that doesn't // match the required pattern. // -// * INVALID_ROLE_NAME: You provided a role name that is not valid. A role -// name can’t begin with the reserved prefix 'AWSServiceRoleFor'. +// * INVALID_ROLE_NAME: You provided a role name that isn't valid. A role +// name can't begin with the reserved prefix AWSServiceRoleFor. // -// * INVALID_SYNTAX_ORGANIZATION_ARN: You specified an invalid ARN for the -// organization. +// * INVALID_SYNTAX_ORGANIZATION_ARN: You specified an invalid Amazon Resource +// Name (ARN) for the organization. // // * INVALID_SYNTAX_POLICY_ID: You specified an invalid policy ID. // @@ -2149,8 +2162,7 @@ func (c *Organizations) DeleteOrganizationRequest(input *DeleteOrganizationInput // // * ErrCodeOrganizationNotEmptyException "OrganizationNotEmptyException" // The organization isn't empty. To delete an organization, you must first remove -// all accounts except the master account, delete all organizational units (OUs), -// and delete all policies. +// all accounts except the master account, delete all OUs, and delete all policies. // // * ErrCodeServiceException "ServiceException" // AWS Organizations can't complete your request because of an internal service @@ -2249,7 +2261,7 @@ func (c *Organizations) DeleteOrganizationalUnitRequest(input *DeleteOrganizatio // in the IAM User Guide. // // * ErrCodeAWSOrganizationsNotInUseException "AWSOrganizationsNotInUseException" -// Your account is not a member of an organization. To make this request, you +// Your account isn't a member of an organization. To make this request, you // must use the credentials of an account that belongs to an organization. // // * ErrCodeConcurrentModificationException "ConcurrentModificationException" @@ -2265,11 +2277,11 @@ func (c *Organizations) DeleteOrganizationalUnitRequest(input *DeleteOrganizatio // specific API or operation: // // * IMMUTABLE_POLICY: You specified a policy that is managed by AWS and -// cannot be modified. +// can't be modified. // // * INPUT_REQUIRED: You must include a value for all required parameters. // -// * INVALID_ENUM: You specified a value that is not valid for that parameter. +// * INVALID_ENUM: You specified a value that isn't valid for that parameter. // // * INVALID_FULL_NAME_TARGET: You specified a full name that contains invalid // characters. @@ -2289,11 +2301,11 @@ func (c *Organizations) DeleteOrganizationalUnitRequest(input *DeleteOrganizatio // * INVALID_PATTERN_TARGET_ID: You specified a policy target ID that doesn't // match the required pattern. // -// * INVALID_ROLE_NAME: You provided a role name that is not valid. A role -// name can’t begin with the reserved prefix 'AWSServiceRoleFor'. +// * INVALID_ROLE_NAME: You provided a role name that isn't valid. A role +// name can't begin with the reserved prefix AWSServiceRoleFor. // -// * INVALID_SYNTAX_ORGANIZATION_ARN: You specified an invalid ARN for the -// organization. +// * INVALID_SYNTAX_ORGANIZATION_ARN: You specified an invalid Amazon Resource +// Name (ARN) for the organization. // // * INVALID_SYNTAX_POLICY_ID: You specified an invalid policy ID. // @@ -2316,13 +2328,11 @@ func (c *Organizations) DeleteOrganizationalUnitRequest(input *DeleteOrganizatio // between entities in the same root. // // * ErrCodeOrganizationalUnitNotEmptyException "OrganizationalUnitNotEmptyException" -// The specified organizational unit (OU) is not empty. Move all accounts to -// another root or to other OUs, remove all child OUs, and then try the operation -// again. +// The specified OU is not empty. Move all accounts to another root or to other +// OUs, remove all child OUs, and try the operation again. // // * ErrCodeOrganizationalUnitNotFoundException "OrganizationalUnitNotFoundException" -// We can't find an organizational unit (OU) with the OrganizationalUnitId that -// you specified. +// We can't find an OU with the OrganizationalUnitId that you specified. // // * ErrCodeServiceException "ServiceException" // AWS Organizations can't complete your request because of an internal service @@ -2422,7 +2432,7 @@ func (c *Organizations) DeletePolicyRequest(input *DeletePolicyInput) (req *requ // in the IAM User Guide. // // * ErrCodeAWSOrganizationsNotInUseException "AWSOrganizationsNotInUseException" -// Your account is not a member of an organization. To make this request, you +// Your account isn't a member of an organization. To make this request, you // must use the credentials of an account that belongs to an organization. // // * ErrCodeConcurrentModificationException "ConcurrentModificationException" @@ -2438,11 +2448,11 @@ func (c *Organizations) DeletePolicyRequest(input *DeletePolicyInput) (req *requ // specific API or operation: // // * IMMUTABLE_POLICY: You specified a policy that is managed by AWS and -// cannot be modified. +// can't be modified. // // * INPUT_REQUIRED: You must include a value for all required parameters. // -// * INVALID_ENUM: You specified a value that is not valid for that parameter. +// * INVALID_ENUM: You specified a value that isn't valid for that parameter. // // * INVALID_FULL_NAME_TARGET: You specified a full name that contains invalid // characters. @@ -2462,11 +2472,11 @@ func (c *Organizations) DeletePolicyRequest(input *DeletePolicyInput) (req *requ // * INVALID_PATTERN_TARGET_ID: You specified a policy target ID that doesn't // match the required pattern. // -// * INVALID_ROLE_NAME: You provided a role name that is not valid. A role -// name can’t begin with the reserved prefix 'AWSServiceRoleFor'. +// * INVALID_ROLE_NAME: You provided a role name that isn't valid. A role +// name can't begin with the reserved prefix AWSServiceRoleFor. // -// * INVALID_SYNTAX_ORGANIZATION_ARN: You specified an invalid ARN for the -// organization. +// * INVALID_SYNTAX_ORGANIZATION_ARN: You specified an invalid Amazon Resource +// Name (ARN) for the organization. // // * INVALID_SYNTAX_POLICY_ID: You specified an invalid policy ID. // @@ -2490,7 +2500,7 @@ func (c *Organizations) DeletePolicyRequest(input *DeletePolicyInput) (req *requ // // * ErrCodePolicyInUseException "PolicyInUseException" // The policy is attached to one or more entities. You must detach it from all -// roots, organizational units (OUs), and accounts before performing this operation. +// roots, OUs, and accounts before performing this operation. // // * ErrCodePolicyNotFoundException "PolicyNotFoundException" // We can't find a policy with the PolicyId that you specified. @@ -2590,11 +2600,11 @@ func (c *Organizations) DescribeAccountRequest(input *DescribeAccountInput) (req // // * ErrCodeAccountNotFoundException "AccountNotFoundException" // We can't find an AWS account with the AccountId that you specified, or the -// account whose credentials you used to make this request is not a member of +// account whose credentials you used to make this request isn't a member of // an organization. // // * ErrCodeAWSOrganizationsNotInUseException "AWSOrganizationsNotInUseException" -// Your account is not a member of an organization. To make this request, you +// Your account isn't a member of an organization. To make this request, you // must use the credentials of an account that belongs to an organization. // // * ErrCodeInvalidInputException "InvalidInputException" @@ -2606,11 +2616,11 @@ func (c *Organizations) DescribeAccountRequest(input *DescribeAccountInput) (req // specific API or operation: // // * IMMUTABLE_POLICY: You specified a policy that is managed by AWS and -// cannot be modified. +// can't be modified. // // * INPUT_REQUIRED: You must include a value for all required parameters. // -// * INVALID_ENUM: You specified a value that is not valid for that parameter. +// * INVALID_ENUM: You specified a value that isn't valid for that parameter. // // * INVALID_FULL_NAME_TARGET: You specified a full name that contains invalid // characters. @@ -2630,11 +2640,11 @@ func (c *Organizations) DescribeAccountRequest(input *DescribeAccountInput) (req // * INVALID_PATTERN_TARGET_ID: You specified a policy target ID that doesn't // match the required pattern. // -// * INVALID_ROLE_NAME: You provided a role name that is not valid. A role -// name can’t begin with the reserved prefix 'AWSServiceRoleFor'. +// * INVALID_ROLE_NAME: You provided a role name that isn't valid. A role +// name can't begin with the reserved prefix AWSServiceRoleFor. // -// * INVALID_SYNTAX_ORGANIZATION_ARN: You specified an invalid ARN for the -// organization. +// * INVALID_SYNTAX_ORGANIZATION_ARN: You specified an invalid Amazon Resource +// Name (ARN) for the organization. // // * INVALID_SYNTAX_POLICY_ID: You specified an invalid policy ID. // @@ -2750,7 +2760,7 @@ func (c *Organizations) DescribeCreateAccountStatusRequest(input *DescribeCreate // in the IAM User Guide. // // * ErrCodeAWSOrganizationsNotInUseException "AWSOrganizationsNotInUseException" -// Your account is not a member of an organization. To make this request, you +// Your account isn't a member of an organization. To make this request, you // must use the credentials of an account that belongs to an organization. // // * ErrCodeCreateAccountStatusNotFoundException "CreateAccountStatusNotFoundException" @@ -2766,11 +2776,11 @@ func (c *Organizations) DescribeCreateAccountStatusRequest(input *DescribeCreate // specific API or operation: // // * IMMUTABLE_POLICY: You specified a policy that is managed by AWS and -// cannot be modified. +// can't be modified. // // * INPUT_REQUIRED: You must include a value for all required parameters. // -// * INVALID_ENUM: You specified a value that is not valid for that parameter. +// * INVALID_ENUM: You specified a value that isn't valid for that parameter. // // * INVALID_FULL_NAME_TARGET: You specified a full name that contains invalid // characters. @@ -2790,11 +2800,11 @@ func (c *Organizations) DescribeCreateAccountStatusRequest(input *DescribeCreate // * INVALID_PATTERN_TARGET_ID: You specified a policy target ID that doesn't // match the required pattern. // -// * INVALID_ROLE_NAME: You provided a role name that is not valid. A role -// name can’t begin with the reserved prefix 'AWSServiceRoleFor'. +// * INVALID_ROLE_NAME: You provided a role name that isn't valid. A role +// name can't begin with the reserved prefix AWSServiceRoleFor. // -// * INVALID_SYNTAX_ORGANIZATION_ARN: You specified an invalid ARN for the -// organization. +// * INVALID_SYNTAX_ORGANIZATION_ARN: You specified an invalid Amazon Resource +// Name (ARN) for the organization. // // * INVALID_SYNTAX_POLICY_ID: You specified an invalid policy ID. // @@ -2931,11 +2941,11 @@ func (c *Organizations) DescribeHandshakeRequest(input *DescribeHandshakeInput) // specific API or operation: // // * IMMUTABLE_POLICY: You specified a policy that is managed by AWS and -// cannot be modified. +// can't be modified. // // * INPUT_REQUIRED: You must include a value for all required parameters. // -// * INVALID_ENUM: You specified a value that is not valid for that parameter. +// * INVALID_ENUM: You specified a value that isn't valid for that parameter. // // * INVALID_FULL_NAME_TARGET: You specified a full name that contains invalid // characters. @@ -2955,11 +2965,11 @@ func (c *Organizations) DescribeHandshakeRequest(input *DescribeHandshakeInput) // * INVALID_PATTERN_TARGET_ID: You specified a policy target ID that doesn't // match the required pattern. // -// * INVALID_ROLE_NAME: You provided a role name that is not valid. A role -// name can’t begin with the reserved prefix 'AWSServiceRoleFor'. +// * INVALID_ROLE_NAME: You provided a role name that isn't valid. A role +// name can't begin with the reserved prefix AWSServiceRoleFor. // -// * INVALID_SYNTAX_ORGANIZATION_ARN: You specified an invalid ARN for the -// organization. +// * INVALID_SYNTAX_ORGANIZATION_ARN: You specified an invalid Amazon Resource +// Name (ARN) for the organization. // // * INVALID_SYNTAX_POLICY_ID: You specified an invalid policy ID. // @@ -3080,7 +3090,7 @@ func (c *Organizations) DescribeOrganizationRequest(input *DescribeOrganizationI // in the IAM User Guide. // // * ErrCodeAWSOrganizationsNotInUseException "AWSOrganizationsNotInUseException" -// Your account is not a member of an organization. To make this request, you +// Your account isn't a member of an organization. To make this request, you // must use the credentials of an account that belongs to an organization. // // * ErrCodeConcurrentModificationException "ConcurrentModificationException" @@ -3181,7 +3191,7 @@ func (c *Organizations) DescribeOrganizationalUnitRequest(input *DescribeOrganiz // in the IAM User Guide. // // * ErrCodeAWSOrganizationsNotInUseException "AWSOrganizationsNotInUseException" -// Your account is not a member of an organization. To make this request, you +// Your account isn't a member of an organization. To make this request, you // must use the credentials of an account that belongs to an organization. // // * ErrCodeInvalidInputException "InvalidInputException" @@ -3193,11 +3203,11 @@ func (c *Organizations) DescribeOrganizationalUnitRequest(input *DescribeOrganiz // specific API or operation: // // * IMMUTABLE_POLICY: You specified a policy that is managed by AWS and -// cannot be modified. +// can't be modified. // // * INPUT_REQUIRED: You must include a value for all required parameters. // -// * INVALID_ENUM: You specified a value that is not valid for that parameter. +// * INVALID_ENUM: You specified a value that isn't valid for that parameter. // // * INVALID_FULL_NAME_TARGET: You specified a full name that contains invalid // characters. @@ -3217,11 +3227,11 @@ func (c *Organizations) DescribeOrganizationalUnitRequest(input *DescribeOrganiz // * INVALID_PATTERN_TARGET_ID: You specified a policy target ID that doesn't // match the required pattern. // -// * INVALID_ROLE_NAME: You provided a role name that is not valid. A role -// name can’t begin with the reserved prefix 'AWSServiceRoleFor'. +// * INVALID_ROLE_NAME: You provided a role name that isn't valid. A role +// name can't begin with the reserved prefix AWSServiceRoleFor. // -// * INVALID_SYNTAX_ORGANIZATION_ARN: You specified an invalid ARN for the -// organization. +// * INVALID_SYNTAX_ORGANIZATION_ARN: You specified an invalid Amazon Resource +// Name (ARN) for the organization. // // * INVALID_SYNTAX_POLICY_ID: You specified an invalid policy ID. // @@ -3244,8 +3254,7 @@ func (c *Organizations) DescribeOrganizationalUnitRequest(input *DescribeOrganiz // between entities in the same root. // // * ErrCodeOrganizationalUnitNotFoundException "OrganizationalUnitNotFoundException" -// We can't find an organizational unit (OU) with the OrganizationalUnitId that -// you specified. +// We can't find an OU with the OrganizationalUnitId that you specified. // // * ErrCodeServiceException "ServiceException" // AWS Organizations can't complete your request because of an internal service @@ -3341,7 +3350,7 @@ func (c *Organizations) DescribePolicyRequest(input *DescribePolicyInput) (req * // in the IAM User Guide. // // * ErrCodeAWSOrganizationsNotInUseException "AWSOrganizationsNotInUseException" -// Your account is not a member of an organization. To make this request, you +// Your account isn't a member of an organization. To make this request, you // must use the credentials of an account that belongs to an organization. // // * ErrCodeInvalidInputException "InvalidInputException" @@ -3353,11 +3362,11 @@ func (c *Organizations) DescribePolicyRequest(input *DescribePolicyInput) (req * // specific API or operation: // // * IMMUTABLE_POLICY: You specified a policy that is managed by AWS and -// cannot be modified. +// can't be modified. // // * INPUT_REQUIRED: You must include a value for all required parameters. // -// * INVALID_ENUM: You specified a value that is not valid for that parameter. +// * INVALID_ENUM: You specified a value that isn't valid for that parameter. // // * INVALID_FULL_NAME_TARGET: You specified a full name that contains invalid // characters. @@ -3377,11 +3386,11 @@ func (c *Organizations) DescribePolicyRequest(input *DescribePolicyInput) (req * // * INVALID_PATTERN_TARGET_ID: You specified a policy target ID that doesn't // match the required pattern. // -// * INVALID_ROLE_NAME: You provided a role name that is not valid. A role -// name can’t begin with the reserved prefix 'AWSServiceRoleFor'. +// * INVALID_ROLE_NAME: You provided a role name that isn't valid. A role +// name can't begin with the reserved prefix AWSServiceRoleFor. // -// * INVALID_SYNTAX_ORGANIZATION_ARN: You specified an invalid ARN for the -// organization. +// * INVALID_SYNTAX_ORGANIZATION_ARN: You specified an invalid Amazon Resource +// Name (ARN) for the organization. // // * INVALID_SYNTAX_POLICY_ID: You specified an invalid policy ID. // @@ -3514,7 +3523,7 @@ func (c *Organizations) DetachPolicyRequest(input *DetachPolicyInput) (req *requ // in the IAM User Guide. // // * ErrCodeAWSOrganizationsNotInUseException "AWSOrganizationsNotInUseException" -// Your account is not a member of an organization. To make this request, you +// Your account isn't a member of an organization. To make this request, you // must use the credentials of an account that belongs to an organization. // // * ErrCodeConcurrentModificationException "ConcurrentModificationException" @@ -3523,40 +3532,42 @@ func (c *Organizations) DetachPolicyRequest(input *DetachPolicyInput) (req *requ // // * ErrCodeConstraintViolationException "ConstraintViolationException" // Performing this operation violates a minimum or maximum value limit. For -// example, attempting to removing the last SCP from an OU or root, inviting -// or creating too many accounts to the organization, or attaching too many -// policies to an account, OU, or root. This exception includes a reason that -// contains additional information about the violated limit: +// example, attempting to removing the last service control policy (SCP) from +// an OU or root, inviting or creating too many accounts to the organization, +// or attaching too many policies to an account, OU, or root. This exception +// includes a reason that contains additional information about the violated +// limit. // // Some of the reasons in the following list might not be applicable to this // specific API or operation: // -// ACCOUNT_NUMBER_LIMIT_EXCEEDED: You attempted to exceed the limit on the number -// of accounts in an organization. If you need more accounts, contact AWS Support -// to request an increase in your limit. +// * ACCOUNT_NUMBER_LIMIT_EXCEEDED: You attempted to exceed the limit on +// the number of accounts in an organization. If you need more accounts, +// contactAWS Support (https://console.aws.amazon.com/support/home#/) to +// request an increase in your limit. // -// Or, The number of invitations that you tried to send would cause you to exceed -// the limit of accounts in your organization. Send fewer invitations, or contact -// AWS Support to request an increase in the number of accounts. +// Or the number of invitations that you tried to send would cause you to exceed +// the limit of accounts in your organization. Send fewer invitations or +// contact AWS Support to request an increase in the number of accounts. // -// Note: deleted and closed accounts still count toward your limit. +// Deleted and closed accounts still count toward your limit. // // If you get receive this exception when running a command immediately after -// creating the organization, wait one hour and try again. If after an hour -// it continues to fail with this error, contact AWS Customer Support (https://console.aws.amazon.com/support/home#/). +// creating the organization, wait one hour and try again. If after an hour +// it continues to fail with this error, contact AWS Support (https://console.aws.amazon.com/support/home#/). // // * HANDSHAKE_RATE_LIMIT_EXCEEDED: You attempted to exceed the number of -// handshakes you can send in one day. +// handshakes that you can send in one day. // -// * OU_NUMBER_LIMIT_EXCEEDED: You attempted to exceed the number of organizational -// units you can have in an organization. +// * OU_NUMBER_LIMIT_EXCEEDED: You attempted to exceed the number of OUs +// that you can have in an organization. // -// * OU_DEPTH_LIMIT_EXCEEDED: You attempted to create an organizational unit -// tree that is too many levels deep. +// * OU_DEPTH_LIMIT_EXCEEDED: You attempted to create an OU tree that is +// too many levels deep. // // * ORGANIZATION_NOT_IN_ALL_FEATURES_MODE: You attempted to perform an operation // that requires the organization to be configured to support all features. -// An organization that supports consolidated billing features only cannot +// An organization that supports only consolidated billing features can't // perform this operation. // // * POLICY_NUMBER_LIMIT_EXCEEDED. You attempted to exceed the number of @@ -3571,23 +3582,24 @@ func (c *Organizations) DetachPolicyRequest(input *DetachPolicyInput) (req *requ // minimum number of policies of a certain type required. // // * ACCOUNT_CANNOT_LEAVE_WITHOUT_EULA: You attempted to remove an account -// from the organization that does not yet have enough information to exist -// as a stand-alone account. This account requires you to first agree to -// the AWS Customer Agreement. Follow the steps at To leave an organization -// when all required account information has not yet been provided (http://docs.aws.amazon.com/organizations/latest/userguide/orgs_manage_accounts_remove.html#leave-without-all-info) +// from the organization that doesn't yet have enough information to exist +// as a standalone account. This account requires you to first agree to the +// AWS Customer Agreement. Follow the steps at To leave an organization when +// all required account information has not yet been provided (http://docs.aws.amazon.com/organizations/latest/userguide/orgs_manage_accounts_remove.html#leave-without-all-info) // in the AWS Organizations User Guide. // // * ACCOUNT_CANNOT_LEAVE_WITHOUT_PHONE_VERIFICATION: You attempted to remove -// an account from the organization that does not yet have enough information -// to exist as a stand-alone account. This account requires you to first -// complete phone verification. Follow the steps at To leave an organization -// when all required account information has not yet been provided (http://docs.aws.amazon.com/organizations/latest/userguide/orgs_manage_accounts_remove.html#leave-without-all-info) +// an account from the organization that doesn't yet have enough information +// to exist as a standalone account. This account requires you to first complete +// phone verification. Follow the steps at To leave an organization when +// all required account information has not yet been provided (http://docs.aws.amazon.com/organizations/latest/userguide/orgs_manage_accounts_remove.html#leave-without-all-info) // in the AWS Organizations User Guide. // // * MASTER_ACCOUNT_PAYMENT_INSTRUMENT_REQUIRED: To create an organization -// with this account, you first must associate a payment instrument, such -// as a credit card, with the account. Follow the steps at To leave an organization -// when all required account information has not yet been provided (http://docs.aws.amazon.com/organizations/latest/userguide/orgs_manage_accounts_remove.html#leave-without-all-info) +// with this master account, you first must associate a payment instrument, +// such as a credit card, with the account. Follow the steps at To leave +// an organization when all required account information has not yet been +// provided (http://docs.aws.amazon.com/organizations/latest/userguide/orgs_manage_accounts_remove.html#leave-without-all-info) // in the AWS Organizations User Guide. // // * MEMBER_ACCOUNT_PAYMENT_INSTRUMENT_REQUIRED: To complete this operation @@ -3620,11 +3632,11 @@ func (c *Organizations) DetachPolicyRequest(input *DetachPolicyInput) (req *requ // specific API or operation: // // * IMMUTABLE_POLICY: You specified a policy that is managed by AWS and -// cannot be modified. +// can't be modified. // // * INPUT_REQUIRED: You must include a value for all required parameters. // -// * INVALID_ENUM: You specified a value that is not valid for that parameter. +// * INVALID_ENUM: You specified a value that isn't valid for that parameter. // // * INVALID_FULL_NAME_TARGET: You specified a full name that contains invalid // characters. @@ -3644,11 +3656,11 @@ func (c *Organizations) DetachPolicyRequest(input *DetachPolicyInput) (req *requ // * INVALID_PATTERN_TARGET_ID: You specified a policy target ID that doesn't // match the required pattern. // -// * INVALID_ROLE_NAME: You provided a role name that is not valid. A role -// name can’t begin with the reserved prefix 'AWSServiceRoleFor'. +// * INVALID_ROLE_NAME: You provided a role name that isn't valid. A role +// name can't begin with the reserved prefix AWSServiceRoleFor. // -// * INVALID_SYNTAX_ORGANIZATION_ARN: You specified an invalid ARN for the -// organization. +// * INVALID_SYNTAX_ORGANIZATION_ARN: You specified an invalid Amazon Resource +// Name (ARN) for the organization. // // * INVALID_SYNTAX_POLICY_ID: You specified an invalid policy ID. // @@ -3795,7 +3807,7 @@ func (c *Organizations) DisableAWSServiceAccessRequest(input *DisableAWSServiceA // in the IAM User Guide. // // * ErrCodeAWSOrganizationsNotInUseException "AWSOrganizationsNotInUseException" -// Your account is not a member of an organization. To make this request, you +// Your account isn't a member of an organization. To make this request, you // must use the credentials of an account that belongs to an organization. // // * ErrCodeConcurrentModificationException "ConcurrentModificationException" @@ -3804,40 +3816,42 @@ func (c *Organizations) DisableAWSServiceAccessRequest(input *DisableAWSServiceA // // * ErrCodeConstraintViolationException "ConstraintViolationException" // Performing this operation violates a minimum or maximum value limit. For -// example, attempting to removing the last SCP from an OU or root, inviting -// or creating too many accounts to the organization, or attaching too many -// policies to an account, OU, or root. This exception includes a reason that -// contains additional information about the violated limit: +// example, attempting to removing the last service control policy (SCP) from +// an OU or root, inviting or creating too many accounts to the organization, +// or attaching too many policies to an account, OU, or root. This exception +// includes a reason that contains additional information about the violated +// limit. // // Some of the reasons in the following list might not be applicable to this // specific API or operation: // -// ACCOUNT_NUMBER_LIMIT_EXCEEDED: You attempted to exceed the limit on the number -// of accounts in an organization. If you need more accounts, contact AWS Support -// to request an increase in your limit. +// * ACCOUNT_NUMBER_LIMIT_EXCEEDED: You attempted to exceed the limit on +// the number of accounts in an organization. If you need more accounts, +// contactAWS Support (https://console.aws.amazon.com/support/home#/) to +// request an increase in your limit. // -// Or, The number of invitations that you tried to send would cause you to exceed -// the limit of accounts in your organization. Send fewer invitations, or contact -// AWS Support to request an increase in the number of accounts. +// Or the number of invitations that you tried to send would cause you to exceed +// the limit of accounts in your organization. Send fewer invitations or +// contact AWS Support to request an increase in the number of accounts. // -// Note: deleted and closed accounts still count toward your limit. +// Deleted and closed accounts still count toward your limit. // // If you get receive this exception when running a command immediately after -// creating the organization, wait one hour and try again. If after an hour -// it continues to fail with this error, contact AWS Customer Support (https://console.aws.amazon.com/support/home#/). +// creating the organization, wait one hour and try again. If after an hour +// it continues to fail with this error, contact AWS Support (https://console.aws.amazon.com/support/home#/). // // * HANDSHAKE_RATE_LIMIT_EXCEEDED: You attempted to exceed the number of -// handshakes you can send in one day. +// handshakes that you can send in one day. // -// * OU_NUMBER_LIMIT_EXCEEDED: You attempted to exceed the number of organizational -// units you can have in an organization. +// * OU_NUMBER_LIMIT_EXCEEDED: You attempted to exceed the number of OUs +// that you can have in an organization. // -// * OU_DEPTH_LIMIT_EXCEEDED: You attempted to create an organizational unit -// tree that is too many levels deep. +// * OU_DEPTH_LIMIT_EXCEEDED: You attempted to create an OU tree that is +// too many levels deep. // // * ORGANIZATION_NOT_IN_ALL_FEATURES_MODE: You attempted to perform an operation // that requires the organization to be configured to support all features. -// An organization that supports consolidated billing features only cannot +// An organization that supports only consolidated billing features can't // perform this operation. // // * POLICY_NUMBER_LIMIT_EXCEEDED. You attempted to exceed the number of @@ -3852,23 +3866,24 @@ func (c *Organizations) DisableAWSServiceAccessRequest(input *DisableAWSServiceA // minimum number of policies of a certain type required. // // * ACCOUNT_CANNOT_LEAVE_WITHOUT_EULA: You attempted to remove an account -// from the organization that does not yet have enough information to exist -// as a stand-alone account. This account requires you to first agree to -// the AWS Customer Agreement. Follow the steps at To leave an organization -// when all required account information has not yet been provided (http://docs.aws.amazon.com/organizations/latest/userguide/orgs_manage_accounts_remove.html#leave-without-all-info) +// from the organization that doesn't yet have enough information to exist +// as a standalone account. This account requires you to first agree to the +// AWS Customer Agreement. Follow the steps at To leave an organization when +// all required account information has not yet been provided (http://docs.aws.amazon.com/organizations/latest/userguide/orgs_manage_accounts_remove.html#leave-without-all-info) // in the AWS Organizations User Guide. // // * ACCOUNT_CANNOT_LEAVE_WITHOUT_PHONE_VERIFICATION: You attempted to remove -// an account from the organization that does not yet have enough information -// to exist as a stand-alone account. This account requires you to first -// complete phone verification. Follow the steps at To leave an organization -// when all required account information has not yet been provided (http://docs.aws.amazon.com/organizations/latest/userguide/orgs_manage_accounts_remove.html#leave-without-all-info) +// an account from the organization that doesn't yet have enough information +// to exist as a standalone account. This account requires you to first complete +// phone verification. Follow the steps at To leave an organization when +// all required account information has not yet been provided (http://docs.aws.amazon.com/organizations/latest/userguide/orgs_manage_accounts_remove.html#leave-without-all-info) // in the AWS Organizations User Guide. // // * MASTER_ACCOUNT_PAYMENT_INSTRUMENT_REQUIRED: To create an organization -// with this account, you first must associate a payment instrument, such -// as a credit card, with the account. Follow the steps at To leave an organization -// when all required account information has not yet been provided (http://docs.aws.amazon.com/organizations/latest/userguide/orgs_manage_accounts_remove.html#leave-without-all-info) +// with this master account, you first must associate a payment instrument, +// such as a credit card, with the account. Follow the steps at To leave +// an organization when all required account information has not yet been +// provided (http://docs.aws.amazon.com/organizations/latest/userguide/orgs_manage_accounts_remove.html#leave-without-all-info) // in the AWS Organizations User Guide. // // * MEMBER_ACCOUNT_PAYMENT_INSTRUMENT_REQUIRED: To complete this operation @@ -3901,11 +3916,11 @@ func (c *Organizations) DisableAWSServiceAccessRequest(input *DisableAWSServiceA // specific API or operation: // // * IMMUTABLE_POLICY: You specified a policy that is managed by AWS and -// cannot be modified. +// can't be modified. // // * INPUT_REQUIRED: You must include a value for all required parameters. // -// * INVALID_ENUM: You specified a value that is not valid for that parameter. +// * INVALID_ENUM: You specified a value that isn't valid for that parameter. // // * INVALID_FULL_NAME_TARGET: You specified a full name that contains invalid // characters. @@ -3925,11 +3940,11 @@ func (c *Organizations) DisableAWSServiceAccessRequest(input *DisableAWSServiceA // * INVALID_PATTERN_TARGET_ID: You specified a policy target ID that doesn't // match the required pattern. // -// * INVALID_ROLE_NAME: You provided a role name that is not valid. A role -// name can’t begin with the reserved prefix 'AWSServiceRoleFor'. +// * INVALID_ROLE_NAME: You provided a role name that isn't valid. A role +// name can't begin with the reserved prefix AWSServiceRoleFor. // -// * INVALID_SYNTAX_ORGANIZATION_ARN: You specified an invalid ARN for the -// organization. +// * INVALID_SYNTAX_ORGANIZATION_ARN: You specified an invalid Amazon Resource +// Name (ARN) for the organization. // // * INVALID_SYNTAX_POLICY_ID: You specified an invalid policy ID. // @@ -4054,7 +4069,7 @@ func (c *Organizations) DisablePolicyTypeRequest(input *DisablePolicyTypeInput) // in the IAM User Guide. // // * ErrCodeAWSOrganizationsNotInUseException "AWSOrganizationsNotInUseException" -// Your account is not a member of an organization. To make this request, you +// Your account isn't a member of an organization. To make this request, you // must use the credentials of an account that belongs to an organization. // // * ErrCodeConcurrentModificationException "ConcurrentModificationException" @@ -4063,40 +4078,42 @@ func (c *Organizations) DisablePolicyTypeRequest(input *DisablePolicyTypeInput) // // * ErrCodeConstraintViolationException "ConstraintViolationException" // Performing this operation violates a minimum or maximum value limit. For -// example, attempting to removing the last SCP from an OU or root, inviting -// or creating too many accounts to the organization, or attaching too many -// policies to an account, OU, or root. This exception includes a reason that -// contains additional information about the violated limit: +// example, attempting to removing the last service control policy (SCP) from +// an OU or root, inviting or creating too many accounts to the organization, +// or attaching too many policies to an account, OU, or root. This exception +// includes a reason that contains additional information about the violated +// limit. // // Some of the reasons in the following list might not be applicable to this // specific API or operation: // -// ACCOUNT_NUMBER_LIMIT_EXCEEDED: You attempted to exceed the limit on the number -// of accounts in an organization. If you need more accounts, contact AWS Support -// to request an increase in your limit. +// * ACCOUNT_NUMBER_LIMIT_EXCEEDED: You attempted to exceed the limit on +// the number of accounts in an organization. If you need more accounts, +// contactAWS Support (https://console.aws.amazon.com/support/home#/) to +// request an increase in your limit. // -// Or, The number of invitations that you tried to send would cause you to exceed -// the limit of accounts in your organization. Send fewer invitations, or contact -// AWS Support to request an increase in the number of accounts. +// Or the number of invitations that you tried to send would cause you to exceed +// the limit of accounts in your organization. Send fewer invitations or +// contact AWS Support to request an increase in the number of accounts. // -// Note: deleted and closed accounts still count toward your limit. +// Deleted and closed accounts still count toward your limit. // // If you get receive this exception when running a command immediately after -// creating the organization, wait one hour and try again. If after an hour -// it continues to fail with this error, contact AWS Customer Support (https://console.aws.amazon.com/support/home#/). +// creating the organization, wait one hour and try again. If after an hour +// it continues to fail with this error, contact AWS Support (https://console.aws.amazon.com/support/home#/). // // * HANDSHAKE_RATE_LIMIT_EXCEEDED: You attempted to exceed the number of -// handshakes you can send in one day. +// handshakes that you can send in one day. // -// * OU_NUMBER_LIMIT_EXCEEDED: You attempted to exceed the number of organizational -// units you can have in an organization. +// * OU_NUMBER_LIMIT_EXCEEDED: You attempted to exceed the number of OUs +// that you can have in an organization. // -// * OU_DEPTH_LIMIT_EXCEEDED: You attempted to create an organizational unit -// tree that is too many levels deep. +// * OU_DEPTH_LIMIT_EXCEEDED: You attempted to create an OU tree that is +// too many levels deep. // // * ORGANIZATION_NOT_IN_ALL_FEATURES_MODE: You attempted to perform an operation // that requires the organization to be configured to support all features. -// An organization that supports consolidated billing features only cannot +// An organization that supports only consolidated billing features can't // perform this operation. // // * POLICY_NUMBER_LIMIT_EXCEEDED. You attempted to exceed the number of @@ -4111,23 +4128,24 @@ func (c *Organizations) DisablePolicyTypeRequest(input *DisablePolicyTypeInput) // minimum number of policies of a certain type required. // // * ACCOUNT_CANNOT_LEAVE_WITHOUT_EULA: You attempted to remove an account -// from the organization that does not yet have enough information to exist -// as a stand-alone account. This account requires you to first agree to -// the AWS Customer Agreement. Follow the steps at To leave an organization -// when all required account information has not yet been provided (http://docs.aws.amazon.com/organizations/latest/userguide/orgs_manage_accounts_remove.html#leave-without-all-info) +// from the organization that doesn't yet have enough information to exist +// as a standalone account. This account requires you to first agree to the +// AWS Customer Agreement. Follow the steps at To leave an organization when +// all required account information has not yet been provided (http://docs.aws.amazon.com/organizations/latest/userguide/orgs_manage_accounts_remove.html#leave-without-all-info) // in the AWS Organizations User Guide. // // * ACCOUNT_CANNOT_LEAVE_WITHOUT_PHONE_VERIFICATION: You attempted to remove -// an account from the organization that does not yet have enough information -// to exist as a stand-alone account. This account requires you to first -// complete phone verification. Follow the steps at To leave an organization -// when all required account information has not yet been provided (http://docs.aws.amazon.com/organizations/latest/userguide/orgs_manage_accounts_remove.html#leave-without-all-info) +// an account from the organization that doesn't yet have enough information +// to exist as a standalone account. This account requires you to first complete +// phone verification. Follow the steps at To leave an organization when +// all required account information has not yet been provided (http://docs.aws.amazon.com/organizations/latest/userguide/orgs_manage_accounts_remove.html#leave-without-all-info) // in the AWS Organizations User Guide. // // * MASTER_ACCOUNT_PAYMENT_INSTRUMENT_REQUIRED: To create an organization -// with this account, you first must associate a payment instrument, such -// as a credit card, with the account. Follow the steps at To leave an organization -// when all required account information has not yet been provided (http://docs.aws.amazon.com/organizations/latest/userguide/orgs_manage_accounts_remove.html#leave-without-all-info) +// with this master account, you first must associate a payment instrument, +// such as a credit card, with the account. Follow the steps at To leave +// an organization when all required account information has not yet been +// provided (http://docs.aws.amazon.com/organizations/latest/userguide/orgs_manage_accounts_remove.html#leave-without-all-info) // in the AWS Organizations User Guide. // // * MEMBER_ACCOUNT_PAYMENT_INSTRUMENT_REQUIRED: To complete this operation @@ -4160,11 +4178,11 @@ func (c *Organizations) DisablePolicyTypeRequest(input *DisablePolicyTypeInput) // specific API or operation: // // * IMMUTABLE_POLICY: You specified a policy that is managed by AWS and -// cannot be modified. +// can't be modified. // // * INPUT_REQUIRED: You must include a value for all required parameters. // -// * INVALID_ENUM: You specified a value that is not valid for that parameter. +// * INVALID_ENUM: You specified a value that isn't valid for that parameter. // // * INVALID_FULL_NAME_TARGET: You specified a full name that contains invalid // characters. @@ -4184,11 +4202,11 @@ func (c *Organizations) DisablePolicyTypeRequest(input *DisablePolicyTypeInput) // * INVALID_PATTERN_TARGET_ID: You specified a policy target ID that doesn't // match the required pattern. // -// * INVALID_ROLE_NAME: You provided a role name that is not valid. A role -// name can’t begin with the reserved prefix 'AWSServiceRoleFor'. +// * INVALID_ROLE_NAME: You provided a role name that isn't valid. A role +// name can't begin with the reserved prefix AWSServiceRoleFor. // -// * INVALID_SYNTAX_ORGANIZATION_ARN: You specified an invalid ARN for the -// organization. +// * INVALID_SYNTAX_ORGANIZATION_ARN: You specified an invalid Amazon Resource +// Name (ARN) for the organization. // // * INVALID_SYNTAX_POLICY_ID: You specified an invalid policy ID. // @@ -4211,7 +4229,7 @@ func (c *Organizations) DisablePolicyTypeRequest(input *DisablePolicyTypeInput) // between entities in the same root. // // * ErrCodePolicyTypeNotEnabledException "PolicyTypeNotEnabledException" -// The specified policy type is not currently enabled in this root. You cannot +// The specified policy type isn't currently enabled in this root. You can't // attach policies of the specified type to entities in a root until you enable // that type in the root. For more information, see Enabling All Features in // Your Organization (http://docs.aws.amazon.com/organizations/latest/userguide/orgs_manage_org_support-all-features.html) @@ -4333,7 +4351,7 @@ func (c *Organizations) EnableAWSServiceAccessRequest(input *EnableAWSServiceAcc // in the IAM User Guide. // // * ErrCodeAWSOrganizationsNotInUseException "AWSOrganizationsNotInUseException" -// Your account is not a member of an organization. To make this request, you +// Your account isn't a member of an organization. To make this request, you // must use the credentials of an account that belongs to an organization. // // * ErrCodeConcurrentModificationException "ConcurrentModificationException" @@ -4342,40 +4360,42 @@ func (c *Organizations) EnableAWSServiceAccessRequest(input *EnableAWSServiceAcc // // * ErrCodeConstraintViolationException "ConstraintViolationException" // Performing this operation violates a minimum or maximum value limit. For -// example, attempting to removing the last SCP from an OU or root, inviting -// or creating too many accounts to the organization, or attaching too many -// policies to an account, OU, or root. This exception includes a reason that -// contains additional information about the violated limit: +// example, attempting to removing the last service control policy (SCP) from +// an OU or root, inviting or creating too many accounts to the organization, +// or attaching too many policies to an account, OU, or root. This exception +// includes a reason that contains additional information about the violated +// limit. // // Some of the reasons in the following list might not be applicable to this // specific API or operation: // -// ACCOUNT_NUMBER_LIMIT_EXCEEDED: You attempted to exceed the limit on the number -// of accounts in an organization. If you need more accounts, contact AWS Support -// to request an increase in your limit. +// * ACCOUNT_NUMBER_LIMIT_EXCEEDED: You attempted to exceed the limit on +// the number of accounts in an organization. If you need more accounts, +// contactAWS Support (https://console.aws.amazon.com/support/home#/) to +// request an increase in your limit. // -// Or, The number of invitations that you tried to send would cause you to exceed -// the limit of accounts in your organization. Send fewer invitations, or contact -// AWS Support to request an increase in the number of accounts. +// Or the number of invitations that you tried to send would cause you to exceed +// the limit of accounts in your organization. Send fewer invitations or +// contact AWS Support to request an increase in the number of accounts. // -// Note: deleted and closed accounts still count toward your limit. +// Deleted and closed accounts still count toward your limit. // // If you get receive this exception when running a command immediately after -// creating the organization, wait one hour and try again. If after an hour -// it continues to fail with this error, contact AWS Customer Support (https://console.aws.amazon.com/support/home#/). +// creating the organization, wait one hour and try again. If after an hour +// it continues to fail with this error, contact AWS Support (https://console.aws.amazon.com/support/home#/). // // * HANDSHAKE_RATE_LIMIT_EXCEEDED: You attempted to exceed the number of -// handshakes you can send in one day. +// handshakes that you can send in one day. // -// * OU_NUMBER_LIMIT_EXCEEDED: You attempted to exceed the number of organizational -// units you can have in an organization. +// * OU_NUMBER_LIMIT_EXCEEDED: You attempted to exceed the number of OUs +// that you can have in an organization. // -// * OU_DEPTH_LIMIT_EXCEEDED: You attempted to create an organizational unit -// tree that is too many levels deep. +// * OU_DEPTH_LIMIT_EXCEEDED: You attempted to create an OU tree that is +// too many levels deep. // // * ORGANIZATION_NOT_IN_ALL_FEATURES_MODE: You attempted to perform an operation // that requires the organization to be configured to support all features. -// An organization that supports consolidated billing features only cannot +// An organization that supports only consolidated billing features can't // perform this operation. // // * POLICY_NUMBER_LIMIT_EXCEEDED. You attempted to exceed the number of @@ -4390,23 +4410,24 @@ func (c *Organizations) EnableAWSServiceAccessRequest(input *EnableAWSServiceAcc // minimum number of policies of a certain type required. // // * ACCOUNT_CANNOT_LEAVE_WITHOUT_EULA: You attempted to remove an account -// from the organization that does not yet have enough information to exist -// as a stand-alone account. This account requires you to first agree to -// the AWS Customer Agreement. Follow the steps at To leave an organization -// when all required account information has not yet been provided (http://docs.aws.amazon.com/organizations/latest/userguide/orgs_manage_accounts_remove.html#leave-without-all-info) +// from the organization that doesn't yet have enough information to exist +// as a standalone account. This account requires you to first agree to the +// AWS Customer Agreement. Follow the steps at To leave an organization when +// all required account information has not yet been provided (http://docs.aws.amazon.com/organizations/latest/userguide/orgs_manage_accounts_remove.html#leave-without-all-info) // in the AWS Organizations User Guide. // // * ACCOUNT_CANNOT_LEAVE_WITHOUT_PHONE_VERIFICATION: You attempted to remove -// an account from the organization that does not yet have enough information -// to exist as a stand-alone account. This account requires you to first -// complete phone verification. Follow the steps at To leave an organization -// when all required account information has not yet been provided (http://docs.aws.amazon.com/organizations/latest/userguide/orgs_manage_accounts_remove.html#leave-without-all-info) +// an account from the organization that doesn't yet have enough information +// to exist as a standalone account. This account requires you to first complete +// phone verification. Follow the steps at To leave an organization when +// all required account information has not yet been provided (http://docs.aws.amazon.com/organizations/latest/userguide/orgs_manage_accounts_remove.html#leave-without-all-info) // in the AWS Organizations User Guide. // // * MASTER_ACCOUNT_PAYMENT_INSTRUMENT_REQUIRED: To create an organization -// with this account, you first must associate a payment instrument, such -// as a credit card, with the account. Follow the steps at To leave an organization -// when all required account information has not yet been provided (http://docs.aws.amazon.com/organizations/latest/userguide/orgs_manage_accounts_remove.html#leave-without-all-info) +// with this master account, you first must associate a payment instrument, +// such as a credit card, with the account. Follow the steps at To leave +// an organization when all required account information has not yet been +// provided (http://docs.aws.amazon.com/organizations/latest/userguide/orgs_manage_accounts_remove.html#leave-without-all-info) // in the AWS Organizations User Guide. // // * MEMBER_ACCOUNT_PAYMENT_INSTRUMENT_REQUIRED: To complete this operation @@ -4439,11 +4460,11 @@ func (c *Organizations) EnableAWSServiceAccessRequest(input *EnableAWSServiceAcc // specific API or operation: // // * IMMUTABLE_POLICY: You specified a policy that is managed by AWS and -// cannot be modified. +// can't be modified. // // * INPUT_REQUIRED: You must include a value for all required parameters. // -// * INVALID_ENUM: You specified a value that is not valid for that parameter. +// * INVALID_ENUM: You specified a value that isn't valid for that parameter. // // * INVALID_FULL_NAME_TARGET: You specified a full name that contains invalid // characters. @@ -4463,11 +4484,11 @@ func (c *Organizations) EnableAWSServiceAccessRequest(input *EnableAWSServiceAcc // * INVALID_PATTERN_TARGET_ID: You specified a policy target ID that doesn't // match the required pattern. // -// * INVALID_ROLE_NAME: You provided a role name that is not valid. A role -// name can’t begin with the reserved prefix 'AWSServiceRoleFor'. +// * INVALID_ROLE_NAME: You provided a role name that isn't valid. A role +// name can't begin with the reserved prefix AWSServiceRoleFor. // -// * INVALID_SYNTAX_ORGANIZATION_ARN: You specified an invalid ARN for the -// organization. +// * INVALID_SYNTAX_ORGANIZATION_ARN: You specified an invalid Amazon Resource +// Name (ARN) for the organization. // // * INVALID_SYNTAX_POLICY_ID: You specified an invalid policy ID. // @@ -4610,7 +4631,7 @@ func (c *Organizations) EnableAllFeaturesRequest(input *EnableAllFeaturesInput) // in the IAM User Guide. // // * ErrCodeAWSOrganizationsNotInUseException "AWSOrganizationsNotInUseException" -// Your account is not a member of an organization. To make this request, you +// Your account isn't a member of an organization. To make this request, you // must use the credentials of an account that belongs to an organization. // // * ErrCodeConcurrentModificationException "ConcurrentModificationException" @@ -4625,15 +4646,15 @@ func (c *Organizations) EnableAllFeaturesRequest(input *EnableAllFeaturesInput) // specific API or operation: // // * ACCOUNT_NUMBER_LIMIT_EXCEEDED: You attempted to exceed the limit on -// the number of accounts in an organization. Note: deleted and closed accounts -// still count toward your limit. +// the number of accounts in an organization. Note that deleted and closed +// accounts still count toward your limit. // // If you get this exception immediately after creating the organization, wait // one hour and try again. If after an hour it continues to fail with this -// error, contact AWS Customer Support (https://console.aws.amazon.com/support/home#/). +// error, contact AWS Support (https://console.aws.amazon.com/support/home#/). // // * HANDSHAKE_RATE_LIMIT_EXCEEDED: You attempted to exceed the number of -// handshakes you can send in one day. +// handshakes that you can send in one day. // // * ALREADY_IN_AN_ORGANIZATION: The handshake request is invalid because // the invited account is already a member of an organization. @@ -4641,13 +4662,13 @@ func (c *Organizations) EnableAllFeaturesRequest(input *EnableAllFeaturesInput) // * ORGANIZATION_ALREADY_HAS_ALL_FEATURES: The handshake request is invalid // because the organization has already enabled all features. // -// * INVITE_DISABLED_DURING_ENABLE_ALL_FEATURES: You cannot issue new invitations -// to join an organization while it is in the process of enabling all features. +// * INVITE_DISABLED_DURING_ENABLE_ALL_FEATURES: You can't issue new invitations +// to join an organization while it's in the process of enabling all features. // You can resume inviting accounts after you finalize the process when all // accounts have agreed to the change. // -// * PAYMENT_INSTRUMENT_REQUIRED: You cannot complete the operation with -// an account that does not have a payment instrument, such as a credit card, +// * PAYMENT_INSTRUMENT_REQUIRED: You can't complete the operation with an +// account that doesn't have a payment instrument, such as a credit card, // associated with it. // // * ORGANIZATION_FROM_DIFFERENT_SELLER_OF_RECORD: The request failed because @@ -4668,11 +4689,11 @@ func (c *Organizations) EnableAllFeaturesRequest(input *EnableAllFeaturesInput) // specific API or operation: // // * IMMUTABLE_POLICY: You specified a policy that is managed by AWS and -// cannot be modified. +// can't be modified. // // * INPUT_REQUIRED: You must include a value for all required parameters. // -// * INVALID_ENUM: You specified a value that is not valid for that parameter. +// * INVALID_ENUM: You specified a value that isn't valid for that parameter. // // * INVALID_FULL_NAME_TARGET: You specified a full name that contains invalid // characters. @@ -4692,11 +4713,11 @@ func (c *Organizations) EnableAllFeaturesRequest(input *EnableAllFeaturesInput) // * INVALID_PATTERN_TARGET_ID: You specified a policy target ID that doesn't // match the required pattern. // -// * INVALID_ROLE_NAME: You provided a role name that is not valid. A role -// name can’t begin with the reserved prefix 'AWSServiceRoleFor'. +// * INVALID_ROLE_NAME: You provided a role name that isn't valid. A role +// name can't begin with the reserved prefix AWSServiceRoleFor. // -// * INVALID_SYNTAX_ORGANIZATION_ARN: You specified an invalid ARN for the -// organization. +// * INVALID_SYNTAX_ORGANIZATION_ARN: You specified an invalid Amazon Resource +// Name (ARN) for the organization. // // * INVALID_SYNTAX_POLICY_ID: You specified an invalid policy ID. // @@ -4821,7 +4842,7 @@ func (c *Organizations) EnablePolicyTypeRequest(input *EnablePolicyTypeInput) (r // in the IAM User Guide. // // * ErrCodeAWSOrganizationsNotInUseException "AWSOrganizationsNotInUseException" -// Your account is not a member of an organization. To make this request, you +// Your account isn't a member of an organization. To make this request, you // must use the credentials of an account that belongs to an organization. // // * ErrCodeConcurrentModificationException "ConcurrentModificationException" @@ -4830,40 +4851,42 @@ func (c *Organizations) EnablePolicyTypeRequest(input *EnablePolicyTypeInput) (r // // * ErrCodeConstraintViolationException "ConstraintViolationException" // Performing this operation violates a minimum or maximum value limit. For -// example, attempting to removing the last SCP from an OU or root, inviting -// or creating too many accounts to the organization, or attaching too many -// policies to an account, OU, or root. This exception includes a reason that -// contains additional information about the violated limit: +// example, attempting to removing the last service control policy (SCP) from +// an OU or root, inviting or creating too many accounts to the organization, +// or attaching too many policies to an account, OU, or root. This exception +// includes a reason that contains additional information about the violated +// limit. // // Some of the reasons in the following list might not be applicable to this // specific API or operation: // -// ACCOUNT_NUMBER_LIMIT_EXCEEDED: You attempted to exceed the limit on the number -// of accounts in an organization. If you need more accounts, contact AWS Support -// to request an increase in your limit. +// * ACCOUNT_NUMBER_LIMIT_EXCEEDED: You attempted to exceed the limit on +// the number of accounts in an organization. If you need more accounts, +// contactAWS Support (https://console.aws.amazon.com/support/home#/) to +// request an increase in your limit. // -// Or, The number of invitations that you tried to send would cause you to exceed -// the limit of accounts in your organization. Send fewer invitations, or contact -// AWS Support to request an increase in the number of accounts. +// Or the number of invitations that you tried to send would cause you to exceed +// the limit of accounts in your organization. Send fewer invitations or +// contact AWS Support to request an increase in the number of accounts. // -// Note: deleted and closed accounts still count toward your limit. +// Deleted and closed accounts still count toward your limit. // // If you get receive this exception when running a command immediately after -// creating the organization, wait one hour and try again. If after an hour -// it continues to fail with this error, contact AWS Customer Support (https://console.aws.amazon.com/support/home#/). +// creating the organization, wait one hour and try again. If after an hour +// it continues to fail with this error, contact AWS Support (https://console.aws.amazon.com/support/home#/). // // * HANDSHAKE_RATE_LIMIT_EXCEEDED: You attempted to exceed the number of -// handshakes you can send in one day. +// handshakes that you can send in one day. // -// * OU_NUMBER_LIMIT_EXCEEDED: You attempted to exceed the number of organizational -// units you can have in an organization. +// * OU_NUMBER_LIMIT_EXCEEDED: You attempted to exceed the number of OUs +// that you can have in an organization. // -// * OU_DEPTH_LIMIT_EXCEEDED: You attempted to create an organizational unit -// tree that is too many levels deep. +// * OU_DEPTH_LIMIT_EXCEEDED: You attempted to create an OU tree that is +// too many levels deep. // // * ORGANIZATION_NOT_IN_ALL_FEATURES_MODE: You attempted to perform an operation // that requires the organization to be configured to support all features. -// An organization that supports consolidated billing features only cannot +// An organization that supports only consolidated billing features can't // perform this operation. // // * POLICY_NUMBER_LIMIT_EXCEEDED. You attempted to exceed the number of @@ -4878,23 +4901,24 @@ func (c *Organizations) EnablePolicyTypeRequest(input *EnablePolicyTypeInput) (r // minimum number of policies of a certain type required. // // * ACCOUNT_CANNOT_LEAVE_WITHOUT_EULA: You attempted to remove an account -// from the organization that does not yet have enough information to exist -// as a stand-alone account. This account requires you to first agree to -// the AWS Customer Agreement. Follow the steps at To leave an organization -// when all required account information has not yet been provided (http://docs.aws.amazon.com/organizations/latest/userguide/orgs_manage_accounts_remove.html#leave-without-all-info) +// from the organization that doesn't yet have enough information to exist +// as a standalone account. This account requires you to first agree to the +// AWS Customer Agreement. Follow the steps at To leave an organization when +// all required account information has not yet been provided (http://docs.aws.amazon.com/organizations/latest/userguide/orgs_manage_accounts_remove.html#leave-without-all-info) // in the AWS Organizations User Guide. // // * ACCOUNT_CANNOT_LEAVE_WITHOUT_PHONE_VERIFICATION: You attempted to remove -// an account from the organization that does not yet have enough information -// to exist as a stand-alone account. This account requires you to first -// complete phone verification. Follow the steps at To leave an organization -// when all required account information has not yet been provided (http://docs.aws.amazon.com/organizations/latest/userguide/orgs_manage_accounts_remove.html#leave-without-all-info) +// an account from the organization that doesn't yet have enough information +// to exist as a standalone account. This account requires you to first complete +// phone verification. Follow the steps at To leave an organization when +// all required account information has not yet been provided (http://docs.aws.amazon.com/organizations/latest/userguide/orgs_manage_accounts_remove.html#leave-without-all-info) // in the AWS Organizations User Guide. // // * MASTER_ACCOUNT_PAYMENT_INSTRUMENT_REQUIRED: To create an organization -// with this account, you first must associate a payment instrument, such -// as a credit card, with the account. Follow the steps at To leave an organization -// when all required account information has not yet been provided (http://docs.aws.amazon.com/organizations/latest/userguide/orgs_manage_accounts_remove.html#leave-without-all-info) +// with this master account, you first must associate a payment instrument, +// such as a credit card, with the account. Follow the steps at To leave +// an organization when all required account information has not yet been +// provided (http://docs.aws.amazon.com/organizations/latest/userguide/orgs_manage_accounts_remove.html#leave-without-all-info) // in the AWS Organizations User Guide. // // * MEMBER_ACCOUNT_PAYMENT_INSTRUMENT_REQUIRED: To complete this operation @@ -4927,11 +4951,11 @@ func (c *Organizations) EnablePolicyTypeRequest(input *EnablePolicyTypeInput) (r // specific API or operation: // // * IMMUTABLE_POLICY: You specified a policy that is managed by AWS and -// cannot be modified. +// can't be modified. // // * INPUT_REQUIRED: You must include a value for all required parameters. // -// * INVALID_ENUM: You specified a value that is not valid for that parameter. +// * INVALID_ENUM: You specified a value that isn't valid for that parameter. // // * INVALID_FULL_NAME_TARGET: You specified a full name that contains invalid // characters. @@ -4951,11 +4975,11 @@ func (c *Organizations) EnablePolicyTypeRequest(input *EnablePolicyTypeInput) (r // * INVALID_PATTERN_TARGET_ID: You specified a policy target ID that doesn't // match the required pattern. // -// * INVALID_ROLE_NAME: You provided a role name that is not valid. A role -// name can’t begin with the reserved prefix 'AWSServiceRoleFor'. +// * INVALID_ROLE_NAME: You provided a role name that isn't valid. A role +// name can't begin with the reserved prefix AWSServiceRoleFor. // -// * INVALID_SYNTAX_ORGANIZATION_ARN: You specified an invalid ARN for the -// organization. +// * INVALID_SYNTAX_ORGANIZATION_ARN: You specified an invalid Amazon Resource +// Name (ARN) for the organization. // // * INVALID_SYNTAX_POLICY_ID: You specified an invalid policy ID. // @@ -4993,9 +5017,9 @@ func (c *Organizations) EnablePolicyTypeRequest(input *EnablePolicyTypeInput) (r // // * ErrCodePolicyTypeNotAvailableForOrganizationException "PolicyTypeNotAvailableForOrganizationException" // You can't use the specified policy type with the feature set currently enabled -// for this organization. For example, you can enable service control policies -// (SCPs) only after you enable all features in the organization. For more information, -// see Enabling and Disabling a Policy Type on a Root (http://docs.aws.amazon.com/organizations/latest/userguide/orgs_manage_policies.html#enable_policies_on_root) +// for this organization. For example, you can enable SCPs only after you enable +// all features in the organization. For more information, see Enabling and +// Disabling a Policy Type on a Root (http://docs.aws.amazon.com/organizations/latest/userguide/orgs_manage_policies.html#enable_policies_on_root) // in the AWS Organizations User Guide. // // See also, https://docs.aws.amazon.com/goto/WebAPI/organizations-2016-11-28/EnablePolicyType @@ -5099,9 +5123,15 @@ func (c *Organizations) InviteAccountToOrganizationRequest(input *InviteAccountT // in the IAM User Guide. // // * ErrCodeAWSOrganizationsNotInUseException "AWSOrganizationsNotInUseException" -// Your account is not a member of an organization. To make this request, you +// Your account isn't a member of an organization. To make this request, you // must use the credentials of an account that belongs to an organization. // +// * ErrCodeAccountOwnerNotVerifiedException "AccountOwnerNotVerifiedException" +// You can't invite an existing account to your organization until you verify +// that you own the email address associated with the master account. For more +// information, see Email Address Verification (http://docs.aws.amazon.com/organizations/latest/userguide/orgs_manage_create.html#about-email-verification) +// in the AWS Organizations User Guide. +// // * ErrCodeConcurrentModificationException "ConcurrentModificationException" // The target of the operation is currently being modified by a different request. // Try again later. @@ -5114,15 +5144,15 @@ func (c *Organizations) InviteAccountToOrganizationRequest(input *InviteAccountT // specific API or operation: // // * ACCOUNT_NUMBER_LIMIT_EXCEEDED: You attempted to exceed the limit on -// the number of accounts in an organization. Note: deleted and closed accounts -// still count toward your limit. +// the number of accounts in an organization. Note that deleted and closed +// accounts still count toward your limit. // // If you get this exception immediately after creating the organization, wait // one hour and try again. If after an hour it continues to fail with this -// error, contact AWS Customer Support (https://console.aws.amazon.com/support/home#/). +// error, contact AWS Support (https://console.aws.amazon.com/support/home#/). // // * HANDSHAKE_RATE_LIMIT_EXCEEDED: You attempted to exceed the number of -// handshakes you can send in one day. +// handshakes that you can send in one day. // // * ALREADY_IN_AN_ORGANIZATION: The handshake request is invalid because // the invited account is already a member of an organization. @@ -5130,13 +5160,13 @@ func (c *Organizations) InviteAccountToOrganizationRequest(input *InviteAccountT // * ORGANIZATION_ALREADY_HAS_ALL_FEATURES: The handshake request is invalid // because the organization has already enabled all features. // -// * INVITE_DISABLED_DURING_ENABLE_ALL_FEATURES: You cannot issue new invitations -// to join an organization while it is in the process of enabling all features. +// * INVITE_DISABLED_DURING_ENABLE_ALL_FEATURES: You can't issue new invitations +// to join an organization while it's in the process of enabling all features. // You can resume inviting accounts after you finalize the process when all // accounts have agreed to the change. // -// * PAYMENT_INSTRUMENT_REQUIRED: You cannot complete the operation with -// an account that does not have a payment instrument, such as a credit card, +// * PAYMENT_INSTRUMENT_REQUIRED: You can't complete the operation with an +// account that doesn't have a payment instrument, such as a credit card, // associated with it. // // * ORGANIZATION_FROM_DIFFERENT_SELLER_OF_RECORD: The request failed because @@ -5164,11 +5194,11 @@ func (c *Organizations) InviteAccountToOrganizationRequest(input *InviteAccountT // specific API or operation: // // * IMMUTABLE_POLICY: You specified a policy that is managed by AWS and -// cannot be modified. +// can't be modified. // // * INPUT_REQUIRED: You must include a value for all required parameters. // -// * INVALID_ENUM: You specified a value that is not valid for that parameter. +// * INVALID_ENUM: You specified a value that isn't valid for that parameter. // // * INVALID_FULL_NAME_TARGET: You specified a full name that contains invalid // characters. @@ -5188,11 +5218,11 @@ func (c *Organizations) InviteAccountToOrganizationRequest(input *InviteAccountT // * INVALID_PATTERN_TARGET_ID: You specified a policy target ID that doesn't // match the required pattern. // -// * INVALID_ROLE_NAME: You provided a role name that is not valid. A role -// name can’t begin with the reserved prefix 'AWSServiceRoleFor'. +// * INVALID_ROLE_NAME: You provided a role name that isn't valid. A role +// name can't begin with the reserved prefix AWSServiceRoleFor. // -// * INVALID_SYNTAX_ORGANIZATION_ARN: You specified an invalid ARN for the -// organization. +// * INVALID_SYNTAX_ORGANIZATION_ARN: You specified an invalid Amazon Resource +// Name (ARN) for the organization. // // * INVALID_SYNTAX_POLICY_ID: You specified an invalid policy ID. // @@ -5215,10 +5245,10 @@ func (c *Organizations) InviteAccountToOrganizationRequest(input *InviteAccountT // between entities in the same root. // // * ErrCodeFinalizingOrganizationException "FinalizingOrganizationException" -// AWS Organizations could not perform the operation because your organization -// has not finished initializing. This can take up to an hour. Try again later. -// If after one hour you continue to receive this error, contact AWS Customer -// Support (https://console.aws.amazon.com/support/home#/). +// AWS Organizations couldn't perform the operation because your organization +// hasn't finished initializing. This can take up to an hour. Try again later. +// If after one hour you continue to receive this error, contact AWS Support +// (https://console.aws.amazon.com/support/home#/). // // * ErrCodeServiceException "ServiceException" // AWS Organizations can't complete your request because of an internal service @@ -5343,11 +5373,11 @@ func (c *Organizations) LeaveOrganizationRequest(input *LeaveOrganizationInput) // // * ErrCodeAccountNotFoundException "AccountNotFoundException" // We can't find an AWS account with the AccountId that you specified, or the -// account whose credentials you used to make this request is not a member of +// account whose credentials you used to make this request isn't a member of // an organization. // // * ErrCodeAWSOrganizationsNotInUseException "AWSOrganizationsNotInUseException" -// Your account is not a member of an organization. To make this request, you +// Your account isn't a member of an organization. To make this request, you // must use the credentials of an account that belongs to an organization. // // * ErrCodeConcurrentModificationException "ConcurrentModificationException" @@ -5356,40 +5386,42 @@ func (c *Organizations) LeaveOrganizationRequest(input *LeaveOrganizationInput) // // * ErrCodeConstraintViolationException "ConstraintViolationException" // Performing this operation violates a minimum or maximum value limit. For -// example, attempting to removing the last SCP from an OU or root, inviting -// or creating too many accounts to the organization, or attaching too many -// policies to an account, OU, or root. This exception includes a reason that -// contains additional information about the violated limit: +// example, attempting to removing the last service control policy (SCP) from +// an OU or root, inviting or creating too many accounts to the organization, +// or attaching too many policies to an account, OU, or root. This exception +// includes a reason that contains additional information about the violated +// limit. // // Some of the reasons in the following list might not be applicable to this // specific API or operation: // -// ACCOUNT_NUMBER_LIMIT_EXCEEDED: You attempted to exceed the limit on the number -// of accounts in an organization. If you need more accounts, contact AWS Support -// to request an increase in your limit. +// * ACCOUNT_NUMBER_LIMIT_EXCEEDED: You attempted to exceed the limit on +// the number of accounts in an organization. If you need more accounts, +// contactAWS Support (https://console.aws.amazon.com/support/home#/) to +// request an increase in your limit. // -// Or, The number of invitations that you tried to send would cause you to exceed -// the limit of accounts in your organization. Send fewer invitations, or contact -// AWS Support to request an increase in the number of accounts. +// Or the number of invitations that you tried to send would cause you to exceed +// the limit of accounts in your organization. Send fewer invitations or +// contact AWS Support to request an increase in the number of accounts. // -// Note: deleted and closed accounts still count toward your limit. +// Deleted and closed accounts still count toward your limit. // // If you get receive this exception when running a command immediately after -// creating the organization, wait one hour and try again. If after an hour -// it continues to fail with this error, contact AWS Customer Support (https://console.aws.amazon.com/support/home#/). +// creating the organization, wait one hour and try again. If after an hour +// it continues to fail with this error, contact AWS Support (https://console.aws.amazon.com/support/home#/). // // * HANDSHAKE_RATE_LIMIT_EXCEEDED: You attempted to exceed the number of -// handshakes you can send in one day. +// handshakes that you can send in one day. // -// * OU_NUMBER_LIMIT_EXCEEDED: You attempted to exceed the number of organizational -// units you can have in an organization. +// * OU_NUMBER_LIMIT_EXCEEDED: You attempted to exceed the number of OUs +// that you can have in an organization. // -// * OU_DEPTH_LIMIT_EXCEEDED: You attempted to create an organizational unit -// tree that is too many levels deep. +// * OU_DEPTH_LIMIT_EXCEEDED: You attempted to create an OU tree that is +// too many levels deep. // // * ORGANIZATION_NOT_IN_ALL_FEATURES_MODE: You attempted to perform an operation // that requires the organization to be configured to support all features. -// An organization that supports consolidated billing features only cannot +// An organization that supports only consolidated billing features can't // perform this operation. // // * POLICY_NUMBER_LIMIT_EXCEEDED. You attempted to exceed the number of @@ -5404,23 +5436,24 @@ func (c *Organizations) LeaveOrganizationRequest(input *LeaveOrganizationInput) // minimum number of policies of a certain type required. // // * ACCOUNT_CANNOT_LEAVE_WITHOUT_EULA: You attempted to remove an account -// from the organization that does not yet have enough information to exist -// as a stand-alone account. This account requires you to first agree to -// the AWS Customer Agreement. Follow the steps at To leave an organization -// when all required account information has not yet been provided (http://docs.aws.amazon.com/organizations/latest/userguide/orgs_manage_accounts_remove.html#leave-without-all-info) +// from the organization that doesn't yet have enough information to exist +// as a standalone account. This account requires you to first agree to the +// AWS Customer Agreement. Follow the steps at To leave an organization when +// all required account information has not yet been provided (http://docs.aws.amazon.com/organizations/latest/userguide/orgs_manage_accounts_remove.html#leave-without-all-info) // in the AWS Organizations User Guide. // // * ACCOUNT_CANNOT_LEAVE_WITHOUT_PHONE_VERIFICATION: You attempted to remove -// an account from the organization that does not yet have enough information -// to exist as a stand-alone account. This account requires you to first -// complete phone verification. Follow the steps at To leave an organization -// when all required account information has not yet been provided (http://docs.aws.amazon.com/organizations/latest/userguide/orgs_manage_accounts_remove.html#leave-without-all-info) +// an account from the organization that doesn't yet have enough information +// to exist as a standalone account. This account requires you to first complete +// phone verification. Follow the steps at To leave an organization when +// all required account information has not yet been provided (http://docs.aws.amazon.com/organizations/latest/userguide/orgs_manage_accounts_remove.html#leave-without-all-info) // in the AWS Organizations User Guide. // // * MASTER_ACCOUNT_PAYMENT_INSTRUMENT_REQUIRED: To create an organization -// with this account, you first must associate a payment instrument, such -// as a credit card, with the account. Follow the steps at To leave an organization -// when all required account information has not yet been provided (http://docs.aws.amazon.com/organizations/latest/userguide/orgs_manage_accounts_remove.html#leave-without-all-info) +// with this master account, you first must associate a payment instrument, +// such as a credit card, with the account. Follow the steps at To leave +// an organization when all required account information has not yet been +// provided (http://docs.aws.amazon.com/organizations/latest/userguide/orgs_manage_accounts_remove.html#leave-without-all-info) // in the AWS Organizations User Guide. // // * MEMBER_ACCOUNT_PAYMENT_INSTRUMENT_REQUIRED: To complete this operation @@ -5453,11 +5486,11 @@ func (c *Organizations) LeaveOrganizationRequest(input *LeaveOrganizationInput) // specific API or operation: // // * IMMUTABLE_POLICY: You specified a policy that is managed by AWS and -// cannot be modified. +// can't be modified. // // * INPUT_REQUIRED: You must include a value for all required parameters. // -// * INVALID_ENUM: You specified a value that is not valid for that parameter. +// * INVALID_ENUM: You specified a value that isn't valid for that parameter. // // * INVALID_FULL_NAME_TARGET: You specified a full name that contains invalid // characters. @@ -5477,11 +5510,11 @@ func (c *Organizations) LeaveOrganizationRequest(input *LeaveOrganizationInput) // * INVALID_PATTERN_TARGET_ID: You specified a policy target ID that doesn't // match the required pattern. // -// * INVALID_ROLE_NAME: You provided a role name that is not valid. A role -// name can’t begin with the reserved prefix 'AWSServiceRoleFor'. +// * INVALID_ROLE_NAME: You provided a role name that isn't valid. A role +// name can't begin with the reserved prefix AWSServiceRoleFor. // -// * INVALID_SYNTAX_ORGANIZATION_ARN: You specified an invalid ARN for the -// organization. +// * INVALID_SYNTAX_ORGANIZATION_ARN: You specified an invalid Amazon Resource +// Name (ARN) for the organization. // // * INVALID_SYNTAX_POLICY_ID: You specified an invalid policy ID. // @@ -5616,45 +5649,47 @@ func (c *Organizations) ListAWSServiceAccessForOrganizationRequest(input *ListAW // in the IAM User Guide. // // * ErrCodeAWSOrganizationsNotInUseException "AWSOrganizationsNotInUseException" -// Your account is not a member of an organization. To make this request, you +// Your account isn't a member of an organization. To make this request, you // must use the credentials of an account that belongs to an organization. // // * ErrCodeConstraintViolationException "ConstraintViolationException" // Performing this operation violates a minimum or maximum value limit. For -// example, attempting to removing the last SCP from an OU or root, inviting -// or creating too many accounts to the organization, or attaching too many -// policies to an account, OU, or root. This exception includes a reason that -// contains additional information about the violated limit: +// example, attempting to removing the last service control policy (SCP) from +// an OU or root, inviting or creating too many accounts to the organization, +// or attaching too many policies to an account, OU, or root. This exception +// includes a reason that contains additional information about the violated +// limit. // // Some of the reasons in the following list might not be applicable to this // specific API or operation: // -// ACCOUNT_NUMBER_LIMIT_EXCEEDED: You attempted to exceed the limit on the number -// of accounts in an organization. If you need more accounts, contact AWS Support -// to request an increase in your limit. +// * ACCOUNT_NUMBER_LIMIT_EXCEEDED: You attempted to exceed the limit on +// the number of accounts in an organization. If you need more accounts, +// contactAWS Support (https://console.aws.amazon.com/support/home#/) to +// request an increase in your limit. // -// Or, The number of invitations that you tried to send would cause you to exceed -// the limit of accounts in your organization. Send fewer invitations, or contact -// AWS Support to request an increase in the number of accounts. +// Or the number of invitations that you tried to send would cause you to exceed +// the limit of accounts in your organization. Send fewer invitations or +// contact AWS Support to request an increase in the number of accounts. // -// Note: deleted and closed accounts still count toward your limit. +// Deleted and closed accounts still count toward your limit. // // If you get receive this exception when running a command immediately after -// creating the organization, wait one hour and try again. If after an hour -// it continues to fail with this error, contact AWS Customer Support (https://console.aws.amazon.com/support/home#/). +// creating the organization, wait one hour and try again. If after an hour +// it continues to fail with this error, contact AWS Support (https://console.aws.amazon.com/support/home#/). // // * HANDSHAKE_RATE_LIMIT_EXCEEDED: You attempted to exceed the number of -// handshakes you can send in one day. +// handshakes that you can send in one day. // -// * OU_NUMBER_LIMIT_EXCEEDED: You attempted to exceed the number of organizational -// units you can have in an organization. +// * OU_NUMBER_LIMIT_EXCEEDED: You attempted to exceed the number of OUs +// that you can have in an organization. // -// * OU_DEPTH_LIMIT_EXCEEDED: You attempted to create an organizational unit -// tree that is too many levels deep. +// * OU_DEPTH_LIMIT_EXCEEDED: You attempted to create an OU tree that is +// too many levels deep. // // * ORGANIZATION_NOT_IN_ALL_FEATURES_MODE: You attempted to perform an operation // that requires the organization to be configured to support all features. -// An organization that supports consolidated billing features only cannot +// An organization that supports only consolidated billing features can't // perform this operation. // // * POLICY_NUMBER_LIMIT_EXCEEDED. You attempted to exceed the number of @@ -5669,23 +5704,24 @@ func (c *Organizations) ListAWSServiceAccessForOrganizationRequest(input *ListAW // minimum number of policies of a certain type required. // // * ACCOUNT_CANNOT_LEAVE_WITHOUT_EULA: You attempted to remove an account -// from the organization that does not yet have enough information to exist -// as a stand-alone account. This account requires you to first agree to -// the AWS Customer Agreement. Follow the steps at To leave an organization -// when all required account information has not yet been provided (http://docs.aws.amazon.com/organizations/latest/userguide/orgs_manage_accounts_remove.html#leave-without-all-info) +// from the organization that doesn't yet have enough information to exist +// as a standalone account. This account requires you to first agree to the +// AWS Customer Agreement. Follow the steps at To leave an organization when +// all required account information has not yet been provided (http://docs.aws.amazon.com/organizations/latest/userguide/orgs_manage_accounts_remove.html#leave-without-all-info) // in the AWS Organizations User Guide. // // * ACCOUNT_CANNOT_LEAVE_WITHOUT_PHONE_VERIFICATION: You attempted to remove -// an account from the organization that does not yet have enough information -// to exist as a stand-alone account. This account requires you to first -// complete phone verification. Follow the steps at To leave an organization -// when all required account information has not yet been provided (http://docs.aws.amazon.com/organizations/latest/userguide/orgs_manage_accounts_remove.html#leave-without-all-info) +// an account from the organization that doesn't yet have enough information +// to exist as a standalone account. This account requires you to first complete +// phone verification. Follow the steps at To leave an organization when +// all required account information has not yet been provided (http://docs.aws.amazon.com/organizations/latest/userguide/orgs_manage_accounts_remove.html#leave-without-all-info) // in the AWS Organizations User Guide. // // * MASTER_ACCOUNT_PAYMENT_INSTRUMENT_REQUIRED: To create an organization -// with this account, you first must associate a payment instrument, such -// as a credit card, with the account. Follow the steps at To leave an organization -// when all required account information has not yet been provided (http://docs.aws.amazon.com/organizations/latest/userguide/orgs_manage_accounts_remove.html#leave-without-all-info) +// with this master account, you first must associate a payment instrument, +// such as a credit card, with the account. Follow the steps at To leave +// an organization when all required account information has not yet been +// provided (http://docs.aws.amazon.com/organizations/latest/userguide/orgs_manage_accounts_remove.html#leave-without-all-info) // in the AWS Organizations User Guide. // // * MEMBER_ACCOUNT_PAYMENT_INSTRUMENT_REQUIRED: To complete this operation @@ -5718,11 +5754,11 @@ func (c *Organizations) ListAWSServiceAccessForOrganizationRequest(input *ListAW // specific API or operation: // // * IMMUTABLE_POLICY: You specified a policy that is managed by AWS and -// cannot be modified. +// can't be modified. // // * INPUT_REQUIRED: You must include a value for all required parameters. // -// * INVALID_ENUM: You specified a value that is not valid for that parameter. +// * INVALID_ENUM: You specified a value that isn't valid for that parameter. // // * INVALID_FULL_NAME_TARGET: You specified a full name that contains invalid // characters. @@ -5742,11 +5778,11 @@ func (c *Organizations) ListAWSServiceAccessForOrganizationRequest(input *ListAW // * INVALID_PATTERN_TARGET_ID: You specified a policy target ID that doesn't // match the required pattern. // -// * INVALID_ROLE_NAME: You provided a role name that is not valid. A role -// name can’t begin with the reserved prefix 'AWSServiceRoleFor'. +// * INVALID_ROLE_NAME: You provided a role name that isn't valid. A role +// name can't begin with the reserved prefix AWSServiceRoleFor. // -// * INVALID_SYNTAX_ORGANIZATION_ARN: You specified an invalid ARN for the -// organization. +// * INVALID_SYNTAX_ORGANIZATION_ARN: You specified an invalid Amazon Resource +// Name (ARN) for the organization. // // * INVALID_SYNTAX_POLICY_ID: You specified an invalid policy ID. // @@ -5925,7 +5961,7 @@ func (c *Organizations) ListAccountsRequest(input *ListAccountsInput) (req *requ // in the IAM User Guide. // // * ErrCodeAWSOrganizationsNotInUseException "AWSOrganizationsNotInUseException" -// Your account is not a member of an organization. To make this request, you +// Your account isn't a member of an organization. To make this request, you // must use the credentials of an account that belongs to an organization. // // * ErrCodeInvalidInputException "InvalidInputException" @@ -5937,11 +5973,11 @@ func (c *Organizations) ListAccountsRequest(input *ListAccountsInput) (req *requ // specific API or operation: // // * IMMUTABLE_POLICY: You specified a policy that is managed by AWS and -// cannot be modified. +// can't be modified. // // * INPUT_REQUIRED: You must include a value for all required parameters. // -// * INVALID_ENUM: You specified a value that is not valid for that parameter. +// * INVALID_ENUM: You specified a value that isn't valid for that parameter. // // * INVALID_FULL_NAME_TARGET: You specified a full name that contains invalid // characters. @@ -5961,11 +5997,11 @@ func (c *Organizations) ListAccountsRequest(input *ListAccountsInput) (req *requ // * INVALID_PATTERN_TARGET_ID: You specified a policy target ID that doesn't // match the required pattern. // -// * INVALID_ROLE_NAME: You provided a role name that is not valid. A role -// name can’t begin with the reserved prefix 'AWSServiceRoleFor'. +// * INVALID_ROLE_NAME: You provided a role name that isn't valid. A role +// name can't begin with the reserved prefix AWSServiceRoleFor. // -// * INVALID_SYNTAX_ORGANIZATION_ARN: You specified an invalid ARN for the -// organization. +// * INVALID_SYNTAX_ORGANIZATION_ARN: You specified an invalid Amazon Resource +// Name (ARN) for the organization. // // * INVALID_SYNTAX_POLICY_ID: You specified an invalid policy ID. // @@ -6147,7 +6183,7 @@ func (c *Organizations) ListAccountsForParentRequest(input *ListAccountsForParen // in the IAM User Guide. // // * ErrCodeAWSOrganizationsNotInUseException "AWSOrganizationsNotInUseException" -// Your account is not a member of an organization. To make this request, you +// Your account isn't a member of an organization. To make this request, you // must use the credentials of an account that belongs to an organization. // // * ErrCodeInvalidInputException "InvalidInputException" @@ -6159,11 +6195,11 @@ func (c *Organizations) ListAccountsForParentRequest(input *ListAccountsForParen // specific API or operation: // // * IMMUTABLE_POLICY: You specified a policy that is managed by AWS and -// cannot be modified. +// can't be modified. // // * INPUT_REQUIRED: You must include a value for all required parameters. // -// * INVALID_ENUM: You specified a value that is not valid for that parameter. +// * INVALID_ENUM: You specified a value that isn't valid for that parameter. // // * INVALID_FULL_NAME_TARGET: You specified a full name that contains invalid // characters. @@ -6183,11 +6219,11 @@ func (c *Organizations) ListAccountsForParentRequest(input *ListAccountsForParen // * INVALID_PATTERN_TARGET_ID: You specified a policy target ID that doesn't // match the required pattern. // -// * INVALID_ROLE_NAME: You provided a role name that is not valid. A role -// name can’t begin with the reserved prefix 'AWSServiceRoleFor'. +// * INVALID_ROLE_NAME: You provided a role name that isn't valid. A role +// name can't begin with the reserved prefix AWSServiceRoleFor. // -// * INVALID_SYNTAX_ORGANIZATION_ARN: You specified an invalid ARN for the -// organization. +// * INVALID_SYNTAX_ORGANIZATION_ARN: You specified an invalid Amazon Resource +// Name (ARN) for the organization. // // * INVALID_SYNTAX_POLICY_ID: You specified an invalid policy ID. // @@ -6210,8 +6246,7 @@ func (c *Organizations) ListAccountsForParentRequest(input *ListAccountsForParen // between entities in the same root. // // * ErrCodeParentNotFoundException "ParentNotFoundException" -// We can't find a root or organizational unit (OU) with the ParentId that you -// specified. +// We can't find a root or OU with the ParentId that you specified. // // * ErrCodeServiceException "ServiceException" // AWS Organizations can't complete your request because of an internal service @@ -6370,7 +6405,7 @@ func (c *Organizations) ListChildrenRequest(input *ListChildrenInput) (req *requ // in the IAM User Guide. // // * ErrCodeAWSOrganizationsNotInUseException "AWSOrganizationsNotInUseException" -// Your account is not a member of an organization. To make this request, you +// Your account isn't a member of an organization. To make this request, you // must use the credentials of an account that belongs to an organization. // // * ErrCodeInvalidInputException "InvalidInputException" @@ -6382,11 +6417,11 @@ func (c *Organizations) ListChildrenRequest(input *ListChildrenInput) (req *requ // specific API or operation: // // * IMMUTABLE_POLICY: You specified a policy that is managed by AWS and -// cannot be modified. +// can't be modified. // // * INPUT_REQUIRED: You must include a value for all required parameters. // -// * INVALID_ENUM: You specified a value that is not valid for that parameter. +// * INVALID_ENUM: You specified a value that isn't valid for that parameter. // // * INVALID_FULL_NAME_TARGET: You specified a full name that contains invalid // characters. @@ -6406,11 +6441,11 @@ func (c *Organizations) ListChildrenRequest(input *ListChildrenInput) (req *requ // * INVALID_PATTERN_TARGET_ID: You specified a policy target ID that doesn't // match the required pattern. // -// * INVALID_ROLE_NAME: You provided a role name that is not valid. A role -// name can’t begin with the reserved prefix 'AWSServiceRoleFor'. +// * INVALID_ROLE_NAME: You provided a role name that isn't valid. A role +// name can't begin with the reserved prefix AWSServiceRoleFor. // -// * INVALID_SYNTAX_ORGANIZATION_ARN: You specified an invalid ARN for the -// organization. +// * INVALID_SYNTAX_ORGANIZATION_ARN: You specified an invalid Amazon Resource +// Name (ARN) for the organization. // // * INVALID_SYNTAX_POLICY_ID: You specified an invalid policy ID. // @@ -6433,8 +6468,7 @@ func (c *Organizations) ListChildrenRequest(input *ListChildrenInput) (req *requ // between entities in the same root. // // * ErrCodeParentNotFoundException "ParentNotFoundException" -// We can't find a root or organizational unit (OU) with the ParentId that you -// specified. +// We can't find a root or OU with the ParentId that you specified. // // * ErrCodeServiceException "ServiceException" // AWS Organizations can't complete your request because of an internal service @@ -6592,7 +6626,7 @@ func (c *Organizations) ListCreateAccountStatusRequest(input *ListCreateAccountS // in the IAM User Guide. // // * ErrCodeAWSOrganizationsNotInUseException "AWSOrganizationsNotInUseException" -// Your account is not a member of an organization. To make this request, you +// Your account isn't a member of an organization. To make this request, you // must use the credentials of an account that belongs to an organization. // // * ErrCodeInvalidInputException "InvalidInputException" @@ -6604,11 +6638,11 @@ func (c *Organizations) ListCreateAccountStatusRequest(input *ListCreateAccountS // specific API or operation: // // * IMMUTABLE_POLICY: You specified a policy that is managed by AWS and -// cannot be modified. +// can't be modified. // // * INPUT_REQUIRED: You must include a value for all required parameters. // -// * INVALID_ENUM: You specified a value that is not valid for that parameter. +// * INVALID_ENUM: You specified a value that isn't valid for that parameter. // // * INVALID_FULL_NAME_TARGET: You specified a full name that contains invalid // characters. @@ -6628,11 +6662,11 @@ func (c *Organizations) ListCreateAccountStatusRequest(input *ListCreateAccountS // * INVALID_PATTERN_TARGET_ID: You specified a policy target ID that doesn't // match the required pattern. // -// * INVALID_ROLE_NAME: You provided a role name that is not valid. A role -// name can’t begin with the reserved prefix 'AWSServiceRoleFor'. +// * INVALID_ROLE_NAME: You provided a role name that isn't valid. A role +// name can't begin with the reserved prefix AWSServiceRoleFor. // -// * INVALID_SYNTAX_ORGANIZATION_ARN: You specified an invalid ARN for the -// organization. +// * INVALID_SYNTAX_ORGANIZATION_ARN: You specified an invalid Amazon Resource +// Name (ARN) for the organization. // // * INVALID_SYNTAX_POLICY_ID: You specified an invalid policy ID. // @@ -6826,11 +6860,11 @@ func (c *Organizations) ListHandshakesForAccountRequest(input *ListHandshakesFor // specific API or operation: // // * IMMUTABLE_POLICY: You specified a policy that is managed by AWS and -// cannot be modified. +// can't be modified. // // * INPUT_REQUIRED: You must include a value for all required parameters. // -// * INVALID_ENUM: You specified a value that is not valid for that parameter. +// * INVALID_ENUM: You specified a value that isn't valid for that parameter. // // * INVALID_FULL_NAME_TARGET: You specified a full name that contains invalid // characters. @@ -6850,11 +6884,11 @@ func (c *Organizations) ListHandshakesForAccountRequest(input *ListHandshakesFor // * INVALID_PATTERN_TARGET_ID: You specified a policy target ID that doesn't // match the required pattern. // -// * INVALID_ROLE_NAME: You provided a role name that is not valid. A role -// name can’t begin with the reserved prefix 'AWSServiceRoleFor'. +// * INVALID_ROLE_NAME: You provided a role name that isn't valid. A role +// name can't begin with the reserved prefix AWSServiceRoleFor. // -// * INVALID_SYNTAX_ORGANIZATION_ARN: You specified an invalid ARN for the -// organization. +// * INVALID_SYNTAX_ORGANIZATION_ARN: You specified an invalid Amazon Resource +// Name (ARN) for the organization. // // * INVALID_SYNTAX_POLICY_ID: You specified an invalid policy ID. // @@ -7038,7 +7072,7 @@ func (c *Organizations) ListHandshakesForOrganizationRequest(input *ListHandshak // in the IAM User Guide. // // * ErrCodeAWSOrganizationsNotInUseException "AWSOrganizationsNotInUseException" -// Your account is not a member of an organization. To make this request, you +// Your account isn't a member of an organization. To make this request, you // must use the credentials of an account that belongs to an organization. // // * ErrCodeConcurrentModificationException "ConcurrentModificationException" @@ -7054,11 +7088,11 @@ func (c *Organizations) ListHandshakesForOrganizationRequest(input *ListHandshak // specific API or operation: // // * IMMUTABLE_POLICY: You specified a policy that is managed by AWS and -// cannot be modified. +// can't be modified. // // * INPUT_REQUIRED: You must include a value for all required parameters. // -// * INVALID_ENUM: You specified a value that is not valid for that parameter. +// * INVALID_ENUM: You specified a value that isn't valid for that parameter. // // * INVALID_FULL_NAME_TARGET: You specified a full name that contains invalid // characters. @@ -7078,11 +7112,11 @@ func (c *Organizations) ListHandshakesForOrganizationRequest(input *ListHandshak // * INVALID_PATTERN_TARGET_ID: You specified a policy target ID that doesn't // match the required pattern. // -// * INVALID_ROLE_NAME: You provided a role name that is not valid. A role -// name can’t begin with the reserved prefix 'AWSServiceRoleFor'. +// * INVALID_ROLE_NAME: You provided a role name that isn't valid. A role +// name can't begin with the reserved prefix AWSServiceRoleFor. // -// * INVALID_SYNTAX_ORGANIZATION_ARN: You specified an invalid ARN for the -// organization. +// * INVALID_SYNTAX_ORGANIZATION_ARN: You specified an invalid Amazon Resource +// Name (ARN) for the organization. // // * INVALID_SYNTAX_POLICY_ID: You specified an invalid policy ID. // @@ -7259,7 +7293,7 @@ func (c *Organizations) ListOrganizationalUnitsForParentRequest(input *ListOrgan // in the IAM User Guide. // // * ErrCodeAWSOrganizationsNotInUseException "AWSOrganizationsNotInUseException" -// Your account is not a member of an organization. To make this request, you +// Your account isn't a member of an organization. To make this request, you // must use the credentials of an account that belongs to an organization. // // * ErrCodeInvalidInputException "InvalidInputException" @@ -7271,11 +7305,11 @@ func (c *Organizations) ListOrganizationalUnitsForParentRequest(input *ListOrgan // specific API or operation: // // * IMMUTABLE_POLICY: You specified a policy that is managed by AWS and -// cannot be modified. +// can't be modified. // // * INPUT_REQUIRED: You must include a value for all required parameters. // -// * INVALID_ENUM: You specified a value that is not valid for that parameter. +// * INVALID_ENUM: You specified a value that isn't valid for that parameter. // // * INVALID_FULL_NAME_TARGET: You specified a full name that contains invalid // characters. @@ -7295,11 +7329,11 @@ func (c *Organizations) ListOrganizationalUnitsForParentRequest(input *ListOrgan // * INVALID_PATTERN_TARGET_ID: You specified a policy target ID that doesn't // match the required pattern. // -// * INVALID_ROLE_NAME: You provided a role name that is not valid. A role -// name can’t begin with the reserved prefix 'AWSServiceRoleFor'. +// * INVALID_ROLE_NAME: You provided a role name that isn't valid. A role +// name can't begin with the reserved prefix AWSServiceRoleFor. // -// * INVALID_SYNTAX_ORGANIZATION_ARN: You specified an invalid ARN for the -// organization. +// * INVALID_SYNTAX_ORGANIZATION_ARN: You specified an invalid Amazon Resource +// Name (ARN) for the organization. // // * INVALID_SYNTAX_POLICY_ID: You specified an invalid policy ID. // @@ -7322,8 +7356,7 @@ func (c *Organizations) ListOrganizationalUnitsForParentRequest(input *ListOrgan // between entities in the same root. // // * ErrCodeParentNotFoundException "ParentNotFoundException" -// We can't find a root or organizational unit (OU) with the ParentId that you -// specified. +// We can't find a root or OU with the ParentId that you specified. // // * ErrCodeServiceException "ServiceException" // AWS Organizations can't complete your request because of an internal service @@ -7484,7 +7517,7 @@ func (c *Organizations) ListParentsRequest(input *ListParentsInput) (req *reques // in the IAM User Guide. // // * ErrCodeAWSOrganizationsNotInUseException "AWSOrganizationsNotInUseException" -// Your account is not a member of an organization. To make this request, you +// Your account isn't a member of an organization. To make this request, you // must use the credentials of an account that belongs to an organization. // // * ErrCodeChildNotFoundException "ChildNotFoundException" @@ -7500,11 +7533,11 @@ func (c *Organizations) ListParentsRequest(input *ListParentsInput) (req *reques // specific API or operation: // // * IMMUTABLE_POLICY: You specified a policy that is managed by AWS and -// cannot be modified. +// can't be modified. // // * INPUT_REQUIRED: You must include a value for all required parameters. // -// * INVALID_ENUM: You specified a value that is not valid for that parameter. +// * INVALID_ENUM: You specified a value that isn't valid for that parameter. // // * INVALID_FULL_NAME_TARGET: You specified a full name that contains invalid // characters. @@ -7524,11 +7557,11 @@ func (c *Organizations) ListParentsRequest(input *ListParentsInput) (req *reques // * INVALID_PATTERN_TARGET_ID: You specified a policy target ID that doesn't // match the required pattern. // -// * INVALID_ROLE_NAME: You provided a role name that is not valid. A role -// name can’t begin with the reserved prefix 'AWSServiceRoleFor'. +// * INVALID_ROLE_NAME: You provided a role name that isn't valid. A role +// name can't begin with the reserved prefix AWSServiceRoleFor. // -// * INVALID_SYNTAX_ORGANIZATION_ARN: You specified an invalid ARN for the -// organization. +// * INVALID_SYNTAX_ORGANIZATION_ARN: You specified an invalid Amazon Resource +// Name (ARN) for the organization. // // * INVALID_SYNTAX_POLICY_ID: You specified an invalid policy ID. // @@ -7705,7 +7738,7 @@ func (c *Organizations) ListPoliciesRequest(input *ListPoliciesInput) (req *requ // in the IAM User Guide. // // * ErrCodeAWSOrganizationsNotInUseException "AWSOrganizationsNotInUseException" -// Your account is not a member of an organization. To make this request, you +// Your account isn't a member of an organization. To make this request, you // must use the credentials of an account that belongs to an organization. // // * ErrCodeInvalidInputException "InvalidInputException" @@ -7717,11 +7750,11 @@ func (c *Organizations) ListPoliciesRequest(input *ListPoliciesInput) (req *requ // specific API or operation: // // * IMMUTABLE_POLICY: You specified a policy that is managed by AWS and -// cannot be modified. +// can't be modified. // // * INPUT_REQUIRED: You must include a value for all required parameters. // -// * INVALID_ENUM: You specified a value that is not valid for that parameter. +// * INVALID_ENUM: You specified a value that isn't valid for that parameter. // // * INVALID_FULL_NAME_TARGET: You specified a full name that contains invalid // characters. @@ -7741,11 +7774,11 @@ func (c *Organizations) ListPoliciesRequest(input *ListPoliciesInput) (req *requ // * INVALID_PATTERN_TARGET_ID: You specified a policy target ID that doesn't // match the required pattern. // -// * INVALID_ROLE_NAME: You provided a role name that is not valid. A role -// name can’t begin with the reserved prefix 'AWSServiceRoleFor'. +// * INVALID_ROLE_NAME: You provided a role name that isn't valid. A role +// name can't begin with the reserved prefix AWSServiceRoleFor. // -// * INVALID_SYNTAX_ORGANIZATION_ARN: You specified an invalid ARN for the -// organization. +// * INVALID_SYNTAX_ORGANIZATION_ARN: You specified an invalid Amazon Resource +// Name (ARN) for the organization. // // * INVALID_SYNTAX_POLICY_ID: You specified an invalid policy ID. // @@ -7924,7 +7957,7 @@ func (c *Organizations) ListPoliciesForTargetRequest(input *ListPoliciesForTarge // in the IAM User Guide. // // * ErrCodeAWSOrganizationsNotInUseException "AWSOrganizationsNotInUseException" -// Your account is not a member of an organization. To make this request, you +// Your account isn't a member of an organization. To make this request, you // must use the credentials of an account that belongs to an organization. // // * ErrCodeInvalidInputException "InvalidInputException" @@ -7936,11 +7969,11 @@ func (c *Organizations) ListPoliciesForTargetRequest(input *ListPoliciesForTarge // specific API or operation: // // * IMMUTABLE_POLICY: You specified a policy that is managed by AWS and -// cannot be modified. +// can't be modified. // // * INPUT_REQUIRED: You must include a value for all required parameters. // -// * INVALID_ENUM: You specified a value that is not valid for that parameter. +// * INVALID_ENUM: You specified a value that isn't valid for that parameter. // // * INVALID_FULL_NAME_TARGET: You specified a full name that contains invalid // characters. @@ -7960,11 +7993,11 @@ func (c *Organizations) ListPoliciesForTargetRequest(input *ListPoliciesForTarge // * INVALID_PATTERN_TARGET_ID: You specified a policy target ID that doesn't // match the required pattern. // -// * INVALID_ROLE_NAME: You provided a role name that is not valid. A role -// name can’t begin with the reserved prefix 'AWSServiceRoleFor'. +// * INVALID_ROLE_NAME: You provided a role name that isn't valid. A role +// name can't begin with the reserved prefix AWSServiceRoleFor. // -// * INVALID_SYNTAX_ORGANIZATION_ARN: You specified an invalid ARN for the -// organization. +// * INVALID_SYNTAX_ORGANIZATION_ARN: You specified an invalid Amazon Resource +// Name (ARN) for the organization. // // * INVALID_SYNTAX_POLICY_ID: You specified an invalid policy ID. // @@ -8150,7 +8183,7 @@ func (c *Organizations) ListRootsRequest(input *ListRootsInput) (req *request.Re // in the IAM User Guide. // // * ErrCodeAWSOrganizationsNotInUseException "AWSOrganizationsNotInUseException" -// Your account is not a member of an organization. To make this request, you +// Your account isn't a member of an organization. To make this request, you // must use the credentials of an account that belongs to an organization. // // * ErrCodeInvalidInputException "InvalidInputException" @@ -8162,11 +8195,11 @@ func (c *Organizations) ListRootsRequest(input *ListRootsInput) (req *request.Re // specific API or operation: // // * IMMUTABLE_POLICY: You specified a policy that is managed by AWS and -// cannot be modified. +// can't be modified. // // * INPUT_REQUIRED: You must include a value for all required parameters. // -// * INVALID_ENUM: You specified a value that is not valid for that parameter. +// * INVALID_ENUM: You specified a value that isn't valid for that parameter. // // * INVALID_FULL_NAME_TARGET: You specified a full name that contains invalid // characters. @@ -8186,11 +8219,11 @@ func (c *Organizations) ListRootsRequest(input *ListRootsInput) (req *request.Re // * INVALID_PATTERN_TARGET_ID: You specified a policy target ID that doesn't // match the required pattern. // -// * INVALID_ROLE_NAME: You provided a role name that is not valid. A role -// name can’t begin with the reserved prefix 'AWSServiceRoleFor'. +// * INVALID_ROLE_NAME: You provided a role name that isn't valid. A role +// name can't begin with the reserved prefix AWSServiceRoleFor. // -// * INVALID_SYNTAX_ORGANIZATION_ARN: You specified an invalid ARN for the -// organization. +// * INVALID_SYNTAX_ORGANIZATION_ARN: You specified an invalid Amazon Resource +// Name (ARN) for the organization. // // * INVALID_SYNTAX_POLICY_ID: You specified an invalid policy ID. // @@ -8368,7 +8401,7 @@ func (c *Organizations) ListTargetsForPolicyRequest(input *ListTargetsForPolicyI // in the IAM User Guide. // // * ErrCodeAWSOrganizationsNotInUseException "AWSOrganizationsNotInUseException" -// Your account is not a member of an organization. To make this request, you +// Your account isn't a member of an organization. To make this request, you // must use the credentials of an account that belongs to an organization. // // * ErrCodeInvalidInputException "InvalidInputException" @@ -8380,11 +8413,11 @@ func (c *Organizations) ListTargetsForPolicyRequest(input *ListTargetsForPolicyI // specific API or operation: // // * IMMUTABLE_POLICY: You specified a policy that is managed by AWS and -// cannot be modified. +// can't be modified. // // * INPUT_REQUIRED: You must include a value for all required parameters. // -// * INVALID_ENUM: You specified a value that is not valid for that parameter. +// * INVALID_ENUM: You specified a value that isn't valid for that parameter. // // * INVALID_FULL_NAME_TARGET: You specified a full name that contains invalid // characters. @@ -8404,11 +8437,11 @@ func (c *Organizations) ListTargetsForPolicyRequest(input *ListTargetsForPolicyI // * INVALID_PATTERN_TARGET_ID: You specified a policy target ID that doesn't // match the required pattern. // -// * INVALID_ROLE_NAME: You provided a role name that is not valid. A role -// name can’t begin with the reserved prefix 'AWSServiceRoleFor'. +// * INVALID_ROLE_NAME: You provided a role name that isn't valid. A role +// name can't begin with the reserved prefix AWSServiceRoleFor. // -// * INVALID_SYNTAX_ORGANIZATION_ARN: You specified an invalid ARN for the -// organization. +// * INVALID_SYNTAX_ORGANIZATION_ARN: You specified an invalid Amazon Resource +// Name (ARN) for the organization. // // * INVALID_SYNTAX_POLICY_ID: You specified an invalid policy ID. // @@ -8588,11 +8621,11 @@ func (c *Organizations) MoveAccountRequest(input *MoveAccountInput) (req *reques // specific API or operation: // // * IMMUTABLE_POLICY: You specified a policy that is managed by AWS and -// cannot be modified. +// can't be modified. // // * INPUT_REQUIRED: You must include a value for all required parameters. // -// * INVALID_ENUM: You specified a value that is not valid for that parameter. +// * INVALID_ENUM: You specified a value that isn't valid for that parameter. // // * INVALID_FULL_NAME_TARGET: You specified a full name that contains invalid // characters. @@ -8612,11 +8645,11 @@ func (c *Organizations) MoveAccountRequest(input *MoveAccountInput) (req *reques // * INVALID_PATTERN_TARGET_ID: You specified a policy target ID that doesn't // match the required pattern. // -// * INVALID_ROLE_NAME: You provided a role name that is not valid. A role -// name can’t begin with the reserved prefix 'AWSServiceRoleFor'. +// * INVALID_ROLE_NAME: You provided a role name that isn't valid. A role +// name can't begin with the reserved prefix AWSServiceRoleFor. // -// * INVALID_SYNTAX_ORGANIZATION_ARN: You specified an invalid ARN for the -// organization. +// * INVALID_SYNTAX_ORGANIZATION_ARN: You specified an invalid Amazon Resource +// Name (ARN) for the organization. // // * INVALID_SYNTAX_POLICY_ID: You specified an invalid policy ID. // @@ -8650,7 +8683,7 @@ func (c *Organizations) MoveAccountRequest(input *MoveAccountInput) (req *reques // // * ErrCodeAccountNotFoundException "AccountNotFoundException" // We can't find an AWS account with the AccountId that you specified, or the -// account whose credentials you used to make this request is not a member of +// account whose credentials you used to make this request isn't a member of // an organization. // // * ErrCodeTooManyRequestsException "TooManyRequestsException" @@ -8662,7 +8695,7 @@ func (c *Organizations) MoveAccountRequest(input *MoveAccountInput) (req *reques // Try again later. // // * ErrCodeAWSOrganizationsNotInUseException "AWSOrganizationsNotInUseException" -// Your account is not a member of an organization. To make this request, you +// Your account isn't a member of an organization. To make this request, you // must use the credentials of an account that belongs to an organization. // // * ErrCodeServiceException "ServiceException" @@ -8780,11 +8813,11 @@ func (c *Organizations) RemoveAccountFromOrganizationRequest(input *RemoveAccoun // // * ErrCodeAccountNotFoundException "AccountNotFoundException" // We can't find an AWS account with the AccountId that you specified, or the -// account whose credentials you used to make this request is not a member of +// account whose credentials you used to make this request isn't a member of // an organization. // // * ErrCodeAWSOrganizationsNotInUseException "AWSOrganizationsNotInUseException" -// Your account is not a member of an organization. To make this request, you +// Your account isn't a member of an organization. To make this request, you // must use the credentials of an account that belongs to an organization. // // * ErrCodeConcurrentModificationException "ConcurrentModificationException" @@ -8793,40 +8826,42 @@ func (c *Organizations) RemoveAccountFromOrganizationRequest(input *RemoveAccoun // // * ErrCodeConstraintViolationException "ConstraintViolationException" // Performing this operation violates a minimum or maximum value limit. For -// example, attempting to removing the last SCP from an OU or root, inviting -// or creating too many accounts to the organization, or attaching too many -// policies to an account, OU, or root. This exception includes a reason that -// contains additional information about the violated limit: +// example, attempting to removing the last service control policy (SCP) from +// an OU or root, inviting or creating too many accounts to the organization, +// or attaching too many policies to an account, OU, or root. This exception +// includes a reason that contains additional information about the violated +// limit. // // Some of the reasons in the following list might not be applicable to this // specific API or operation: // -// ACCOUNT_NUMBER_LIMIT_EXCEEDED: You attempted to exceed the limit on the number -// of accounts in an organization. If you need more accounts, contact AWS Support -// to request an increase in your limit. +// * ACCOUNT_NUMBER_LIMIT_EXCEEDED: You attempted to exceed the limit on +// the number of accounts in an organization. If you need more accounts, +// contactAWS Support (https://console.aws.amazon.com/support/home#/) to +// request an increase in your limit. // -// Or, The number of invitations that you tried to send would cause you to exceed -// the limit of accounts in your organization. Send fewer invitations, or contact -// AWS Support to request an increase in the number of accounts. +// Or the number of invitations that you tried to send would cause you to exceed +// the limit of accounts in your organization. Send fewer invitations or +// contact AWS Support to request an increase in the number of accounts. // -// Note: deleted and closed accounts still count toward your limit. +// Deleted and closed accounts still count toward your limit. // // If you get receive this exception when running a command immediately after -// creating the organization, wait one hour and try again. If after an hour -// it continues to fail with this error, contact AWS Customer Support (https://console.aws.amazon.com/support/home#/). +// creating the organization, wait one hour and try again. If after an hour +// it continues to fail with this error, contact AWS Support (https://console.aws.amazon.com/support/home#/). // // * HANDSHAKE_RATE_LIMIT_EXCEEDED: You attempted to exceed the number of -// handshakes you can send in one day. +// handshakes that you can send in one day. // -// * OU_NUMBER_LIMIT_EXCEEDED: You attempted to exceed the number of organizational -// units you can have in an organization. +// * OU_NUMBER_LIMIT_EXCEEDED: You attempted to exceed the number of OUs +// that you can have in an organization. // -// * OU_DEPTH_LIMIT_EXCEEDED: You attempted to create an organizational unit -// tree that is too many levels deep. +// * OU_DEPTH_LIMIT_EXCEEDED: You attempted to create an OU tree that is +// too many levels deep. // // * ORGANIZATION_NOT_IN_ALL_FEATURES_MODE: You attempted to perform an operation // that requires the organization to be configured to support all features. -// An organization that supports consolidated billing features only cannot +// An organization that supports only consolidated billing features can't // perform this operation. // // * POLICY_NUMBER_LIMIT_EXCEEDED. You attempted to exceed the number of @@ -8841,23 +8876,24 @@ func (c *Organizations) RemoveAccountFromOrganizationRequest(input *RemoveAccoun // minimum number of policies of a certain type required. // // * ACCOUNT_CANNOT_LEAVE_WITHOUT_EULA: You attempted to remove an account -// from the organization that does not yet have enough information to exist -// as a stand-alone account. This account requires you to first agree to -// the AWS Customer Agreement. Follow the steps at To leave an organization -// when all required account information has not yet been provided (http://docs.aws.amazon.com/organizations/latest/userguide/orgs_manage_accounts_remove.html#leave-without-all-info) +// from the organization that doesn't yet have enough information to exist +// as a standalone account. This account requires you to first agree to the +// AWS Customer Agreement. Follow the steps at To leave an organization when +// all required account information has not yet been provided (http://docs.aws.amazon.com/organizations/latest/userguide/orgs_manage_accounts_remove.html#leave-without-all-info) // in the AWS Organizations User Guide. // // * ACCOUNT_CANNOT_LEAVE_WITHOUT_PHONE_VERIFICATION: You attempted to remove -// an account from the organization that does not yet have enough information -// to exist as a stand-alone account. This account requires you to first -// complete phone verification. Follow the steps at To leave an organization -// when all required account information has not yet been provided (http://docs.aws.amazon.com/organizations/latest/userguide/orgs_manage_accounts_remove.html#leave-without-all-info) +// an account from the organization that doesn't yet have enough information +// to exist as a standalone account. This account requires you to first complete +// phone verification. Follow the steps at To leave an organization when +// all required account information has not yet been provided (http://docs.aws.amazon.com/organizations/latest/userguide/orgs_manage_accounts_remove.html#leave-without-all-info) // in the AWS Organizations User Guide. // // * MASTER_ACCOUNT_PAYMENT_INSTRUMENT_REQUIRED: To create an organization -// with this account, you first must associate a payment instrument, such -// as a credit card, with the account. Follow the steps at To leave an organization -// when all required account information has not yet been provided (http://docs.aws.amazon.com/organizations/latest/userguide/orgs_manage_accounts_remove.html#leave-without-all-info) +// with this master account, you first must associate a payment instrument, +// such as a credit card, with the account. Follow the steps at To leave +// an organization when all required account information has not yet been +// provided (http://docs.aws.amazon.com/organizations/latest/userguide/orgs_manage_accounts_remove.html#leave-without-all-info) // in the AWS Organizations User Guide. // // * MEMBER_ACCOUNT_PAYMENT_INSTRUMENT_REQUIRED: To complete this operation @@ -8890,11 +8926,11 @@ func (c *Organizations) RemoveAccountFromOrganizationRequest(input *RemoveAccoun // specific API or operation: // // * IMMUTABLE_POLICY: You specified a policy that is managed by AWS and -// cannot be modified. +// can't be modified. // // * INPUT_REQUIRED: You must include a value for all required parameters. // -// * INVALID_ENUM: You specified a value that is not valid for that parameter. +// * INVALID_ENUM: You specified a value that isn't valid for that parameter. // // * INVALID_FULL_NAME_TARGET: You specified a full name that contains invalid // characters. @@ -8914,11 +8950,11 @@ func (c *Organizations) RemoveAccountFromOrganizationRequest(input *RemoveAccoun // * INVALID_PATTERN_TARGET_ID: You specified a policy target ID that doesn't // match the required pattern. // -// * INVALID_ROLE_NAME: You provided a role name that is not valid. A role -// name can’t begin with the reserved prefix 'AWSServiceRoleFor'. +// * INVALID_ROLE_NAME: You provided a role name that isn't valid. A role +// name can't begin with the reserved prefix AWSServiceRoleFor. // -// * INVALID_SYNTAX_ORGANIZATION_ARN: You specified an invalid ARN for the -// organization. +// * INVALID_SYNTAX_ORGANIZATION_ARN: You specified an invalid Amazon Resource +// Name (ARN) for the organization. // // * INVALID_SYNTAX_POLICY_ID: You specified an invalid policy ID. // @@ -9041,7 +9077,7 @@ func (c *Organizations) UpdateOrganizationalUnitRequest(input *UpdateOrganizatio // in the IAM User Guide. // // * ErrCodeAWSOrganizationsNotInUseException "AWSOrganizationsNotInUseException" -// Your account is not a member of an organization. To make this request, you +// Your account isn't a member of an organization. To make this request, you // must use the credentials of an account that belongs to an organization. // // * ErrCodeConcurrentModificationException "ConcurrentModificationException" @@ -9049,7 +9085,7 @@ func (c *Organizations) UpdateOrganizationalUnitRequest(input *UpdateOrganizatio // Try again later. // // * ErrCodeDuplicateOrganizationalUnitException "DuplicateOrganizationalUnitException" -// An organizational unit (OU) with the same name already exists. +// An OU with the same name already exists. // // * ErrCodeInvalidInputException "InvalidInputException" // The requested operation failed because you provided invalid values for one @@ -9060,11 +9096,11 @@ func (c *Organizations) UpdateOrganizationalUnitRequest(input *UpdateOrganizatio // specific API or operation: // // * IMMUTABLE_POLICY: You specified a policy that is managed by AWS and -// cannot be modified. +// can't be modified. // // * INPUT_REQUIRED: You must include a value for all required parameters. // -// * INVALID_ENUM: You specified a value that is not valid for that parameter. +// * INVALID_ENUM: You specified a value that isn't valid for that parameter. // // * INVALID_FULL_NAME_TARGET: You specified a full name that contains invalid // characters. @@ -9084,11 +9120,11 @@ func (c *Organizations) UpdateOrganizationalUnitRequest(input *UpdateOrganizatio // * INVALID_PATTERN_TARGET_ID: You specified a policy target ID that doesn't // match the required pattern. // -// * INVALID_ROLE_NAME: You provided a role name that is not valid. A role -// name can’t begin with the reserved prefix 'AWSServiceRoleFor'. +// * INVALID_ROLE_NAME: You provided a role name that isn't valid. A role +// name can't begin with the reserved prefix AWSServiceRoleFor. // -// * INVALID_SYNTAX_ORGANIZATION_ARN: You specified an invalid ARN for the -// organization. +// * INVALID_SYNTAX_ORGANIZATION_ARN: You specified an invalid Amazon Resource +// Name (ARN) for the organization. // // * INVALID_SYNTAX_POLICY_ID: You specified an invalid policy ID. // @@ -9111,8 +9147,7 @@ func (c *Organizations) UpdateOrganizationalUnitRequest(input *UpdateOrganizatio // between entities in the same root. // // * ErrCodeOrganizationalUnitNotFoundException "OrganizationalUnitNotFoundException" -// We can't find an organizational unit (OU) with the OrganizationalUnitId that -// you specified. +// We can't find an OU with the OrganizationalUnitId that you specified. // // * ErrCodeServiceException "ServiceException" // AWS Organizations can't complete your request because of an internal service @@ -9210,7 +9245,7 @@ func (c *Organizations) UpdatePolicyRequest(input *UpdatePolicyInput) (req *requ // in the IAM User Guide. // // * ErrCodeAWSOrganizationsNotInUseException "AWSOrganizationsNotInUseException" -// Your account is not a member of an organization. To make this request, you +// Your account isn't a member of an organization. To make this request, you // must use the credentials of an account that belongs to an organization. // // * ErrCodeConcurrentModificationException "ConcurrentModificationException" @@ -9219,40 +9254,42 @@ func (c *Organizations) UpdatePolicyRequest(input *UpdatePolicyInput) (req *requ // // * ErrCodeConstraintViolationException "ConstraintViolationException" // Performing this operation violates a minimum or maximum value limit. For -// example, attempting to removing the last SCP from an OU or root, inviting -// or creating too many accounts to the organization, or attaching too many -// policies to an account, OU, or root. This exception includes a reason that -// contains additional information about the violated limit: +// example, attempting to removing the last service control policy (SCP) from +// an OU or root, inviting or creating too many accounts to the organization, +// or attaching too many policies to an account, OU, or root. This exception +// includes a reason that contains additional information about the violated +// limit. // // Some of the reasons in the following list might not be applicable to this // specific API or operation: // -// ACCOUNT_NUMBER_LIMIT_EXCEEDED: You attempted to exceed the limit on the number -// of accounts in an organization. If you need more accounts, contact AWS Support -// to request an increase in your limit. +// * ACCOUNT_NUMBER_LIMIT_EXCEEDED: You attempted to exceed the limit on +// the number of accounts in an organization. If you need more accounts, +// contactAWS Support (https://console.aws.amazon.com/support/home#/) to +// request an increase in your limit. // -// Or, The number of invitations that you tried to send would cause you to exceed -// the limit of accounts in your organization. Send fewer invitations, or contact -// AWS Support to request an increase in the number of accounts. +// Or the number of invitations that you tried to send would cause you to exceed +// the limit of accounts in your organization. Send fewer invitations or +// contact AWS Support to request an increase in the number of accounts. // -// Note: deleted and closed accounts still count toward your limit. +// Deleted and closed accounts still count toward your limit. // // If you get receive this exception when running a command immediately after -// creating the organization, wait one hour and try again. If after an hour -// it continues to fail with this error, contact AWS Customer Support (https://console.aws.amazon.com/support/home#/). +// creating the organization, wait one hour and try again. If after an hour +// it continues to fail with this error, contact AWS Support (https://console.aws.amazon.com/support/home#/). // // * HANDSHAKE_RATE_LIMIT_EXCEEDED: You attempted to exceed the number of -// handshakes you can send in one day. +// handshakes that you can send in one day. // -// * OU_NUMBER_LIMIT_EXCEEDED: You attempted to exceed the number of organizational -// units you can have in an organization. +// * OU_NUMBER_LIMIT_EXCEEDED: You attempted to exceed the number of OUs +// that you can have in an organization. // -// * OU_DEPTH_LIMIT_EXCEEDED: You attempted to create an organizational unit -// tree that is too many levels deep. +// * OU_DEPTH_LIMIT_EXCEEDED: You attempted to create an OU tree that is +// too many levels deep. // // * ORGANIZATION_NOT_IN_ALL_FEATURES_MODE: You attempted to perform an operation // that requires the organization to be configured to support all features. -// An organization that supports consolidated billing features only cannot +// An organization that supports only consolidated billing features can't // perform this operation. // // * POLICY_NUMBER_LIMIT_EXCEEDED. You attempted to exceed the number of @@ -9267,23 +9304,24 @@ func (c *Organizations) UpdatePolicyRequest(input *UpdatePolicyInput) (req *requ // minimum number of policies of a certain type required. // // * ACCOUNT_CANNOT_LEAVE_WITHOUT_EULA: You attempted to remove an account -// from the organization that does not yet have enough information to exist -// as a stand-alone account. This account requires you to first agree to -// the AWS Customer Agreement. Follow the steps at To leave an organization -// when all required account information has not yet been provided (http://docs.aws.amazon.com/organizations/latest/userguide/orgs_manage_accounts_remove.html#leave-without-all-info) +// from the organization that doesn't yet have enough information to exist +// as a standalone account. This account requires you to first agree to the +// AWS Customer Agreement. Follow the steps at To leave an organization when +// all required account information has not yet been provided (http://docs.aws.amazon.com/organizations/latest/userguide/orgs_manage_accounts_remove.html#leave-without-all-info) // in the AWS Organizations User Guide. // // * ACCOUNT_CANNOT_LEAVE_WITHOUT_PHONE_VERIFICATION: You attempted to remove -// an account from the organization that does not yet have enough information -// to exist as a stand-alone account. This account requires you to first -// complete phone verification. Follow the steps at To leave an organization -// when all required account information has not yet been provided (http://docs.aws.amazon.com/organizations/latest/userguide/orgs_manage_accounts_remove.html#leave-without-all-info) +// an account from the organization that doesn't yet have enough information +// to exist as a standalone account. This account requires you to first complete +// phone verification. Follow the steps at To leave an organization when +// all required account information has not yet been provided (http://docs.aws.amazon.com/organizations/latest/userguide/orgs_manage_accounts_remove.html#leave-without-all-info) // in the AWS Organizations User Guide. // // * MASTER_ACCOUNT_PAYMENT_INSTRUMENT_REQUIRED: To create an organization -// with this account, you first must associate a payment instrument, such -// as a credit card, with the account. Follow the steps at To leave an organization -// when all required account information has not yet been provided (http://docs.aws.amazon.com/organizations/latest/userguide/orgs_manage_accounts_remove.html#leave-without-all-info) +// with this master account, you first must associate a payment instrument, +// such as a credit card, with the account. Follow the steps at To leave +// an organization when all required account information has not yet been +// provided (http://docs.aws.amazon.com/organizations/latest/userguide/orgs_manage_accounts_remove.html#leave-without-all-info) // in the AWS Organizations User Guide. // // * MEMBER_ACCOUNT_PAYMENT_INSTRUMENT_REQUIRED: To complete this operation @@ -9319,11 +9357,11 @@ func (c *Organizations) UpdatePolicyRequest(input *UpdatePolicyInput) (req *requ // specific API or operation: // // * IMMUTABLE_POLICY: You specified a policy that is managed by AWS and -// cannot be modified. +// can't be modified. // // * INPUT_REQUIRED: You must include a value for all required parameters. // -// * INVALID_ENUM: You specified a value that is not valid for that parameter. +// * INVALID_ENUM: You specified a value that isn't valid for that parameter. // // * INVALID_FULL_NAME_TARGET: You specified a full name that contains invalid // characters. @@ -9343,11 +9381,11 @@ func (c *Organizations) UpdatePolicyRequest(input *UpdatePolicyInput) (req *requ // * INVALID_PATTERN_TARGET_ID: You specified a policy target ID that doesn't // match the required pattern. // -// * INVALID_ROLE_NAME: You provided a role name that is not valid. A role -// name can’t begin with the reserved prefix 'AWSServiceRoleFor'. +// * INVALID_ROLE_NAME: You provided a role name that isn't valid. A role +// name can't begin with the reserved prefix AWSServiceRoleFor. // -// * INVALID_SYNTAX_ORGANIZATION_ARN: You specified an invalid ARN for the -// organization. +// * INVALID_SYNTAX_ORGANIZATION_ARN: You specified an invalid Amazon Resource +// Name (ARN) for the organization. // // * INVALID_SYNTAX_POLICY_ID: You specified an invalid policy ID. // @@ -9370,7 +9408,7 @@ func (c *Organizations) UpdatePolicyRequest(input *UpdatePolicyInput) (req *requ // between entities in the same root. // // * ErrCodeMalformedPolicyDocumentException "MalformedPolicyDocumentException" -// The provided policy document does not meet the requirements of the specified +// The provided policy document doesn't meet the requirements of the specified // policy type. For example, the syntax might be incorrect. For details about // service control policy syntax, see Service Control Policy Syntax (http://docs.aws.amazon.com/organizations/latest/userguide/orgs_reference_scp-syntax.html) // in the AWS Organizations User Guide. @@ -9767,7 +9805,7 @@ type CreateAccountInput struct { // The email address of the owner to assign to the new member account. This // email address must not already be associated with another AWS account. You - // must use a valid email address to complete account creation. You cannot access + // must use a valid email address to complete account creation. You can't access // the root user of the account or remove an account that was created with an // invalid email address. // @@ -9775,25 +9813,26 @@ type CreateAccountInput struct { Email *string `min:"6" type:"string" required:"true"` // If set to ALLOW, the new account enables IAM users to access account billing - // information if they have the required permissions. If set to DENY, then only - // the root user of the new account can access account billing information. - // For more information, see Activating Access to the Billing and Cost Management + // information if they have the required permissions. If set to DENY, only the + // root user of the new account can access account billing information. For + // more information, see Activating Access to the Billing and Cost Management // Console (http://docs.aws.amazon.com/awsaccountbilling/latest/aboutv2/grantaccess.html#ControllingAccessWebsite-Activate) // in the AWS Billing and Cost Management User Guide. // - // If you do not specify this parameter, the value defaults to ALLOW, and IAM + // If you don't specify this parameter, the value defaults to ALLOW, and IAM // users and roles with the required permissions can access billing information // for the new account. IamUserAccessToBilling *string `type:"string" enum:"IAMUserAccessToBilling"` // (Optional) // - // The name of an IAM role that Organizations automatically preconfigures in - // the new member account. This role trusts the master account, allowing users - // in the master account to assume the role, as permitted by the master account - // administrator. The role has administrator permissions in the new member account. + // The name of an IAM role that AWS Organizations automatically preconfigures + // in the new member account. This role trusts the master account, allowing + // users in the master account to assume the role, as permitted by the master + // account administrator. The role has administrator permissions in the new + // member account. // - // If you do not specify this parameter, the role name defaults to OrganizationAccountAccessRole. + // If you don't specify this parameter, the role name defaults to OrganizationAccountAccessRole. // // For more information about how to use this role to access the member account, // see Accessing and Administering the Member Accounts in Your Organization @@ -9872,7 +9911,10 @@ type CreateAccountOutput struct { // This response structure might not be fully populated when you first receive // it because account creation is an asynchronous process. You can pass the // returned CreateAccountStatus ID as a parameter to DescribeCreateAccountStatus - // to get status about the progress of the request at later times. + // to get status about the progress of the request at later times. You can also + // check the AWS CloudTrail log for the CreateAccountResult event. For more + // information, see Monitoring the Activity in Your Organization (http://docs.aws.amazon.com/organizations/latest/userguide/orgs_monitoring.html) + // in the AWS Organizations User Guide. CreateAccountStatus *CreateAccountStatus `type:"structure"` } @@ -11594,7 +11636,7 @@ type InviteAccountToOrganizationInput struct { // number as the Id. If you specify "Type": "EMAIL", then you must specify the // email address that is associated with the account. // - // --target Id=bill@example.com,Type=EMAIL + // --target Id=diego@example.com,Type=EMAIL // // Target is a required field Target *HandshakeParty `type:"structure" required:"true"` @@ -11695,15 +11737,15 @@ func (s LeaveOrganizationOutput) GoString() string { type ListAWSServiceAccessForOrganizationInput struct { _ struct{} `type:"structure"` - // (Optional) Use this to limit the number of results you want included in the - // response. If you do not include this parameter, it defaults to a value that - // is specific to the operation. If additional items exist beyond the maximum - // you specify, the NextToken response element is present and has a value (is - // not null). Include that value as the NextToken request parameter in the next - // call to the operation to get the next part of the results. Note that Organizations - // might return fewer results than the maximum even when there are more results - // available. You should check NextToken after every operation to ensure that - // you receive all of the results. + // (Optional) Use this to limit the number of results you want included per + // page in the response. If you do not include this parameter, it defaults to + // a value that is specific to the operation. If additional items exist beyond + // the maximum you specify, the NextToken response element is present and has + // a value (is not null). Include that value as the NextToken request parameter + // in the next call to the operation to get the next part of the results. Note + // that Organizations might return fewer results than the maximum even when + // there are more results available. You should check NextToken after every + // operation to ensure that you receive all of the results. MaxResults *int64 `min:"1" type:"integer"` // Use this parameter if you receive a NextToken response in a previous request @@ -11789,15 +11831,15 @@ func (s *ListAWSServiceAccessForOrganizationOutput) SetNextToken(v string) *List type ListAccountsForParentInput struct { _ struct{} `type:"structure"` - // (Optional) Use this to limit the number of results you want included in the - // response. If you do not include this parameter, it defaults to a value that - // is specific to the operation. If additional items exist beyond the maximum - // you specify, the NextToken response element is present and has a value (is - // not null). Include that value as the NextToken request parameter in the next - // call to the operation to get the next part of the results. Note that Organizations - // might return fewer results than the maximum even when there are more results - // available. You should check NextToken after every operation to ensure that - // you receive all of the results. + // (Optional) Use this to limit the number of results you want included per + // page in the response. If you do not include this parameter, it defaults to + // a value that is specific to the operation. If additional items exist beyond + // the maximum you specify, the NextToken response element is present and has + // a value (is not null). Include that value as the NextToken request parameter + // in the next call to the operation to get the next part of the results. Note + // that Organizations might return fewer results than the maximum even when + // there are more results available. You should check NextToken after every + // operation to ensure that you receive all of the results. MaxResults *int64 `min:"1" type:"integer"` // Use this parameter if you receive a NextToken response in a previous request @@ -11896,15 +11938,15 @@ func (s *ListAccountsForParentOutput) SetNextToken(v string) *ListAccountsForPar type ListAccountsInput struct { _ struct{} `type:"structure"` - // (Optional) Use this to limit the number of results you want included in the - // response. If you do not include this parameter, it defaults to a value that - // is specific to the operation. If additional items exist beyond the maximum - // you specify, the NextToken response element is present and has a value (is - // not null). Include that value as the NextToken request parameter in the next - // call to the operation to get the next part of the results. Note that Organizations - // might return fewer results than the maximum even when there are more results - // available. You should check NextToken after every operation to ensure that - // you receive all of the results. + // (Optional) Use this to limit the number of results you want included per + // page in the response. If you do not include this parameter, it defaults to + // a value that is specific to the operation. If additional items exist beyond + // the maximum you specify, the NextToken response element is present and has + // a value (is not null). Include that value as the NextToken request parameter + // in the next call to the operation to get the next part of the results. Note + // that Organizations might return fewer results than the maximum even when + // there are more results available. You should check NextToken after every + // operation to ensure that you receive all of the results. MaxResults *int64 `min:"1" type:"integer"` // Use this parameter if you receive a NextToken response in a previous request @@ -11993,15 +12035,15 @@ type ListChildrenInput struct { // ChildType is a required field ChildType *string `type:"string" required:"true" enum:"ChildType"` - // (Optional) Use this to limit the number of results you want included in the - // response. If you do not include this parameter, it defaults to a value that - // is specific to the operation. If additional items exist beyond the maximum - // you specify, the NextToken response element is present and has a value (is - // not null). Include that value as the NextToken request parameter in the next - // call to the operation to get the next part of the results. Note that Organizations - // might return fewer results than the maximum even when there are more results - // available. You should check NextToken after every operation to ensure that - // you receive all of the results. + // (Optional) Use this to limit the number of results you want included per + // page in the response. If you do not include this parameter, it defaults to + // a value that is specific to the operation. If additional items exist beyond + // the maximum you specify, the NextToken response element is present and has + // a value (is not null). Include that value as the NextToken request parameter + // in the next call to the operation to get the next part of the results. Note + // that Organizations might return fewer results than the maximum even when + // there are more results available. You should check NextToken after every + // operation to ensure that you receive all of the results. MaxResults *int64 `min:"1" type:"integer"` // Use this parameter if you receive a NextToken response in a previous request @@ -12120,15 +12162,15 @@ func (s *ListChildrenOutput) SetNextToken(v string) *ListChildrenOutput { type ListCreateAccountStatusInput struct { _ struct{} `type:"structure"` - // (Optional) Use this to limit the number of results you want included in the - // response. If you do not include this parameter, it defaults to a value that - // is specific to the operation. If additional items exist beyond the maximum - // you specify, the NextToken response element is present and has a value (is - // not null). Include that value as the NextToken request parameter in the next - // call to the operation to get the next part of the results. Note that Organizations - // might return fewer results than the maximum even when there are more results - // available. You should check NextToken after every operation to ensure that - // you receive all of the results. + // (Optional) Use this to limit the number of results you want included per + // page in the response. If you do not include this parameter, it defaults to + // a value that is specific to the operation. If additional items exist beyond + // the maximum you specify, the NextToken response element is present and has + // a value (is not null). Include that value as the NextToken request parameter + // in the next call to the operation to get the next part of the results. Note + // that Organizations might return fewer results than the maximum even when + // there are more results available. You should check NextToken after every + // operation to ensure that you receive all of the results. MaxResults *int64 `min:"1" type:"integer"` // Use this parameter if you receive a NextToken response in a previous request @@ -12232,15 +12274,15 @@ type ListHandshakesForAccountInput struct { // handshakes that were generated by that parent request. Filter *HandshakeFilter `type:"structure"` - // (Optional) Use this to limit the number of results you want included in the - // response. If you do not include this parameter, it defaults to a value that - // is specific to the operation. If additional items exist beyond the maximum - // you specify, the NextToken response element is present and has a value (is - // not null). Include that value as the NextToken request parameter in the next - // call to the operation to get the next part of the results. Note that Organizations - // might return fewer results than the maximum even when there are more results - // available. You should check NextToken after every operation to ensure that - // you receive all of the results. + // (Optional) Use this to limit the number of results you want included per + // page in the response. If you do not include this parameter, it defaults to + // a value that is specific to the operation. If additional items exist beyond + // the maximum you specify, the NextToken response element is present and has + // a value (is not null). Include that value as the NextToken request parameter + // in the next call to the operation to get the next part of the results. Note + // that Organizations might return fewer results than the maximum even when + // there are more results available. You should check NextToken after every + // operation to ensure that you receive all of the results. MaxResults *int64 `min:"1" type:"integer"` // Use this parameter if you receive a NextToken response in a previous request @@ -12339,15 +12381,15 @@ type ListHandshakesForOrganizationInput struct { // the handshakes that were generated by that parent request. Filter *HandshakeFilter `type:"structure"` - // (Optional) Use this to limit the number of results you want included in the - // response. If you do not include this parameter, it defaults to a value that - // is specific to the operation. If additional items exist beyond the maximum - // you specify, the NextToken response element is present and has a value (is - // not null). Include that value as the NextToken request parameter in the next - // call to the operation to get the next part of the results. Note that Organizations - // might return fewer results than the maximum even when there are more results - // available. You should check NextToken after every operation to ensure that - // you receive all of the results. + // (Optional) Use this to limit the number of results you want included per + // page in the response. If you do not include this parameter, it defaults to + // a value that is specific to the operation. If additional items exist beyond + // the maximum you specify, the NextToken response element is present and has + // a value (is not null). Include that value as the NextToken request parameter + // in the next call to the operation to get the next part of the results. Note + // that Organizations might return fewer results than the maximum even when + // there are more results available. You should check NextToken after every + // operation to ensure that you receive all of the results. MaxResults *int64 `min:"1" type:"integer"` // Use this parameter if you receive a NextToken response in a previous request @@ -12438,15 +12480,15 @@ func (s *ListHandshakesForOrganizationOutput) SetNextToken(v string) *ListHandsh type ListOrganizationalUnitsForParentInput struct { _ struct{} `type:"structure"` - // (Optional) Use this to limit the number of results you want included in the - // response. If you do not include this parameter, it defaults to a value that - // is specific to the operation. If additional items exist beyond the maximum - // you specify, the NextToken response element is present and has a value (is - // not null). Include that value as the NextToken request parameter in the next - // call to the operation to get the next part of the results. Note that Organizations - // might return fewer results than the maximum even when there are more results - // available. You should check NextToken after every operation to ensure that - // you receive all of the results. + // (Optional) Use this to limit the number of results you want included per + // page in the response. If you do not include this parameter, it defaults to + // a value that is specific to the operation. If additional items exist beyond + // the maximum you specify, the NextToken response element is present and has + // a value (is not null). Include that value as the NextToken request parameter + // in the next call to the operation to get the next part of the results. Note + // that Organizations might return fewer results than the maximum even when + // there are more results available. You should check NextToken after every + // operation to ensure that you receive all of the results. MaxResults *int64 `min:"1" type:"integer"` // Use this parameter if you receive a NextToken response in a previous request @@ -12572,15 +12614,15 @@ type ListParentsInput struct { // ChildId is a required field ChildId *string `type:"string" required:"true"` - // (Optional) Use this to limit the number of results you want included in the - // response. If you do not include this parameter, it defaults to a value that - // is specific to the operation. If additional items exist beyond the maximum - // you specify, the NextToken response element is present and has a value (is - // not null). Include that value as the NextToken request parameter in the next - // call to the operation to get the next part of the results. Note that Organizations - // might return fewer results than the maximum even when there are more results - // available. You should check NextToken after every operation to ensure that - // you receive all of the results. + // (Optional) Use this to limit the number of results you want included per + // page in the response. If you do not include this parameter, it defaults to + // a value that is specific to the operation. If additional items exist beyond + // the maximum you specify, the NextToken response element is present and has + // a value (is not null). Include that value as the NextToken request parameter + // in the next call to the operation to get the next part of the results. Note + // that Organizations might return fewer results than the maximum even when + // there are more results available. You should check NextToken after every + // operation to ensure that you receive all of the results. MaxResults *int64 `min:"1" type:"integer"` // Use this parameter if you receive a NextToken response in a previous request @@ -12678,15 +12720,15 @@ type ListPoliciesForTargetInput struct { // Filter is a required field Filter *string `type:"string" required:"true" enum:"PolicyType"` - // (Optional) Use this to limit the number of results you want included in the - // response. If you do not include this parameter, it defaults to a value that - // is specific to the operation. If additional items exist beyond the maximum - // you specify, the NextToken response element is present and has a value (is - // not null). Include that value as the NextToken request parameter in the next - // call to the operation to get the next part of the results. Note that Organizations - // might return fewer results than the maximum even when there are more results - // available. You should check NextToken after every operation to ensure that - // you receive all of the results. + // (Optional) Use this to limit the number of results you want included per + // page in the response. If you do not include this parameter, it defaults to + // a value that is specific to the operation. If additional items exist beyond + // the maximum you specify, the NextToken response element is present and has + // a value (is not null). Include that value as the NextToken request parameter + // in the next call to the operation to get the next part of the results. Note + // that Organizations might return fewer results than the maximum even when + // there are more results available. You should check NextToken after every + // operation to ensure that you receive all of the results. MaxResults *int64 `min:"1" type:"integer"` // Use this parameter if you receive a NextToken response in a previous request @@ -12812,15 +12854,15 @@ type ListPoliciesInput struct { // Filter is a required field Filter *string `type:"string" required:"true" enum:"PolicyType"` - // (Optional) Use this to limit the number of results you want included in the - // response. If you do not include this parameter, it defaults to a value that - // is specific to the operation. If additional items exist beyond the maximum - // you specify, the NextToken response element is present and has a value (is - // not null). Include that value as the NextToken request parameter in the next - // call to the operation to get the next part of the results. Note that Organizations - // might return fewer results than the maximum even when there are more results - // available. You should check NextToken after every operation to ensure that - // you receive all of the results. + // (Optional) Use this to limit the number of results you want included per + // page in the response. If you do not include this parameter, it defaults to + // a value that is specific to the operation. If additional items exist beyond + // the maximum you specify, the NextToken response element is present and has + // a value (is not null). Include that value as the NextToken request parameter + // in the next call to the operation to get the next part of the results. Note + // that Organizations might return fewer results than the maximum even when + // there are more results available. You should check NextToken after every + // operation to ensure that you receive all of the results. MaxResults *int64 `min:"1" type:"integer"` // Use this parameter if you receive a NextToken response in a previous request @@ -12915,15 +12957,15 @@ func (s *ListPoliciesOutput) SetPolicies(v []*PolicySummary) *ListPoliciesOutput type ListRootsInput struct { _ struct{} `type:"structure"` - // (Optional) Use this to limit the number of results you want included in the - // response. If you do not include this parameter, it defaults to a value that - // is specific to the operation. If additional items exist beyond the maximum - // you specify, the NextToken response element is present and has a value (is - // not null). Include that value as the NextToken request parameter in the next - // call to the operation to get the next part of the results. Note that Organizations - // might return fewer results than the maximum even when there are more results - // available. You should check NextToken after every operation to ensure that - // you receive all of the results. + // (Optional) Use this to limit the number of results you want included per + // page in the response. If you do not include this parameter, it defaults to + // a value that is specific to the operation. If additional items exist beyond + // the maximum you specify, the NextToken response element is present and has + // a value (is not null). Include that value as the NextToken request parameter + // in the next call to the operation to get the next part of the results. Note + // that Organizations might return fewer results than the maximum even when + // there are more results available. You should check NextToken after every + // operation to ensure that you receive all of the results. MaxResults *int64 `min:"1" type:"integer"` // Use this parameter if you receive a NextToken response in a previous request @@ -13007,15 +13049,15 @@ func (s *ListRootsOutput) SetRoots(v []*Root) *ListRootsOutput { type ListTargetsForPolicyInput struct { _ struct{} `type:"structure"` - // (Optional) Use this to limit the number of results you want included in the - // response. If you do not include this parameter, it defaults to a value that - // is specific to the operation. If additional items exist beyond the maximum - // you specify, the NextToken response element is present and has a value (is - // not null). Include that value as the NextToken request parameter in the next - // call to the operation to get the next part of the results. Note that Organizations - // might return fewer results than the maximum even when there are more results - // available. You should check NextToken after every operation to ensure that - // you receive all of the results. + // (Optional) Use this to limit the number of results you want included per + // page in the response. If you do not include this parameter, it defaults to + // a value that is specific to the operation. If additional items exist beyond + // the maximum you specify, the NextToken response element is present and has + // a value (is not null). Include that value as the NextToken request parameter + // in the next call to the operation to get the next part of the results. Note + // that Organizations might return fewer results than the maximum even when + // there are more results available. You should check NextToken after every + // operation to ensure that you receive all of the results. MaxResults *int64 `min:"1" type:"integer"` // Use this parameter if you receive a NextToken response in a previous request @@ -14067,6 +14109,12 @@ const ( // ConstraintViolationExceptionReasonOrganizationNotInAllFeaturesMode is a ConstraintViolationExceptionReason enum value ConstraintViolationExceptionReasonOrganizationNotInAllFeaturesMode = "ORGANIZATION_NOT_IN_ALL_FEATURES_MODE" + + // ConstraintViolationExceptionReasonEmailVerificationCodeExpired is a ConstraintViolationExceptionReason enum value + ConstraintViolationExceptionReasonEmailVerificationCodeExpired = "EMAIL_VERIFICATION_CODE_EXPIRED" + + // ConstraintViolationExceptionReasonWaitPeriodActive is a ConstraintViolationExceptionReason enum value + ConstraintViolationExceptionReasonWaitPeriodActive = "WAIT_PERIOD_ACTIVE" ) const ( diff --git a/vendor/github.com/aws/aws-sdk-go/service/organizations/errors.go b/vendor/github.com/aws/aws-sdk-go/service/organizations/errors.go index fe4011c05..5d886170e 100644 --- a/vendor/github.com/aws/aws-sdk-go/service/organizations/errors.go +++ b/vendor/github.com/aws/aws-sdk-go/service/organizations/errors.go @@ -7,7 +7,7 @@ const ( // ErrCodeAWSOrganizationsNotInUseException for service response error code // "AWSOrganizationsNotInUseException". // - // Your account is not a member of an organization. To make this request, you + // Your account isn't a member of an organization. To make this request, you // must use the credentials of an account that belongs to an organization. ErrCodeAWSOrganizationsNotInUseException = "AWSOrganizationsNotInUseException" @@ -24,19 +24,28 @@ const ( // ErrCodeAccessDeniedForDependencyException for service response error code // "AccessDeniedForDependencyException". // - // The operation you attempted requires you to have the iam:CreateServiceLinkedRole - // so that Organizations can create the required service-linked role. You do - // not have that permission. + // The operation that you attempted requires you to have the iam:CreateServiceLinkedRole + // so that AWS Organizations can create the required service-linked role. You + // don't have that permission. ErrCodeAccessDeniedForDependencyException = "AccessDeniedForDependencyException" // ErrCodeAccountNotFoundException for service response error code // "AccountNotFoundException". // // We can't find an AWS account with the AccountId that you specified, or the - // account whose credentials you used to make this request is not a member of + // account whose credentials you used to make this request isn't a member of // an organization. ErrCodeAccountNotFoundException = "AccountNotFoundException" + // ErrCodeAccountOwnerNotVerifiedException for service response error code + // "AccountOwnerNotVerifiedException". + // + // You can't invite an existing account to your organization until you verify + // that you own the email address associated with the master account. For more + // information, see Email Address Verification (http://docs.aws.amazon.com/organizations/latest/userguide/orgs_manage_create.html#about-email-verification) + // in the AWS Organizations User Guide. + ErrCodeAccountOwnerNotVerifiedException = "AccountOwnerNotVerifiedException" + // ErrCodeAlreadyInOrganizationException for service response error code // "AlreadyInOrganizationException". // @@ -62,40 +71,42 @@ const ( // "ConstraintViolationException". // // Performing this operation violates a minimum or maximum value limit. For - // example, attempting to removing the last SCP from an OU or root, inviting - // or creating too many accounts to the organization, or attaching too many - // policies to an account, OU, or root. This exception includes a reason that - // contains additional information about the violated limit: + // example, attempting to removing the last service control policy (SCP) from + // an OU or root, inviting or creating too many accounts to the organization, + // or attaching too many policies to an account, OU, or root. This exception + // includes a reason that contains additional information about the violated + // limit. // // Some of the reasons in the following list might not be applicable to this // specific API or operation: // - // ACCOUNT_NUMBER_LIMIT_EXCEEDED: You attempted to exceed the limit on the number - // of accounts in an organization. If you need more accounts, contact AWS Support - // to request an increase in your limit. + // * ACCOUNT_NUMBER_LIMIT_EXCEEDED: You attempted to exceed the limit on + // the number of accounts in an organization. If you need more accounts, + // contactAWS Support (https://console.aws.amazon.com/support/home#/) to + // request an increase in your limit. // - // Or, The number of invitations that you tried to send would cause you to exceed - // the limit of accounts in your organization. Send fewer invitations, or contact - // AWS Support to request an increase in the number of accounts. + // Or the number of invitations that you tried to send would cause you to exceed + // the limit of accounts in your organization. Send fewer invitations or + // contact AWS Support to request an increase in the number of accounts. // - // Note: deleted and closed accounts still count toward your limit. + // Deleted and closed accounts still count toward your limit. // // If you get receive this exception when running a command immediately after - // creating the organization, wait one hour and try again. If after an hour - // it continues to fail with this error, contact AWS Customer Support (https://console.aws.amazon.com/support/home#/). + // creating the organization, wait one hour and try again. If after an hour + // it continues to fail with this error, contact AWS Support (https://console.aws.amazon.com/support/home#/). // // * HANDSHAKE_RATE_LIMIT_EXCEEDED: You attempted to exceed the number of - // handshakes you can send in one day. + // handshakes that you can send in one day. // - // * OU_NUMBER_LIMIT_EXCEEDED: You attempted to exceed the number of organizational - // units you can have in an organization. + // * OU_NUMBER_LIMIT_EXCEEDED: You attempted to exceed the number of OUs + // that you can have in an organization. // - // * OU_DEPTH_LIMIT_EXCEEDED: You attempted to create an organizational unit - // tree that is too many levels deep. + // * OU_DEPTH_LIMIT_EXCEEDED: You attempted to create an OU tree that is + // too many levels deep. // // * ORGANIZATION_NOT_IN_ALL_FEATURES_MODE: You attempted to perform an operation // that requires the organization to be configured to support all features. - // An organization that supports consolidated billing features only cannot + // An organization that supports only consolidated billing features can't // perform this operation. // // * POLICY_NUMBER_LIMIT_EXCEEDED. You attempted to exceed the number of @@ -110,23 +121,24 @@ const ( // minimum number of policies of a certain type required. // // * ACCOUNT_CANNOT_LEAVE_WITHOUT_EULA: You attempted to remove an account - // from the organization that does not yet have enough information to exist - // as a stand-alone account. This account requires you to first agree to - // the AWS Customer Agreement. Follow the steps at To leave an organization - // when all required account information has not yet been provided (http://docs.aws.amazon.com/organizations/latest/userguide/orgs_manage_accounts_remove.html#leave-without-all-info) + // from the organization that doesn't yet have enough information to exist + // as a standalone account. This account requires you to first agree to the + // AWS Customer Agreement. Follow the steps at To leave an organization when + // all required account information has not yet been provided (http://docs.aws.amazon.com/organizations/latest/userguide/orgs_manage_accounts_remove.html#leave-without-all-info) // in the AWS Organizations User Guide. // // * ACCOUNT_CANNOT_LEAVE_WITHOUT_PHONE_VERIFICATION: You attempted to remove - // an account from the organization that does not yet have enough information - // to exist as a stand-alone account. This account requires you to first - // complete phone verification. Follow the steps at To leave an organization - // when all required account information has not yet been provided (http://docs.aws.amazon.com/organizations/latest/userguide/orgs_manage_accounts_remove.html#leave-without-all-info) + // an account from the organization that doesn't yet have enough information + // to exist as a standalone account. This account requires you to first complete + // phone verification. Follow the steps at To leave an organization when + // all required account information has not yet been provided (http://docs.aws.amazon.com/organizations/latest/userguide/orgs_manage_accounts_remove.html#leave-without-all-info) // in the AWS Organizations User Guide. // // * MASTER_ACCOUNT_PAYMENT_INSTRUMENT_REQUIRED: To create an organization - // with this account, you first must associate a payment instrument, such - // as a credit card, with the account. Follow the steps at To leave an organization - // when all required account information has not yet been provided (http://docs.aws.amazon.com/organizations/latest/userguide/orgs_manage_accounts_remove.html#leave-without-all-info) + // with this master account, you first must associate a payment instrument, + // such as a credit card, with the account. Follow the steps at To leave + // an organization when all required account information has not yet been + // provided (http://docs.aws.amazon.com/organizations/latest/userguide/orgs_manage_accounts_remove.html#leave-without-all-info) // in the AWS Organizations User Guide. // // * MEMBER_ACCOUNT_PAYMENT_INSTRUMENT_REQUIRED: To complete this operation @@ -184,7 +196,7 @@ const ( // ErrCodeDuplicateOrganizationalUnitException for service response error code // "DuplicateOrganizationalUnitException". // - // An organizational unit (OU) with the same name already exists. + // An OU with the same name already exists. ErrCodeDuplicateOrganizationalUnitException = "DuplicateOrganizationalUnitException" // ErrCodeDuplicatePolicyAttachmentException for service response error code @@ -202,10 +214,10 @@ const ( // ErrCodeFinalizingOrganizationException for service response error code // "FinalizingOrganizationException". // - // AWS Organizations could not perform the operation because your organization - // has not finished initializing. This can take up to an hour. Try again later. - // If after one hour you continue to receive this error, contact AWS Customer - // Support (https://console.aws.amazon.com/support/home#/). + // AWS Organizations couldn't perform the operation because your organization + // hasn't finished initializing. This can take up to an hour. Try again later. + // If after one hour you continue to receive this error, contact AWS Support + // (https://console.aws.amazon.com/support/home#/). ErrCodeFinalizingOrganizationException = "FinalizingOrganizationException" // ErrCodeHandshakeAlreadyInStateException for service response error code @@ -225,15 +237,15 @@ const ( // specific API or operation: // // * ACCOUNT_NUMBER_LIMIT_EXCEEDED: You attempted to exceed the limit on - // the number of accounts in an organization. Note: deleted and closed accounts - // still count toward your limit. + // the number of accounts in an organization. Note that deleted and closed + // accounts still count toward your limit. // // If you get this exception immediately after creating the organization, wait // one hour and try again. If after an hour it continues to fail with this - // error, contact AWS Customer Support (https://console.aws.amazon.com/support/home#/). + // error, contact AWS Support (https://console.aws.amazon.com/support/home#/). // // * HANDSHAKE_RATE_LIMIT_EXCEEDED: You attempted to exceed the number of - // handshakes you can send in one day. + // handshakes that you can send in one day. // // * ALREADY_IN_AN_ORGANIZATION: The handshake request is invalid because // the invited account is already a member of an organization. @@ -241,13 +253,13 @@ const ( // * ORGANIZATION_ALREADY_HAS_ALL_FEATURES: The handshake request is invalid // because the organization has already enabled all features. // - // * INVITE_DISABLED_DURING_ENABLE_ALL_FEATURES: You cannot issue new invitations - // to join an organization while it is in the process of enabling all features. + // * INVITE_DISABLED_DURING_ENABLE_ALL_FEATURES: You can't issue new invitations + // to join an organization while it's in the process of enabling all features. // You can resume inviting accounts after you finalize the process when all // accounts have agreed to the change. // - // * PAYMENT_INSTRUMENT_REQUIRED: You cannot complete the operation with - // an account that does not have a payment instrument, such as a credit card, + // * PAYMENT_INSTRUMENT_REQUIRED: You can't complete the operation with an + // account that doesn't have a payment instrument, such as a credit card, // associated with it. // // * ORGANIZATION_FROM_DIFFERENT_SELLER_OF_RECORD: The request failed because @@ -270,7 +282,7 @@ const ( // "InvalidHandshakeTransitionException". // // You can't perform the operation on the handshake in its current state. For - // example, you can't cancel a handshake that was already accepted, or accept + // example, you can't cancel a handshake that was already accepted or accept // a handshake that was already declined. ErrCodeInvalidHandshakeTransitionException = "InvalidHandshakeTransitionException" @@ -285,11 +297,11 @@ const ( // specific API or operation: // // * IMMUTABLE_POLICY: You specified a policy that is managed by AWS and - // cannot be modified. + // can't be modified. // // * INPUT_REQUIRED: You must include a value for all required parameters. // - // * INVALID_ENUM: You specified a value that is not valid for that parameter. + // * INVALID_ENUM: You specified a value that isn't valid for that parameter. // // * INVALID_FULL_NAME_TARGET: You specified a full name that contains invalid // characters. @@ -309,11 +321,11 @@ const ( // * INVALID_PATTERN_TARGET_ID: You specified a policy target ID that doesn't // match the required pattern. // - // * INVALID_ROLE_NAME: You provided a role name that is not valid. A role - // name can’t begin with the reserved prefix 'AWSServiceRoleFor'. + // * INVALID_ROLE_NAME: You provided a role name that isn't valid. A role + // name can't begin with the reserved prefix AWSServiceRoleFor. // - // * INVALID_SYNTAX_ORGANIZATION_ARN: You specified an invalid ARN for the - // organization. + // * INVALID_SYNTAX_ORGANIZATION_ARN: You specified an invalid Amazon Resource + // Name (ARN) for the organization. // // * INVALID_SYNTAX_POLICY_ID: You specified an invalid policy ID. // @@ -339,7 +351,7 @@ const ( // ErrCodeMalformedPolicyDocumentException for service response error code // "MalformedPolicyDocumentException". // - // The provided policy document does not meet the requirements of the specified + // The provided policy document doesn't meet the requirements of the specified // policy type. For example, the syntax might be incorrect. For details about // service control policy syntax, see Service Control Policy Syntax (http://docs.aws.amazon.com/organizations/latest/userguide/orgs_reference_scp-syntax.html) // in the AWS Organizations User Guide. @@ -357,37 +369,33 @@ const ( // "OrganizationNotEmptyException". // // The organization isn't empty. To delete an organization, you must first remove - // all accounts except the master account, delete all organizational units (OUs), - // and delete all policies. + // all accounts except the master account, delete all OUs, and delete all policies. ErrCodeOrganizationNotEmptyException = "OrganizationNotEmptyException" // ErrCodeOrganizationalUnitNotEmptyException for service response error code // "OrganizationalUnitNotEmptyException". // - // The specified organizational unit (OU) is not empty. Move all accounts to - // another root or to other OUs, remove all child OUs, and then try the operation - // again. + // The specified OU is not empty. Move all accounts to another root or to other + // OUs, remove all child OUs, and try the operation again. ErrCodeOrganizationalUnitNotEmptyException = "OrganizationalUnitNotEmptyException" // ErrCodeOrganizationalUnitNotFoundException for service response error code // "OrganizationalUnitNotFoundException". // - // We can't find an organizational unit (OU) with the OrganizationalUnitId that - // you specified. + // We can't find an OU with the OrganizationalUnitId that you specified. ErrCodeOrganizationalUnitNotFoundException = "OrganizationalUnitNotFoundException" // ErrCodeParentNotFoundException for service response error code // "ParentNotFoundException". // - // We can't find a root or organizational unit (OU) with the ParentId that you - // specified. + // We can't find a root or OU with the ParentId that you specified. ErrCodeParentNotFoundException = "ParentNotFoundException" // ErrCodePolicyInUseException for service response error code // "PolicyInUseException". // // The policy is attached to one or more entities. You must detach it from all - // roots, organizational units (OUs), and accounts before performing this operation. + // roots, OUs, and accounts before performing this operation. ErrCodePolicyInUseException = "PolicyInUseException" // ErrCodePolicyNotAttachedException for service response error code @@ -412,16 +420,16 @@ const ( // "PolicyTypeNotAvailableForOrganizationException". // // You can't use the specified policy type with the feature set currently enabled - // for this organization. For example, you can enable service control policies - // (SCPs) only after you enable all features in the organization. For more information, - // see Enabling and Disabling a Policy Type on a Root (http://docs.aws.amazon.com/organizations/latest/userguide/orgs_manage_policies.html#enable_policies_on_root) + // for this organization. For example, you can enable SCPs only after you enable + // all features in the organization. For more information, see Enabling and + // Disabling a Policy Type on a Root (http://docs.aws.amazon.com/organizations/latest/userguide/orgs_manage_policies.html#enable_policies_on_root) // in the AWS Organizations User Guide. ErrCodePolicyTypeNotAvailableForOrganizationException = "PolicyTypeNotAvailableForOrganizationException" // ErrCodePolicyTypeNotEnabledException for service response error code // "PolicyTypeNotEnabledException". // - // The specified policy type is not currently enabled in this root. You cannot + // The specified policy type isn't currently enabled in this root. You can't // attach policies of the specified type to entities in a root until you enable // that type in the root. For more information, see Enabling All Features in // Your Organization (http://docs.aws.amazon.com/organizations/latest/userguide/orgs_manage_org_support-all-features.html) diff --git a/vendor/github.com/aws/aws-sdk-go/service/pinpoint/api.go b/vendor/github.com/aws/aws-sdk-go/service/pinpoint/api.go index 5ecfc42db..2346c28e5 100644 --- a/vendor/github.com/aws/aws-sdk-go/service/pinpoint/api.go +++ b/vendor/github.com/aws/aws-sdk-go/service/pinpoint/api.go @@ -1838,7 +1838,7 @@ func (c *Pinpoint) DeleteUserEndpointsRequest(input *DeleteUserEndpointsInput) ( // DeleteUserEndpoints API operation for Amazon Pinpoint. // -// Deletes endpoints associated with an user id. +// Deletes endpoints that are associated with a User ID. // // Returns awserr.Error for service API and SDK errors. Use runtime type assertions // with awserr.Error's Code and Message methods to get detailed information about @@ -4752,7 +4752,7 @@ func (c *Pinpoint) GetUserEndpointsRequest(input *GetUserEndpointsInput) (req *r // GetUserEndpoints API operation for Amazon Pinpoint. // -// Returns information about the endpoints associated with an user id. +// Returns information about the endpoints that are associated with a User ID. // // Returns awserr.Error for service API and SDK errors. Use runtime type assertions // with awserr.Error's Code and Message methods to get detailed information about @@ -4990,6 +4990,101 @@ func (c *Pinpoint) PutEventStreamWithContext(ctx aws.Context, input *PutEventStr return out, req.Send() } +const opPutEvents = "PutEvents" + +// PutEventsRequest generates a "aws/request.Request" representing the +// client's request for the PutEvents operation. The "output" return +// value will be populated with the request's response once the request completes +// successfuly. +// +// Use "Send" method on the returned Request to send the API call to the service. +// the "output" return value is not valid until after Send returns without error. +// +// See PutEvents for more information on using the PutEvents +// API call, and error handling. +// +// This method is useful when you want to inject custom logic or configuration +// into the SDK's request lifecycle. Such as custom headers, or retry logic. +// +// +// // Example sending a request using the PutEventsRequest method. +// req, resp := client.PutEventsRequest(params) +// +// err := req.Send() +// if err == nil { // resp is now filled +// fmt.Println(resp) +// } +// +// See also, https://docs.aws.amazon.com/goto/WebAPI/pinpoint-2016-12-01/PutEvents +func (c *Pinpoint) PutEventsRequest(input *PutEventsInput) (req *request.Request, output *PutEventsOutput) { + op := &request.Operation{ + Name: opPutEvents, + HTTPMethod: "POST", + HTTPPath: "/v1/apps/{application-id}/events", + } + + if input == nil { + input = &PutEventsInput{} + } + + output = &PutEventsOutput{} + req = c.newRequest(op, input, output) + return +} + +// PutEvents API operation for Amazon Pinpoint. +// +// Use to record events for endpoints. This method creates events and creates +// or updates the endpoints that those events are associated with. +// +// Returns awserr.Error for service API and SDK errors. Use runtime type assertions +// with awserr.Error's Code and Message methods to get detailed information about +// the error. +// +// See the AWS API reference guide for Amazon Pinpoint's +// API operation PutEvents for usage and error information. +// +// Returned Error Codes: +// * ErrCodeBadRequestException "BadRequestException" +// Simple message object. +// +// * ErrCodeInternalServerErrorException "InternalServerErrorException" +// Simple message object. +// +// * ErrCodeForbiddenException "ForbiddenException" +// Simple message object. +// +// * ErrCodeNotFoundException "NotFoundException" +// Simple message object. +// +// * ErrCodeMethodNotAllowedException "MethodNotAllowedException" +// Simple message object. +// +// * ErrCodeTooManyRequestsException "TooManyRequestsException" +// Simple message object. +// +// See also, https://docs.aws.amazon.com/goto/WebAPI/pinpoint-2016-12-01/PutEvents +func (c *Pinpoint) PutEvents(input *PutEventsInput) (*PutEventsOutput, error) { + req, out := c.PutEventsRequest(input) + return out, req.Send() +} + +// PutEventsWithContext is the same as PutEvents with the addition of +// the ability to pass a context and additional request options. +// +// See PutEvents for details on how to use this API operation. +// +// The context must be non-nil and will be used for request cancellation. If +// the context is nil a panic will occur. In the future the SDK may create +// sub-contexts for http.Requests. See https://golang.org/pkg/context/ +// for more information on using Contexts. +func (c *Pinpoint) PutEventsWithContext(ctx aws.Context, input *PutEventsInput, opts ...request.Option) (*PutEventsOutput, error) { + req, out := c.PutEventsRequest(input) + req.SetContext(ctx) + req.ApplyOptions(opts...) + return out, req.Send() +} + const opRemoveAttributes = "RemoveAttributes" // RemoveAttributesRequest generates a "aws/request.Request" representing the @@ -5128,14 +5223,7 @@ func (c *Pinpoint) SendMessagesRequest(input *SendMessagesInput) (req *request.R // SendMessages API operation for Amazon Pinpoint. // -// Use this resource to send a direct message, which is a one time message that -// you send to a limited audience without creating a campaign. You can send -// the message to up to 100 recipients. You cannot use the message to engage -// a segment. When you send the message, Amazon Pinpoint delivers it immediately, -// and you cannot schedule the delivery. To engage a user segment, and to schedule -// the message delivery, create a campaign instead of sending a direct message.You -// can send a direct message as a push notification to your mobile app or as -// an SMS message to SMS-enabled devices. +// Used to send a direct message. // // Returns awserr.Error for service API and SDK errors. Use runtime type assertions // with awserr.Error's Code and Message methods to get detailed information about @@ -5229,22 +5317,7 @@ func (c *Pinpoint) SendUsersMessagesRequest(input *SendUsersMessagesInput) (req // SendUsersMessages API operation for Amazon Pinpoint. // -// Use this resource to message a list of users. Amazon Pinpoint sends the message -// to all of the endpoints that are associated with each user.A user represents -// an individual who is assigned a unique user ID, and this ID is assigned to -// one or more endpoints. For example, if an individual uses your app on multiple -// devices, your app could assign that person's user ID to the endpoint for -// each device.With the users-messages resource, you specify the message recipients -// as user IDs. For each user ID, Amazon Pinpoint delivers the message to all -// of the user's endpoints. Within the body of your request, you can specify -// a default message, and you can tailor your message for different channels, -// including those for mobile push and SMS.With this resource, you send a direct -// message, which is a one time message that you send to a limited audience -// without creating a campaign. You can send the message to up to 100 users -// per request. You cannot use the message to engage a segment. When you send -// the message, Amazon Pinpoint delivers it immediately, and you cannot schedule -// the delivery. To engage a user segment, and to schedule the message delivery, -// create a campaign instead of using the users-messages resource. +// Used to send a message to a list of users. // // Returns awserr.Error for service API and SDK errors. Use runtime type assertions // with awserr.Error's Code and Message methods to get detailed information about @@ -6466,7 +6539,7 @@ func (c *Pinpoint) UpdateSegmentRequest(input *UpdateSegmentInput) (req *request // UpdateSegment API operation for Amazon Pinpoint. // -// Use to update a segment. +// Used to update a segment. // // Returns awserr.Error for service API and SDK errors. Use runtime type assertions // with awserr.Error's Code and Message methods to get detailed information about @@ -6614,13 +6687,13 @@ func (c *Pinpoint) UpdateSmsChannelWithContext(ctx aws.Context, input *UpdateSms type ADMChannelRequest struct { _ struct{} `type:"structure"` - // Client ID as gotten from Amazon + // The Client ID that you obtained from the Amazon App Distribution Portal. ClientId *string `type:"string"` - // Client secret as gotten from Amazon + // The Client Secret that you obtained from the Amazon App Distribution Portal. ClientSecret *string `type:"string"` - // If the channel is enabled for sending messages. + // Indicates whether or not the channel is enabled for sending messages. Enabled *bool `type:"boolean"` } @@ -6659,31 +6732,31 @@ type ADMChannelResponse struct { // The ID of the application to which the channel applies. ApplicationId *string `type:"string"` - // When was this segment created + // The date and time when this channel was created. CreationDate *string `type:"string"` - // If the channel is enabled for sending messages. + // Indicates whether or not the channel is enabled for sending messages. Enabled *bool `type:"boolean"` // Not used. Retained for backwards compatibility. HasCredential *bool `type:"boolean"` - // Channel ID. Not used, only for backwards compatibility. + // (Deprecated) An identifier for the channel. Retained for backwards compatibility. Id *string `type:"string"` - // Is this channel archived + // Indicates whether or not the channel is archived. IsArchived *bool `type:"boolean"` - // Who last updated this entry + // The user who last updated this channel. LastModifiedBy *string `type:"string"` - // Last date this was updated + // The date and time when this channel was last modified. LastModifiedDate *string `type:"string"` - // Platform type. Will be "ADM" + // The platform type. For this channel, the value is always "ADM." Platform *string `type:"string"` - // Version of channel + // The channel version. Version *int64 `type:"integer"` } @@ -6770,7 +6843,7 @@ type ADMMessage struct { // Possible values include: OPEN_APP | DEEP_LINK | URL Action *string `type:"string" enum:"Action"` - // The message body of the notification, the email body or the text message. + // The message body of the notification. Body *string `type:"string"` // Optional. Arbitrary string used to indicate multiple messages are logically @@ -7026,10 +7099,10 @@ func (s *APNSChannelRequest) SetTokenKeyId(v string) *APNSChannelRequest { type APNSChannelResponse struct { _ struct{} `type:"structure"` - // The ID of the application to which the channel applies. + // The ID of the application that the channel applies to. ApplicationId *string `type:"string"` - // When was this segment created + // The date and time when this channel was created. CreationDate *string `type:"string"` // The default authentication method used for APNs. @@ -7045,22 +7118,22 @@ type APNSChannelResponse struct { // Provide a token key by setting the TokenKey attribute. HasTokenKey *bool `type:"boolean"` - // Channel ID. Not used. Present only for backwards compatibility. + // (Deprecated) An identifier for the channel. Retained for backwards compatibility. Id *string `type:"string"` - // Is this channel archived + // Indicates whether or not the channel is archived. IsArchived *bool `type:"boolean"` - // Who last updated this entry + // The user who last updated this channel. LastModifiedBy *string `type:"string"` - // Last date this was updated + // The date and time when this channel was last modified. LastModifiedDate *string `type:"string"` - // The platform type. Will be APNS. + // The platform type. For this channel, the value is always "ADM." Platform *string `type:"string"` - // Version of channel + // The channel version. Version *int64 `type:"integer"` } @@ -7164,7 +7237,7 @@ type APNSMessage struct { // To remove the badge, set the value of this key to 0. Badge *int64 `type:"integer"` - // The message body of the notification, the email body or the text message. + // The message body of the notification. Body *string `type:"string"` // Provide this key with a string value that represents the notification's type. @@ -7985,6 +8058,10 @@ type ActivitiesResponse struct { // List of campaign activities Item []*ActivityResponse `type:"list"` + + // The string that you use in a subsequent request to get the next page of results + // in a paginated response. + NextToken *string `type:"string"` } // String returns the string representation @@ -8003,6 +8080,12 @@ func (s *ActivitiesResponse) SetItem(v []*ActivityResponse) *ActivitiesResponse return s } +// SetNextToken sets the NextToken field's value. +func (s *ActivitiesResponse) SetNextToken(v string) *ActivitiesResponse { + s.NextToken = &v + return s +} + // Activity definition type ActivityResponse struct { _ struct{} `type:"structure"` @@ -8592,7 +8675,7 @@ type BaiduMessage struct { // Possible values include: OPEN_APP | DEEP_LINK | URL Action *string `type:"string" enum:"Action"` - // The message body of the notification, the email body or the text message. + // The message body of the notification. Body *string `type:"string"` // The data payload used for a silent push. This payload is added to the notifications' @@ -9696,7 +9779,7 @@ func (s *CreateSegmentOutput) SetSegmentResponse(v *SegmentResponse) *CreateSegm return s } -// Default Message across push notification, email, and sms. +// The default message to use across all channels. type DefaultMessage struct { _ struct{} `type:"structure"` @@ -9742,7 +9825,7 @@ type DefaultPushNotificationMessage struct { // Possible values include: OPEN_APP | DEEP_LINK | URL Action *string `type:"string" enum:"Action"` - // The message body of the notification, the email body or the text message. + // The message body of the notification. Body *string `type:"string"` // The data payload used for a silent push. This payload is added to the notifications' @@ -11060,7 +11143,7 @@ type EndpointBatchItem struct { // The destination for messages that you send to this endpoint. The address // varies by channel. For mobile push channels, use the token provided by the // push notification service, such as the APNs device token or the FCM registration - // token. For the SMS channel, use a phone number in E.164 format, such as +1206XXX5550100. + // token. For the SMS channel, use a phone number in E.164 format, such as +12065550100. // For the email channel, use an email address. Address *string `type:"string"` @@ -11214,7 +11297,7 @@ func (s *EndpointBatchRequest) SetItem(v []*EndpointBatchItem) *EndpointBatchReq return s } -// Endpoint demographic data +// Demographic information about the endpoint. type EndpointDemographic struct { _ struct{} `type:"structure"` @@ -11225,19 +11308,19 @@ type EndpointDemographic struct { // followed by an underscore, followed by an ISO 3166-1 alpha-2 value. Locale *string `type:"string"` - // The endpoint make, such as such as Apple or Samsung. + // The manufacturer of the endpoint device, such as Apple or Samsung. Make *string `type:"string"` - // The endpoint model, such as iPhone. + // The model name or number of the endpoint device, such as iPhone. Model *string `type:"string"` - // The endpoint model version. + // The model version of the endpoint device. ModelVersion *string `type:"string"` - // The endpoint platform, such as ios or android. + // The platform of the endpoint device, such as iOS or Android. Platform *string `type:"string"` - // The endpoint platform version. + // The platform version of the endpoint device. PlatformVersion *string `type:"string"` // The timezone of the endpoint. Specified as a tz database value, such as Americas/Los_Angeles. @@ -11302,29 +11385,64 @@ func (s *EndpointDemographic) SetTimezone(v string) *EndpointDemographic { return s } -// Endpoint location data +// The responses that are returned after you create or update an endpoint and +// record an event. +type EndpointItemResponse struct { + _ struct{} `type:"structure"` + + // A custom message associated with the registration of an endpoint when issuing + // a response. + Message *string `type:"string"` + + // The status code to respond with for a particular endpoint id after endpoint + // registration + StatusCode *int64 `type:"integer"` +} + +// String returns the string representation +func (s EndpointItemResponse) String() string { + return awsutil.Prettify(s) +} + +// GoString returns the string representation +func (s EndpointItemResponse) GoString() string { + return s.String() +} + +// SetMessage sets the Message field's value. +func (s *EndpointItemResponse) SetMessage(v string) *EndpointItemResponse { + s.Message = &v + return s +} + +// SetStatusCode sets the StatusCode field's value. +func (s *EndpointItemResponse) SetStatusCode(v int64) *EndpointItemResponse { + s.StatusCode = &v + return s +} + +// Location data for the endpoint. type EndpointLocation struct { _ struct{} `type:"structure"` // The city where the endpoint is located. City *string `type:"string"` - // Country according to ISO 3166-1 Alpha-2 codes. For example, US. + // The two-letter code for the country or region of the endpoint. Specified + // as an ISO 3166-1 Alpha-2 code, such as "US" for the United States. Country *string `type:"string"` - // The latitude of the endpoint location. Rounded to one decimal (Roughly corresponding - // to a mile). + // The latitude of the endpoint location, rounded to one decimal place. Latitude *float64 `type:"double"` - // The longitude of the endpoint location. Rounded to one decimal (Roughly corresponding - // to a mile). + // The longitude of the endpoint location, rounded to one decimal place. Longitude *float64 `type:"double"` // The postal code or zip code of the endpoint. PostalCode *string `type:"string"` - // The region of the endpoint location. For example, corresponds to a state - // in US. + // The region of the endpoint location. For example, in the United States, this + // corresponds to a state. Region *string `type:"string"` } @@ -11381,7 +11499,20 @@ type EndpointMessageResult struct { // Address that endpoint message was delivered to. Address *string `type:"string"` - // Delivery status of message. + // The delivery status of the message. Possible values:SUCCESS - The message + // was successfully delivered to the endpoint.TRANSIENT_FAILURE - A temporary + // error occurred. Amazon Pinpoint will attempt to deliver the message again + // later.FAILURE_PERMANENT - An error occurred when delivering the message to + // the endpoint. Amazon Pinpoint won't attempt to send the message again.TIMEOUT + // - The message couldn't be sent within the timeout period.QUIET_TIME - The + // local time for the endpoint was within the Quiet Hours for the campaign.DAILY_CAP + // - The endpoint has received the maximum number of messages it can receive + // within a 24-hour period.HOLDOUT - The endpoint was in a hold out treatment + // for the campaign.THROTTLED - Amazon Pinpoint throttled sending to this endpoint.EXPIRED + // - The endpoint address is expired.CAMPAIGN_CAP - The endpoint received the + // maximum number of messages allowed by the campaign.SERVICE_FAILURE - A service-level + // failure prevented Amazon Pinpoint from delivering the message.UNKNOWN - An + // unknown error occurred. DeliveryStatus *string `type:"string" enum:"DeliveryStatus"` // Unique message identifier associated with the message that was sent. @@ -11450,7 +11581,7 @@ type EndpointRequest struct { // The destination for messages that you send to this endpoint. The address // varies by channel. For mobile push channels, use the token provided by the // push notification service, such as the APNs device token or the FCM registration - // token. For the SMS channel, use a phone number in E.164 format, such as +1206XXX5550100. + // token. For the SMS channel, use a phone number in E.164 format, such as +12065550100. // For the email channel, use an email address. Address *string `type:"string"` @@ -11468,10 +11599,10 @@ type EndpointRequest struct { // | ADM | SMS | EMAIL | BAIDU ChannelType *string `type:"string" enum:"ChannelType"` - // The endpoint demographic attributes. + // Demographic attributes for the endpoint. Demographic *EndpointDemographic `type:"structure"` - // The last time the endpoint was updated. Provided in ISO 8601 format. + // The date and time when the endpoint was updated, shown in ISO 8601 format. EffectiveDate *string `type:"string"` // Unused. @@ -11575,48 +11706,48 @@ func (s *EndpointRequest) SetUser(v *EndpointUser) *EndpointRequest { type EndpointResponse struct { _ struct{} `type:"structure"` - // The address or token of the endpoint as provided by your push provider (e.g. - // DeviceToken or RegistrationId). + // The address of the endpoint as provided by your push provider. For example, + // the DeviceToken or RegistrationId. Address *string `type:"string"` - // The ID of the application associated with the endpoint. + // The ID of the application that is associated with the endpoint. ApplicationId *string `type:"string"` // Custom attributes that describe the endpoint by associating a name with an // array of values. For example, an attribute named "interests" might have the - // values ["science", "politics", "travel"]. You can use these attributes as - // selection criteria when you create a segment of users to engage with a messaging - // campaign.The following characters are not recommended in attribute names: - // # : ? \ /. The Amazon Pinpoint console does not display attributes that include - // these characters in the name. This limitation does not apply to attribute - // values. + // following values: ["science", "politics", "travel"]. You can use these attributes + // as selection criteria when you create segments.The Amazon Pinpoint console + // can't display attribute names that include the following characters: hash/pound + // sign (#), colon (:), question mark (?), backslash (\), and forward slash + // (/). For this reason, you should avoid using these characters in the names + // of custom attributes. Attributes map[string][]*string `type:"map"` // The channel type.Valid values: GCM | APNS | APNS_SANDBOX | APNS_VOIP | APNS_VOIP_SANDBOX // | ADM | SMS | EMAIL | BAIDU ChannelType *string `type:"string" enum:"ChannelType"` - // A number from 0 - 99 that represents the cohort the endpoint is assigned - // to. Endpoints are grouped into cohorts randomly, and each cohort contains - // approximately 1 percent of the endpoints for an app. Amazon Pinpoint assigns - // cohorts to the holdout or treatment allocations for a campaign. + // A number from 0-99 that represents the cohort the endpoint is assigned to. + // Endpoints are grouped into cohorts randomly, and each cohort contains approximately + // 1 percent of the endpoints for an app. Amazon Pinpoint assigns cohorts to + // the holdout or treatment allocations for a campaign. CohortId *string `type:"string"` - // The last time the endpoint was created. Provided in ISO 8601 format. + // The date and time when the endpoint was created, shown in ISO 8601 format. CreationDate *string `type:"string"` // The endpoint demographic attributes. Demographic *EndpointDemographic `type:"structure"` - // The last time the endpoint was updated. Provided in ISO 8601 format. + // The date and time when the endpoint was last updated, shown in ISO 8601 format. EffectiveDate *string `type:"string"` // Unused. EndpointStatus *string `type:"string"` // The unique ID that you assigned to the endpoint. The ID should be a globally - // unique identifier (GUID) to ensure that it is unique compared to all other - // endpoints for the application. + // unique identifier (GUID) to ensure that it doesn't conflict with other endpoint + // IDs associated with the application. Id *string `type:"string"` // The endpoint location attributes. @@ -11806,14 +11937,14 @@ func (s *EndpointSendConfiguration) SetTitleOverride(v string) *EndpointSendConf type EndpointUser struct { _ struct{} `type:"structure"` - // Custom attributes that describe an end user by associating a name with an - // array of values. For example, an attribute named "interests" might have the - // values ["science", "politics", "travel"]. You can use these attributes as - // selection criteria when you create a segment of users to engage with a messaging - // campaign.The following characters are not recommended in attribute names: - // # : ? \ /. The Amazon Pinpoint console does not display attributes that include - // these characters in the name. This limitation does not apply to attribute - // values. + // Custom attributes that describe the user by associating a name with an array + // of values. For example, an attribute named "interests" might have the following + // values: ["science", "politics", "travel"]. You can use these attributes as + // selection criteria when you create segments.The Amazon Pinpoint console can't + // display attribute names that include the following characters: hash/pound + // sign (#), colon (:), question mark (?), backslash (\), and forward slash + // (/). For this reason, you should avoid using these characters in the names + // of custom attributes. UserAttributes map[string][]*string `type:"map"` // The unique ID of the user. @@ -11866,6 +11997,108 @@ func (s *EndpointsResponse) SetItem(v []*EndpointResponse) *EndpointsResponse { return s } +// Model for creating or updating events. +type Event struct { + _ struct{} `type:"structure"` + + // Custom attributes that are associated with the event you're adding or updating. + Attributes map[string]*string `type:"map"` + + // The version of the SDK that's running on the client device. + ClientSdkVersion *string `type:"string"` + + // The name of the custom event that you're recording. + EventType *string `type:"string"` + + // Event metrics + Metrics map[string]*float64 `type:"map"` + + // The session + Session *Session `type:"structure"` + + // The date and time when the event occurred, in ISO 8601 format. + Timestamp *string `type:"string"` +} + +// String returns the string representation +func (s Event) String() string { + return awsutil.Prettify(s) +} + +// GoString returns the string representation +func (s Event) GoString() string { + return s.String() +} + +// SetAttributes sets the Attributes field's value. +func (s *Event) SetAttributes(v map[string]*string) *Event { + s.Attributes = v + return s +} + +// SetClientSdkVersion sets the ClientSdkVersion field's value. +func (s *Event) SetClientSdkVersion(v string) *Event { + s.ClientSdkVersion = &v + return s +} + +// SetEventType sets the EventType field's value. +func (s *Event) SetEventType(v string) *Event { + s.EventType = &v + return s +} + +// SetMetrics sets the Metrics field's value. +func (s *Event) SetMetrics(v map[string]*float64) *Event { + s.Metrics = v + return s +} + +// SetSession sets the Session field's value. +func (s *Event) SetSession(v *Session) *Event { + s.Session = v + return s +} + +// SetTimestamp sets the Timestamp field's value. +func (s *Event) SetTimestamp(v string) *Event { + s.Timestamp = &v + return s +} + +// The responses that are returned after you record an event. +type EventItemResponse struct { + _ struct{} `type:"structure"` + + // A custom message that is associated with the processing of an event. + Message *string `type:"string"` + + // The status code to respond with for a particular event id + StatusCode *int64 `type:"integer"` +} + +// String returns the string representation +func (s EventItemResponse) String() string { + return awsutil.Prettify(s) +} + +// GoString returns the string representation +func (s EventItemResponse) GoString() string { + return s.String() +} + +// SetMessage sets the Message field's value. +func (s *EventItemResponse) SetMessage(v string) *EventItemResponse { + s.Message = &v + return s +} + +// SetStatusCode sets the StatusCode field's value. +func (s *EventItemResponse) SetStatusCode(v int64) *EventItemResponse { + s.StatusCode = &v + return s +} + // Model for an event publishing subscription export. type EventStream struct { _ struct{} `type:"structure"` @@ -11878,7 +12111,7 @@ type EventStream struct { // Kinesis ARN: arn:aws:kinesis:REGION:ACCOUNT_ID:stream/STREAM_NAME DestinationStreamArn *string `type:"string"` - // DEPRECATED. Your AWS account ID, which you assigned to the ExternalID key + // (Deprecated) Your AWS account ID, which you assigned to the ExternalID key // in an IAM trust policy. Used by Amazon Pinpoint to assume an IAM role. This // requirement is removed, and external IDs are not recommended for IAM roles // assumed by Amazon Pinpoint. @@ -11941,6 +12174,90 @@ func (s *EventStream) SetRoleArn(v string) *EventStream { return s } +// Events batch definition +type EventsBatch struct { + _ struct{} `type:"structure"` + + // Endpoint information + Endpoint *PublicEndpoint `type:"structure"` + + // Events + Events map[string]*Event `type:"map"` +} + +// String returns the string representation +func (s EventsBatch) String() string { + return awsutil.Prettify(s) +} + +// GoString returns the string representation +func (s EventsBatch) GoString() string { + return s.String() +} + +// SetEndpoint sets the Endpoint field's value. +func (s *EventsBatch) SetEndpoint(v *PublicEndpoint) *EventsBatch { + s.Endpoint = v + return s +} + +// SetEvents sets the Events field's value. +func (s *EventsBatch) SetEvents(v map[string]*Event) *EventsBatch { + s.Events = v + return s +} + +// Put Events request +type EventsRequest struct { + _ struct{} `type:"structure"` + + // Batch of events with endpoint id as the key and an object of EventsBatch + // as value. The EventsBatch object has the PublicEndpoint and a map of event + // Id's to events + BatchItem map[string]*EventsBatch `type:"map"` +} + +// String returns the string representation +func (s EventsRequest) String() string { + return awsutil.Prettify(s) +} + +// GoString returns the string representation +func (s EventsRequest) GoString() string { + return s.String() +} + +// SetBatchItem sets the BatchItem field's value. +func (s *EventsRequest) SetBatchItem(v map[string]*EventsBatch) *EventsRequest { + s.BatchItem = v + return s +} + +// The results from processing a put events request +type EventsResponse struct { + _ struct{} `type:"structure"` + + // A map containing a multi part response for each endpoint, with the endpoint + // id as the key and item response as the value + Results map[string]*ItemResponse `type:"map"` +} + +// String returns the string representation +func (s EventsResponse) String() string { + return awsutil.Prettify(s) +} + +// GoString returns the string representation +func (s EventsResponse) GoString() string { + return s.String() +} + +// SetResults sets the Results field's value. +func (s *EventsResponse) SetResults(v map[string]*ItemResponse) *EventsResponse { + s.Results = v + return s +} + // Export job request. type ExportJobRequest struct { _ struct{} `type:"structure"` @@ -12057,7 +12374,7 @@ func (s *ExportJobResource) SetSegmentVersion(v int64) *ExportJobResource { type ExportJobResponse struct { _ struct{} `type:"structure"` - // The unique ID of the application to which the job applies. + // The unique ID of the application associated with the export job. ApplicationId *string `type:"string"` // The number of pieces that have successfully completed as of the time of the @@ -12384,7 +12701,7 @@ type GCMMessage struct { // Possible values include: OPEN_APP | DEEP_LINK | URL Action *string `type:"string" enum:"Action"` - // The message body of the notification, the email body or the text message. + // The message body of the notification. Body *string `type:"string"` // This parameter identifies a group of messages (e.g., with collapse_key: "Updates @@ -14850,7 +15167,7 @@ type ImportJobRequest struct { // Sets whether the endpoints create a segment when they are imported. DefineSegment *bool `type:"boolean"` - // DEPRECATED. Your AWS account ID, which you assigned to the ExternalID key + // (Deprecated) Your AWS account ID, which you assigned to the ExternalID key // in an IAM trust policy. Used by Amazon Pinpoint to assume an IAM role. This // requirement is removed, and external IDs are not recommended for IAM roles // assumed by Amazon Pinpoint. @@ -14868,10 +15185,10 @@ type ImportJobRequest struct { // access to the Amazon S3 location that contains the endpoints to import. RoleArn *string `type:"string"` - // A URL that points to the location within an Amazon S3 bucket that contains - // the endpoints to import. The location can be a folder or a single file.The - // URL should follow this format: s3://bucket-name/folder-name/file-nameAmazon - // Pinpoint will import endpoints from this location and any subfolders it contains. + // The URL of the S3 bucket that contains the segment information to import. + // The location can be a folder or a single file. The URL should use the following + // format: s3://bucket-name/folder-name/file-nameAmazon Pinpoint imports endpoints + // from this location and any subfolders it contains. S3Url *string `type:"string"` // The ID of the segment to update if the import job is meant to update an existing @@ -14948,7 +15265,7 @@ type ImportJobResource struct { // Sets whether the endpoints create a segment when they are imported. DefineSegment *bool `type:"boolean"` - // DEPRECATED. Your AWS account ID, which you assigned to the ExternalID key + // (Deprecated) Your AWS account ID, which you assigned to the ExternalID key // in an IAM trust policy. Used by Amazon Pinpoint to assume an IAM role. This // requirement is removed, and external IDs are not recommended for IAM roles // assumed by Amazon Pinpoint. @@ -14966,10 +15283,10 @@ type ImportJobResource struct { // access to the Amazon S3 location that contains the endpoints to import. RoleArn *string `type:"string"` - // A URL that points to the location within an Amazon S3 bucket that contains - // the endpoints to import. The location can be a folder or a single file.The - // URL should follow this format: s3://bucket-name/folder-name/file-nameAmazon - // Pinpoint will import endpoints from this location and any subfolders it contains. + // The URL of the S3 bucket that contains the segment information to import. + // The location can be a folder or a single file. The URL should use the following + // format: s3://bucket-name/folder-name/file-nameAmazon Pinpoint imports endpoints + // from this location and any subfolders it contains. S3Url *string `type:"string"` // The ID of the segment to update if the import job is meant to update an existing @@ -15210,6 +15527,40 @@ func (s *ImportJobsResponse) SetNextToken(v string) *ImportJobsResponse { return s } +// The endpoint and events combined response definition +type ItemResponse struct { + _ struct{} `type:"structure"` + + // Endpoint item response after endpoint registration + EndpointItemResponse *EndpointItemResponse `type:"structure"` + + // Events item response is a multipart response object per event Id, with eventId + // as the key and EventItemResponse object as the value + EventsItemResponse map[string]*EventItemResponse `type:"map"` +} + +// String returns the string representation +func (s ItemResponse) String() string { + return awsutil.Prettify(s) +} + +// GoString returns the string representation +func (s ItemResponse) GoString() string { + return s.String() +} + +// SetEndpointItemResponse sets the EndpointItemResponse field's value. +func (s *ItemResponse) SetEndpointItemResponse(v *EndpointItemResponse) *ItemResponse { + s.EndpointItemResponse = v + return s +} + +// SetEventsItemResponse sets the EventsItemResponse field's value. +func (s *ItemResponse) SetEventsItemResponse(v map[string]*EventItemResponse) *ItemResponse { + s.EventsItemResponse = v + return s +} + // Message to send type Message struct { _ struct{} `type:"structure"` @@ -15485,6 +15836,9 @@ type MessageRequest struct { // Message configuration. MessageConfiguration *DirectMessageConfiguration `type:"structure"` + + // A unique ID that you can use to trace a message. This ID is visible to recipients. + TraceId *string `type:"string"` } // String returns the string representation @@ -15521,6 +15875,12 @@ func (s *MessageRequest) SetMessageConfiguration(v *DirectMessageConfiguration) return s } +// SetTraceId sets the TraceId field's value. +func (s *MessageRequest) SetTraceId(v string) *MessageRequest { + s.TraceId = &v + return s +} + // Send message response. type MessageResponse struct { _ struct{} `type:"structure"` @@ -15579,7 +15939,20 @@ func (s *MessageResponse) SetResult(v map[string]*MessageResult) *MessageRespons type MessageResult struct { _ struct{} `type:"structure"` - // Delivery status of message. + // The delivery status of the message. Possible values:SUCCESS - The message + // was successfully delivered to the endpoint.TRANSIENT_FAILURE - A temporary + // error occurred. Amazon Pinpoint will attempt to deliver the message again + // later.FAILURE_PERMANENT - An error occurred when delivering the message to + // the endpoint. Amazon Pinpoint won't attempt to send the message again.TIMEOUT + // - The message couldn't be sent within the timeout period.QUIET_TIME - The + // local time for the endpoint was within the Quiet Hours for the campaign.DAILY_CAP + // - The endpoint has received the maximum number of messages it can receive + // within a 24-hour period.HOLDOUT - The endpoint was in a hold out treatment + // for the campaign.THROTTLED - Amazon Pinpoint throttled sending to this endpoint.EXPIRED + // - The endpoint address is expired.CAMPAIGN_CAP - The endpoint received the + // maximum number of messages allowed by the campaign.SERVICE_FAILURE - A service-level + // failure prevented Amazon Pinpoint from delivering the message.UNKNOWN - An + // unknown error occurred. DeliveryStatus *string `type:"string" enum:"DeliveryStatus"` // Unique message identifier associated with the message that was sent. @@ -15672,11 +16045,13 @@ func (s *MetricDimension) SetValue(v float64) *MetricDimension { type NumberValidateRequest struct { _ struct{} `type:"structure"` - // (Optional) The two-character ISO country code for the country where the phone - // number was originally registered. + // (Optional) The two-character ISO country code for the country or region where + // the phone number was originally registered. IsoCountryCode *string `type:"string"` - // The phone number to get information about. + // The phone number to get information about. The phone number that you provide + // should include a country code. If the number doesn't include a valid country + // code, the operation might result in an error. PhoneNumber *string `type:"string"` } @@ -15706,50 +16081,52 @@ func (s *NumberValidateRequest) SetPhoneNumber(v string) *NumberValidateRequest type NumberValidateResponse struct { _ struct{} `type:"structure"` - // The carrier that the phone number is registered with. + // The carrier or servive provider that the phone number is currently registered + // with. Carrier *string `type:"string"` // The city where the phone number was originally registered. City *string `type:"string"` - // The cleansed (standardized) phone number in E.164 format. + // The cleansed phone number, shown in E.164 format. CleansedPhoneNumberE164 *string `type:"string"` - // The cleansed phone number in national format. + // The cleansed phone number, shown in the local phone number format. CleansedPhoneNumberNational *string `type:"string"` - // The country where the phone number was originally registered. + // The country or region where the phone number was originally registered. Country *string `type:"string"` - // The two-character ISO country code for the country where the phone number + // The two-character ISO code for the country or region where the phone number // was originally registered. CountryCodeIso2 *string `type:"string"` - // The numeric country code for the country where the phone number was originally + // The numeric code for the country or region where the phone number was originally // registered. CountryCodeNumeric *string `type:"string"` // The county where the phone number was originally registered. County *string `type:"string"` - // The two-character ISO country code that was included in the request body. + // The two-character ISO code for the country or region that you included in + // the request body. OriginalCountryCodeIso2 *string `type:"string"` // The phone number that you included in the request body. OriginalPhoneNumber *string `type:"string"` - // A description of the phone type. Possible values include MOBILE, LANDLINE, - // VOIP, INVALID, and OTHER. + // A description of the phone type. Possible values are MOBILE, LANDLINE, VOIP, + // INVALID, PREPAID, and OTHER. PhoneType *string `type:"string"` - // The phone type as an integer. Possible values include 0 (MOBILE), 1 (LANDLINE), - // 2 (VOIP), 3 (INVALID), and 4 (OTHER). + // The phone type, represented by an integer. Possible values include 0 (MOBILE), + // 1 (LANDLINE), 2 (VOIP), 3 (INVALID), 4 (OTHER), and 5 (PREPAID). PhoneTypeCode *int64 `type:"integer"` // The time zone for the location where the phone number was originally registered. Timezone *string `type:"string"` - // The zip code for the location where the phone number was originally registered. + // The postal code for the location where the phone number was originally registered. ZipCode *string `type:"string"` } @@ -15910,6 +16287,125 @@ func (s *PhoneNumberValidateOutput) SetNumberValidateResponse(v *NumberValidateR return s } +// Public endpoint attributes. +type PublicEndpoint struct { + _ struct{} `type:"structure"` + + // The unique identifier for the recipient. For example, an address could be + // a device token or an endpoint ID. + Address *string `type:"string"` + + // Custom attributes that your app reports to Amazon Pinpoint. You can use these + // attributes as selection criteria when you create a segment. + Attributes map[string][]*string `type:"map"` + + // The channel type.Valid values: APNS, GCM + ChannelType *string `type:"string" enum:"ChannelType"` + + // The endpoint demographic attributes. + Demographic *EndpointDemographic `type:"structure"` + + // The date and time when the endpoint was last updated. + EffectiveDate *string `type:"string"` + + // The status of the endpoint. If the update fails, the value is INACTIVE. If + // the endpoint is updated successfully, the value is ACTIVE. + EndpointStatus *string `type:"string"` + + // The endpoint location attributes. + Location *EndpointLocation `type:"structure"` + + // Custom metrics that your app reports to Amazon Pinpoint. + Metrics map[string]*float64 `type:"map"` + + // Indicates whether a user has opted out of receiving messages with one of + // the following values:ALL - User has opted out of all messages.NONE - Users + // has not opted out and receives all messages. + OptOut *string `type:"string"` + + // A unique identifier that is generated each time the endpoint is updated. + RequestId *string `type:"string"` + + // Custom user-specific attributes that your app reports to Amazon Pinpoint. + User *EndpointUser `type:"structure"` +} + +// String returns the string representation +func (s PublicEndpoint) String() string { + return awsutil.Prettify(s) +} + +// GoString returns the string representation +func (s PublicEndpoint) GoString() string { + return s.String() +} + +// SetAddress sets the Address field's value. +func (s *PublicEndpoint) SetAddress(v string) *PublicEndpoint { + s.Address = &v + return s +} + +// SetAttributes sets the Attributes field's value. +func (s *PublicEndpoint) SetAttributes(v map[string][]*string) *PublicEndpoint { + s.Attributes = v + return s +} + +// SetChannelType sets the ChannelType field's value. +func (s *PublicEndpoint) SetChannelType(v string) *PublicEndpoint { + s.ChannelType = &v + return s +} + +// SetDemographic sets the Demographic field's value. +func (s *PublicEndpoint) SetDemographic(v *EndpointDemographic) *PublicEndpoint { + s.Demographic = v + return s +} + +// SetEffectiveDate sets the EffectiveDate field's value. +func (s *PublicEndpoint) SetEffectiveDate(v string) *PublicEndpoint { + s.EffectiveDate = &v + return s +} + +// SetEndpointStatus sets the EndpointStatus field's value. +func (s *PublicEndpoint) SetEndpointStatus(v string) *PublicEndpoint { + s.EndpointStatus = &v + return s +} + +// SetLocation sets the Location field's value. +func (s *PublicEndpoint) SetLocation(v *EndpointLocation) *PublicEndpoint { + s.Location = v + return s +} + +// SetMetrics sets the Metrics field's value. +func (s *PublicEndpoint) SetMetrics(v map[string]*float64) *PublicEndpoint { + s.Metrics = v + return s +} + +// SetOptOut sets the OptOut field's value. +func (s *PublicEndpoint) SetOptOut(v string) *PublicEndpoint { + s.OptOut = &v + return s +} + +// SetRequestId sets the RequestId field's value. +func (s *PublicEndpoint) SetRequestId(v string) *PublicEndpoint { + s.RequestId = &v + return s +} + +// SetUser sets the User field's value. +func (s *PublicEndpoint) SetUser(v *EndpointUser) *PublicEndpoint { + s.User = v + return s +} + type PutEventStreamInput struct { _ struct{} `type:"structure" payload:"WriteEventStream"` @@ -15985,6 +16481,81 @@ func (s *PutEventStreamOutput) SetEventStream(v *EventStream) *PutEventStreamOut return s } +type PutEventsInput struct { + _ struct{} `type:"structure" payload:"EventsRequest"` + + // ApplicationId is a required field + ApplicationId *string `location:"uri" locationName:"application-id" type:"string" required:"true"` + + // Put Events request + // + // EventsRequest is a required field + EventsRequest *EventsRequest `type:"structure" required:"true"` +} + +// String returns the string representation +func (s PutEventsInput) String() string { + return awsutil.Prettify(s) +} + +// GoString returns the string representation +func (s PutEventsInput) GoString() string { + return s.String() +} + +// Validate inspects the fields of the type to determine if they are valid. +func (s *PutEventsInput) Validate() error { + invalidParams := request.ErrInvalidParams{Context: "PutEventsInput"} + if s.ApplicationId == nil { + invalidParams.Add(request.NewErrParamRequired("ApplicationId")) + } + if s.EventsRequest == nil { + invalidParams.Add(request.NewErrParamRequired("EventsRequest")) + } + + if invalidParams.Len() > 0 { + return invalidParams + } + return nil +} + +// SetApplicationId sets the ApplicationId field's value. +func (s *PutEventsInput) SetApplicationId(v string) *PutEventsInput { + s.ApplicationId = &v + return s +} + +// SetEventsRequest sets the EventsRequest field's value. +func (s *PutEventsInput) SetEventsRequest(v *EventsRequest) *PutEventsInput { + s.EventsRequest = v + return s +} + +type PutEventsOutput struct { + _ struct{} `type:"structure" payload:"EventsResponse"` + + // The results from processing a put events request + // + // EventsResponse is a required field + EventsResponse *EventsResponse `type:"structure" required:"true"` +} + +// String returns the string representation +func (s PutEventsOutput) String() string { + return awsutil.Prettify(s) +} + +// GoString returns the string representation +func (s PutEventsOutput) GoString() string { + return s.String() +} + +// SetEventsResponse sets the EventsResponse field's value. +func (s *PutEventsOutput) SetEventsResponse(v *EventsResponse) *PutEventsOutput { + s.EventsResponse = v + return s +} + // Quiet Time type QuietTime struct { _ struct{} `type:"structure"` @@ -16639,14 +17210,22 @@ type SegmentGroup struct { // List of dimensions to include or exclude. Dimensions []*SegmentDimensions `type:"list"` - // Segments that define the source of this segment. Currently a maximum of 1 - // import segment is supported. + // The base segment that you build your segment on. The source segment defines + // the starting "universe" of endpoints. When you add dimensions to the segment, + // it filters the source segment based on the dimensions that you specify. You + // can specify more than one dimensional segment. You can only specify one imported + // segment. SourceSegments []*SegmentReference `type:"list"` - // Include or exclude the source. + // Specify how to handle multiple source segments. For example, if you specify + // three source segments, should the resulting segment be based on any or all + // of the segments? Acceptable values: ANY or ALL. SourceType *string `type:"string" enum:"SourceType"` - // How should the dimensions be applied for the result + // Specify how to handle multiple segment dimensions. For example, if you specify + // three dimensions, should the resulting segment include endpoints that are + // matched by all, any, or none of the dimensions? Acceptable values: ALL, ANY, + // or NONE. Type *string `type:"string" enum:"Type"` } @@ -16688,10 +17267,13 @@ func (s *SegmentGroup) SetType(v string) *SegmentGroup { type SegmentGroupList struct { _ struct{} `type:"structure"` - // List of dimension groups to evaluate. + // A set of segment criteria to evaluate. Groups []*SegmentGroup `type:"list"` - // How should the groups be applied for the result + // Specify how to handle multiple segment groups. For example, if the segment + // includes three segment groups, should the resulting segment include endpoints + // that are matched by all, any, or none of the segment groups you created. + // Acceptable values: ALL, ANY, or NONE. Include *string `type:"string" enum:"Include"` } @@ -16721,10 +17303,10 @@ func (s *SegmentGroupList) SetInclude(v string) *SegmentGroupList { type SegmentImportResource struct { _ struct{} `type:"structure"` - // Channel type counts + // The number of channel types in the imported segment. ChannelCounts map[string]*int64 `type:"map"` - // DEPRECATED. Your AWS account ID, which you assigned to the ExternalID key + // (Deprecated) Your AWS account ID, which you assigned to the ExternalID key // in an IAM trust policy. Used by Amazon Pinpoint to assume an IAM role. This // requirement is removed, and external IDs are not recommended for IAM roles // assumed by Amazon Pinpoint. @@ -16738,8 +17320,7 @@ type SegmentImportResource struct { // access to the endpoints in Amazon S3. RoleArn *string `type:"string"` - // A URL that points to the Amazon S3 location from which the endpoints for - // this segment were imported. + // The URL of the S3 bucket that the segment was imported from. S3Url *string `type:"string"` // The number of endpoints that were successfully imported to create this segment. @@ -16829,7 +17410,7 @@ func (s *SegmentLocation) SetGPSPoint(v *GPSPointDimension) *SegmentLocation { type SegmentReference struct { _ struct{} `type:"structure"` - // Segment Id. + // A unique identifier for the segment. Id *string `type:"string"` // If specified contains a specific version of the segment included. @@ -16862,10 +17443,10 @@ func (s *SegmentReference) SetVersion(v int64) *SegmentReference { type SegmentResponse struct { _ struct{} `type:"structure"` - // The ID of the application to which the segment applies. + // The ID of the application that the segment applies to. ApplicationId *string `type:"string"` - // The date the segment was created in ISO 8601 format. + // The date and time when the segment was created. CreationDate *string `type:"string"` // The segment dimensions attributes. @@ -16877,14 +17458,14 @@ type SegmentResponse struct { // The import job settings. ImportDefinition *SegmentImportResource `type:"structure"` - // The date the segment was last updated in ISO 8601 format. + // The date and time when the segment was last modified. LastModifiedDate *string `type:"string"` - // The name of segment + // The name of the segment. Name *string `type:"string"` - // Segment definition groups. We currently only support one. If specified Dimensions - // must be empty. + // A segment group, which consists of zero or more source segments, plus dimensions + // that are applied to those source segments. SegmentGroups *SegmentGroupList `type:"structure"` // The segment type:DIMENSIONAL - A dynamic segment built from selection criteria @@ -17093,6 +17674,9 @@ type SendUsersMessageRequest struct { // for specific channels. MessageConfiguration *DirectMessageConfiguration `type:"structure"` + // A unique ID that you can use to trace a message. This ID is visible to recipients. + TraceId *string `type:"string"` + // A map that associates user IDs with EndpointSendConfiguration objects. Within // an EndpointSendConfiguration object, you can tailor the message for a user // by specifying message overrides or substitutions. @@ -17121,6 +17705,12 @@ func (s *SendUsersMessageRequest) SetMessageConfiguration(v *DirectMessageConfig return s } +// SetTraceId sets the TraceId field's value. +func (s *SendUsersMessageRequest) SetTraceId(v string) *SendUsersMessageRequest { + s.TraceId = &v + return s +} + // SetUsers sets the Users field's value. func (s *SendUsersMessageRequest) SetUsers(v map[string]*EndpointSendConfiguration) *SendUsersMessageRequest { s.Users = v @@ -17247,6 +17837,57 @@ func (s *SendUsersMessagesOutput) SetSendUsersMessageResponse(v *SendUsersMessag return s } +// Information about a session. +type Session struct { + _ struct{} `type:"structure"` + + // Session duration in millis + Duration *int64 `type:"integer"` + + // A unique identifier for the session. + Id *string `type:"string"` + + // The date and time when the session began. + StartTimestamp *string `type:"string"` + + // The date and time when the session ended. + StopTimestamp *string `type:"string"` +} + +// String returns the string representation +func (s Session) String() string { + return awsutil.Prettify(s) +} + +// GoString returns the string representation +func (s Session) GoString() string { + return s.String() +} + +// SetDuration sets the Duration field's value. +func (s *Session) SetDuration(v int64) *Session { + s.Duration = &v + return s +} + +// SetId sets the Id field's value. +func (s *Session) SetId(v string) *Session { + s.Id = &v + return s +} + +// SetStartTimestamp sets the StartTimestamp field's value. +func (s *Session) SetStartTimestamp(v string) *Session { + s.StartTimestamp = &v + return s +} + +// SetStopTimestamp sets the StopTimestamp field's value. +func (s *Session) SetStopTimestamp(v string) *Session { + s.StopTimestamp = &v + return s +} + // Dimension specification of a segment. type SetDimension struct { _ struct{} `type:"structure"` @@ -18707,8 +19348,10 @@ type WriteSegmentRequest struct { // The name of segment Name *string `type:"string"` - // Segment definition groups. We currently only support one. If specified Dimensions - // must be empty. + // A segment group, which consists of zero or more source segments, plus dimensions + // that are applied to those source segments. Your request can only include + // one segment group. Your request can include either a SegmentGroups object + // or a Dimensions object, but not both. SegmentGroups *SegmentGroupList `type:"structure"` } @@ -19013,6 +19656,9 @@ const ( // SourceTypeAny is a SourceType enum value SourceTypeAny = "ANY" + + // SourceTypeNone is a SourceType enum value + SourceTypeNone = "NONE" ) const ( diff --git a/vendor/github.com/aws/aws-sdk-go/service/rds/api.go b/vendor/github.com/aws/aws-sdk-go/service/rds/api.go index 241078f21..1d699dc94 100644 --- a/vendor/github.com/aws/aws-sdk-go/service/rds/api.go +++ b/vendor/github.com/aws/aws-sdk-go/service/rds/api.go @@ -60,8 +60,9 @@ func (c *RDS) AddRoleToDBClusterRequest(input *AddRoleToDBClusterInput) (req *re // AddRoleToDBCluster API operation for Amazon Relational Database Service. // // Associates an Identity and Access Management (IAM) role from an Aurora DB -// cluster. For more information, see Authorizing Amazon Aurora to Access Other -// AWS Services On Your Behalf (http://docs.aws.amazon.com/AmazonRDS/latest/UserGuide/Aurora.Authorizing.AWSServices.html). +// cluster. For more information, see Authorizing Amazon Aurora MySQL to Access +// Other AWS Services on Your Behalf (http://docs.aws.amazon.com/AmazonRDS/latest/AuroraUserGuide/AuroraMySQL.Integrating.Authorizing.html) +// in the Amazon Aurora User Guide. // // Returns awserr.Error for service API and SDK errors. Use runtime type assertions // with awserr.Error's Code and Message methods to get detailed information about @@ -339,6 +340,12 @@ func (c *RDS) ApplyPendingMaintenanceActionRequest(input *ApplyPendingMaintenanc // * ErrCodeResourceNotFoundFault "ResourceNotFoundFault" // The specified resource ID was not found. // +// * ErrCodeInvalidDBClusterStateFault "InvalidDBClusterStateFault" +// The DB cluster isn't in a valid state. +// +// * ErrCodeInvalidDBInstanceStateFault "InvalidDBInstanceState" +// The DB instance isn't in a valid state. +// // See also, https://docs.aws.amazon.com/goto/WebAPI/rds-2014-10-31/ApplyPendingMaintenanceAction func (c *RDS) ApplyPendingMaintenanceAction(input *ApplyPendingMaintenanceActionInput) (*ApplyPendingMaintenanceActionOutput, error) { req, out := c.ApplyPendingMaintenanceActionRequest(input) @@ -509,8 +516,8 @@ func (c *RDS) BacktrackDBClusterRequest(input *BacktrackDBClusterInput) (req *re // Backtracks a DB cluster to a specific time, without creating a new DB cluster. // // For more information on backtracking, see Backtracking an Aurora DB Cluster -// (http://docs.aws.amazon.com/AmazonRDS/latest/UserGuide/AuroraMySQL.Managing.Backtrack.html) -// in the Amazon RDS User Guide. +// (http://docs.aws.amazon.com/AmazonRDS/latest/AuroraUserGuide/AuroraMySQL.Managing.Backtrack.html) +// in the Amazon Aurora User Guide. // // Returns awserr.Error for service API and SDK errors. Use runtime type assertions // with awserr.Error's Code and Message methods to get detailed information about @@ -735,12 +742,11 @@ func (c *RDS) CopyDBClusterSnapshotRequest(input *CopyDBClusterSnapshotInput) (r // DB cluster snapshot is in "copying" status. // // For more information on copying encrypted DB cluster snapshots from one AWS -// Region to another, see Copying a DB Cluster Snapshot in the Same Account, -// Either in the Same Region or Across Regions (http://docs.aws.amazon.com/AmazonRDS/latest/UserGuide/USER_CopySnapshot.html#USER_CopyDBClusterSnapshot.CrossRegion) -// in the Amazon RDS User Guide. +// Region to another, see Copying a Snapshot (http://docs.aws.amazon.com/AmazonRDS/latest/AuroraUserGuide/USER_CopySnapshot.html) +// in the Amazon Aurora User Guide. // -// For more information on Amazon Aurora, see Aurora on Amazon RDS (http://docs.aws.amazon.com/AmazonRDS/latest/UserGuide/CHAP_Aurora.html) -// in the Amazon RDS User Guide. +// For more information on Amazon Aurora, see What Is Amazon Aurora? (http://docs.aws.amazon.com/AmazonRDS/latest/AuroraUserGuide/CHAP_AuroraOverview.html) +// in the Amazon Aurora User Guide. // // Returns awserr.Error for service API and SDK errors. Use runtime type assertions // with awserr.Error's Code and Message methods to get detailed information about @@ -1111,8 +1117,8 @@ func (c *RDS) CreateDBClusterRequest(input *CreateDBClusterInput) (req *request. // For cross-region replication where the DB cluster identified by ReplicationSourceIdentifier // is encrypted, you must also specify the PreSignedUrl parameter. // -// For more information on Amazon Aurora, see Aurora on Amazon RDS (http://docs.aws.amazon.com/AmazonRDS/latest/UserGuide/CHAP_Aurora.html) -// in the Amazon RDS User Guide. +// For more information on Amazon Aurora, see What Is Amazon Aurora? (http://docs.aws.amazon.com/AmazonRDS/latest/AuroraUserGuide/CHAP_AuroraOverview.html) +// in the Amazon Aurora User Guide. // // Returns awserr.Error for service API and SDK errors. Use runtime type assertions // with awserr.Error's Code and Message methods to get detailed information about @@ -1156,7 +1162,7 @@ func (c *RDS) CreateDBClusterRequest(input *CreateDBClusterInput) (req *request. // are not all in a common VPC. // // * ErrCodeInvalidDBInstanceStateFault "InvalidDBInstanceState" -// The specified DB instance isn't in the available state. +// The DB instance isn't in a valid state. // // * ErrCodeDBClusterParameterGroupNotFoundFault "DBClusterParameterGroupNotFound" // DBClusterParameterGroupName doesn't refer to an existing DB cluster parameter @@ -1267,8 +1273,8 @@ func (c *RDS) CreateDBClusterParameterGroupRequest(input *CreateDBClusterParamet // command to verify that your DB cluster parameter group has been created or // modified. // -// For more information on Amazon Aurora, see Aurora on Amazon RDS (http://docs.aws.amazon.com/AmazonRDS/latest/UserGuide/CHAP_Aurora.html) -// in the Amazon RDS User Guide. +// For more information on Amazon Aurora, see What Is Amazon Aurora? (http://docs.aws.amazon.com/AmazonRDS/latest/AuroraUserGuide/CHAP_AuroraOverview.html) +// in the Amazon Aurora User Guide. // // Returns awserr.Error for service API and SDK errors. Use runtime type assertions // with awserr.Error's Code and Message methods to get detailed information about @@ -1352,8 +1358,8 @@ func (c *RDS) CreateDBClusterSnapshotRequest(input *CreateDBClusterSnapshotInput // CreateDBClusterSnapshot API operation for Amazon Relational Database Service. // // Creates a snapshot of a DB cluster. For more information on Amazon Aurora, -// see Aurora on Amazon RDS (http://docs.aws.amazon.com/AmazonRDS/latest/UserGuide/CHAP_Aurora.html) -// in the Amazon RDS User Guide. +// see What Is Amazon Aurora? (http://docs.aws.amazon.com/AmazonRDS/latest/AuroraUserGuide/CHAP_AuroraOverview.html) +// in the Amazon Aurora User Guide. // // Returns awserr.Error for service API and SDK errors. Use runtime type assertions // with awserr.Error's Code and Message methods to get detailed information about @@ -1517,6 +1523,8 @@ func (c *RDS) CreateDBInstanceRequest(input *CreateDBInstanceInput) (req *reques // * ErrCodeDomainNotFoundFault "DomainNotFoundFault" // Domain doesn't refer to an existing Active Directory domain. // +// * ErrCodeBackupPolicyNotFoundFault "BackupPolicyNotFoundFault" +// // See also, https://docs.aws.amazon.com/goto/WebAPI/rds-2014-10-31/CreateDBInstance func (c *RDS) CreateDBInstance(input *CreateDBInstanceInput) (*CreateDBInstanceOutput, error) { req, out := c.CreateDBInstanceRequest(input) @@ -1586,7 +1594,8 @@ func (c *RDS) CreateDBInstanceReadReplicaRequest(input *CreateDBInstanceReadRepl // Creates a new DB instance that acts as a Read Replica for an existing source // DB instance. You can create a Read Replica for a DB instance running MySQL, // MariaDB, or PostgreSQL. For more information, see Working with PostgreSQL, -// MySQL, and MariaDB Read Replicas (http://docs.aws.amazon.com/AmazonRDS/latest/UserGuide/USER_ReadRepl.html). +// MySQL, and MariaDB Read Replicas (http://docs.aws.amazon.com/AmazonRDS/latest/UserGuide/USER_ReadRepl.html) +// in the Amazon RDS User Guide. // // Amazon Aurora doesn't support this action. You must call the CreateDBInstance // action to create a DB instance for an Aurora DB cluster. @@ -1629,7 +1638,7 @@ func (c *RDS) CreateDBInstanceReadReplicaRequest(input *CreateDBInstanceReadRepl // DBInstanceIdentifier doesn't refer to an existing DB instance. // // * ErrCodeInvalidDBInstanceStateFault "InvalidDBInstanceState" -// The specified DB instance isn't in the available state. +// The DB instance isn't in a valid state. // // * ErrCodeDBSubnetGroupNotFoundFault "DBSubnetGroupNotFoundFault" // DBSubnetGroupName doesn't refer to an existing DB subnet group. @@ -1940,7 +1949,7 @@ func (c *RDS) CreateDBSnapshotRequest(input *CreateDBSnapshotInput) (req *reques // DBSnapshotIdentifier is already used by an existing snapshot. // // * ErrCodeInvalidDBInstanceStateFault "InvalidDBInstanceState" -// The specified DB instance isn't in the available state. +// The DB instance isn't in a valid state. // // * ErrCodeDBInstanceNotFoundFault "DBInstanceNotFound" // DBInstanceIdentifier doesn't refer to an existing DB instance. @@ -2311,7 +2320,7 @@ func (c *RDS) DeleteDBClusterRequest(input *DeleteDBClusterInput) (req *request. // and can't be recovered. Manual DB cluster snapshots of the specified DB cluster // are not deleted. // -// For more information on Amazon Aurora, see Aurora on Amazon RDS (http://docs.aws.amazon.com/AmazonRDS/latest/UserGuide/CHAP_Aurora.html)in the Amazon RDS User Guide. +// For more information on Amazon Aurora, see What Is Amazon Aurora? (http://docs.aws.amazon.com/AmazonRDS/latest/AuroraUserGuide/CHAP_AuroraOverview.html)in the Amazon Aurora User Guide. // // Returns awserr.Error for service API and SDK errors. Use runtime type assertions // with awserr.Error's Code and Message methods to get detailed information about @@ -2407,8 +2416,8 @@ func (c *RDS) DeleteDBClusterParameterGroupRequest(input *DeleteDBClusterParamet // Deletes a specified DB cluster parameter group. The DB cluster parameter // group to be deleted can't be associated with any DB clusters. // -// For more information on Amazon Aurora, see Aurora on Amazon RDS (http://docs.aws.amazon.com/AmazonRDS/latest/UserGuide/CHAP_Aurora.html) -// in the Amazon RDS User Guide. +// For more information on Amazon Aurora, see What Is Amazon Aurora? (http://docs.aws.amazon.com/AmazonRDS/latest/AuroraUserGuide/CHAP_AuroraOverview.html) +// in the Amazon Aurora User Guide. // // Returns awserr.Error for service API and SDK errors. Use runtime type assertions // with awserr.Error's Code and Message methods to get detailed information about @@ -2497,8 +2506,8 @@ func (c *RDS) DeleteDBClusterSnapshotRequest(input *DeleteDBClusterSnapshotInput // // The DB cluster snapshot must be in the available state to be deleted. // -// For more information on Amazon Aurora, see Aurora on Amazon RDS (http://docs.aws.amazon.com/AmazonRDS/latest/UserGuide/CHAP_Aurora.html) -// in the Amazon RDS User Guide. +// For more information on Amazon Aurora, see What Is Amazon Aurora? (http://docs.aws.amazon.com/AmazonRDS/latest/AuroraUserGuide/CHAP_AuroraOverview.html) +// in the Amazon Aurora User Guide. // // Returns awserr.Error for service API and SDK errors. Use runtime type assertions // with awserr.Error's Code and Message methods to get detailed information about @@ -2618,7 +2627,7 @@ func (c *RDS) DeleteDBInstanceRequest(input *DeleteDBInstanceInput) (req *reques // DBInstanceIdentifier doesn't refer to an existing DB instance. // // * ErrCodeInvalidDBInstanceStateFault "InvalidDBInstanceState" -// The specified DB instance isn't in the available state. +// The DB instance isn't in a valid state. // // * ErrCodeDBSnapshotAlreadyExistsFault "DBSnapshotAlreadyExists" // DBSnapshotIdentifier is already used by an existing snapshot. @@ -3369,8 +3378,8 @@ func (c *RDS) DescribeDBClusterBacktracksRequest(input *DescribeDBClusterBacktra // // Returns information about backtracks for a DB cluster. // -// For more information on Amazon Aurora, see Aurora on Amazon RDS (http://docs.aws.amazon.com/AmazonRDS/latest/UserGuide/CHAP_Aurora.html) -// in the Amazon RDS User Guide. +// For more information on Amazon Aurora, see What Is Amazon Aurora? (http://docs.aws.amazon.com/AmazonRDS/latest/AuroraUserGuide/CHAP_AuroraOverview.html) +// in the Amazon Aurora User Guide. // // Returns awserr.Error for service API and SDK errors. Use runtime type assertions // with awserr.Error's Code and Message methods to get detailed information about @@ -3456,8 +3465,8 @@ func (c *RDS) DescribeDBClusterParameterGroupsRequest(input *DescribeDBClusterPa // parameter is specified, the list will contain only the description of the // specified DB cluster parameter group. // -// For more information on Amazon Aurora, see Aurora on Amazon RDS (http://docs.aws.amazon.com/AmazonRDS/latest/UserGuide/CHAP_Aurora.html) -// in the Amazon RDS User Guide. +// For more information on Amazon Aurora, see What Is Amazon Aurora? (http://docs.aws.amazon.com/AmazonRDS/latest/AuroraUserGuide/CHAP_AuroraOverview.html) +// in the Amazon Aurora User Guide. // // Returns awserr.Error for service API and SDK errors. Use runtime type assertions // with awserr.Error's Code and Message methods to get detailed information about @@ -3539,8 +3548,8 @@ func (c *RDS) DescribeDBClusterParametersRequest(input *DescribeDBClusterParamet // Returns the detailed parameter list for a particular DB cluster parameter // group. // -// For more information on Amazon Aurora, see Aurora on Amazon RDS (http://docs.aws.amazon.com/AmazonRDS/latest/UserGuide/CHAP_Aurora.html) -// in the Amazon RDS User Guide. +// For more information on Amazon Aurora, see What Is Amazon Aurora? (http://docs.aws.amazon.com/AmazonRDS/latest/AuroraUserGuide/CHAP_AuroraOverview.html) +// in the Amazon Aurora User Guide. // // Returns awserr.Error for service API and SDK errors. Use runtime type assertions // with awserr.Error's Code and Message methods to get detailed information about @@ -3712,8 +3721,8 @@ func (c *RDS) DescribeDBClusterSnapshotsRequest(input *DescribeDBClusterSnapshot // Returns information about DB cluster snapshots. This API action supports // pagination. // -// For more information on Amazon Aurora, see Aurora on Amazon RDS (http://docs.aws.amazon.com/AmazonRDS/latest/UserGuide/CHAP_Aurora.html) -// in the Amazon RDS User Guide. +// For more information on Amazon Aurora, see What Is Amazon Aurora? (http://docs.aws.amazon.com/AmazonRDS/latest/AuroraUserGuide/CHAP_AuroraOverview.html) +// in the Amazon Aurora User Guide. // // Returns awserr.Error for service API and SDK errors. Use runtime type assertions // with awserr.Error's Code and Message methods to get detailed information about @@ -3779,6 +3788,12 @@ func (c *RDS) DescribeDBClustersRequest(input *DescribeDBClustersInput) (req *re Name: opDescribeDBClusters, HTTPMethod: "POST", HTTPPath: "/", + Paginator: &request.Paginator{ + InputTokens: []string{"Marker"}, + OutputTokens: []string{"Marker"}, + LimitToken: "MaxRecords", + TruncationToken: "", + }, } if input == nil { @@ -3795,8 +3810,8 @@ func (c *RDS) DescribeDBClustersRequest(input *DescribeDBClustersInput) (req *re // Returns information about provisioned Aurora DB clusters. This API supports // pagination. // -// For more information on Amazon Aurora, see Aurora on Amazon RDS (http://docs.aws.amazon.com/AmazonRDS/latest/UserGuide/CHAP_Aurora.html) -// in the Amazon RDS User Guide. +// For more information on Amazon Aurora, see What Is Amazon Aurora? (http://docs.aws.amazon.com/AmazonRDS/latest/AuroraUserGuide/CHAP_AuroraOverview.html) +// in the Amazon Aurora User Guide. // // Returns awserr.Error for service API and SDK errors. Use runtime type assertions // with awserr.Error's Code and Message methods to get detailed information about @@ -3831,6 +3846,56 @@ func (c *RDS) DescribeDBClustersWithContext(ctx aws.Context, input *DescribeDBCl return out, req.Send() } +// DescribeDBClustersPages iterates over the pages of a DescribeDBClusters operation, +// calling the "fn" function with the response data for each page. To stop +// iterating, return false from the fn function. +// +// See DescribeDBClusters method for more information on how to use this operation. +// +// Note: This operation can generate multiple requests to a service. +// +// // Example iterating over at most 3 pages of a DescribeDBClusters operation. +// pageNum := 0 +// err := client.DescribeDBClustersPages(params, +// func(page *DescribeDBClustersOutput, lastPage bool) bool { +// pageNum++ +// fmt.Println(page) +// return pageNum <= 3 +// }) +// +func (c *RDS) DescribeDBClustersPages(input *DescribeDBClustersInput, fn func(*DescribeDBClustersOutput, bool) bool) error { + return c.DescribeDBClustersPagesWithContext(aws.BackgroundContext(), input, fn) +} + +// DescribeDBClustersPagesWithContext same as DescribeDBClustersPages except +// it takes a Context and allows setting request options on the pages. +// +// The context must be non-nil and will be used for request cancellation. If +// the context is nil a panic will occur. In the future the SDK may create +// sub-contexts for http.Requests. See https://golang.org/pkg/context/ +// for more information on using Contexts. +func (c *RDS) DescribeDBClustersPagesWithContext(ctx aws.Context, input *DescribeDBClustersInput, fn func(*DescribeDBClustersOutput, bool) bool, opts ...request.Option) error { + p := request.Pagination{ + NewRequest: func() (*request.Request, error) { + var inCpy *DescribeDBClustersInput + if input != nil { + tmp := *input + inCpy = &tmp + } + req, _ := c.DescribeDBClustersRequest(inCpy) + req.SetContext(ctx) + req.ApplyOptions(opts...) + return req, nil + }, + } + + cont := true + for p.Next() && cont { + cont = fn(p.Page().(*DescribeDBClustersOutput), !p.HasNextPage()) + } + return p.Err() +} + const opDescribeDBEngineVersions = "DescribeDBEngineVersions" // DescribeDBEngineVersionsRequest generates a "aws/request.Request" representing the @@ -5050,8 +5115,8 @@ func (c *RDS) DescribeEngineDefaultClusterParametersRequest(input *DescribeEngin // Returns the default engine and system parameter information for the cluster // database engine. // -// For more information on Amazon Aurora, see Aurora on Amazon RDS (http://docs.aws.amazon.com/AmazonRDS/latest/UserGuide/CHAP_Aurora.html) -// in the Amazon RDS User Guide. +// For more information on Amazon Aurora, see What Is Amazon Aurora? (http://docs.aws.amazon.com/AmazonRDS/latest/AuroraUserGuide/CHAP_AuroraOverview.html) +// in the Amazon Aurora User Guide. // // Returns awserr.Error for service API and SDK errors. Use runtime type assertions // with awserr.Error's Code and Message methods to get detailed information about @@ -6444,7 +6509,7 @@ func (c *RDS) DescribeValidDBInstanceModificationsRequest(input *DescribeValidDB // DBInstanceIdentifier doesn't refer to an existing DB instance. // // * ErrCodeInvalidDBInstanceStateFault "InvalidDBInstanceState" -// The specified DB instance isn't in the available state. +// The DB instance isn't in a valid state. // // See also, https://docs.aws.amazon.com/goto/WebAPI/rds-2014-10-31/DescribeValidDBInstanceModifications func (c *RDS) DescribeValidDBInstanceModifications(input *DescribeValidDBInstanceModificationsInput) (*DescribeValidDBInstanceModificationsOutput, error) { @@ -6662,8 +6727,8 @@ func (c *RDS) FailoverDBClusterRequest(input *FailoverDBClusterInput) (req *requ // re-establish any existing connections that use those endpoint addresses when // the failover is complete. // -// For more information on Amazon Aurora, see Aurora on Amazon RDS (http://docs.aws.amazon.com/AmazonRDS/latest/UserGuide/CHAP_Aurora.html) -// in the Amazon RDS User Guide. +// For more information on Amazon Aurora, see What Is Amazon Aurora? (http://docs.aws.amazon.com/AmazonRDS/latest/AuroraUserGuide/CHAP_AuroraOverview.html) +// in the Amazon Aurora User Guide. // // Returns awserr.Error for service API and SDK errors. Use runtime type assertions // with awserr.Error's Code and Message methods to get detailed information about @@ -6680,7 +6745,7 @@ func (c *RDS) FailoverDBClusterRequest(input *FailoverDBClusterInput) (req *requ // The DB cluster isn't in a valid state. // // * ErrCodeInvalidDBInstanceStateFault "InvalidDBInstanceState" -// The specified DB instance isn't in the available state. +// The DB instance isn't in a valid state. // // See also, https://docs.aws.amazon.com/goto/WebAPI/rds-2014-10-31/FailoverDBCluster func (c *RDS) FailoverDBCluster(input *FailoverDBClusterInput) (*FailoverDBClusterOutput, error) { @@ -6751,7 +6816,8 @@ func (c *RDS) ListTagsForResourceRequest(input *ListTagsForResourceInput) (req * // Lists all tags on an Amazon RDS resource. // // For an overview on tagging an Amazon RDS resource, see Tagging Amazon RDS -// Resources (http://docs.aws.amazon.com/AmazonRDS/latest/UserGuide/Overview.Tagging.html). +// Resources (http://docs.aws.amazon.com/AmazonRDS/latest/UserGuide/Overview.Tagging.html) +// in the Amazon RDS User Guide. // // Returns awserr.Error for service API and SDK errors. Use runtime type assertions // with awserr.Error's Code and Message methods to get detailed information about @@ -6792,6 +6858,111 @@ func (c *RDS) ListTagsForResourceWithContext(ctx aws.Context, input *ListTagsFor return out, req.Send() } +const opModifyCurrentDBClusterCapacity = "ModifyCurrentDBClusterCapacity" + +// ModifyCurrentDBClusterCapacityRequest generates a "aws/request.Request" representing the +// client's request for the ModifyCurrentDBClusterCapacity operation. The "output" return +// value will be populated with the request's response once the request completes +// successfuly. +// +// Use "Send" method on the returned Request to send the API call to the service. +// the "output" return value is not valid until after Send returns without error. +// +// See ModifyCurrentDBClusterCapacity for more information on using the ModifyCurrentDBClusterCapacity +// API call, and error handling. +// +// This method is useful when you want to inject custom logic or configuration +// into the SDK's request lifecycle. Such as custom headers, or retry logic. +// +// +// // Example sending a request using the ModifyCurrentDBClusterCapacityRequest method. +// req, resp := client.ModifyCurrentDBClusterCapacityRequest(params) +// +// err := req.Send() +// if err == nil { // resp is now filled +// fmt.Println(resp) +// } +// +// See also, https://docs.aws.amazon.com/goto/WebAPI/rds-2014-10-31/ModifyCurrentDBClusterCapacity +func (c *RDS) ModifyCurrentDBClusterCapacityRequest(input *ModifyCurrentDBClusterCapacityInput) (req *request.Request, output *ModifyCurrentDBClusterCapacityOutput) { + op := &request.Operation{ + Name: opModifyCurrentDBClusterCapacity, + HTTPMethod: "POST", + HTTPPath: "/", + } + + if input == nil { + input = &ModifyCurrentDBClusterCapacityInput{} + } + + output = &ModifyCurrentDBClusterCapacityOutput{} + req = c.newRequest(op, input, output) + return +} + +// ModifyCurrentDBClusterCapacity API operation for Amazon Relational Database Service. +// +// Set the capacity of an Aurora Serverless DB cluster to a specific value. +// +// Aurora Serverless scales seamlessly based on the workload on the DB cluster. +// In some cases, the capacity might not scale fast enough to meet a sudden +// change in workload, such as a large number of new transactions. Call ModifyCurrentDBClusterCapacity +// to set the capacity explicitly. +// +// After this call sets the DB cluster capacity, Aurora Serverless can automatically +// scale the DB cluster based on the cooldown period for scaling up and the +// cooldown period for scaling down. +// +// For more information about Aurora Serverless, see Using Amazon Aurora Serverless +// (http://docs.aws.amazon.com/AmazonRDS/latest/AuroraUserGuide/aurora-serverless.html) +// in the Amazon Aurora User Guide. +// +// If you call ModifyCurrentDBClusterCapacity with the default TimeoutAction, +// connections that prevent Aurora Serverless from finding a scaling point might +// be dropped. For more information about scaling points, see Autoscaling for +// Aurora Serverless (http://docs.aws.amazon.com/AmazonRDS/latest/AuroraUserGuide/aurora-serverless.how-it-works.html#aurora-serverless.how-it-works.auto-scaling) +// in the Amazon Aurora User Guide. +// +// Returns awserr.Error for service API and SDK errors. Use runtime type assertions +// with awserr.Error's Code and Message methods to get detailed information about +// the error. +// +// See the AWS API reference guide for Amazon Relational Database Service's +// API operation ModifyCurrentDBClusterCapacity for usage and error information. +// +// Returned Error Codes: +// * ErrCodeDBClusterNotFoundFault "DBClusterNotFoundFault" +// DBClusterIdentifier doesn't refer to an existing DB cluster. +// +// * ErrCodeInvalidDBClusterStateFault "InvalidDBClusterStateFault" +// The DB cluster isn't in a valid state. +// +// * ErrCodeInvalidDBClusterCapacityFault "InvalidDBClusterCapacityFault" +// Capacity isn't a valid Aurora Serverless DB cluster capacity. Valid capacity +// values are 2, 4, 8, 16, 32, 64, 128, and 256. +// +// See also, https://docs.aws.amazon.com/goto/WebAPI/rds-2014-10-31/ModifyCurrentDBClusterCapacity +func (c *RDS) ModifyCurrentDBClusterCapacity(input *ModifyCurrentDBClusterCapacityInput) (*ModifyCurrentDBClusterCapacityOutput, error) { + req, out := c.ModifyCurrentDBClusterCapacityRequest(input) + return out, req.Send() +} + +// ModifyCurrentDBClusterCapacityWithContext is the same as ModifyCurrentDBClusterCapacity with the addition of +// the ability to pass a context and additional request options. +// +// See ModifyCurrentDBClusterCapacity for details on how to use this API operation. +// +// The context must be non-nil and will be used for request cancellation. If +// the context is nil a panic will occur. In the future the SDK may create +// sub-contexts for http.Requests. See https://golang.org/pkg/context/ +// for more information on using Contexts. +func (c *RDS) ModifyCurrentDBClusterCapacityWithContext(ctx aws.Context, input *ModifyCurrentDBClusterCapacityInput, opts ...request.Option) (*ModifyCurrentDBClusterCapacityOutput, error) { + req, out := c.ModifyCurrentDBClusterCapacityRequest(input) + req.SetContext(ctx) + req.ApplyOptions(opts...) + return out, req.Send() +} + const opModifyDBCluster = "ModifyDBCluster" // ModifyDBClusterRequest generates a "aws/request.Request" representing the @@ -6838,9 +7009,9 @@ func (c *RDS) ModifyDBClusterRequest(input *ModifyDBClusterInput) (req *request. // // Modify a setting for an Amazon Aurora DB cluster. You can change one or more // database configuration parameters by specifying these parameters and the -// new values in the request. For more information on Amazon Aurora, see Aurora -// on Amazon RDS (http://docs.aws.amazon.com/AmazonRDS/latest/UserGuide/CHAP_Aurora.html) -// in the Amazon RDS User Guide. +// new values in the request. For more information on Amazon Aurora, see What +// Is Amazon Aurora? (http://docs.aws.amazon.com/AmazonRDS/latest/AuroraUserGuide/CHAP_AuroraOverview.html) +// in the Amazon Aurora User Guide. // // Returns awserr.Error for service API and SDK errors. Use runtime type assertions // with awserr.Error's Code and Message methods to get detailed information about @@ -6882,7 +7053,7 @@ func (c *RDS) ModifyDBClusterRequest(input *ModifyDBClusterInput) (req *request. // The state of the DB security group doesn't allow deletion. // // * ErrCodeInvalidDBInstanceStateFault "InvalidDBInstanceState" -// The specified DB instance isn't in the available state. +// The DB instance isn't in a valid state. // // * ErrCodeDBClusterAlreadyExistsFault "DBClusterAlreadyExistsFault" // The user already has a DB cluster with the given identifier. @@ -6957,8 +7128,8 @@ func (c *RDS) ModifyDBClusterParameterGroupRequest(input *ModifyDBClusterParamet // one parameter, submit a list of the following: ParameterName, ParameterValue, // and ApplyMethod. A maximum of 20 parameters can be modified in a single request. // -// For more information on Amazon Aurora, see Aurora on Amazon RDS (http://docs.aws.amazon.com/AmazonRDS/latest/UserGuide/CHAP_Aurora.html) -// in the Amazon RDS User Guide. +// For more information on Amazon Aurora, see What Is Amazon Aurora? (http://docs.aws.amazon.com/AmazonRDS/latest/AuroraUserGuide/CHAP_AuroraOverview.html) +// in the Amazon Aurora User Guide. // // Changes to dynamic parameters are applied immediately. Changes to static // parameters require a reboot without failover to the DB cluster associated @@ -7173,7 +7344,7 @@ func (c *RDS) ModifyDBInstanceRequest(input *ModifyDBInstanceInput) (req *reques // // Returned Error Codes: // * ErrCodeInvalidDBInstanceStateFault "InvalidDBInstanceState" -// The specified DB instance isn't in the available state. +// The DB instance isn't in a valid state. // // * ErrCodeInvalidDBSecurityGroupStateFault "InvalidDBSecurityGroupState" // The state of the DB security group doesn't allow deletion. @@ -7227,6 +7398,8 @@ func (c *RDS) ModifyDBInstanceRequest(input *ModifyDBInstanceInput) (req *reques // * ErrCodeDomainNotFoundFault "DomainNotFoundFault" // Domain doesn't refer to an existing Active Directory domain. // +// * ErrCodeBackupPolicyNotFoundFault "BackupPolicyNotFoundFault" +// // See also, https://docs.aws.amazon.com/goto/WebAPI/rds-2014-10-31/ModifyDBInstance func (c *RDS) ModifyDBInstance(input *ModifyDBInstanceInput) (*ModifyDBInstanceOutput, error) { req, out := c.ModifyDBInstanceRequest(input) @@ -7878,7 +8051,7 @@ func (c *RDS) PromoteReadReplicaRequest(input *PromoteReadReplicaInput) (req *re // // Returned Error Codes: // * ErrCodeInvalidDBInstanceStateFault "InvalidDBInstanceState" -// The specified DB instance isn't in the available state. +// The DB instance isn't in a valid state. // // * ErrCodeDBInstanceNotFoundFault "DBInstanceNotFound" // DBInstanceIdentifier doesn't refer to an existing DB instance. @@ -8125,7 +8298,8 @@ func (c *RDS) RebootDBInstanceRequest(input *RebootDBInstanceInput) (req *reques // DB instance results in a momentary outage, during which the DB instance status // is set to rebooting. // -// For more information about rebooting, see Rebooting a DB Instance (http://docs.aws.amazon.com/AmazonRDS/latest/UserGuide/USER_RebootInstance.html). +// For more information about rebooting, see Rebooting a DB Instance (http://docs.aws.amazon.com/AmazonRDS/latest/UserGuide/USER_RebootInstance.html) +// in the Amazon RDS User Guide. // // Returns awserr.Error for service API and SDK errors. Use runtime type assertions // with awserr.Error's Code and Message methods to get detailed information about @@ -8136,7 +8310,7 @@ func (c *RDS) RebootDBInstanceRequest(input *RebootDBInstanceInput) (req *reques // // Returned Error Codes: // * ErrCodeInvalidDBInstanceStateFault "InvalidDBInstanceState" -// The specified DB instance isn't in the available state. +// The DB instance isn't in a valid state. // // * ErrCodeDBInstanceNotFoundFault "DBInstanceNotFound" // DBInstanceIdentifier doesn't refer to an existing DB instance. @@ -8210,8 +8384,9 @@ func (c *RDS) RemoveRoleFromDBClusterRequest(input *RemoveRoleFromDBClusterInput // RemoveRoleFromDBCluster API operation for Amazon Relational Database Service. // // Disassociates an Identity and Access Management (IAM) role from an Aurora -// DB cluster. For more information, see Authorizing Amazon Aurora to Access -// Other AWS Services On Your Behalf (http://docs.aws.amazon.com/AmazonRDS/latest/UserGuide/Aurora.Authorizing.AWSServices.html). +// DB cluster. For more information, see Authorizing Amazon Aurora MySQL to +// Access Other AWS Services on Your Behalf (http://docs.aws.amazon.com/AmazonRDS/latest/AuroraUserGuide/AuroraMySQL.Integrating.Authorizing.html) +// in the Amazon Aurora User Guide. // // Returns awserr.Error for service API and SDK errors. Use runtime type assertions // with awserr.Error's Code and Message methods to get detailed information about @@ -8384,7 +8559,8 @@ func (c *RDS) RemoveTagsFromResourceRequest(input *RemoveTagsFromResourceInput) // Removes metadata tags from an Amazon RDS resource. // // For an overview on tagging an Amazon RDS resource, see Tagging Amazon RDS -// Resources (http://docs.aws.amazon.com/AmazonRDS/latest/UserGuide/Overview.Tagging.html). +// Resources (http://docs.aws.amazon.com/AmazonRDS/latest/UserGuide/Overview.Tagging.html) +// in the Amazon RDS User Guide. // // Returns awserr.Error for service API and SDK errors. Use runtime type assertions // with awserr.Error's Code and Message methods to get detailed information about @@ -8480,8 +8656,8 @@ func (c *RDS) ResetDBClusterParameterGroupRequest(input *ResetDBClusterParameter // for every DB instance in your DB cluster that you want the updated static // parameter to apply to. // -// For more information on Amazon Aurora, see Aurora on Amazon RDS (http://docs.aws.amazon.com/AmazonRDS/latest/UserGuide/CHAP_Aurora.html) -// in the Amazon RDS User Guide. +// For more information on Amazon Aurora, see What Is Amazon Aurora? (http://docs.aws.amazon.com/AmazonRDS/latest/AuroraUserGuide/CHAP_AuroraOverview.html) +// in the Amazon Aurora User Guide. // // Returns awserr.Error for service API and SDK errors. Use runtime type assertions // with awserr.Error's Code and Message methods to get detailed information about @@ -8657,8 +8833,9 @@ func (c *RDS) RestoreDBClusterFromS3Request(input *RestoreDBClusterFromS3Input) // // Creates an Amazon Aurora DB cluster from data stored in an Amazon S3 bucket. // Amazon RDS must be authorized to access the Amazon S3 bucket and the data -// must be created using the Percona XtraBackup utility as described in Migrating -// Data from MySQL by Using an Amazon S3 Bucket (http://docs.aws.amazon.com/AmazonRDS/latest/UserGuide/Aurora.Migrate.MySQL.html#Aurora.Migrate.MySQL.S3). +// must be created using the Percona XtraBackup utility as described in Migrating +// Data to an Amazon Aurora MySQL DB Cluster (http://docs.aws.amazon.com/AmazonRDS/latest/AuroraUserGuide/AuroraMySQL.Migrating.html) +// in the Amazon Aurora User Guide. // // Returns awserr.Error for service API and SDK errors. Use runtime type assertions // with awserr.Error's Code and Message methods to get detailed information about @@ -8792,8 +8969,8 @@ func (c *RDS) RestoreDBClusterFromSnapshotRequest(input *RestoreDBClusterFromSna // source DB cluster, except that the new DB cluster is created with the default // security group. // -// For more information on Amazon Aurora, see Aurora on Amazon RDS (http://docs.aws.amazon.com/AmazonRDS/latest/UserGuide/CHAP_Aurora.html) -// in the Amazon RDS User Guide. +// For more information on Amazon Aurora, see What Is Amazon Aurora? (http://docs.aws.amazon.com/AmazonRDS/latest/AuroraUserGuide/CHAP_AuroraOverview.html) +// in the Amazon Aurora User Guide. // // Returns awserr.Error for service API and SDK errors. Use runtime type assertions // with awserr.Error's Code and Message methods to get detailed information about @@ -8944,8 +9121,8 @@ func (c *RDS) RestoreDBClusterToPointInTimeRequest(input *RestoreDBClusterToPoin // RestoreDBClusterToPointInTime action has completed and the DB cluster is // available. // -// For more information on Amazon Aurora, see Aurora on Amazon RDS (http://docs.aws.amazon.com/AmazonRDS/latest/UserGuide/CHAP_Aurora.html) -// in the Amazon RDS User Guide. +// For more information on Amazon Aurora, see What Is Amazon Aurora? (http://docs.aws.amazon.com/AmazonRDS/latest/AuroraUserGuide/CHAP_AuroraOverview.html) +// in the Amazon Aurora User Guide. // // Returns awserr.Error for service API and SDK errors. Use runtime type assertions // with awserr.Error's Code and Message methods to get detailed information about @@ -9176,6 +9353,8 @@ func (c *RDS) RestoreDBInstanceFromDBSnapshotRequest(input *RestoreDBInstanceFro // * ErrCodeDBParameterGroupNotFoundFault "DBParameterGroupNotFound" // DBParameterGroupName doesn't refer to an existing DB parameter group. // +// * ErrCodeBackupPolicyNotFoundFault "BackupPolicyNotFoundFault" +// // See also, https://docs.aws.amazon.com/goto/WebAPI/rds-2014-10-31/RestoreDBInstanceFromDBSnapshot func (c *RDS) RestoreDBInstanceFromDBSnapshot(input *RestoreDBInstanceFromDBSnapshotInput) (*RestoreDBInstanceFromDBSnapshotOutput, error) { req, out := c.RestoreDBInstanceFromDBSnapshotRequest(input) @@ -9247,7 +9426,8 @@ func (c *RDS) RestoreDBInstanceFromS3Request(input *RestoreDBInstanceFromS3Input // database, store it on Amazon Simple Storage Service (Amazon S3), and then // restore the backup file onto a new Amazon RDS DB instance running MySQL. // For more information, see Importing Data into an Amazon RDS MySQL DB Instance -// (http://docs.aws.amazon.com/AmazonRDS/latest/UserGuide/MySQL.Procedural.Importing.html). +// (http://docs.aws.amazon.com/AmazonRDS/latest/UserGuide/MySQL.Procedural.Importing.html) +// in the Amazon RDS User Guide. // // Returns awserr.Error for service API and SDK errors. Use runtime type assertions // with awserr.Error's Code and Message methods to get detailed information about @@ -9316,6 +9496,8 @@ func (c *RDS) RestoreDBInstanceFromS3Request(input *RestoreDBInstanceFromS3Input // * ErrCodeKMSKeyNotAccessibleFault "KMSKeyNotAccessibleFault" // An error occurred accessing an AWS KMS key. // +// * ErrCodeBackupPolicyNotFoundFault "BackupPolicyNotFoundFault" +// // See also, https://docs.aws.amazon.com/goto/WebAPI/rds-2014-10-31/RestoreDBInstanceFromS3 func (c *RDS) RestoreDBInstanceFromS3(input *RestoreDBInstanceFromS3Input) (*RestoreDBInstanceFromS3Output, error) { req, out := c.RestoreDBInstanceFromS3Request(input) @@ -9420,7 +9602,7 @@ func (c *RDS) RestoreDBInstanceToPointInTimeRequest(input *RestoreDBInstanceToPo // Zone. // // * ErrCodeInvalidDBInstanceStateFault "InvalidDBInstanceState" -// The specified DB instance isn't in the available state. +// The DB instance isn't in a valid state. // // * ErrCodePointInTimeRestoreNotEnabledFault "PointInTimeRestoreNotEnabled" // SourceDBInstanceIdentifier refers to a DB instance with BackupRetentionPeriod @@ -9476,6 +9658,8 @@ func (c *RDS) RestoreDBInstanceToPointInTimeRequest(input *RestoreDBInstanceToPo // * ErrCodeDBParameterGroupNotFoundFault "DBParameterGroupNotFound" // DBParameterGroupName doesn't refer to an existing DB parameter group. // +// * ErrCodeBackupPolicyNotFoundFault "BackupPolicyNotFoundFault" +// // See also, https://docs.aws.amazon.com/goto/WebAPI/rds-2014-10-31/RestoreDBInstanceToPointInTime func (c *RDS) RestoreDBInstanceToPointInTime(input *RestoreDBInstanceToPointInTimeInput) (*RestoreDBInstanceToPointInTimeOutput, error) { req, out := c.RestoreDBInstanceToPointInTimeRequest(input) @@ -9590,6 +9774,95 @@ func (c *RDS) RevokeDBSecurityGroupIngressWithContext(ctx aws.Context, input *Re return out, req.Send() } +const opStartDBCluster = "StartDBCluster" + +// StartDBClusterRequest generates a "aws/request.Request" representing the +// client's request for the StartDBCluster operation. The "output" return +// value will be populated with the request's response once the request completes +// successfuly. +// +// Use "Send" method on the returned Request to send the API call to the service. +// the "output" return value is not valid until after Send returns without error. +// +// See StartDBCluster for more information on using the StartDBCluster +// API call, and error handling. +// +// This method is useful when you want to inject custom logic or configuration +// into the SDK's request lifecycle. Such as custom headers, or retry logic. +// +// +// // Example sending a request using the StartDBClusterRequest method. +// req, resp := client.StartDBClusterRequest(params) +// +// err := req.Send() +// if err == nil { // resp is now filled +// fmt.Println(resp) +// } +// +// See also, https://docs.aws.amazon.com/goto/WebAPI/rds-2014-10-31/StartDBCluster +func (c *RDS) StartDBClusterRequest(input *StartDBClusterInput) (req *request.Request, output *StartDBClusterOutput) { + op := &request.Operation{ + Name: opStartDBCluster, + HTTPMethod: "POST", + HTTPPath: "/", + } + + if input == nil { + input = &StartDBClusterInput{} + } + + output = &StartDBClusterOutput{} + req = c.newRequest(op, input, output) + return +} + +// StartDBCluster API operation for Amazon Relational Database Service. +// +// Starts an Amazon Aurora DB cluster that was stopped using the AWS console, +// the stop-db-cluster AWS CLI command, or the StopDBCluster action. +// +// For more information, see Stopping and Starting an Aurora Cluster (http://docs.aws.amazon.com/AmazonRDS/latest/AuroraUserGuide/aurora-cluster-stop-start.html) +// in the Amazon Aurora User Guide. +// +// Returns awserr.Error for service API and SDK errors. Use runtime type assertions +// with awserr.Error's Code and Message methods to get detailed information about +// the error. +// +// See the AWS API reference guide for Amazon Relational Database Service's +// API operation StartDBCluster for usage and error information. +// +// Returned Error Codes: +// * ErrCodeDBClusterNotFoundFault "DBClusterNotFoundFault" +// DBClusterIdentifier doesn't refer to an existing DB cluster. +// +// * ErrCodeInvalidDBClusterStateFault "InvalidDBClusterStateFault" +// The DB cluster isn't in a valid state. +// +// * ErrCodeInvalidDBInstanceStateFault "InvalidDBInstanceState" +// The DB instance isn't in a valid state. +// +// See also, https://docs.aws.amazon.com/goto/WebAPI/rds-2014-10-31/StartDBCluster +func (c *RDS) StartDBCluster(input *StartDBClusterInput) (*StartDBClusterOutput, error) { + req, out := c.StartDBClusterRequest(input) + return out, req.Send() +} + +// StartDBClusterWithContext is the same as StartDBCluster with the addition of +// the ability to pass a context and additional request options. +// +// See StartDBCluster for details on how to use this API operation. +// +// The context must be non-nil and will be used for request cancellation. If +// the context is nil a panic will occur. In the future the SDK may create +// sub-contexts for http.Requests. See https://golang.org/pkg/context/ +// for more information on using Contexts. +func (c *RDS) StartDBClusterWithContext(ctx aws.Context, input *StartDBClusterInput, opts ...request.Option) (*StartDBClusterOutput, error) { + req, out := c.StartDBClusterRequest(input) + req.SetContext(ctx) + req.ApplyOptions(opts...) + return out, req.Send() +} + const opStartDBInstance = "StartDBInstance" // StartDBInstanceRequest generates a "aws/request.Request" representing the @@ -9634,11 +9907,15 @@ func (c *RDS) StartDBInstanceRequest(input *StartDBInstanceInput) (req *request. // StartDBInstance API operation for Amazon Relational Database Service. // -// Starts a DB instance that was stopped using the AWS console, the stop-db-instance -// AWS CLI command, or the StopDBInstance action. For more information, see -// Stopping and Starting a DB instance in the AWS RDS user guide. +// Starts an Amazon RDS DB instance that was stopped using the AWS console, +// the stop-db-instance AWS CLI command, or the StopDBInstance action. // -// This command doesn't apply to Aurora MySQL and Aurora PostgreSQL. +// For more information, see Starting an Amazon RDS DB Instance That Was Previously +// Stopped (http://docs.aws.amazon.com/AmazonRDS/latest/UserGuide/USER_StartInstance.html) +// in the Amazon RDS User Guide. +// +// This command doesn't apply to Aurora MySQL and Aurora PostgreSQL. For Aurora +// DB clusters, use StartDBCluster instead. // // Returns awserr.Error for service API and SDK errors. Use runtime type assertions // with awserr.Error's Code and Message methods to get detailed information about @@ -9652,7 +9929,7 @@ func (c *RDS) StartDBInstanceRequest(input *StartDBInstanceInput) (req *request. // DBInstanceIdentifier doesn't refer to an existing DB instance. // // * ErrCodeInvalidDBInstanceStateFault "InvalidDBInstanceState" -// The specified DB instance isn't in the available state. +// The DB instance isn't in a valid state. // // * ErrCodeInsufficientDBInstanceCapacityFault "InsufficientDBInstanceCapacity" // The specified DB instance class isn't available in the specified Availability @@ -9711,6 +9988,97 @@ func (c *RDS) StartDBInstanceWithContext(ctx aws.Context, input *StartDBInstance return out, req.Send() } +const opStopDBCluster = "StopDBCluster" + +// StopDBClusterRequest generates a "aws/request.Request" representing the +// client's request for the StopDBCluster operation. The "output" return +// value will be populated with the request's response once the request completes +// successfuly. +// +// Use "Send" method on the returned Request to send the API call to the service. +// the "output" return value is not valid until after Send returns without error. +// +// See StopDBCluster for more information on using the StopDBCluster +// API call, and error handling. +// +// This method is useful when you want to inject custom logic or configuration +// into the SDK's request lifecycle. Such as custom headers, or retry logic. +// +// +// // Example sending a request using the StopDBClusterRequest method. +// req, resp := client.StopDBClusterRequest(params) +// +// err := req.Send() +// if err == nil { // resp is now filled +// fmt.Println(resp) +// } +// +// See also, https://docs.aws.amazon.com/goto/WebAPI/rds-2014-10-31/StopDBCluster +func (c *RDS) StopDBClusterRequest(input *StopDBClusterInput) (req *request.Request, output *StopDBClusterOutput) { + op := &request.Operation{ + Name: opStopDBCluster, + HTTPMethod: "POST", + HTTPPath: "/", + } + + if input == nil { + input = &StopDBClusterInput{} + } + + output = &StopDBClusterOutput{} + req = c.newRequest(op, input, output) + return +} + +// StopDBCluster API operation for Amazon Relational Database Service. +// +// Stops an Amazon Aurora DB cluster. When you stop a DB cluster, Aurora retains +// the DB cluster's metadata, including its endpoints and DB parameter groups. +// Aurora also retains the transaction logs so you can do a point-in-time restore +// if necessary. +// +// For more information, see Stopping and Starting an Aurora Cluster (http://docs.aws.amazon.com/AmazonRDS/latest/AuroraUserGuide/aurora-cluster-stop-start.html) +// in the Amazon Aurora User Guide. +// +// Returns awserr.Error for service API and SDK errors. Use runtime type assertions +// with awserr.Error's Code and Message methods to get detailed information about +// the error. +// +// See the AWS API reference guide for Amazon Relational Database Service's +// API operation StopDBCluster for usage and error information. +// +// Returned Error Codes: +// * ErrCodeDBClusterNotFoundFault "DBClusterNotFoundFault" +// DBClusterIdentifier doesn't refer to an existing DB cluster. +// +// * ErrCodeInvalidDBClusterStateFault "InvalidDBClusterStateFault" +// The DB cluster isn't in a valid state. +// +// * ErrCodeInvalidDBInstanceStateFault "InvalidDBInstanceState" +// The DB instance isn't in a valid state. +// +// See also, https://docs.aws.amazon.com/goto/WebAPI/rds-2014-10-31/StopDBCluster +func (c *RDS) StopDBCluster(input *StopDBClusterInput) (*StopDBClusterOutput, error) { + req, out := c.StopDBClusterRequest(input) + return out, req.Send() +} + +// StopDBClusterWithContext is the same as StopDBCluster with the addition of +// the ability to pass a context and additional request options. +// +// See StopDBCluster for details on how to use this API operation. +// +// The context must be non-nil and will be used for request cancellation. If +// the context is nil a panic will occur. In the future the SDK may create +// sub-contexts for http.Requests. See https://golang.org/pkg/context/ +// for more information on using Contexts. +func (c *RDS) StopDBClusterWithContext(ctx aws.Context, input *StopDBClusterInput, opts ...request.Option) (*StopDBClusterOutput, error) { + req, out := c.StopDBClusterRequest(input) + req.SetContext(ctx) + req.ApplyOptions(opts...) + return out, req.Send() +} + const opStopDBInstance = "StopDBInstance" // StopDBInstanceRequest generates a "aws/request.Request" representing the @@ -9755,13 +10123,17 @@ func (c *RDS) StopDBInstanceRequest(input *StopDBInstanceInput) (req *request.Re // StopDBInstance API operation for Amazon Relational Database Service. // -// Stops a DB instance. When you stop a DB instance, Amazon RDS retains the -// DB instance's metadata, including its endpoint, DB parameter group, and option -// group membership. Amazon RDS also retains the transaction logs so you can -// do a point-in-time restore if necessary. For more information, see Stopping -// and Starting a DB instance in the AWS RDS user guide. +// Stops an Amazon RDS DB instance. When you stop a DB instance, Amazon RDS +// retains the DB instance's metadata, including its endpoint, DB parameter +// group, and option group membership. Amazon RDS also retains the transaction +// logs so you can do a point-in-time restore if necessary. // -// This command doesn't apply to Aurora MySQL and Aurora PostgreSQL. +// For more information, see Stopping an Amazon RDS DB Instance Temporarily +// (http://docs.aws.amazon.com/AmazonRDS/latest/UserGuide/USER_StopInstance.html) +// in the Amazon RDS User Guide. +// +// This command doesn't apply to Aurora MySQL and Aurora PostgreSQL. For Aurora +// clusters, use StopDBCluster instead. // // Returns awserr.Error for service API and SDK errors. Use runtime type assertions // with awserr.Error's Code and Message methods to get detailed information about @@ -9775,7 +10147,7 @@ func (c *RDS) StopDBInstanceRequest(input *StopDBInstanceInput) (req *request.Re // DBInstanceIdentifier doesn't refer to an existing DB instance. // // * ErrCodeInvalidDBInstanceStateFault "InvalidDBInstanceState" -// The specified DB instance isn't in the available state. +// The DB instance isn't in a valid state. // // * ErrCodeDBSnapshotAlreadyExistsFault "DBSnapshotAlreadyExists" // DBSnapshotIdentifier is already used by an existing snapshot. @@ -10647,6 +11019,12 @@ func (s *CharacterSet) SetCharacterSetName(v string) *CharacterSet { // The configuration setting for the log types to be enabled for export to CloudWatch // Logs for a specific DB instance or DB cluster. +// +// The EnableLogTypes and DisableLogTypes arrays determine which logs will be +// exported (or not exported) to CloudWatch Logs. The values within these arrays +// depend on the DB engine being used. For more information, see Publishing +// Database Logs to Amazon CloudWatch Logs (http://docs.aws.amazon.com/AmazonRDS/latest/UserGuide/USER_LogAccess.html#USER_LogAccess.Procedural.UploadtoCloudWatch) +// in the Amazon RDS User Guide. type CloudwatchLogsExportConfiguration struct { _ struct{} `type:"structure"` @@ -10683,8 +11061,9 @@ type CopyDBClusterParameterGroupInput struct { _ struct{} `type:"structure"` // The identifier or Amazon Resource Name (ARN) for the source DB cluster parameter - // group. For information about creating an ARN, see Constructing an RDS Amazon - // Resource Name (ARN) (http://docs.aws.amazon.com/AmazonRDS/latest/UserGuide/USER_Tagging.ARN.html#USER_Tagging.ARN.Constructing). + // group. For information about creating an ARN, see Constructing an ARN for + // Amazon RDS (http://docs.aws.amazon.com/AmazonRDS/latest/AuroraUserGuide/USER_Tagging.ARN.html#USER_Tagging.ARN.Constructing) + // in the Amazon Aurora User Guide. // // Constraints: // @@ -10700,7 +11079,8 @@ type CopyDBClusterParameterGroupInput struct { // SourceDBClusterParameterGroupIdentifier is a required field SourceDBClusterParameterGroupIdentifier *string `type:"string" required:"true"` - // A list of tags. For more information, see Tagging Amazon RDS Resources (http://docs.aws.amazon.com/AmazonRDS/latest/UserGuide/USER_Tagging.html). + // A list of tags. For more information, see Tagging Amazon RDS Resources (http://docs.aws.amazon.com/AmazonRDS/latest/UserGuide/USER_Tagging.html) + // in the Amazon RDS User Guide. Tags []*Tag `locationNameList:"Tag" type:"list"` // A description for the copied DB cluster parameter group. @@ -10883,7 +11263,8 @@ type CopyDBClusterSnapshotInput struct { // // * If the source snapshot is in a different AWS Region than the copy, specify // a valid DB cluster snapshot ARN. For more information, go to Copying - // a DB Snapshot or DB Cluster Snapshot (http://docs.aws.amazon.com/AmazonRDS/latest/UserGuide/USER_CopySnapshot.html). + // Snapshots Across AWS Regions (http://docs.aws.amazon.com/AmazonRDS/latest/AuroraUserGuide/USER_CopySnapshot.html#USER_CopySnapshot.AcrossRegions) + // in the Amazon Aurora User Guide. // // Example: my-cluster-snapshot1 // @@ -10895,7 +11276,8 @@ type CopyDBClusterSnapshotInput struct { // have the same region as the source ARN. SourceRegion *string `type:"string" ignore:"true"` - // A list of tags. For more information, see Tagging Amazon RDS Resources (http://docs.aws.amazon.com/AmazonRDS/latest/UserGuide/USER_Tagging.html). + // A list of tags. For more information, see Tagging Amazon RDS Resources (http://docs.aws.amazon.com/AmazonRDS/latest/UserGuide/USER_Tagging.html) + // in the Amazon RDS User Guide. Tags []*Tag `locationNameList:"Tag" type:"list"` // The identifier of the new DB cluster snapshot to create from the source DB @@ -11019,8 +11401,8 @@ type CopyDBParameterGroupInput struct { _ struct{} `type:"structure"` // The identifier or ARN for the source DB parameter group. For information - // about creating an ARN, see Constructing an RDS Amazon Resource Name (ARN) - // (http://docs.aws.amazon.com/AmazonRDS/latest/UserGuide/USER_Tagging.ARN.html#USER_Tagging.ARN.Constructing). + // about creating an ARN, see Constructing an ARN for Amazon RDS (http://docs.aws.amazon.com/AmazonRDS/latest/UserGuide/USER_Tagging.ARN.html#USER_Tagging.ARN.Constructing) + // in the Amazon RDS User Guide. // // Constraints: // @@ -11032,7 +11414,8 @@ type CopyDBParameterGroupInput struct { // SourceDBParameterGroupIdentifier is a required field SourceDBParameterGroupIdentifier *string `type:"string" required:"true"` - // A list of tags. For more information, see Tagging Amazon RDS Resources (http://docs.aws.amazon.com/AmazonRDS/latest/UserGuide/USER_Tagging.html). + // A list of tags. For more information, see Tagging Amazon RDS Resources (http://docs.aws.amazon.com/AmazonRDS/latest/UserGuide/USER_Tagging.html) + // in the Amazon RDS User Guide. Tags []*Tag `locationNameList:"Tag" type:"list"` // A description for the copied DB parameter group. @@ -11174,7 +11557,8 @@ type CopyDBSnapshotInput struct { // another, and your DB instance uses a nondefault option group. If your source // DB instance uses Transparent Data Encryption for Oracle or Microsoft SQL // Server, you must specify this option when copying across AWS Regions. For - // more information, see Option Group Considerations (http://docs.aws.amazon.com/AmazonRDS/latest/UserGuide/USER_CopySnapshot.html#USER_CopySnapshot.Options). + // more information, see Option Group Considerations (http://docs.aws.amazon.com/AmazonRDS/latest/UserGuide/USER_CopySnapshot.html#USER_CopySnapshot.Options) + // in the Amazon RDS User Guide. OptionGroupName *string `type:"string"` // The URL that contains a Signature Version 4 signed request for the CopyDBSnapshot @@ -11251,7 +11635,8 @@ type CopyDBSnapshotInput struct { // have the same region as the source ARN. SourceRegion *string `type:"string" ignore:"true"` - // A list of tags. For more information, see Tagging Amazon RDS Resources (http://docs.aws.amazon.com/AmazonRDS/latest/UserGuide/USER_Tagging.html). + // A list of tags. For more information, see Tagging Amazon RDS Resources (http://docs.aws.amazon.com/AmazonRDS/latest/UserGuide/USER_Tagging.html) + // in the Amazon RDS User Guide. Tags []*Tag `locationNameList:"Tag" type:"list"` // The identifier for the copy of the snapshot. @@ -11381,7 +11766,8 @@ type CopyOptionGroupInput struct { _ struct{} `type:"structure"` // The identifier or ARN for the source option group. For information about - // creating an ARN, see Constructing an RDS Amazon Resource Name (ARN) (http://docs.aws.amazon.com/AmazonRDS/latest/UserGuide/USER_Tagging.ARN.html#USER_Tagging.ARN.Constructing). + // creating an ARN, see Constructing an ARN for Amazon RDS (http://docs.aws.amazon.com/AmazonRDS/latest/UserGuide/USER_Tagging.ARN.html#USER_Tagging.ARN.Constructing) + // in the Amazon RDS User Guide. // // Constraints: // @@ -11397,7 +11783,8 @@ type CopyOptionGroupInput struct { // SourceOptionGroupIdentifier is a required field SourceOptionGroupIdentifier *string `type:"string" required:"true"` - // A list of tags. For more information, see Tagging Amazon RDS Resources (http://docs.aws.amazon.com/AmazonRDS/latest/UserGuide/USER_Tagging.html). + // A list of tags. For more information, see Tagging Amazon RDS Resources (http://docs.aws.amazon.com/AmazonRDS/latest/UserGuide/USER_Tagging.html) + // in the Amazon RDS User Guide. Tags []*Tag `locationNameList:"Tag" type:"list"` // The description for the copied option group. @@ -11502,8 +11889,9 @@ type CreateDBClusterInput struct { _ struct{} `type:"structure"` // A list of EC2 Availability Zones that instances in the DB cluster can be - // created in. For information on AWS Regions and Availability Zones, see Regions - // and Availability Zones (http://docs.aws.amazon.com/AmazonRDS/latest/UserGuide/Concepts.RegionsAndAvailabilityZones.html). + // created in. For information on AWS Regions and Availability Zones, see Choosing + // the Regions and Availability Zones (http://docs.aws.amazon.com/AmazonRDS/latest/AuroraUserGuide/Concepts.RegionsAndAvailabilityZones.html) + // in the Amazon Aurora User Guide. AvailabilityZones []*string `locationNameList:"AvailabilityZone" type:"list"` // The target backtrack window, in seconds. To disable backtracking, set this @@ -11567,11 +11955,18 @@ type CreateDBClusterInput struct { // you are creating. DatabaseName *string `type:"string"` + // Indicates if the DB cluster should have deletion protection enabled. The + // database can't be deleted when this value is set to true. The default is + // false. + DeletionProtection *bool `type:"boolean"` + // DestinationRegion is used for presigning the request to a given region. DestinationRegion *string `type:"string"` // The list of log types that need to be enabled for exporting to CloudWatch - // Logs. + // Logs. The values in the list depend on the DB engine being used. For more + // information, see Publishing Database Logs to Amazon CloudWatch Logs (http://docs.aws.amazon.com/AmazonRDS/latest/AuroraUserGuide/USER_LogAccess.html#USER_LogAccess.Procedural.UploadtoCloudWatch) + // in the Amazon Aurora User Guide. EnableCloudwatchLogsExports []*string `type:"list"` // True to enable mapping of AWS Identity and Access Management (IAM) accounts @@ -11588,6 +11983,10 @@ type CreateDBClusterInput struct { // Engine is a required field Engine *string `type:"string" required:"true"` + // The DB engine mode of the DB cluster, either provisioned, serverless, or + // parallelquery. + EngineMode *string `type:"string"` + // The version number of the database engine to use. // // Aurora MySQL @@ -11688,8 +12087,8 @@ type CreateDBClusterInput struct { // // The default is a 30-minute window selected at random from an 8-hour block // of time for each AWS Region. To see the time blocks available, see Adjusting - // the Preferred Maintenance Window (http://docs.aws.amazon.com/AmazonRDS/latest/UserGuide/AdjustingTheMaintenanceWindow.html) - // in the Amazon RDS User Guide. + // the Preferred DB Cluster Maintenance Window (http://docs.aws.amazon.com/AmazonRDS/latest/AuroraUserGuide/USER_UpgradeDBInstance.Maintenance.html#AdjustingTheMaintenanceWindow.Aurora) + // in the Amazon Aurora User Guide. // // Constraints: // @@ -11709,9 +12108,9 @@ type CreateDBClusterInput struct { // // The default is a 30-minute window selected at random from an 8-hour block // of time for each AWS Region, occurring on a random day of the week. To see - // the time blocks available, see Adjusting the Preferred Maintenance Window - // (http://docs.aws.amazon.com/AmazonRDS/latest/UserGuide/AdjustingTheMaintenanceWindow.html) - // in the Amazon RDS User Guide. + // the time blocks available, see Adjusting the Preferred DB Cluster Maintenance + // Window (http://docs.aws.amazon.com/AmazonRDS/latest/AuroraUserGuide/USER_UpgradeDBInstance.Maintenance.html#AdjustingTheMaintenanceWindow.Aurora) + // in the Amazon Aurora User Guide. // // Valid Days: Mon, Tue, Wed, Thu, Fri, Sat, Sun. // @@ -11722,6 +12121,10 @@ type CreateDBClusterInput struct { // this DB cluster is created as a Read Replica. ReplicationSourceIdentifier *string `type:"string"` + // For DB clusters in serverless DB engine mode, the scaling properties of the + // DB cluster. + ScalingConfiguration *ScalingConfiguration `type:"structure"` + // SourceRegion is the source region where the resource exists. This is not // sent over the wire and is only used for presigning. This value should always // have the same region as the source ARN. @@ -11730,7 +12133,8 @@ type CreateDBClusterInput struct { // Specifies whether the DB cluster is encrypted. StorageEncrypted *bool `type:"boolean"` - // A list of tags. For more information, see Tagging Amazon RDS Resources (http://docs.aws.amazon.com/AmazonRDS/latest/UserGuide/USER_Tagging.html). + // A list of tags. For more information, see Tagging Amazon RDS Resources (http://docs.aws.amazon.com/AmazonRDS/latest/UserGuide/USER_Tagging.html) + // in the Amazon RDS User Guide. Tags []*Tag `locationNameList:"Tag" type:"list"` // A list of EC2 VPC security groups to associate with this DB cluster. @@ -11811,6 +12215,12 @@ func (s *CreateDBClusterInput) SetDatabaseName(v string) *CreateDBClusterInput { return s } +// SetDeletionProtection sets the DeletionProtection field's value. +func (s *CreateDBClusterInput) SetDeletionProtection(v bool) *CreateDBClusterInput { + s.DeletionProtection = &v + return s +} + // SetDestinationRegion sets the DestinationRegion field's value. func (s *CreateDBClusterInput) SetDestinationRegion(v string) *CreateDBClusterInput { s.DestinationRegion = &v @@ -11835,6 +12245,12 @@ func (s *CreateDBClusterInput) SetEngine(v string) *CreateDBClusterInput { return s } +// SetEngineMode sets the EngineMode field's value. +func (s *CreateDBClusterInput) SetEngineMode(v string) *CreateDBClusterInput { + s.EngineMode = &v + return s +} + // SetEngineVersion sets the EngineVersion field's value. func (s *CreateDBClusterInput) SetEngineVersion(v string) *CreateDBClusterInput { s.EngineVersion = &v @@ -11895,6 +12311,12 @@ func (s *CreateDBClusterInput) SetReplicationSourceIdentifier(v string) *CreateD return s } +// SetScalingConfiguration sets the ScalingConfiguration field's value. +func (s *CreateDBClusterInput) SetScalingConfiguration(v *ScalingConfiguration) *CreateDBClusterInput { + s.ScalingConfiguration = v + return s +} + // SetSourceRegion sets the SourceRegion field's value. func (s *CreateDBClusterInput) SetSourceRegion(v string) *CreateDBClusterInput { s.SourceRegion = &v @@ -11922,9 +12344,10 @@ func (s *CreateDBClusterInput) SetVpcSecurityGroupIds(v []*string) *CreateDBClus type CreateDBClusterOutput struct { _ struct{} `type:"structure"` - // Contains the details of an Amazon RDS DB cluster. + // Contains the details of an Amazon Aurora DB cluster. // - // This data type is used as a response element in the DescribeDBClusters action. + // This data type is used as a response element in the DescribeDBClusters, StopDBCluster, + // and StartDBCluster actions. DBCluster *DBCluster `type:"structure"` } @@ -11979,7 +12402,8 @@ type CreateDBClusterParameterGroupInput struct { // Description is a required field Description *string `type:"string" required:"true"` - // A list of tags. For more information, see Tagging Amazon RDS Resources (http://docs.aws.amazon.com/AmazonRDS/latest/UserGuide/USER_Tagging.html). + // A list of tags. For more information, see Tagging Amazon RDS Resources (http://docs.aws.amazon.com/AmazonRDS/latest/UserGuide/USER_Tagging.html) + // in the Amazon RDS User Guide. Tags []*Tag `locationNameList:"Tag" type:"list"` } @@ -12419,6 +12843,11 @@ type CreateDBInstanceInput struct { // If there is no DB subnet group, then it is a non-VPC DB instance. DBSubnetGroupName *string `type:"string"` + // Indicates if the DB instance should have deletion protection enabled. The + // database can't be deleted when this value is set to true. The default is + // false. For more information, see Deleting a DB Instance (http://docs.aws.amazon.com/AmazonRDS/latest/UserGuide/USER_DeleteInstance.html). + DeletionProtection *bool `type:"boolean"` + // Specify the Active Directory Domain to create the instance in. Domain *string `type:"string"` @@ -12427,7 +12856,9 @@ type CreateDBInstanceInput struct { DomainIAMRoleName *string `type:"string"` // The list of log types that need to be enabled for exporting to CloudWatch - // Logs. + // Logs. The values in the list depend on the DB engine being used. For more + // information, see Publishing Database Logs to Amazon CloudWatch Logs (http://docs.aws.amazon.com/AmazonRDS/latest/UserGuide/USER_LogAccess.html#USER_LogAccess.Procedural.UploadtoCloudWatch) + // in the Amazon Relational Database Service User Guide. EnableCloudwatchLogsExports []*string `type:"list"` // True to enable mapping of AWS Identity and Access Management (IAM) accounts @@ -12534,7 +12965,8 @@ type CreateDBInstanceInput struct { // The amount of Provisioned IOPS (input/output operations per second) to be // initially allocated for the DB instance. For information about valid Iops // values, see see Amazon RDS Provisioned IOPS Storage to Improve Performance - // (http://docs.aws.amazon.com/AmazonRDS/latest/UserGuide/CHAP_Storage.html#USER_PIOPS). + // (http://docs.aws.amazon.com/AmazonRDS/latest/UserGuide/CHAP_Storage.html#USER_PIOPS) + // in the Amazon RDS User Guide. // // Constraints: Must be a multiple between 1 and 50 of the storage amount for // the DB instance. Must also be an integer multiple of 1000. For example, if @@ -12673,7 +13105,8 @@ type CreateDBInstanceInput struct { // The ARN for the IAM role that permits RDS to send enhanced monitoring metrics // to Amazon CloudWatch Logs. For example, arn:aws:iam:123456789012:role/emaccess. // For information on creating a monitoring role, go to Setting Up and Enabling - // Enhanced Monitoring (http://docs.aws.amazon.com/AmazonRDS/latest/UserGuide/USER_Monitoring.OS.html#USER_Monitoring.OS.Enabling). + // Enhanced Monitoring (http://docs.aws.amazon.com/AmazonRDS/latest/UserGuide/USER_Monitoring.OS.html#USER_Monitoring.OS.Enabling) + // in the Amazon RDS User Guide. // // If MonitoringInterval is set to a value other than 0, then you must supply // a MonitoringRoleArn value. @@ -12750,7 +13183,8 @@ type CreateDBInstanceInput struct { // The daily time range during which automated backups are created if automated // backups are enabled, using the BackupRetentionPeriod parameter. For more - // information, see The Backup Window (http://docs.aws.amazon.com/AmazonRDS/latest/UserGuide/USER_WorkingWithAutomatedBackups.html#USER_WorkingWithAutomatedBackups.BackupWindow). + // information, see The Backup Window (http://docs.aws.amazon.com/AmazonRDS/latest/UserGuide/USER_WorkingWithAutomatedBackups.html#USER_WorkingWithAutomatedBackups.BackupWindow) + // in the Amazon RDS User Guide. // // Amazon Aurora // @@ -12759,7 +13193,8 @@ type CreateDBInstanceInput struct { // // The default is a 30-minute window selected at random from an 8-hour block // of time for each AWS Region. To see the time blocks available, see Adjusting - // the Preferred DB Instance Maintenance Window (http://docs.aws.amazon.com/AmazonRDS/latest/UserGuide/USER_UpgradeDBInstance.Maintenance.html#AdjustingTheMaintenanceWindow). + // the Preferred DB Instance Maintenance Window (http://docs.aws.amazon.com/AmazonRDS/latest/UserGuide/USER_UpgradeDBInstance.Maintenance.html#AdjustingTheMaintenanceWindow) + // in the Amazon RDS User Guide. // // Constraints: // @@ -12792,7 +13227,8 @@ type CreateDBInstanceInput struct { // A value that specifies the order in which an Aurora Replica is promoted to // the primary instance after a failure of the existing primary instance. For - // more information, see Fault Tolerance for an Aurora DB Cluster (http://docs.aws.amazon.com/AmazonRDS/latest/UserGuide/Aurora.Managing.html#Aurora.Managing.FaultTolerance). + // more information, see Fault Tolerance for an Aurora DB Cluster (http://docs.aws.amazon.com/AmazonRDS/latest/AuroraUserGuide/Aurora.Managing.Backups.html#Aurora.Managing.FaultTolerance) + // in the Amazon Aurora User Guide. // // Default: 1 // @@ -12804,17 +13240,26 @@ type CreateDBInstanceInput struct { // which resolves to a public IP address. A value of false specifies an internal // instance with a DNS name that resolves to a private IP address. // - // Default: The default behavior varies depending on whether a VPC has been - // requested or not. The following list shows the default behavior in each case. + // Default: The default behavior varies depending on whether DBSubnetGroupName + // is specified. // - // * Default VPC: true + // If DBSubnetGroupName is not specified, and PubliclyAccessible is not specified, + // the following applies: // - // * VPC: false + // * If the default VPC in the target region doesn’t have an Internet gateway + // attached to it, the DB instance is private. // - // If no DB subnet group has been specified as part of the request and the PubliclyAccessible - // value has not been set, the DB instance is publicly accessible. If a specific - // DB subnet group has been specified as part of the request and the PubliclyAccessible - // value has not been set, the DB instance is private. + // * If the default VPC in the target region has an Internet gateway attached + // to it, the DB instance is public. + // + // If DBSubnetGroupName is specified, and PubliclyAccessible is not specified, + // the following applies: + // + // * If the subnets are part of a VPC that doesn’t have an Internet gateway + // attached to it, the DB instance is private. + // + // * If the subnets are part of a VPC that has an Internet gateway attached + // to it, the DB instance is public. PubliclyAccessible *bool `type:"boolean"` // Specifies whether the DB instance is encrypted. @@ -12836,7 +13281,8 @@ type CreateDBInstanceInput struct { // Default: io1 if the Iops parameter is specified, otherwise standard StorageType *string `type:"string"` - // A list of tags. For more information, see Tagging Amazon RDS Resources (http://docs.aws.amazon.com/AmazonRDS/latest/UserGuide/USER_Tagging.html). + // A list of tags. For more information, see Tagging Amazon RDS Resources (http://docs.aws.amazon.com/AmazonRDS/latest/UserGuide/USER_Tagging.html) + // in the Amazon RDS User Guide. Tags []*Tag `locationNameList:"Tag" type:"list"` // The ARN from the key store with which to associate the instance for TDE encryption. @@ -12968,6 +13414,12 @@ func (s *CreateDBInstanceInput) SetDBSubnetGroupName(v string) *CreateDBInstance return s } +// SetDeletionProtection sets the DeletionProtection field's value. +func (s *CreateDBInstanceInput) SetDeletionProtection(v bool) *CreateDBInstanceInput { + s.DeletionProtection = &v + return s +} + // SetDomain sets the Domain field's value. func (s *CreateDBInstanceInput) SetDomain(v string) *CreateDBInstanceInput { s.Domain = &v @@ -13242,10 +13694,18 @@ type CreateDBInstanceReadReplicaInput struct { // Example: mySubnetgroup DBSubnetGroupName *string `type:"string"` + // Indicates if the DB instance should have deletion protection enabled. The + // database can't be deleted when this value is set to true. The default is + // false. For more information, see Deleting a DB Instance (http://docs.aws.amazon.com/AmazonRDS/latest/UserGuide/USER_DeleteInstance.html). + DeletionProtection *bool `type:"boolean"` + // DestinationRegion is used for presigning the request to a given region. DestinationRegion *string `type:"string"` // The list of logs that the new DB instance is to export to CloudWatch Logs. + // The values in the list depend on the DB engine being used. For more information, + // see Publishing Database Logs to Amazon CloudWatch Logs (http://docs.aws.amazon.com/AmazonRDS/latest/UserGuide/USER_LogAccess.html#USER_LogAccess.Procedural.UploadtoCloudWatch) + // in the Amazon RDS User Guide. EnableCloudwatchLogsExports []*string `type:"list"` // True to enable mapping of AWS Identity and Access Management (IAM) accounts @@ -13265,7 +13725,7 @@ type CreateDBInstanceReadReplicaInput struct { // True to enable Performance Insights for the read replica, and otherwise false. // // For more information, see Using Amazon Performance Insights (http://docs.aws.amazon.com/AmazonRDS/latest/UserGuide/USER_PerfInsights.html) - // in the Amazon Relational Database Service User Guide. + // in the Amazon RDS User Guide. EnablePerformanceInsights *bool `type:"boolean"` // The amount of Provisioned IOPS (input/output operations per second) to be @@ -13302,7 +13762,8 @@ type CreateDBInstanceReadReplicaInput struct { // The ARN for the IAM role that permits RDS to send enhanced monitoring metrics // to Amazon CloudWatch Logs. For example, arn:aws:iam:123456789012:role/emaccess. // For information on creating a monitoring role, go to To create an IAM role - // for Amazon RDS Enhanced Monitoring (http://docs.aws.amazon.com/AmazonRDS/latest/UserGuide/USER_Monitoring.html#USER_Monitoring.OS.IAMRole). + // for Amazon RDS Enhanced Monitoring (http://docs.aws.amazon.com/AmazonRDS/latest/UserGuide/USER_Monitoring.html#USER_Monitoring.OS.IAMRole) + // in the Amazon RDS User Guide. // // If MonitoringInterval is set to a value other than 0, then you must supply // a MonitoringRoleArn value. @@ -13386,19 +13847,8 @@ type CreateDBInstanceReadReplicaInput struct { // Specifies the accessibility options for the DB instance. A value of true // specifies an Internet-facing instance with a publicly resolvable DNS name, // which resolves to a public IP address. A value of false specifies an internal - // instance with a DNS name that resolves to a private IP address. - // - // Default: The default behavior varies depending on whether a VPC has been - // requested or not. The following list shows the default behavior in each case. - // - // * Default VPC:true - // - // * VPC:false - // - // If no DB subnet group has been specified as part of the request and the PubliclyAccessible - // value has not been set, the DB instance is publicly accessible. If a specific - // DB subnet group has been specified as part of the request and the PubliclyAccessible - // value has not been set, the DB instance is private. + // instance with a DNS name that resolves to a private IP address. For more + // information, see CreateDBInstance. PubliclyAccessible *bool `type:"boolean"` // The identifier of the DB instance that will act as the source for the Read @@ -13424,7 +13874,8 @@ type CreateDBInstanceReadReplicaInput struct { // // * If the source DB instance is in a different AWS Region than the Read // Replica, specify a valid DB instance ARN. For more information, go to - // Constructing a Amazon RDS Amazon Resource Name (ARN) (http://docs.aws.amazon.com/AmazonRDS/latest/UserGuide/USER_Tagging.ARN.html#USER_Tagging.ARN.Constructing). + // Constructing an ARN for Amazon RDS (http://docs.aws.amazon.com/AmazonRDS/latest/UserGuide/USER_Tagging.ARN.html#USER_Tagging.ARN.Constructing) + // in the Amazon RDS User Guide. // // SourceDBInstanceIdentifier is a required field SourceDBInstanceIdentifier *string `type:"string" required:"true"` @@ -13443,7 +13894,8 @@ type CreateDBInstanceReadReplicaInput struct { // Default: io1 if the Iops parameter is specified, otherwise standard StorageType *string `type:"string"` - // A list of tags. For more information, see Tagging Amazon RDS Resources (http://docs.aws.amazon.com/AmazonRDS/latest/UserGuide/USER_Tagging.html). + // A list of tags. For more information, see Tagging Amazon RDS Resources (http://docs.aws.amazon.com/AmazonRDS/latest/UserGuide/USER_Tagging.html) + // in the Amazon RDS User Guide. Tags []*Tag `locationNameList:"Tag" type:"list"` // A value that specifies that the DB instance class of the DB instance uses @@ -13513,6 +13965,12 @@ func (s *CreateDBInstanceReadReplicaInput) SetDBSubnetGroupName(v string) *Creat return s } +// SetDeletionProtection sets the DeletionProtection field's value. +func (s *CreateDBInstanceReadReplicaInput) SetDeletionProtection(v bool) *CreateDBInstanceReadReplicaInput { + s.DeletionProtection = &v + return s +} + // SetDestinationRegion sets the DestinationRegion field's value. func (s *CreateDBInstanceReadReplicaInput) SetDestinationRegion(v string) *CreateDBInstanceReadReplicaInput { s.DestinationRegion = &v @@ -13702,7 +14160,8 @@ type CreateDBParameterGroupInput struct { // Description is a required field Description *string `type:"string" required:"true"` - // A list of tags. For more information, see Tagging Amazon RDS Resources (http://docs.aws.amazon.com/AmazonRDS/latest/UserGuide/USER_Tagging.html). + // A list of tags. For more information, see Tagging Amazon RDS Resources (http://docs.aws.amazon.com/AmazonRDS/latest/UserGuide/USER_Tagging.html) + // in the Amazon RDS User Guide. Tags []*Tag `locationNameList:"Tag" type:"list"` } @@ -13810,7 +14269,8 @@ type CreateDBSecurityGroupInput struct { // DBSecurityGroupName is a required field DBSecurityGroupName *string `type:"string" required:"true"` - // A list of tags. For more information, see Tagging Amazon RDS Resources (http://docs.aws.amazon.com/AmazonRDS/latest/UserGuide/USER_Tagging.html). + // A list of tags. For more information, see Tagging Amazon RDS Resources (http://docs.aws.amazon.com/AmazonRDS/latest/UserGuide/USER_Tagging.html) + // in the Amazon RDS User Guide. Tags []*Tag `locationNameList:"Tag" type:"list"` } @@ -13913,7 +14373,8 @@ type CreateDBSnapshotInput struct { // DBSnapshotIdentifier is a required field DBSnapshotIdentifier *string `type:"string" required:"true"` - // A list of tags. For more information, see Tagging Amazon RDS Resources (http://docs.aws.amazon.com/AmazonRDS/latest/UserGuide/USER_Tagging.html). + // A list of tags. For more information, see Tagging Amazon RDS Resources (http://docs.aws.amazon.com/AmazonRDS/latest/UserGuide/USER_Tagging.html) + // in the Amazon RDS User Guide. Tags []*Tag `locationNameList:"Tag" type:"list"` } @@ -14009,7 +14470,8 @@ type CreateDBSubnetGroupInput struct { // SubnetIds is a required field SubnetIds []*string `locationNameList:"SubnetIdentifier" type:"list" required:"true"` - // A list of tags. For more information, see Tagging Amazon RDS Resources (http://docs.aws.amazon.com/AmazonRDS/latest/UserGuide/USER_Tagging.html). + // A list of tags. For more information, see Tagging Amazon RDS Resources (http://docs.aws.amazon.com/AmazonRDS/latest/UserGuide/USER_Tagging.html) + // in the Amazon RDS User Guide. Tags []*Tag `locationNameList:"Tag" type:"list"` } @@ -14150,7 +14612,8 @@ type CreateEventSubscriptionInput struct { // SubscriptionName is a required field SubscriptionName *string `type:"string" required:"true"` - // A list of tags. For more information, see Tagging Amazon RDS Resources (http://docs.aws.amazon.com/AmazonRDS/latest/UserGuide/USER_Tagging.html). + // A list of tags. For more information, see Tagging Amazon RDS Resources (http://docs.aws.amazon.com/AmazonRDS/latest/UserGuide/USER_Tagging.html) + // in the Amazon RDS User Guide. Tags []*Tag `locationNameList:"Tag" type:"list"` } @@ -14281,7 +14744,8 @@ type CreateOptionGroupInput struct { // OptionGroupName is a required field OptionGroupName *string `type:"string" required:"true"` - // A list of tags. For more information, see Tagging Amazon RDS Resources (http://docs.aws.amazon.com/AmazonRDS/latest/UserGuide/USER_Tagging.html). + // A list of tags. For more information, see Tagging Amazon RDS Resources (http://docs.aws.amazon.com/AmazonRDS/latest/UserGuide/USER_Tagging.html) + // in the Amazon RDS User Guide. Tags []*Tag `locationNameList:"Tag" type:"list"` } @@ -14369,9 +14833,10 @@ func (s *CreateOptionGroupOutput) SetOptionGroup(v *OptionGroup) *CreateOptionGr return s } -// Contains the details of an Amazon RDS DB cluster. +// Contains the details of an Amazon Aurora DB cluster. // -// This data type is used as a response element in the DescribeDBClusters action. +// This data type is used as a response element in the DescribeDBClusters, StopDBCluster, +// and StartDBCluster actions. type DBCluster struct { _ struct{} `type:"structure"` @@ -14401,6 +14866,8 @@ type DBCluster struct { // Specifies the number of days for which automatic DB snapshots are retained. BackupRetentionPeriod *int64 `type:"integer"` + Capacity *int64 `type:"integer"` + // If present, specifies the name of the character set that this cluster is // associated with. CharacterSetName *string `type:"string"` @@ -14442,6 +14909,10 @@ type DBCluster struct { // cluster is accessed. DbClusterResourceId *string `type:"string"` + // Indicates if the DB cluster has deletion protection enabled. The database + // can't be deleted when this value is set to true. + DeletionProtection *bool `type:"boolean"` + // The earliest time to which a DB cluster can be backtracked. EarliestBacktrackTime *time.Time `type:"timestamp"` @@ -14451,6 +14922,10 @@ type DBCluster struct { // A list of log types that this DB cluster is configured to export to CloudWatch // Logs. + // + // Log types vary by DB engine. For information about the log types for each + // DB engine, see Amazon RDS Database Log Files (http://docs.aws.amazon.com/AmazonRDS/latest/AuroraUserGuide/USER_LogAccess.html) + // in the Amazon Aurora User Guide. EnabledCloudwatchLogsExports []*string `type:"list"` // Specifies the connection endpoint for the primary instance of the DB cluster. @@ -14459,6 +14934,10 @@ type DBCluster struct { // Provides the name of the database engine to be used for this DB cluster. Engine *string `type:"string"` + // The DB engine mode of the DB cluster, either provisioned, serverless, or + // parallelquery. + EngineMode *string `type:"string"` + // Indicates the database engine version. EngineVersion *string `type:"string"` @@ -14518,6 +14997,13 @@ type DBCluster struct { // Read Replica. ReplicationSourceIdentifier *string `type:"string"` + // Shows the scaling configuration for an Aurora DB cluster in serverless DB + // engine mode. + // + // For more information, see Using Amazon Aurora Serverless (http://docs.aws.amazon.com/AmazonRDS/latest/AuroraUserGuide/aurora-serverless.html) + // in the Amazon Aurora User Guide. + ScalingConfigurationInfo *ScalingConfigurationInfo `type:"structure"` + // Specifies the current state of this DB cluster. Status *string `type:"string"` @@ -14574,6 +15060,12 @@ func (s *DBCluster) SetBackupRetentionPeriod(v int64) *DBCluster { return s } +// SetCapacity sets the Capacity field's value. +func (s *DBCluster) SetCapacity(v int64) *DBCluster { + s.Capacity = &v + return s +} + // SetCharacterSetName sets the CharacterSetName field's value. func (s *DBCluster) SetCharacterSetName(v string) *DBCluster { s.CharacterSetName = &v @@ -14640,6 +15132,12 @@ func (s *DBCluster) SetDbClusterResourceId(v string) *DBCluster { return s } +// SetDeletionProtection sets the DeletionProtection field's value. +func (s *DBCluster) SetDeletionProtection(v bool) *DBCluster { + s.DeletionProtection = &v + return s +} + // SetEarliestBacktrackTime sets the EarliestBacktrackTime field's value. func (s *DBCluster) SetEarliestBacktrackTime(v time.Time) *DBCluster { s.EarliestBacktrackTime = &v @@ -14670,6 +15168,12 @@ func (s *DBCluster) SetEngine(v string) *DBCluster { return s } +// SetEngineMode sets the EngineMode field's value. +func (s *DBCluster) SetEngineMode(v string) *DBCluster { + s.EngineMode = &v + return s +} + // SetEngineVersion sets the EngineVersion field's value. func (s *DBCluster) SetEngineVersion(v string) *DBCluster { s.EngineVersion = &v @@ -14754,6 +15258,12 @@ func (s *DBCluster) SetReplicationSourceIdentifier(v string) *DBCluster { return s } +// SetScalingConfigurationInfo sets the ScalingConfigurationInfo field's value. +func (s *DBCluster) SetScalingConfigurationInfo(v *ScalingConfigurationInfo) *DBCluster { + s.ScalingConfigurationInfo = v + return s +} + // SetStatus sets the Status field's value. func (s *DBCluster) SetStatus(v string) *DBCluster { s.Status = &v @@ -14789,7 +15299,8 @@ type DBClusterMember struct { // A value that specifies the order in which an Aurora Replica is promoted to // the primary instance after a failure of the existing primary instance. For - // more information, see Fault Tolerance for an Aurora DB Cluster (http://docs.aws.amazon.com/AmazonRDS/latest/UserGuide/Aurora.Managing.html#Aurora.Managing.FaultTolerance). + // more information, see Fault Tolerance for an Aurora DB Cluster (http://docs.aws.amazon.com/AmazonRDS/latest/AuroraUserGuide/Aurora.Managing.Backups.html#Aurora.Managing.FaultTolerance) + // in the Amazon Aurora User Guide. PromotionTier *int64 `type:"integer"` } @@ -14954,6 +15465,8 @@ func (s *DBClusterParameterGroupNameMessage) SetDBClusterParameterGroupName(v st type DBClusterRole struct { _ struct{} `type:"structure"` + FeatureName *string `type:"string"` + // The Amazon Resource Name (ARN) of the IAM role that is associated with the // DB cluster. RoleArn *string `type:"string"` @@ -14982,6 +15495,12 @@ func (s DBClusterRole) GoString() string { return s.String() } +// SetFeatureName sets the FeatureName field's value. +func (s *DBClusterRole) SetFeatureName(v string) *DBClusterRole { + s.FeatureName = &v + return s +} + // SetRoleArn sets the RoleArn field's value. func (s *DBClusterRole) SetRoleArn(v string) *DBClusterRole { s.RoleArn = &v @@ -15318,6 +15837,9 @@ type DBEngineVersion struct { // parameter of the CreateDBInstance action. SupportedCharacterSets []*CharacterSet `locationNameList:"CharacterSet" type:"list"` + // A list of the supported DB engine modes. + SupportedEngineModes []*string `type:"list"` + // A list of the time zones supported by this engine for the Timezone parameter // of the CreateDBInstance action. SupportedTimezones []*Timezone `locationNameList:"Timezone" type:"list"` @@ -15392,6 +15914,12 @@ func (s *DBEngineVersion) SetSupportedCharacterSets(v []*CharacterSet) *DBEngine return s } +// SetSupportedEngineModes sets the SupportedEngineModes field's value. +func (s *DBEngineVersion) SetSupportedEngineModes(v []*string) *DBEngineVersion { + s.SupportedEngineModes = v + return s +} + // SetSupportedTimezones sets the SupportedTimezones field's value. func (s *DBEngineVersion) SetSupportedTimezones(v []*Timezone) *DBEngineVersion { s.SupportedTimezones = v @@ -15501,11 +16029,20 @@ type DBInstance struct { // instance is accessed. DbiResourceId *string `type:"string"` + // Indicates if the DB instance has deletion protection enabled. The database + // can't be deleted when this value is set to true. For more information, see + // Deleting a DB Instance (http://docs.aws.amazon.com/AmazonRDS/latest/UserGuide/USER_DeleteInstance.html). + DeletionProtection *bool `type:"boolean"` + // The Active Directory Domain membership records associated with the DB instance. DomainMemberships []*DomainMembership `locationNameList:"DomainMembership" type:"list"` // A list of log types that this DB instance is configured to export to CloudWatch // Logs. + // + // Log types vary by DB engine. For information about the log types for each + // DB engine, see Amazon RDS Database Log Files (http://docs.aws.amazon.com/AmazonRDS/latest/UserGuide/USER_LogAccess.html) + // in the Amazon RDS User Guide. EnabledCloudwatchLogsExports []*string `type:"list"` // Specifies the connection endpoint. @@ -15599,29 +16136,21 @@ type DBInstance struct { // A value that specifies the order in which an Aurora Replica is promoted to // the primary instance after a failure of the existing primary instance. For - // more information, see Fault Tolerance for an Aurora DB Cluster (http://docs.aws.amazon.com/AmazonRDS/latest/UserGuide/Aurora.Managing.html#Aurora.Managing.FaultTolerance). + // more information, see Fault Tolerance for an Aurora DB Cluster (http://docs.aws.amazon.com/AmazonRDS/latest/AuroraUserGuide/Aurora.Managing.Backups.html#Aurora.Managing.FaultTolerance) + // in the Amazon Aurora User Guide. PromotionTier *int64 `type:"integer"` // Specifies the accessibility options for the DB instance. A value of true // specifies an Internet-facing instance with a publicly resolvable DNS name, // which resolves to a public IP address. A value of false specifies an internal // instance with a DNS name that resolves to a private IP address. - // - // Default: The default behavior varies depending on whether a VPC has been - // requested or not. The following list shows the default behavior in each case. - // - // * Default VPC:true - // - // * VPC:false - // - // If no DB subnet group has been specified as part of the request and the PubliclyAccessible - // value has not been set, the DB instance is publicly accessible. If a specific - // DB subnet group has been specified as part of the request and the PubliclyAccessible - // value has not been set, the DB instance is private. PubliclyAccessible *bool `type:"boolean"` - // Contains one or more identifiers of Aurora DB clusters that are Read Replicas - // of this DB instance. + // Contains one or more identifiers of Aurora DB clusters to which the RDS DB + // instance is replicated as a Read Replica. For example, when you create an + // Aurora Read Replica of an RDS MySQL DB instance, the Aurora MySQL DB cluster + // for the Aurora Read Replica is shown. This output does not contain information + // about cross region Aurora Read Replicas. ReadReplicaDBClusterIdentifiers []*string `locationNameList:"ReadReplicaDBClusterIdentifier" type:"list"` // Contains one or more identifiers of the Read Replicas associated with this @@ -15778,6 +16307,12 @@ func (s *DBInstance) SetDbiResourceId(v string) *DBInstance { return s } +// SetDeletionProtection sets the DeletionProtection field's value. +func (s *DBInstance) SetDeletionProtection(v bool) *DBInstance { + s.DeletionProtection = &v + return s +} + // SetDomainMemberships sets the DomainMemberships field's value. func (s *DBInstance) SetDomainMemberships(v []*DomainMembership) *DBInstance { s.DomainMemberships = v @@ -16007,7 +16542,8 @@ type DBInstanceStatusInfo struct { Normal *bool `type:"boolean"` // Status of the DB instance. For a StatusType of read replica, the values can - // be replicating, error, stopped, or terminated. + // be replicating, replication stop point set, replication stop point reached, + // error, stopped, or terminated. Status *string `type:"string"` // This value is currently "read replication." @@ -16807,9 +17343,10 @@ func (s *DeleteDBClusterInput) SetSkipFinalSnapshot(v bool) *DeleteDBClusterInpu type DeleteDBClusterOutput struct { _ struct{} `type:"structure"` - // Contains the details of an Amazon RDS DB cluster. + // Contains the details of an Amazon Aurora DB cluster. // - // This data type is used as a response element in the DescribeDBClusters action. + // This data type is used as a response element in the DescribeDBClusters, StopDBCluster, + // and StartDBCluster actions. DBCluster *DBCluster `type:"structure"` } @@ -21946,9 +22483,10 @@ func (s *FailoverDBClusterInput) SetTargetDBInstanceIdentifier(v string) *Failov type FailoverDBClusterOutput struct { _ struct{} `type:"structure"` - // Contains the details of an Amazon RDS DB cluster. + // Contains the details of an Amazon Aurora DB cluster. // - // This data type is used as a response element in the DescribeDBClusters action. + // This data type is used as a response element in the DescribeDBClusters, StopDBCluster, + // and StartDBCluster actions. DBCluster *DBCluster `type:"structure"` } @@ -22078,8 +22616,9 @@ type ListTagsForResourceInput struct { Filters []*Filter `locationNameList:"Filter" type:"list"` // The Amazon RDS resource with tags to be listed. This value is an Amazon Resource - // Name (ARN). For information about creating an ARN, see Constructing an RDS - // Amazon Resource Name (ARN) (http://docs.aws.amazon.com/AmazonRDS/latest/UserGuide/USER_Tagging.ARN.html#USER_Tagging.ARN.Constructing). + // Name (ARN). For information about creating an ARN, see Constructing an ARN + // for Amazon RDS (http://docs.aws.amazon.com/AmazonRDS/latest/UserGuide/USER_Tagging.ARN.html#USER_Tagging.ARN.Constructing) + // in the Amazon RDS User Guide. // // ResourceName is a required field ResourceName *string `type:"string" required:"true"` @@ -22153,6 +22692,187 @@ func (s *ListTagsForResourceOutput) SetTagList(v []*Tag) *ListTagsForResourceOut return s } +// The minimum DB engine version required for each corresponding allowed value +// for an option setting. +type MinimumEngineVersionPerAllowedValue struct { + _ struct{} `type:"structure"` + + // The allowed value for an option setting. + AllowedValue *string `type:"string"` + + // The minimum DB engine version required for the allowed value. + MinimumEngineVersion *string `type:"string"` +} + +// String returns the string representation +func (s MinimumEngineVersionPerAllowedValue) String() string { + return awsutil.Prettify(s) +} + +// GoString returns the string representation +func (s MinimumEngineVersionPerAllowedValue) GoString() string { + return s.String() +} + +// SetAllowedValue sets the AllowedValue field's value. +func (s *MinimumEngineVersionPerAllowedValue) SetAllowedValue(v string) *MinimumEngineVersionPerAllowedValue { + s.AllowedValue = &v + return s +} + +// SetMinimumEngineVersion sets the MinimumEngineVersion field's value. +func (s *MinimumEngineVersionPerAllowedValue) SetMinimumEngineVersion(v string) *MinimumEngineVersionPerAllowedValue { + s.MinimumEngineVersion = &v + return s +} + +type ModifyCurrentDBClusterCapacityInput struct { + _ struct{} `type:"structure"` + + // The DB cluster capacity. + // + // Constraints: + // + // * Value must be 2, 4, 8, 16, 32, 64, 128, or 256. + Capacity *int64 `type:"integer"` + + // The DB cluster identifier for the cluster being modified. This parameter + // is not case-sensitive. + // + // Constraints: + // + // * Must match the identifier of an existing DB cluster. + // + // DBClusterIdentifier is a required field + DBClusterIdentifier *string `type:"string" required:"true"` + + // The amount of time, in seconds, that Aurora Serverless tries to find a scaling + // point to perform seamless scaling before enforcing the timeout action. The + // default is 300. + // + // * Value must be from 10 through 600. + SecondsBeforeTimeout *int64 `type:"integer"` + + // The action to take when the timeout is reached, either ForceApplyCapacityChange + // or RollbackCapacityChange. + // + // ForceApplyCapacityChange, the default, sets the capacity to the specified + // value as soon as possible. + // + // RollbackCapacityChange ignores the capacity change if a scaling point is + // not found in the timeout period. + TimeoutAction *string `type:"string"` +} + +// String returns the string representation +func (s ModifyCurrentDBClusterCapacityInput) String() string { + return awsutil.Prettify(s) +} + +// GoString returns the string representation +func (s ModifyCurrentDBClusterCapacityInput) GoString() string { + return s.String() +} + +// Validate inspects the fields of the type to determine if they are valid. +func (s *ModifyCurrentDBClusterCapacityInput) Validate() error { + invalidParams := request.ErrInvalidParams{Context: "ModifyCurrentDBClusterCapacityInput"} + if s.DBClusterIdentifier == nil { + invalidParams.Add(request.NewErrParamRequired("DBClusterIdentifier")) + } + + if invalidParams.Len() > 0 { + return invalidParams + } + return nil +} + +// SetCapacity sets the Capacity field's value. +func (s *ModifyCurrentDBClusterCapacityInput) SetCapacity(v int64) *ModifyCurrentDBClusterCapacityInput { + s.Capacity = &v + return s +} + +// SetDBClusterIdentifier sets the DBClusterIdentifier field's value. +func (s *ModifyCurrentDBClusterCapacityInput) SetDBClusterIdentifier(v string) *ModifyCurrentDBClusterCapacityInput { + s.DBClusterIdentifier = &v + return s +} + +// SetSecondsBeforeTimeout sets the SecondsBeforeTimeout field's value. +func (s *ModifyCurrentDBClusterCapacityInput) SetSecondsBeforeTimeout(v int64) *ModifyCurrentDBClusterCapacityInput { + s.SecondsBeforeTimeout = &v + return s +} + +// SetTimeoutAction sets the TimeoutAction field's value. +func (s *ModifyCurrentDBClusterCapacityInput) SetTimeoutAction(v string) *ModifyCurrentDBClusterCapacityInput { + s.TimeoutAction = &v + return s +} + +type ModifyCurrentDBClusterCapacityOutput struct { + _ struct{} `type:"structure"` + + // The current capacity of the DB cluster. + CurrentCapacity *int64 `type:"integer"` + + // A user-supplied DB cluster identifier. This identifier is the unique key + // that identifies a DB cluster. + DBClusterIdentifier *string `type:"string"` + + // A value that specifies the capacity that the DB cluster scales to next. + PendingCapacity *int64 `type:"integer"` + + // The number of seconds before a call to ModifyCurrentDBClusterCapacity times + // out. + SecondsBeforeTimeout *int64 `type:"integer"` + + // The timeout action of a call to ModifyCurrentDBClusterCapacity, either ForceApplyCapacityChange + // or RollbackCapacityChange. + TimeoutAction *string `type:"string"` +} + +// String returns the string representation +func (s ModifyCurrentDBClusterCapacityOutput) String() string { + return awsutil.Prettify(s) +} + +// GoString returns the string representation +func (s ModifyCurrentDBClusterCapacityOutput) GoString() string { + return s.String() +} + +// SetCurrentCapacity sets the CurrentCapacity field's value. +func (s *ModifyCurrentDBClusterCapacityOutput) SetCurrentCapacity(v int64) *ModifyCurrentDBClusterCapacityOutput { + s.CurrentCapacity = &v + return s +} + +// SetDBClusterIdentifier sets the DBClusterIdentifier field's value. +func (s *ModifyCurrentDBClusterCapacityOutput) SetDBClusterIdentifier(v string) *ModifyCurrentDBClusterCapacityOutput { + s.DBClusterIdentifier = &v + return s +} + +// SetPendingCapacity sets the PendingCapacity field's value. +func (s *ModifyCurrentDBClusterCapacityOutput) SetPendingCapacity(v int64) *ModifyCurrentDBClusterCapacityOutput { + s.PendingCapacity = &v + return s +} + +// SetSecondsBeforeTimeout sets the SecondsBeforeTimeout field's value. +func (s *ModifyCurrentDBClusterCapacityOutput) SetSecondsBeforeTimeout(v int64) *ModifyCurrentDBClusterCapacityOutput { + s.SecondsBeforeTimeout = &v + return s +} + +// SetTimeoutAction sets the TimeoutAction field's value. +func (s *ModifyCurrentDBClusterCapacityOutput) SetTimeoutAction(v string) *ModifyCurrentDBClusterCapacityOutput { + s.TimeoutAction = &v + return s +} + type ModifyDBClusterInput struct { _ struct{} `type:"structure"` @@ -22162,12 +22882,12 @@ type ModifyDBClusterInput struct { // is set to false, changes to the DB cluster are applied during the next maintenance // window. // - // The ApplyImmediately parameter only affects the NewDBClusterIdentifier and - // MasterUserPassword values. If you set the ApplyImmediately parameter value - // to false, then changes to the NewDBClusterIdentifier and MasterUserPassword - // values are applied during the next maintenance window. All other changes - // are applied immediately, regardless of the value of the ApplyImmediately - // parameter. + // The ApplyImmediately parameter only affects the EnableIAMDatabaseAuthentication, + // MasterUserPassword, and NewDBClusterIdentifier values. If you set the ApplyImmediately + // parameter value to false, then changes to the EnableIAMDatabaseAuthentication, + // MasterUserPassword, and NewDBClusterIdentifier values are applied during + // the next maintenance window. All other changes are applied immediately, regardless + // of the value of the ApplyImmediately parameter. // // Default: false ApplyImmediately *bool `type:"boolean"` @@ -22210,6 +22930,10 @@ type ModifyDBClusterInput struct { // The name of the DB cluster parameter group to use for the DB cluster. DBClusterParameterGroupName *string `type:"string"` + // Indicates if the DB cluster has deletion protection enabled. The database + // can't be deleted when this value is set to true. + DeletionProtection *bool `type:"boolean"` + // True to enable mapping of AWS Identity and Access Management (IAM) accounts // to database accounts, and otherwise false. // @@ -22267,8 +22991,8 @@ type ModifyDBClusterInput struct { // // The default is a 30-minute window selected at random from an 8-hour block // of time for each AWS Region. To see the time blocks available, see Adjusting - // the Preferred Maintenance Window (http://docs.aws.amazon.com/AmazonRDS/latest/UserGuide/AdjustingTheMaintenanceWindow.html) - // in the Amazon RDS User Guide. + // the Preferred DB Cluster Maintenance Window (http://docs.aws.amazon.com/AmazonRDS/latest/AuroraUserGuide/USER_UpgradeDBInstance.Maintenance.html#AdjustingTheMaintenanceWindow.Aurora) + // in the Amazon Aurora User Guide. // // Constraints: // @@ -22288,15 +23012,19 @@ type ModifyDBClusterInput struct { // // The default is a 30-minute window selected at random from an 8-hour block // of time for each AWS Region, occurring on a random day of the week. To see - // the time blocks available, see Adjusting the Preferred Maintenance Window - // (http://docs.aws.amazon.com/AmazonRDS/latest/UserGuide/AdjustingTheMaintenanceWindow.html) - // in the Amazon RDS User Guide. + // the time blocks available, see Adjusting the Preferred DB Cluster Maintenance + // Window (http://docs.aws.amazon.com/AmazonRDS/latest/AuroraUserGuide/USER_UpgradeDBInstance.Maintenance.html#AdjustingTheMaintenanceWindow.Aurora) + // in the Amazon Aurora User Guide. // // Valid Days: Mon, Tue, Wed, Thu, Fri, Sat, Sun. // // Constraints: Minimum 30-minute window. PreferredMaintenanceWindow *string `type:"string"` + // The scaling properties of the DB cluster. You can only modify scaling properties + // for DB clusters in serverless DB engine mode. + ScalingConfiguration *ScalingConfiguration `type:"structure"` + // A list of VPC security groups that the DB cluster will belong to. VpcSecurityGroupIds []*string `locationNameList:"VpcSecurityGroupId" type:"list"` } @@ -22360,6 +23088,12 @@ func (s *ModifyDBClusterInput) SetDBClusterParameterGroupName(v string) *ModifyD return s } +// SetDeletionProtection sets the DeletionProtection field's value. +func (s *ModifyDBClusterInput) SetDeletionProtection(v bool) *ModifyDBClusterInput { + s.DeletionProtection = &v + return s +} + // SetEnableIAMDatabaseAuthentication sets the EnableIAMDatabaseAuthentication field's value. func (s *ModifyDBClusterInput) SetEnableIAMDatabaseAuthentication(v bool) *ModifyDBClusterInput { s.EnableIAMDatabaseAuthentication = &v @@ -22408,6 +23142,12 @@ func (s *ModifyDBClusterInput) SetPreferredMaintenanceWindow(v string) *ModifyDB return s } +// SetScalingConfiguration sets the ScalingConfiguration field's value. +func (s *ModifyDBClusterInput) SetScalingConfiguration(v *ScalingConfiguration) *ModifyDBClusterInput { + s.ScalingConfiguration = v + return s +} + // SetVpcSecurityGroupIds sets the VpcSecurityGroupIds field's value. func (s *ModifyDBClusterInput) SetVpcSecurityGroupIds(v []*string) *ModifyDBClusterInput { s.VpcSecurityGroupIds = v @@ -22417,9 +23157,10 @@ func (s *ModifyDBClusterInput) SetVpcSecurityGroupIds(v []*string) *ModifyDBClus type ModifyDBClusterOutput struct { _ struct{} `type:"structure"` - // Contains the details of an Amazon RDS DB cluster. + // Contains the details of an Amazon Aurora DB cluster. // - // This data type is used as a response element in the DescribeDBClusters action. + // This data type is used as a response element in the DescribeDBClusters, StopDBCluster, + // and StartDBCluster actions. DBCluster *DBCluster `type:"structure"` } @@ -22638,8 +23379,9 @@ type ModifyDBInstanceInput struct { // and are applied on the next call to RebootDBInstance, or the next failure // reboot. Review the table of parameters in Modifying a DB Instance and Using // the Apply Immediately Parameter (http://docs.aws.amazon.com/AmazonRDS/latest/UserGuide/Overview.DBInstance.Modifying.html) - // to see the impact that setting ApplyImmediately to true or false has for - // each modified parameter and to determine when the changes are applied. + // in the Amazon RDS User Guide. to see the impact that setting ApplyImmediately + // to true or false has for each modified parameter and to determine when the + // changes are applied. // // Default: false ApplyImmediately *bool `type:"boolean"` @@ -22789,7 +23531,8 @@ type ModifyDBInstanceInput struct { // The new DB subnet group for the DB instance. You can use this parameter to // move your DB instance to a different VPC. If your DB instance is not in a // VPC, you can also use this parameter to move your DB instance into a VPC. - // For more information, see Updating the VPC for a DB Instance (http://docs.aws.amazon.com/AmazonRDS/latest/UserGuide/USER_VPC.WorkingWithRDSInstanceinaVPC.html#USER_VPC.Non-VPC2VPC). + // For more information, see Updating the VPC for a DB Instance (http://docs.aws.amazon.com/AmazonRDS/latest/UserGuide/USER_VPC.WorkingWithRDSInstanceinaVPC.html#USER_VPC.Non-VPC2VPC) + // in the Amazon RDS User Guide. // // Changing the subnet group causes an outage during the change. The change // is applied during the next maintenance window, unless you specify true for @@ -22800,6 +23543,11 @@ type ModifyDBInstanceInput struct { // Example: mySubnetGroup DBSubnetGroupName *string `type:"string"` + // Indicates if the DB instance has deletion protection enabled. The database + // can't be deleted when this value is set to true. For more information, see + // Deleting a DB Instance (http://docs.aws.amazon.com/AmazonRDS/latest/UserGuide/USER_DeleteInstance.html). + DeletionProtection *bool `type:"boolean"` + // The Active Directory Domain to move the instance to. Specify none to remove // the instance from its current domain. The domain must be created prior to // this operation. Currently only a Microsoft SQL Server instance can be created @@ -22934,7 +23682,8 @@ type ModifyDBInstanceInput struct { // The ARN for the IAM role that permits RDS to send enhanced monitoring metrics // to Amazon CloudWatch Logs. For example, arn:aws:iam:123456789012:role/emaccess. // For information on creating a monitoring role, go to To create an IAM role - // for Amazon RDS Enhanced Monitoring (http://docs.aws.amazon.com/AmazonRDS/latest/UserGuide/USER_Monitoring.html#USER_Monitoring.OS.IAMRole). + // for Amazon RDS Enhanced Monitoring (http://docs.aws.amazon.com/AmazonRDS/latest/UserGuide/USER_Monitoring.html#USER_Monitoring.OS.IAMRole) + // in the Amazon RDS User Guide. // // If MonitoringInterval is set to a value other than 0, then you must supply // a MonitoringRoleArn value. @@ -23029,7 +23778,8 @@ type ModifyDBInstanceInput struct { // A value that specifies the order in which an Aurora Replica is promoted to // the primary instance after a failure of the existing primary instance. For - // more information, see Fault Tolerance for an Aurora DB Cluster (http://docs.aws.amazon.com/AmazonRDS/latest/UserGuide/Aurora.Managing.html#Aurora.Managing.FaultTolerance). + // more information, see Fault Tolerance for an Aurora DB Cluster (http://docs.aws.amazon.com/AmazonRDS/latest/AuroraUserGuide/Aurora.Managing.Backups.html#Aurora.Managing.FaultTolerance) + // in the Amazon Aurora User Guide. // // Default: 1 // @@ -23207,6 +23957,12 @@ func (s *ModifyDBInstanceInput) SetDBSubnetGroupName(v string) *ModifyDBInstance return s } +// SetDeletionProtection sets the DeletionProtection field's value. +func (s *ModifyDBInstanceInput) SetDeletionProtection(v bool) *ModifyDBInstanceInput { + s.DeletionProtection = &v + return s +} + // SetDomain sets the Domain field's value. func (s *ModifyDBInstanceInput) SetDomain(v string) *ModifyDBInstanceInput { s.Domain = &v @@ -23592,7 +24348,8 @@ type ModifyDBSnapshotInput struct { // You can specify this parameter when you upgrade an Oracle DB snapshot. The // same option group considerations apply when upgrading a DB snapshot as when // upgrading a DB instance. For more information, see Option Group Considerations - // (http://docs.aws.amazon.com/AmazonRDS/latest/UserGuide/USER_UpgradeDBInstance.Oracle.html#USER_UpgradeDBInstance.Oracle.OGPG.OG). + // (http://docs.aws.amazon.com/AmazonRDS/latest/UserGuide/USER_UpgradeDBInstance.Oracle.html#USER_UpgradeDBInstance.Oracle.OGPG.OG) + // in the Amazon RDS User Guide. OptionGroupName *string `type:"string"` } @@ -24462,6 +25219,14 @@ type OptionGroupOptionSetting struct { // from the default value. IsModifiable *bool `type:"boolean"` + // Boolean value where true indicates that a value must be specified for this + // option setting of the option group option. + IsRequired *bool `type:"boolean"` + + // The minimum DB engine version required for the corresponding allowed value + // for this option setting. + MinimumEngineVersionPerAllowedValue []*MinimumEngineVersionPerAllowedValue `locationNameList:"MinimumEngineVersionPerAllowedValue" type:"list"` + // The description of the option group option. SettingDescription *string `type:"string"` @@ -24503,6 +25268,18 @@ func (s *OptionGroupOptionSetting) SetIsModifiable(v bool) *OptionGroupOptionSet return s } +// SetIsRequired sets the IsRequired field's value. +func (s *OptionGroupOptionSetting) SetIsRequired(v bool) *OptionGroupOptionSetting { + s.IsRequired = &v + return s +} + +// SetMinimumEngineVersionPerAllowedValue sets the MinimumEngineVersionPerAllowedValue field's value. +func (s *OptionGroupOptionSetting) SetMinimumEngineVersionPerAllowedValue(v []*MinimumEngineVersionPerAllowedValue) *OptionGroupOptionSetting { + s.MinimumEngineVersionPerAllowedValue = v + return s +} + // SetSettingDescription sets the SettingDescription field's value. func (s *OptionGroupOptionSetting) SetSettingDescription(v string) *OptionGroupOptionSetting { s.SettingDescription = &v @@ -24702,6 +25479,9 @@ type OrderableDBInstanceOption struct { // Indicates the storage type for a DB instance. StorageType *string `type:"string"` + // A list of the supported DB engine modes. + SupportedEngineModes []*string `type:"list"` + // Indicates whether a DB instance supports Enhanced Monitoring at intervals // from 1 to 60 seconds. SupportsEnhancedMonitoring *bool `type:"boolean"` @@ -24822,6 +25602,12 @@ func (s *OrderableDBInstanceOption) SetStorageType(v string) *OrderableDBInstanc return s } +// SetSupportedEngineModes sets the SupportedEngineModes field's value. +func (s *OrderableDBInstanceOption) SetSupportedEngineModes(v []*string) *OrderableDBInstanceOption { + s.SupportedEngineModes = v + return s +} + // SetSupportsEnhancedMonitoring sets the SupportsEnhancedMonitoring field's value. func (s *OrderableDBInstanceOption) SetSupportsEnhancedMonitoring(v bool) *OrderableDBInstanceOption { s.SupportsEnhancedMonitoring = &v @@ -24897,6 +25683,9 @@ type Parameter struct { // Indicates the source of the parameter value. Source *string `type:"string"` + + // The valid DB engine modes. + SupportedEngineModes []*string `type:"list"` } // String returns the string representation @@ -24969,6 +25758,12 @@ func (s *Parameter) SetSource(v string) *Parameter { return s } +// SetSupportedEngineModes sets the SupportedEngineModes field's value. +func (s *Parameter) SetSupportedEngineModes(v []*string) *Parameter { + s.SupportedEngineModes = v + return s +} + // A list of the log types whose configuration is still pending. In other words, // these log types are in the process of being activated or deactivated. type PendingCloudwatchLogsExports struct { @@ -25358,9 +26153,10 @@ func (s *PromoteReadReplicaDBClusterInput) SetDBClusterIdentifier(v string) *Pro type PromoteReadReplicaDBClusterOutput struct { _ struct{} `type:"structure"` - // Contains the details of an Amazon RDS DB cluster. + // Contains the details of an Amazon Aurora DB cluster. // - // This data type is used as a response element in the DescribeDBClusters action. + // This data type is used as a response element in the DescribeDBClusters, StopDBCluster, + // and StartDBCluster actions. DBCluster *DBCluster `type:"structure"` } @@ -25511,7 +26307,8 @@ type PurchaseReservedDBInstancesOfferingInput struct { // ReservedDBInstancesOfferingId is a required field ReservedDBInstancesOfferingId *string `type:"string" required:"true"` - // A list of tags. For more information, see Tagging Amazon RDS Resources (http://docs.aws.amazon.com/AmazonRDS/latest/UserGuide/USER_Tagging.html). + // A list of tags. For more information, see Tagging Amazon RDS Resources (http://docs.aws.amazon.com/AmazonRDS/latest/UserGuide/USER_Tagging.html) + // in the Amazon RDS User Guide. Tags []*Tag `locationNameList:"Tag" type:"list"` } @@ -25894,7 +26691,8 @@ type RemoveTagsFromResourceInput struct { // The Amazon RDS resource that the tags are removed from. This value is an // Amazon Resource Name (ARN). For information about creating an ARN, see Constructing - // an RDS Amazon Resource Name (ARN) (http://docs.aws.amazon.com/AmazonRDS/latest/UserGuide/USER_Tagging.ARN.html#USER_Tagging.ARN.Constructing). + // an ARN for Amazon RDS (http://docs.aws.amazon.com/AmazonRDS/latest/UserGuide/USER_Tagging.ARN.html#USER_Tagging.ARN.Constructing) + // in the Amazon RDS User Guide. // // ResourceName is a required field ResourceName *string `type:"string" required:"true"` @@ -26460,8 +27258,15 @@ type RestoreDBClusterFromS3Input struct { // The database name for the restored DB cluster. DatabaseName *string `type:"string"` + // Indicates if the DB cluster should have deletion protection enabled. The + // database can't be deleted when this value is set to true. The default is + // false. + DeletionProtection *bool `type:"boolean"` + // The list of logs that the restored DB cluster is to export to CloudWatch - // Logs. + // Logs. The values in the list depend on the DB engine being used. For more + // information, see Publishing Database Logs to Amazon CloudWatch Logs (http://docs.aws.amazon.com/AmazonRDS/latest/AuroraUserGuide/USER_LogAccess.html#USER_LogAccess.Procedural.UploadtoCloudWatch) + // in the Amazon Aurora User Guide. EnableCloudwatchLogsExports []*string `type:"list"` // True to enable mapping of AWS Identity and Access Management (IAM) accounts @@ -26540,8 +27345,8 @@ type RestoreDBClusterFromS3Input struct { // // The default is a 30-minute window selected at random from an 8-hour block // of time for each AWS Region. To see the time blocks available, see Adjusting - // the Preferred Maintenance Window (http://docs.aws.amazon.com/AmazonRDS/latest/UserGuide/AdjustingTheMaintenanceWindow.html) - // in the Amazon RDS User Guide. + // the Preferred Maintenance Window (http://docs.aws.amazon.com/AmazonRDS/latest/AuroraUserGuide/USER_UpgradeDBInstance.Maintenance.html#AdjustingTheMaintenanceWindow.Aurora) + // in the Amazon Aurora User Guide. // // Constraints: // @@ -26562,8 +27367,8 @@ type RestoreDBClusterFromS3Input struct { // The default is a 30-minute window selected at random from an 8-hour block // of time for each AWS Region, occurring on a random day of the week. To see // the time blocks available, see Adjusting the Preferred Maintenance Window - // (http://docs.aws.amazon.com/AmazonRDS/latest/UserGuide/AdjustingTheMaintenanceWindow.html) - // in the Amazon RDS User Guide. + // (http://docs.aws.amazon.com/AmazonRDS/latest/AuroraUserGuide/USER_UpgradeDBInstance.Maintenance.html#AdjustingTheMaintenanceWindow.Aurora) + // in the Amazon Aurora User Guide. // // Valid Days: Mon, Tue, Wed, Thu, Fri, Sat, Sun. // @@ -26609,7 +27414,8 @@ type RestoreDBClusterFromS3Input struct { // Specifies whether the restored DB cluster is encrypted. StorageEncrypted *bool `type:"boolean"` - // A list of tags. For more information, see Tagging Amazon RDS Resources (http://docs.aws.amazon.com/AmazonRDS/latest/UserGuide/USER_Tagging.html). + // A list of tags. For more information, see Tagging Amazon RDS Resources (http://docs.aws.amazon.com/AmazonRDS/latest/UserGuide/USER_Tagging.html) + // in the Amazon RDS User Guide. Tags []*Tag `locationNameList:"Tag" type:"list"` // A list of EC2 VPC security groups to associate with the restored DB cluster. @@ -26708,6 +27514,12 @@ func (s *RestoreDBClusterFromS3Input) SetDatabaseName(v string) *RestoreDBCluste return s } +// SetDeletionProtection sets the DeletionProtection field's value. +func (s *RestoreDBClusterFromS3Input) SetDeletionProtection(v bool) *RestoreDBClusterFromS3Input { + s.DeletionProtection = &v + return s +} + // SetEnableCloudwatchLogsExports sets the EnableCloudwatchLogsExports field's value. func (s *RestoreDBClusterFromS3Input) SetEnableCloudwatchLogsExports(v []*string) *RestoreDBClusterFromS3Input { s.EnableCloudwatchLogsExports = v @@ -26825,9 +27637,10 @@ func (s *RestoreDBClusterFromS3Input) SetVpcSecurityGroupIds(v []*string) *Resto type RestoreDBClusterFromS3Output struct { _ struct{} `type:"structure"` - // Contains the details of an Amazon RDS DB cluster. + // Contains the details of an Amazon Aurora DB cluster. // - // This data type is used as a response element in the DescribeDBClusters action. + // This data type is used as a response element in the DescribeDBClusters, StopDBCluster, + // and StartDBCluster actions. DBCluster *DBCluster `type:"structure"` } @@ -26891,8 +27704,15 @@ type RestoreDBClusterFromSnapshotInput struct { // The database name for the restored DB cluster. DatabaseName *string `type:"string"` + // Indicates if the DB cluster should have deletion protection enabled. The + // database can't be deleted when this value is set to true. The default is + // false. + DeletionProtection *bool `type:"boolean"` + // The list of logs that the restored DB cluster is to export to CloudWatch - // Logs. + // Logs. The values in the list depend on the DB engine being used. For more + // information, see Publishing Database Logs to Amazon CloudWatch Logs (http://docs.aws.amazon.com/AmazonRDS/latest/AuroraUserGuide/USER_LogAccess.html#USER_LogAccess.Procedural.UploadtoCloudWatch) + // in the Amazon Aurora User Guide. EnableCloudwatchLogsExports []*string `type:"list"` // True to enable mapping of AWS Identity and Access Management (IAM) accounts @@ -26910,6 +27730,10 @@ type RestoreDBClusterFromSnapshotInput struct { // Engine is a required field Engine *string `type:"string" required:"true"` + // The DB engine mode of the DB cluster, either provisioned, serverless, or + // parallelquery. + EngineMode *string `type:"string"` + // The version of the database engine to use for the new DB cluster. EngineVersion *string `type:"string"` @@ -26942,6 +27766,10 @@ type RestoreDBClusterFromSnapshotInput struct { // Default: The same port as the original DB cluster. Port *int64 `type:"integer"` + // For DB clusters in serverless DB engine mode, the scaling properties of the + // DB cluster. + ScalingConfiguration *ScalingConfiguration `type:"structure"` + // The identifier for the DB snapshot or DB cluster snapshot to restore from. // // You can use either the name or the Amazon Resource Name (ARN) to specify @@ -27021,6 +27849,12 @@ func (s *RestoreDBClusterFromSnapshotInput) SetDatabaseName(v string) *RestoreDB return s } +// SetDeletionProtection sets the DeletionProtection field's value. +func (s *RestoreDBClusterFromSnapshotInput) SetDeletionProtection(v bool) *RestoreDBClusterFromSnapshotInput { + s.DeletionProtection = &v + return s +} + // SetEnableCloudwatchLogsExports sets the EnableCloudwatchLogsExports field's value. func (s *RestoreDBClusterFromSnapshotInput) SetEnableCloudwatchLogsExports(v []*string) *RestoreDBClusterFromSnapshotInput { s.EnableCloudwatchLogsExports = v @@ -27039,6 +27873,12 @@ func (s *RestoreDBClusterFromSnapshotInput) SetEngine(v string) *RestoreDBCluste return s } +// SetEngineMode sets the EngineMode field's value. +func (s *RestoreDBClusterFromSnapshotInput) SetEngineMode(v string) *RestoreDBClusterFromSnapshotInput { + s.EngineMode = &v + return s +} + // SetEngineVersion sets the EngineVersion field's value. func (s *RestoreDBClusterFromSnapshotInput) SetEngineVersion(v string) *RestoreDBClusterFromSnapshotInput { s.EngineVersion = &v @@ -27063,6 +27903,12 @@ func (s *RestoreDBClusterFromSnapshotInput) SetPort(v int64) *RestoreDBClusterFr return s } +// SetScalingConfiguration sets the ScalingConfiguration field's value. +func (s *RestoreDBClusterFromSnapshotInput) SetScalingConfiguration(v *ScalingConfiguration) *RestoreDBClusterFromSnapshotInput { + s.ScalingConfiguration = v + return s +} + // SetSnapshotIdentifier sets the SnapshotIdentifier field's value. func (s *RestoreDBClusterFromSnapshotInput) SetSnapshotIdentifier(v string) *RestoreDBClusterFromSnapshotInput { s.SnapshotIdentifier = &v @@ -27084,9 +27930,10 @@ func (s *RestoreDBClusterFromSnapshotInput) SetVpcSecurityGroupIds(v []*string) type RestoreDBClusterFromSnapshotOutput struct { _ struct{} `type:"structure"` - // Contains the details of an Amazon RDS DB cluster. + // Contains the details of an Amazon Aurora DB cluster. // - // This data type is used as a response element in the DescribeDBClusters action. + // This data type is used as a response element in the DescribeDBClusters, StopDBCluster, + // and StartDBCluster actions. DBCluster *DBCluster `type:"structure"` } @@ -27140,8 +27987,15 @@ type RestoreDBClusterToPointInTimeInput struct { // Example: mySubnetgroup DBSubnetGroupName *string `type:"string"` + // Indicates if the DB cluster should have deletion protection enabled. The + // database can't be deleted when this value is set to true. The default is + // false. + DeletionProtection *bool `type:"boolean"` + // The list of logs that the restored DB cluster is to export to CloudWatch - // Logs. + // Logs. The values in the list depend on the DB engine being used. For more + // information, see Publishing Database Logs to Amazon CloudWatch Logs (http://docs.aws.amazon.com/AmazonRDS/latest/AuroraUserGuide/USER_LogAccess.html#USER_LogAccess.Procedural.UploadtoCloudWatch) + // in the Amazon Aurora User Guide. EnableCloudwatchLogsExports []*string `type:"list"` // True to enable mapping of AWS Identity and Access Management (IAM) accounts @@ -27228,7 +28082,8 @@ type RestoreDBClusterToPointInTimeInput struct { // SourceDBClusterIdentifier is a required field SourceDBClusterIdentifier *string `type:"string" required:"true"` - // A list of tags. For more information, see Tagging Amazon RDS Resources (http://docs.aws.amazon.com/AmazonRDS/latest/UserGuide/USER_Tagging.html). + // A list of tags. For more information, see Tagging Amazon RDS Resources (http://docs.aws.amazon.com/AmazonRDS/latest/UserGuide/USER_Tagging.html) + // in the Amazon RDS User Guide. Tags []*Tag `locationNameList:"Tag" type:"list"` // A value that is set to true to restore the DB cluster to the latest restorable @@ -27287,6 +28142,12 @@ func (s *RestoreDBClusterToPointInTimeInput) SetDBSubnetGroupName(v string) *Res return s } +// SetDeletionProtection sets the DeletionProtection field's value. +func (s *RestoreDBClusterToPointInTimeInput) SetDeletionProtection(v bool) *RestoreDBClusterToPointInTimeInput { + s.DeletionProtection = &v + return s +} + // SetEnableCloudwatchLogsExports sets the EnableCloudwatchLogsExports field's value. func (s *RestoreDBClusterToPointInTimeInput) SetEnableCloudwatchLogsExports(v []*string) *RestoreDBClusterToPointInTimeInput { s.EnableCloudwatchLogsExports = v @@ -27356,9 +28217,10 @@ func (s *RestoreDBClusterToPointInTimeInput) SetVpcSecurityGroupIds(v []*string) type RestoreDBClusterToPointInTimeOutput struct { _ struct{} `type:"structure"` - // Contains the details of an Amazon RDS DB cluster. + // Contains the details of an Amazon Aurora DB cluster. // - // This data type is used as a response element in the DescribeDBClusters action. + // This data type is used as a response element in the DescribeDBClusters, StopDBCluster, + // and StartDBCluster actions. DBCluster *DBCluster `type:"structure"` } @@ -27448,6 +28310,11 @@ type RestoreDBInstanceFromDBSnapshotInput struct { // Example: mySubnetgroup DBSubnetGroupName *string `type:"string"` + // Indicates if the DB instance should have deletion protection enabled. The + // database can't be deleted when this value is set to true. The default is + // false. For more information, see Deleting a DB Instance (http://docs.aws.amazon.com/AmazonRDS/latest/UserGuide/USER_DeleteInstance.html). + DeletionProtection *bool `type:"boolean"` + // Specify the Active Directory Domain to restore the instance in. Domain *string `type:"string"` @@ -27456,7 +28323,9 @@ type RestoreDBInstanceFromDBSnapshotInput struct { DomainIAMRoleName *string `type:"string"` // The list of logs that the restored DB instance is to export to CloudWatch - // Logs. + // Logs. The values in the list depend on the DB engine being used. For more + // information, see Publishing Database Logs to Amazon CloudWatch Logs (http://docs.aws.amazon.com/AmazonRDS/latest/AuroraUserGuide/USER_LogAccess.html#USER_LogAccess.Procedural.UploadtoCloudWatch) + // in the Amazon Aurora User Guide. EnableCloudwatchLogsExports []*string `type:"list"` // True to enable mapping of AWS Identity and Access Management (IAM) accounts @@ -27512,7 +28381,8 @@ type RestoreDBInstanceFromDBSnapshotInput struct { // // The provisioned IOPS value must follow the requirements for your database // engine. For more information, see Amazon RDS Provisioned IOPS Storage to - // Improve Performance (http://docs.aws.amazon.com/AmazonRDS/latest/UserGuide/CHAP_Storage.html#USER_PIOPS). + // Improve Performance (http://docs.aws.amazon.com/AmazonRDS/latest/UserGuide/CHAP_Storage.html#USER_PIOPS) + // in the Amazon RDS User Guide. // // Constraints: Must be an integer greater than 1000. Iops *int64 `type:"integer"` @@ -27551,19 +28421,8 @@ type RestoreDBInstanceFromDBSnapshotInput struct { // Specifies the accessibility options for the DB instance. A value of true // specifies an Internet-facing instance with a publicly resolvable DNS name, // which resolves to a public IP address. A value of false specifies an internal - // instance with a DNS name that resolves to a private IP address. - // - // Default: The default behavior varies depending on whether a VPC has been - // requested or not. The following list shows the default behavior in each case. - // - // * Default VPC: true - // - // * VPC: false - // - // If no DB subnet group has been specified as part of the request and the PubliclyAccessible - // value has not been set, the DB instance is publicly accessible. If a specific - // DB subnet group has been specified as part of the request and the PubliclyAccessible - // value has not been set, the DB instance is private. + // instance with a DNS name that resolves to a private IP address. For more + // information, see CreateDBInstance. PubliclyAccessible *bool `type:"boolean"` // Specifies the storage type to be associated with the DB instance. @@ -27575,7 +28434,8 @@ type RestoreDBInstanceFromDBSnapshotInput struct { // Default: io1 if the Iops parameter is specified, otherwise standard StorageType *string `type:"string"` - // A list of tags. For more information, see Tagging Amazon RDS Resources (http://docs.aws.amazon.com/AmazonRDS/latest/UserGuide/USER_Tagging.html). + // A list of tags. For more information, see Tagging Amazon RDS Resources (http://docs.aws.amazon.com/AmazonRDS/latest/UserGuide/USER_Tagging.html) + // in the Amazon RDS User Guide. Tags []*Tag `locationNameList:"Tag" type:"list"` // The ARN from the key store with which to associate the instance for TDE encryption. @@ -27664,6 +28524,12 @@ func (s *RestoreDBInstanceFromDBSnapshotInput) SetDBSubnetGroupName(v string) *R return s } +// SetDeletionProtection sets the DeletionProtection field's value. +func (s *RestoreDBInstanceFromDBSnapshotInput) SetDeletionProtection(v bool) *RestoreDBInstanceFromDBSnapshotInput { + s.DeletionProtection = &v + return s +} + // SetDomain sets the Domain field's value. func (s *RestoreDBInstanceFromDBSnapshotInput) SetDomain(v string) *RestoreDBInstanceFromDBSnapshotInput { s.Domain = &v @@ -27810,7 +28676,8 @@ type RestoreDBInstanceFromS3Input struct { // The Availability Zone that the DB instance is created in. For information // about AWS Regions and Availability Zones, see Regions and Availability Zones - // (http://docs.aws.amazon.com/AmazonRDS/latest/UserGuide/Concepts.RegionsAndAvailabilityZones.html). + // (http://docs.aws.amazon.com/AmazonRDS/latest/UserGuide/Concepts.RegionsAndAvailabilityZones.html) + // in the Amazon RDS User Guide. // // Default: A random, system-chosen Availability Zone in the endpoint's AWS // Region. @@ -27877,8 +28744,15 @@ type RestoreDBInstanceFromS3Input struct { // A DB subnet group to associate with this DB instance. DBSubnetGroupName *string `type:"string"` + // Indicates if the DB instance should have deletion protection enabled. The + // database can't be deleted when this value is set to true. The default is + // false. For more information, see Deleting a DB Instance (http://docs.aws.amazon.com/AmazonRDS/latest/UserGuide/USER_DeleteInstance.html). + DeletionProtection *bool `type:"boolean"` + // The list of logs that the restored DB instance is to export to CloudWatch - // Logs. + // Logs. The values in the list depend on the DB engine being used. For more + // information, see Publishing Database Logs to Amazon CloudWatch Logs (http://docs.aws.amazon.com/AmazonRDS/latest/UserGuide/USER_LogAccess.html#USER_LogAccess.Procedural.UploadtoCloudWatch) + // in the Amazon RDS User Guide. EnableCloudwatchLogsExports []*string `type:"list"` // True to enable mapping of AWS Identity and Access Management (IAM) accounts @@ -27907,7 +28781,8 @@ type RestoreDBInstanceFromS3Input struct { // The amount of Provisioned IOPS (input/output operations per second) to allocate // initially for the DB instance. For information about valid Iops values, see - // see Amazon RDS Provisioned IOPS Storage to Improve Performance (http://docs.aws.amazon.com/AmazonRDS/latest/UserGuide/CHAP_Storage.html#USER_PIOPS). + // see Amazon RDS Provisioned IOPS Storage to Improve Performance (http://docs.aws.amazon.com/AmazonRDS/latest/UserGuide/CHAP_Storage.html#USER_PIOPS) + // in the Amazon RDS User Guide. Iops *int64 `type:"integer"` // The AWS KMS key identifier for an encrypted DB instance. @@ -27958,7 +28833,8 @@ type RestoreDBInstanceFromS3Input struct { // The ARN for the IAM role that permits RDS to send enhanced monitoring metrics // to Amazon CloudWatch Logs. For example, arn:aws:iam:123456789012:role/emaccess. // For information on creating a monitoring role, see Setting Up and Enabling - // Enhanced Monitoring (http://docs.aws.amazon.com/AmazonRDS/latest/UserGuide/USER_Monitoring.OS.html#USER_Monitoring.OS.Enabling). + // Enhanced Monitoring (http://docs.aws.amazon.com/AmazonRDS/latest/UserGuide/USER_Monitoring.OS.html#USER_Monitoring.OS.Enabling) + // in the Amazon RDS User Guide. // // If MonitoringInterval is set to a value other than 0, then you must supply // a MonitoringRoleArn value. @@ -27992,7 +28868,8 @@ type RestoreDBInstanceFromS3Input struct { Port *int64 `type:"integer"` // The time range each day during which automated backups are created if automated - // backups are enabled. For more information, see The Backup Window (http://docs.aws.amazon.com/AmazonRDS/latest/UserGuide/USER_WorkingWithAutomatedBackups.html#USER_WorkingWithAutomatedBackups.BackupWindow). + // backups are enabled. For more information, see The Backup Window (http://docs.aws.amazon.com/AmazonRDS/latest/UserGuide/USER_WorkingWithAutomatedBackups.html#USER_WorkingWithAutomatedBackups.BackupWindow) + // in the Amazon RDS User Guide. // // Constraints: // @@ -28007,7 +28884,8 @@ type RestoreDBInstanceFromS3Input struct { // The time range each week during which system maintenance can occur, in Universal // Coordinated Time (UTC). For more information, see Amazon RDS Maintenance - // Window (http://docs.aws.amazon.com/AmazonRDS/latest/UserGuide/USER_UpgradeDBInstance.Maintenance.html#Concepts.DBMaintenance). + // Window (http://docs.aws.amazon.com/AmazonRDS/latest/UserGuide/USER_UpgradeDBInstance.Maintenance.html#Concepts.DBMaintenance) + // in the Amazon RDS User Guide. // // Constraints: // @@ -28026,7 +28904,10 @@ type RestoreDBInstanceFromS3Input struct { // class of the DB instance. ProcessorFeatures []*ProcessorFeature `locationNameList:"ProcessorFeature" type:"list"` - // Specifies whether the DB instance is publicly accessible or not. For more + // Specifies the accessibility options for the DB instance. A value of true + // specifies an Internet-facing instance with a publicly resolvable DNS name, + // which resolves to a public IP address. A value of false specifies an internal + // instance with a DNS name that resolves to a private IP address. For more // information, see CreateDBInstance. PubliclyAccessible *bool `type:"boolean"` @@ -28071,7 +28952,8 @@ type RestoreDBInstanceFromS3Input struct { StorageType *string `type:"string"` // A list of tags to associate with this DB instance. For more information, - // see Tagging Amazon RDS Resources (http://docs.aws.amazon.com/AmazonRDS/latest/UserGuide/USER_Tagging.html). + // see Tagging Amazon RDS Resources (http://docs.aws.amazon.com/AmazonRDS/latest/UserGuide/USER_Tagging.html) + // in the Amazon RDS User Guide. Tags []*Tag `locationNameList:"Tag" type:"list"` // A value that specifies that the DB instance class of the DB instance uses @@ -28189,6 +29071,12 @@ func (s *RestoreDBInstanceFromS3Input) SetDBSubnetGroupName(v string) *RestoreDB return s } +// SetDeletionProtection sets the DeletionProtection field's value. +func (s *RestoreDBInstanceFromS3Input) SetDeletionProtection(v bool) *RestoreDBInstanceFromS3Input { + s.DeletionProtection = &v + return s +} + // SetEnableCloudwatchLogsExports sets the EnableCloudwatchLogsExports field's value. func (s *RestoreDBInstanceFromS3Input) SetEnableCloudwatchLogsExports(v []*string) *RestoreDBInstanceFromS3Input { s.EnableCloudwatchLogsExports = v @@ -28442,6 +29330,11 @@ type RestoreDBInstanceToPointInTimeInput struct { // Example: mySubnetgroup DBSubnetGroupName *string `type:"string"` + // Indicates if the DB instance should have deletion protection enabled. The + // database can't be deleted when this value is set to true. The default is + // false. For more information, see Deleting a DB Instance (http://docs.aws.amazon.com/AmazonRDS/latest/UserGuide/USER_DeleteInstance.html). + DeletionProtection *bool `type:"boolean"` + // Specify the Active Directory Domain to restore the instance in. Domain *string `type:"string"` @@ -28450,7 +29343,9 @@ type RestoreDBInstanceToPointInTimeInput struct { DomainIAMRoleName *string `type:"string"` // The list of logs that the restored DB instance is to export to CloudWatch - // Logs. + // Logs. The values in the list depend on the DB engine being used. For more + // information, see Publishing Database Logs to Amazon CloudWatch Logs (http://docs.aws.amazon.com/AmazonRDS/latest/UserGuide/USER_LogAccess.html#USER_LogAccess.Procedural.UploadtoCloudWatch) + // in the Amazon RDS User Guide. EnableCloudwatchLogsExports []*string `type:"list"` // True to enable mapping of AWS Identity and Access Management (IAM) accounts @@ -28540,19 +29435,8 @@ type RestoreDBInstanceToPointInTimeInput struct { // Specifies the accessibility options for the DB instance. A value of true // specifies an Internet-facing instance with a publicly resolvable DNS name, // which resolves to a public IP address. A value of false specifies an internal - // instance with a DNS name that resolves to a private IP address. - // - // Default: The default behavior varies depending on whether a VPC has been - // requested or not. The following list shows the default behavior in each case. - // - // * Default VPC:true - // - // * VPC:false - // - // If no DB subnet group has been specified as part of the request and the PubliclyAccessible - // value has not been set, the DB instance is publicly accessible. If a specific - // DB subnet group has been specified as part of the request and the PubliclyAccessible - // value has not been set, the DB instance is private. + // instance with a DNS name that resolves to a private IP address. For more + // information, see CreateDBInstance. PubliclyAccessible *bool `type:"boolean"` // The date and time to restore from. @@ -28586,7 +29470,8 @@ type RestoreDBInstanceToPointInTimeInput struct { // Default: io1 if the Iops parameter is specified, otherwise standard StorageType *string `type:"string"` - // A list of tags. For more information, see Tagging Amazon RDS Resources (http://docs.aws.amazon.com/AmazonRDS/latest/UserGuide/USER_Tagging.html). + // A list of tags. For more information, see Tagging Amazon RDS Resources (http://docs.aws.amazon.com/AmazonRDS/latest/UserGuide/USER_Tagging.html) + // in the Amazon RDS User Guide. Tags []*Tag `locationNameList:"Tag" type:"list"` // The name of the new DB instance to be created. @@ -28684,6 +29569,12 @@ func (s *RestoreDBInstanceToPointInTimeInput) SetDBSubnetGroupName(v string) *Re return s } +// SetDeletionProtection sets the DeletionProtection field's value. +func (s *RestoreDBInstanceToPointInTimeInput) SetDeletionProtection(v bool) *RestoreDBInstanceToPointInTimeInput { + s.DeletionProtection = &v + return s +} + // SetDomain sets the Domain field's value. func (s *RestoreDBInstanceToPointInTimeInput) SetDomain(v string) *RestoreDBInstanceToPointInTimeInput { s.Domain = &v @@ -28945,6 +29836,132 @@ func (s *RevokeDBSecurityGroupIngressOutput) SetDBSecurityGroup(v *DBSecurityGro return s } +// Contains the scaling configuration of an Aurora Serverless DB cluster. +// +// For more information, see Using Amazon Aurora Serverless (http://docs.aws.amazon.com/AmazonRDS/latest/AuroraUserGuide/aurora-serverless.html) +// in the Amazon Aurora User Guide. +type ScalingConfiguration struct { + _ struct{} `type:"structure"` + + // A value that specifies whether to allow or disallow automatic pause for an + // Aurora DB cluster in serverless DB engine mode. A DB cluster can be paused + // only when it's idle (it has no connections). + // + // If a DB cluster is paused for more than seven days, the DB cluster might + // be backed up with a snapshot. In this case, the DB cluster is restored when + // there is a request to connect to it. + AutoPause *bool `type:"boolean"` + + // The maximum capacity for an Aurora DB cluster in serverless DB engine mode. + // + // Valid capacity values are 2, 4, 8, 16, 32, 64, 128, and 256. + // + // The maximum capacity must be greater than or equal to the minimum capacity. + MaxCapacity *int64 `type:"integer"` + + // The minimum capacity for an Aurora DB cluster in serverless DB engine mode. + // + // Valid capacity values are 2, 4, 8, 16, 32, 64, 128, and 256. + // + // The minimum capacity must be less than or equal to the maximum capacity. + MinCapacity *int64 `type:"integer"` + + // The time, in seconds, before an Aurora DB cluster in serverless mode is paused. + SecondsUntilAutoPause *int64 `type:"integer"` +} + +// String returns the string representation +func (s ScalingConfiguration) String() string { + return awsutil.Prettify(s) +} + +// GoString returns the string representation +func (s ScalingConfiguration) GoString() string { + return s.String() +} + +// SetAutoPause sets the AutoPause field's value. +func (s *ScalingConfiguration) SetAutoPause(v bool) *ScalingConfiguration { + s.AutoPause = &v + return s +} + +// SetMaxCapacity sets the MaxCapacity field's value. +func (s *ScalingConfiguration) SetMaxCapacity(v int64) *ScalingConfiguration { + s.MaxCapacity = &v + return s +} + +// SetMinCapacity sets the MinCapacity field's value. +func (s *ScalingConfiguration) SetMinCapacity(v int64) *ScalingConfiguration { + s.MinCapacity = &v + return s +} + +// SetSecondsUntilAutoPause sets the SecondsUntilAutoPause field's value. +func (s *ScalingConfiguration) SetSecondsUntilAutoPause(v int64) *ScalingConfiguration { + s.SecondsUntilAutoPause = &v + return s +} + +// Shows the scaling configuration for an Aurora DB cluster in serverless DB +// engine mode. +// +// For more information, see Using Amazon Aurora Serverless (http://docs.aws.amazon.com/AmazonRDS/latest/AuroraUserGuide/aurora-serverless.html) +// in the Amazon Aurora User Guide. +type ScalingConfigurationInfo struct { + _ struct{} `type:"structure"` + + // A value that indicates whether automatic pause is allowed for the Aurora + // DB cluster in serverless DB engine mode. + AutoPause *bool `type:"boolean"` + + // The maximum capacity for an Aurora DB cluster in serverless DB engine mode. + MaxCapacity *int64 `type:"integer"` + + // The maximum capacity for the Aurora DB cluster in serverless DB engine mode. + MinCapacity *int64 `type:"integer"` + + // The remaining amount of time, in seconds, before the Aurora DB cluster in + // serverless mode is paused. A DB cluster can be paused only when it's idle + // (it has no connections). + SecondsUntilAutoPause *int64 `type:"integer"` +} + +// String returns the string representation +func (s ScalingConfigurationInfo) String() string { + return awsutil.Prettify(s) +} + +// GoString returns the string representation +func (s ScalingConfigurationInfo) GoString() string { + return s.String() +} + +// SetAutoPause sets the AutoPause field's value. +func (s *ScalingConfigurationInfo) SetAutoPause(v bool) *ScalingConfigurationInfo { + s.AutoPause = &v + return s +} + +// SetMaxCapacity sets the MaxCapacity field's value. +func (s *ScalingConfigurationInfo) SetMaxCapacity(v int64) *ScalingConfigurationInfo { + s.MaxCapacity = &v + return s +} + +// SetMinCapacity sets the MinCapacity field's value. +func (s *ScalingConfigurationInfo) SetMinCapacity(v int64) *ScalingConfigurationInfo { + s.MinCapacity = &v + return s +} + +// SetSecondsUntilAutoPause sets the SecondsUntilAutoPause field's value. +func (s *ScalingConfigurationInfo) SetSecondsUntilAutoPause(v int64) *ScalingConfigurationInfo { + s.SecondsUntilAutoPause = &v + return s +} + // Contains an AWS Region name as the result of a successful call to the DescribeSourceRegions // action. type SourceRegion struct { @@ -28988,6 +30005,71 @@ func (s *SourceRegion) SetStatus(v string) *SourceRegion { return s } +type StartDBClusterInput struct { + _ struct{} `type:"structure"` + + // The DB cluster identifier of the Amazon Aurora DB cluster to be started. + // This parameter is stored as a lowercase string. + // + // DBClusterIdentifier is a required field + DBClusterIdentifier *string `type:"string" required:"true"` +} + +// String returns the string representation +func (s StartDBClusterInput) String() string { + return awsutil.Prettify(s) +} + +// GoString returns the string representation +func (s StartDBClusterInput) GoString() string { + return s.String() +} + +// Validate inspects the fields of the type to determine if they are valid. +func (s *StartDBClusterInput) Validate() error { + invalidParams := request.ErrInvalidParams{Context: "StartDBClusterInput"} + if s.DBClusterIdentifier == nil { + invalidParams.Add(request.NewErrParamRequired("DBClusterIdentifier")) + } + + if invalidParams.Len() > 0 { + return invalidParams + } + return nil +} + +// SetDBClusterIdentifier sets the DBClusterIdentifier field's value. +func (s *StartDBClusterInput) SetDBClusterIdentifier(v string) *StartDBClusterInput { + s.DBClusterIdentifier = &v + return s +} + +type StartDBClusterOutput struct { + _ struct{} `type:"structure"` + + // Contains the details of an Amazon Aurora DB cluster. + // + // This data type is used as a response element in the DescribeDBClusters, StopDBCluster, + // and StartDBCluster actions. + DBCluster *DBCluster `type:"structure"` +} + +// String returns the string representation +func (s StartDBClusterOutput) String() string { + return awsutil.Prettify(s) +} + +// GoString returns the string representation +func (s StartDBClusterOutput) GoString() string { + return s.String() +} + +// SetDBCluster sets the DBCluster field's value. +func (s *StartDBClusterOutput) SetDBCluster(v *DBCluster) *StartDBClusterOutput { + s.DBCluster = v + return s +} + type StartDBInstanceInput struct { _ struct{} `type:"structure"` @@ -29051,6 +30133,71 @@ func (s *StartDBInstanceOutput) SetDBInstance(v *DBInstance) *StartDBInstanceOut return s } +type StopDBClusterInput struct { + _ struct{} `type:"structure"` + + // The DB cluster identifier of the Amazon Aurora DB cluster to be stopped. + // This parameter is stored as a lowercase string. + // + // DBClusterIdentifier is a required field + DBClusterIdentifier *string `type:"string" required:"true"` +} + +// String returns the string representation +func (s StopDBClusterInput) String() string { + return awsutil.Prettify(s) +} + +// GoString returns the string representation +func (s StopDBClusterInput) GoString() string { + return s.String() +} + +// Validate inspects the fields of the type to determine if they are valid. +func (s *StopDBClusterInput) Validate() error { + invalidParams := request.ErrInvalidParams{Context: "StopDBClusterInput"} + if s.DBClusterIdentifier == nil { + invalidParams.Add(request.NewErrParamRequired("DBClusterIdentifier")) + } + + if invalidParams.Len() > 0 { + return invalidParams + } + return nil +} + +// SetDBClusterIdentifier sets the DBClusterIdentifier field's value. +func (s *StopDBClusterInput) SetDBClusterIdentifier(v string) *StopDBClusterInput { + s.DBClusterIdentifier = &v + return s +} + +type StopDBClusterOutput struct { + _ struct{} `type:"structure"` + + // Contains the details of an Amazon Aurora DB cluster. + // + // This data type is used as a response element in the DescribeDBClusters, StopDBCluster, + // and StartDBCluster actions. + DBCluster *DBCluster `type:"structure"` +} + +// String returns the string representation +func (s StopDBClusterOutput) String() string { + return awsutil.Prettify(s) +} + +// GoString returns the string representation +func (s StopDBClusterOutput) GoString() string { + return s.String() +} + +// SetDBCluster sets the DBCluster field's value. +func (s *StopDBClusterOutput) SetDBCluster(v *DBCluster) *StopDBClusterOutput { + s.DBCluster = v + return s +} + type StopDBInstanceInput struct { _ struct{} `type:"structure"` diff --git a/vendor/github.com/aws/aws-sdk-go/service/rds/errors.go b/vendor/github.com/aws/aws-sdk-go/service/rds/errors.go index a4201c6da..0ca8c1eb2 100644 --- a/vendor/github.com/aws/aws-sdk-go/service/rds/errors.go +++ b/vendor/github.com/aws/aws-sdk-go/service/rds/errors.go @@ -27,6 +27,10 @@ const ( // The DB security group authorization quota has been reached. ErrCodeAuthorizationQuotaExceededFault = "AuthorizationQuotaExceeded" + // ErrCodeBackupPolicyNotFoundFault for service response error code + // "BackupPolicyNotFoundFault". + ErrCodeBackupPolicyNotFoundFault = "BackupPolicyNotFoundFault" + // ErrCodeCertificateNotFoundFault for service response error code // "CertificateNotFound". // @@ -258,6 +262,13 @@ const ( // Availability Zones that have more storage available. ErrCodeInsufficientStorageClusterCapacityFault = "InsufficientStorageClusterCapacity" + // ErrCodeInvalidDBClusterCapacityFault for service response error code + // "InvalidDBClusterCapacityFault". + // + // Capacity isn't a valid Aurora Serverless DB cluster capacity. Valid capacity + // values are 2, 4, 8, 16, 32, 64, 128, and 256. + ErrCodeInvalidDBClusterCapacityFault = "InvalidDBClusterCapacityFault" + // ErrCodeInvalidDBClusterSnapshotStateFault for service response error code // "InvalidDBClusterSnapshotStateFault". // @@ -273,7 +284,7 @@ const ( // ErrCodeInvalidDBInstanceStateFault for service response error code // "InvalidDBInstanceState". // - // The specified DB instance isn't in the available state. + // The DB instance isn't in a valid state. ErrCodeInvalidDBInstanceStateFault = "InvalidDBInstanceState" // ErrCodeInvalidDBParameterGroupStateFault for service response error code diff --git a/vendor/github.com/aws/aws-sdk-go/service/redshift/api.go b/vendor/github.com/aws/aws-sdk-go/service/redshift/api.go index 82e996e83..c57085cf4 100644 --- a/vendor/github.com/aws/aws-sdk-go/service/redshift/api.go +++ b/vendor/github.com/aws/aws-sdk-go/service/redshift/api.go @@ -553,6 +553,9 @@ func (c *Redshift) CreateClusterRequest(input *CreateClusterInput) (req *request // The request cannot be completed because a dependent service is throttling // requests made by Amazon Redshift on your behalf. Wait and retry the request. // +// * ErrCodeInvalidClusterTrackFault "InvalidClusterTrack" +// The provided cluster track name is not valid. +// // See also, https://docs.aws.amazon.com/goto/WebAPI/redshift-2012-12-01/CreateCluster func (c *Redshift) CreateCluster(input *CreateClusterInput) (*CreateClusterOutput, error) { req, out := c.CreateClusterRequest(input) @@ -3264,6 +3267,88 @@ func (c *Redshift) DescribeClusterSubnetGroupsPagesWithContext(ctx aws.Context, return p.Err() } +const opDescribeClusterTracks = "DescribeClusterTracks" + +// DescribeClusterTracksRequest generates a "aws/request.Request" representing the +// client's request for the DescribeClusterTracks operation. The "output" return +// value will be populated with the request's response once the request completes +// successfuly. +// +// Use "Send" method on the returned Request to send the API call to the service. +// the "output" return value is not valid until after Send returns without error. +// +// See DescribeClusterTracks for more information on using the DescribeClusterTracks +// API call, and error handling. +// +// This method is useful when you want to inject custom logic or configuration +// into the SDK's request lifecycle. Such as custom headers, or retry logic. +// +// +// // Example sending a request using the DescribeClusterTracksRequest method. +// req, resp := client.DescribeClusterTracksRequest(params) +// +// err := req.Send() +// if err == nil { // resp is now filled +// fmt.Println(resp) +// } +// +// See also, https://docs.aws.amazon.com/goto/WebAPI/redshift-2012-12-01/DescribeClusterTracks +func (c *Redshift) DescribeClusterTracksRequest(input *DescribeClusterTracksInput) (req *request.Request, output *DescribeClusterTracksOutput) { + op := &request.Operation{ + Name: opDescribeClusterTracks, + HTTPMethod: "POST", + HTTPPath: "/", + } + + if input == nil { + input = &DescribeClusterTracksInput{} + } + + output = &DescribeClusterTracksOutput{} + req = c.newRequest(op, input, output) + return +} + +// DescribeClusterTracks API operation for Amazon Redshift. +// +// Returns a list of all the available maintenance tracks. +// +// Returns awserr.Error for service API and SDK errors. Use runtime type assertions +// with awserr.Error's Code and Message methods to get detailed information about +// the error. +// +// See the AWS API reference guide for Amazon Redshift's +// API operation DescribeClusterTracks for usage and error information. +// +// Returned Error Codes: +// * ErrCodeInvalidClusterTrackFault "InvalidClusterTrack" +// The provided cluster track name is not valid. +// +// * ErrCodeUnauthorizedOperation "UnauthorizedOperation" +// Your account is not authorized to perform the requested operation. +// +// See also, https://docs.aws.amazon.com/goto/WebAPI/redshift-2012-12-01/DescribeClusterTracks +func (c *Redshift) DescribeClusterTracks(input *DescribeClusterTracksInput) (*DescribeClusterTracksOutput, error) { + req, out := c.DescribeClusterTracksRequest(input) + return out, req.Send() +} + +// DescribeClusterTracksWithContext is the same as DescribeClusterTracks with the addition of +// the ability to pass a context and additional request options. +// +// See DescribeClusterTracks for details on how to use this API operation. +// +// The context must be non-nil and will be used for request cancellation. If +// the context is nil a panic will occur. In the future the SDK may create +// sub-contexts for http.Requests. See https://golang.org/pkg/context/ +// for more information on using Contexts. +func (c *Redshift) DescribeClusterTracksWithContext(ctx aws.Context, input *DescribeClusterTracksInput, opts ...request.Option) (*DescribeClusterTracksOutput, error) { + req, out := c.DescribeClusterTracksRequest(input) + req.SetContext(ctx) + req.ApplyOptions(opts...) + return out, req.Send() +} + const opDescribeClusterVersions = "DescribeClusterVersions" // DescribeClusterVersionsRequest generates a "aws/request.Request" representing the @@ -5744,8 +5829,8 @@ func (c *Redshift) GetReservedNodeExchangeOfferingsRequest(input *GetReservedNod // GetReservedNodeExchangeOfferings API operation for Amazon Redshift. // -// Returns an array of ReservedNodeOfferings which is filtered by payment type, -// term, and instance type. +// Returns an array of DC2 ReservedNodeOfferings that matches the payment type, +// term, and usage price of the given DC1 reserved node. // // Returns awserr.Error for service API and SDK errors. Use runtime type assertions // with awserr.Error's Code and Message methods to get detailed information about @@ -5917,6 +6002,9 @@ func (c *Redshift) ModifyClusterRequest(input *ModifyClusterInput) (req *request // The number of tables in the cluster exceeds the limit for the requested new // cluster node type. // +// * ErrCodeInvalidClusterTrackFault "InvalidClusterTrack" +// The provided cluster track name is not valid. +// // See also, https://docs.aws.amazon.com/goto/WebAPI/redshift-2012-12-01/ModifyCluster func (c *Redshift) ModifyCluster(input *ModifyClusterInput) (*ModifyClusterOutput, error) { req, out := c.ModifyClusterRequest(input) @@ -6773,6 +6861,129 @@ func (c *Redshift) ResetClusterParameterGroupWithContext(ctx aws.Context, input return out, req.Send() } +const opResizeCluster = "ResizeCluster" + +// ResizeClusterRequest generates a "aws/request.Request" representing the +// client's request for the ResizeCluster operation. The "output" return +// value will be populated with the request's response once the request completes +// successfuly. +// +// Use "Send" method on the returned Request to send the API call to the service. +// the "output" return value is not valid until after Send returns without error. +// +// See ResizeCluster for more information on using the ResizeCluster +// API call, and error handling. +// +// This method is useful when you want to inject custom logic or configuration +// into the SDK's request lifecycle. Such as custom headers, or retry logic. +// +// +// // Example sending a request using the ResizeClusterRequest method. +// req, resp := client.ResizeClusterRequest(params) +// +// err := req.Send() +// if err == nil { // resp is now filled +// fmt.Println(resp) +// } +// +// See also, https://docs.aws.amazon.com/goto/WebAPI/redshift-2012-12-01/ResizeCluster +func (c *Redshift) ResizeClusterRequest(input *ResizeClusterInput) (req *request.Request, output *ResizeClusterOutput) { + op := &request.Operation{ + Name: opResizeCluster, + HTTPMethod: "POST", + HTTPPath: "/", + } + + if input == nil { + input = &ResizeClusterInput{} + } + + output = &ResizeClusterOutput{} + req = c.newRequest(op, input, output) + return +} + +// ResizeCluster API operation for Amazon Redshift. +// +// Changes the size of the cluster. You can change the cluster's type, or change +// the number or type of nodes. The default behavior is to use the elastic resize +// method. With an elastic resize your cluster is avaialble for read and write +// operations more quickly than with the classic resize method. +// +// Elastic resize operations have the following restrictions: +// +// * You can only resize clusters of the following types: +// +// dc2.large +// +// dc2.8xlarge +// +// ds2.xlarge +// +// ds2.8xlarge +// +// * The type of nodes you add must match the node type for the cluster. +// +// Returns awserr.Error for service API and SDK errors. Use runtime type assertions +// with awserr.Error's Code and Message methods to get detailed information about +// the error. +// +// See the AWS API reference guide for Amazon Redshift's +// API operation ResizeCluster for usage and error information. +// +// Returned Error Codes: +// * ErrCodeInvalidClusterStateFault "InvalidClusterState" +// The specified cluster is not in the available state. +// +// * ErrCodeClusterNotFoundFault "ClusterNotFound" +// The ClusterIdentifier parameter does not refer to an existing cluster. +// +// * ErrCodeNumberOfNodesQuotaExceededFault "NumberOfNodesQuotaExceeded" +// The operation would exceed the number of nodes allotted to the account. For +// information about increasing your quota, go to Limits in Amazon Redshift +// (http://docs.aws.amazon.com/redshift/latest/mgmt/amazon-redshift-limits.html) +// in the Amazon Redshift Cluster Management Guide. +// +// * ErrCodeNumberOfNodesPerClusterLimitExceededFault "NumberOfNodesPerClusterLimitExceeded" +// The operation would exceed the number of nodes allowed for a cluster. +// +// * ErrCodeInsufficientClusterCapacityFault "InsufficientClusterCapacity" +// The number of nodes specified exceeds the allotted capacity of the cluster. +// +// * ErrCodeUnsupportedOptionFault "UnsupportedOptionFault" +// A request option was specified that is not supported. +// +// * ErrCodeUnsupportedOperationFault "UnsupportedOperation" +// The requested operation isn't supported. +// +// * ErrCodeUnauthorizedOperation "UnauthorizedOperation" +// Your account is not authorized to perform the requested operation. +// +// * ErrCodeLimitExceededFault "LimitExceededFault" +// The encryption key has exceeded its grant limit in AWS KMS. +// +// See also, https://docs.aws.amazon.com/goto/WebAPI/redshift-2012-12-01/ResizeCluster +func (c *Redshift) ResizeCluster(input *ResizeClusterInput) (*ResizeClusterOutput, error) { + req, out := c.ResizeClusterRequest(input) + return out, req.Send() +} + +// ResizeClusterWithContext is the same as ResizeCluster with the addition of +// the ability to pass a context and additional request options. +// +// See ResizeCluster for details on how to use this API operation. +// +// The context must be non-nil and will be used for request cancellation. If +// the context is nil a panic will occur. In the future the SDK may create +// sub-contexts for http.Requests. See https://golang.org/pkg/context/ +// for more information on using Contexts. +func (c *Redshift) ResizeClusterWithContext(ctx aws.Context, input *ResizeClusterInput, opts ...request.Option) (*ResizeClusterOutput, error) { + req, out := c.ResizeClusterRequest(input) + req.SetContext(ctx) + req.ApplyOptions(opts...) + return out, req.Send() +} + const opRestoreFromClusterSnapshot = "RestoreFromClusterSnapshot" // RestoreFromClusterSnapshotRequest generates a "aws/request.Request" representing the @@ -6916,6 +7127,9 @@ func (c *Redshift) RestoreFromClusterSnapshotRequest(input *RestoreFromClusterSn // The request cannot be completed because a dependent service is throttling // requests made by Amazon Redshift on your behalf. Wait and retry the request. // +// * ErrCodeInvalidClusterTrackFault "InvalidClusterTrack" +// The provided cluster track name is not valid. +// // See also, https://docs.aws.amazon.com/goto/WebAPI/redshift-2012-12-01/RestoreFromClusterSnapshot func (c *Redshift) RestoreFromClusterSnapshot(input *RestoreFromClusterSnapshotInput) (*RestoreFromClusterSnapshotOutput, error) { req, out := c.RestoreFromClusterSnapshotRequest(input) @@ -7323,12 +7537,14 @@ func (c *Redshift) RotateEncryptionKeyWithContext(ctx aws.Context, input *Rotate type AcceptReservedNodeExchangeInput struct { _ struct{} `type:"structure"` - // A string representing the identifier of the Reserved Node to be exchanged. + // A string representing the node identifier of the DC1 Reserved Node to be + // exchanged. // // ReservedNodeId is a required field ReservedNodeId *string `type:"string" required:"true"` - // The unique identifier of the Reserved Node offering to be used for the exchange. + // The unique identifier of the DC2 Reserved Node offering to be used for the + // exchange. You can obtain the value for the parameter by calling GetReservedNodeExchangeOfferings // // TargetReservedNodeOfferingId is a required field TargetReservedNodeOfferingId *string `type:"string" required:"true"` @@ -7739,6 +7955,10 @@ type Cluster struct { // The status of the elastic IP (EIP) address. ElasticIpStatus *ElasticIpStatus `type:"structure"` + // Indicates the number of nodes the cluster can be resized to with the elastic + // resize method. + ElasticResizeNumberOfNodeOptions *string `type:"string"` + // A Boolean value that, if true, indicates that data in the cluster is encrypted // at rest. Encrypted *bool `type:"boolean"` @@ -7772,6 +7992,9 @@ type Cluster struct { // to encrypt data in the cluster. KmsKeyId *string `type:"string"` + // The name of the maintenance track for the cluster. + MaintenanceTrackName *string `type:"string"` + // The master user name for the cluster. This name is used to connect to the // database that is specified in the DBName parameter. MasterUsername *string `type:"string"` @@ -7922,6 +8145,12 @@ func (s *Cluster) SetElasticIpStatus(v *ElasticIpStatus) *Cluster { return s } +// SetElasticResizeNumberOfNodeOptions sets the ElasticResizeNumberOfNodeOptions field's value. +func (s *Cluster) SetElasticResizeNumberOfNodeOptions(v string) *Cluster { + s.ElasticResizeNumberOfNodeOptions = &v + return s +} + // SetEncrypted sets the Encrypted field's value. func (s *Cluster) SetEncrypted(v bool) *Cluster { s.Encrypted = &v @@ -7958,6 +8187,12 @@ func (s *Cluster) SetKmsKeyId(v string) *Cluster { return s } +// SetMaintenanceTrackName sets the MaintenanceTrackName field's value. +func (s *Cluster) SetMaintenanceTrackName(v string) *Cluster { + s.MaintenanceTrackName = &v + return s +} + // SetMasterUsername sets the MasterUsername field's value. func (s *Cluster) SetMasterUsername(v string) *Cluster { s.MasterUsername = &v @@ -8896,6 +9131,11 @@ type CreateClusterInput struct { // want to use to encrypt data in the cluster. KmsKeyId *string `type:"string"` + // An optional parameter for the name of the maintenance track for the cluster. + // If you don't provide a maintenance track name, the cluster is assigned to + // the current track. + MaintenanceTrackName *string `type:"string"` + // The password associated with the master user account for the cluster that // is being created. // @@ -9136,6 +9376,12 @@ func (s *CreateClusterInput) SetKmsKeyId(v string) *CreateClusterInput { return s } +// SetMaintenanceTrackName sets the MaintenanceTrackName field's value. +func (s *CreateClusterInput) SetMaintenanceTrackName(v string) *CreateClusterInput { + s.MaintenanceTrackName = &v + return s +} + // SetMasterUserPassword sets the MasterUserPassword field's value. func (s *CreateClusterInput) SetMasterUserPassword(v string) *CreateClusterInput { s.MasterUserPassword = &v @@ -11621,6 +11867,86 @@ func (s *DescribeClusterSubnetGroupsOutput) SetMarker(v string) *DescribeCluster return s } +type DescribeClusterTracksInput struct { + _ struct{} `type:"structure"` + + // The name of the maintenance track. + MaintenanceTrackName *string `type:"string"` + + // An optional parameter that specifies the starting point to return a set of + // response records. When the results of a DescribeClusterTracks request exceed + // the value specified in MaxRecords, Amazon Redshift returns a value in the + // Marker field of the response. You can retrieve the next set of response records + // by providing the returned marker value in the Marker parameter and retrying + // the request. + Marker *string `type:"string"` + + // An integer value for the maximum number of maintenance tracks to return. + MaxRecords *int64 `type:"integer"` +} + +// String returns the string representation +func (s DescribeClusterTracksInput) String() string { + return awsutil.Prettify(s) +} + +// GoString returns the string representation +func (s DescribeClusterTracksInput) GoString() string { + return s.String() +} + +// SetMaintenanceTrackName sets the MaintenanceTrackName field's value. +func (s *DescribeClusterTracksInput) SetMaintenanceTrackName(v string) *DescribeClusterTracksInput { + s.MaintenanceTrackName = &v + return s +} + +// SetMarker sets the Marker field's value. +func (s *DescribeClusterTracksInput) SetMarker(v string) *DescribeClusterTracksInput { + s.Marker = &v + return s +} + +// SetMaxRecords sets the MaxRecords field's value. +func (s *DescribeClusterTracksInput) SetMaxRecords(v int64) *DescribeClusterTracksInput { + s.MaxRecords = &v + return s +} + +type DescribeClusterTracksOutput struct { + _ struct{} `type:"structure"` + + // A list of maintenance tracks output by the DescribeClusterTracks operation. + MaintenanceTracks []*MaintenanceTrack `locationNameList:"MaintenanceTrack" type:"list"` + + // The starting point to return a set of response tracklist records. You can + // retrieve the next set of response records by providing the returned marker + // value in the Marker parameter and retrying the request. + Marker *string `type:"string"` +} + +// String returns the string representation +func (s DescribeClusterTracksOutput) String() string { + return awsutil.Prettify(s) +} + +// GoString returns the string representation +func (s DescribeClusterTracksOutput) GoString() string { + return s.String() +} + +// SetMaintenanceTracks sets the MaintenanceTracks field's value. +func (s *DescribeClusterTracksOutput) SetMaintenanceTracks(v []*MaintenanceTrack) *DescribeClusterTracksOutput { + s.MaintenanceTracks = v + return s +} + +// SetMarker sets the Marker field's value. +func (s *DescribeClusterTracksOutput) SetMarker(v string) *DescribeClusterTracksOutput { + s.Marker = &v + return s +} + type DescribeClusterVersionsInput struct { _ struct{} `type:"structure"` @@ -12914,6 +13240,9 @@ type DescribeResizeOutput struct { // Valid Values: List of table names ImportTablesNotStarted []*string `type:"list"` + // An optional string to provide additional details about the resize action. + Message *string `type:"string"` + // While the resize operation is in progress, this value shows the current amount // of data, in megabytes, that has been processed so far. When the resize operation // is complete, this value shows the total amount of data, in megabytes, on @@ -12921,6 +13250,10 @@ type DescribeResizeOutput struct { // estimated total amount of data before resize). ProgressInMegaBytes *int64 `type:"long"` + // An enum with possible values of ClassicResize and ElasticResize. These values + // describe the type of resize operation being performed. + ResizeType *string `type:"string"` + // The status of the resize operation. // // Valid Values: NONE | IN_PROGRESS | FAILED | SUCCEEDED @@ -12931,6 +13264,12 @@ type DescribeResizeOutput struct { // Valid Values: multi-node | single-node TargetClusterType *string `type:"string"` + // The type of encryption for the cluster after the resize is complete. + // + // Possible values are KMS and None. In the China region possible values are: + // Legacy and None. + TargetEncryptionType *string `type:"string"` + // The node type that the cluster will have after the resize operation is complete. TargetNodeType *string `type:"string"` @@ -12989,12 +13328,24 @@ func (s *DescribeResizeOutput) SetImportTablesNotStarted(v []*string) *DescribeR return s } +// SetMessage sets the Message field's value. +func (s *DescribeResizeOutput) SetMessage(v string) *DescribeResizeOutput { + s.Message = &v + return s +} + // SetProgressInMegaBytes sets the ProgressInMegaBytes field's value. func (s *DescribeResizeOutput) SetProgressInMegaBytes(v int64) *DescribeResizeOutput { s.ProgressInMegaBytes = &v return s } +// SetResizeType sets the ResizeType field's value. +func (s *DescribeResizeOutput) SetResizeType(v string) *DescribeResizeOutput { + s.ResizeType = &v + return s +} + // SetStatus sets the Status field's value. func (s *DescribeResizeOutput) SetStatus(v string) *DescribeResizeOutput { s.Status = &v @@ -13007,6 +13358,12 @@ func (s *DescribeResizeOutput) SetTargetClusterType(v string) *DescribeResizeOut return s } +// SetTargetEncryptionType sets the TargetEncryptionType field's value. +func (s *DescribeResizeOutput) SetTargetEncryptionType(v string) *DescribeResizeOutput { + s.TargetEncryptionType = &v + return s +} + // SetTargetNodeType sets the TargetNodeType field's value. func (s *DescribeResizeOutput) SetTargetNodeType(v string) *DescribeResizeOutput { s.TargetNodeType = &v @@ -14316,7 +14673,8 @@ type GetReservedNodeExchangeOfferingsInput struct { // An integer setting the maximum number of ReservedNodeOfferings to retrieve. MaxRecords *int64 `type:"integer"` - // A string representing the node identifier for the Reserved Node to be exchanged. + // A string representing the node identifier for the DC1 Reserved Node to be + // exchanged. // // ReservedNodeId is a required field ReservedNodeId *string `type:"string" required:"true"` @@ -14666,6 +15024,52 @@ func (s *LoggingStatus) SetS3KeyPrefix(v string) *LoggingStatus { return s } +// Defines a maintenance track that determines which Amazon Redshift version +// to apply during a maintenance window. If the value for MaintenanceTrack is +// current, the cluster is updated to the most recently certified maintenance +// release. If the value is trailing, the cluster is updated to the previously +// certified maintenance release. +type MaintenanceTrack struct { + _ struct{} `type:"structure"` + + // The version number for the cluster release. + DatabaseVersion *string `type:"string"` + + // The name of the maintenance track. Possible values are current and trailing. + MaintenanceTrackName *string `type:"string"` + + // An array of UpdateTarget objects to update with the maintenance track. + UpdateTargets []*UpdateTarget `locationNameList:"UpdateTarget" type:"list"` +} + +// String returns the string representation +func (s MaintenanceTrack) String() string { + return awsutil.Prettify(s) +} + +// GoString returns the string representation +func (s MaintenanceTrack) GoString() string { + return s.String() +} + +// SetDatabaseVersion sets the DatabaseVersion field's value. +func (s *MaintenanceTrack) SetDatabaseVersion(v string) *MaintenanceTrack { + s.DatabaseVersion = &v + return s +} + +// SetMaintenanceTrackName sets the MaintenanceTrackName field's value. +func (s *MaintenanceTrack) SetMaintenanceTrackName(v string) *MaintenanceTrack { + s.MaintenanceTrackName = &v + return s +} + +// SetUpdateTargets sets the UpdateTargets field's value. +func (s *MaintenanceTrack) SetUpdateTargets(v []*UpdateTarget) *MaintenanceTrack { + s.UpdateTargets = v + return s +} + type ModifyClusterDbRevisionInput struct { _ struct{} `type:"structure"` @@ -14912,6 +15316,13 @@ type ModifyClusterInput struct { // in the Amazon Redshift Cluster Management Guide. ElasticIp *string `type:"string"` + // Indicates whether the cluster is encrypted. If the cluster is encrypted and + // you provide a value for the KmsKeyId parameter, we will encrypt the cluster + // with the provided KmsKeyId. If you don't provide a KmsKeyId, we will encrypt + // with the default key. In the China region we will use legacy encryption if + // you specify that the cluster is encrypted. + Encrypted *bool `type:"boolean"` + // An option that specifies whether to create the cluster with enhanced VPC // routing enabled. To create a cluster that uses enhanced VPC routing, the // cluster must be in a VPC. For more information, see Enhanced VPC Routing @@ -14931,6 +15342,17 @@ type ModifyClusterInput struct { // the Amazon Redshift cluster can use to retrieve and store keys in an HSM. HsmConfigurationIdentifier *string `type:"string"` + // The AWS Key Management Service (KMS) key ID of the encryption key that you + // want to use to encrypt data in the cluster. + KmsKeyId *string `type:"string"` + + // The name for the maintenance track that you want to assign for the cluster. + // This name change is asynchronous. The new track name stays in the PendingModifiedValues + // for the cluster until the next maintenance window. When the maintenance track + // changes, the cluster is switched to the latest cluster release available + // for the maintenance track. At this point, the maintenance track name is applied. + MaintenanceTrackName *string `type:"string"` + // The new password for the cluster master user. This change is asynchronously // applied as soon as possible. Between the time of the request and the completion // of the request, the MasterUserPassword element exists in the PendingModifiedValues @@ -15100,6 +15522,12 @@ func (s *ModifyClusterInput) SetElasticIp(v string) *ModifyClusterInput { return s } +// SetEncrypted sets the Encrypted field's value. +func (s *ModifyClusterInput) SetEncrypted(v bool) *ModifyClusterInput { + s.Encrypted = &v + return s +} + // SetEnhancedVpcRouting sets the EnhancedVpcRouting field's value. func (s *ModifyClusterInput) SetEnhancedVpcRouting(v bool) *ModifyClusterInput { s.EnhancedVpcRouting = &v @@ -15118,6 +15546,18 @@ func (s *ModifyClusterInput) SetHsmConfigurationIdentifier(v string) *ModifyClus return s } +// SetKmsKeyId sets the KmsKeyId field's value. +func (s *ModifyClusterInput) SetKmsKeyId(v string) *ModifyClusterInput { + s.KmsKeyId = &v + return s +} + +// SetMaintenanceTrackName sets the MaintenanceTrackName field's value. +func (s *ModifyClusterInput) SetMaintenanceTrackName(v string) *ModifyClusterInput { + s.MaintenanceTrackName = &v + return s +} + // SetMasterUserPassword sets the MasterUserPassword field's value. func (s *ModifyClusterInput) SetMasterUserPassword(v string) *ModifyClusterInput { s.MasterUserPassword = &v @@ -15722,6 +16162,10 @@ type PendingModifiedValues struct { // The pending or in-progress change of the service version. ClusterVersion *string `type:"string"` + // The encryption type for a cluster. Possible values are: KMS and None. For + // the China region the possible values are None, and Legacy. + EncryptionType *string `type:"string"` + // An option that specifies whether to create the cluster with enhanced VPC // routing enabled. To create a cluster that uses enhanced VPC routing, the // cluster must be in a VPC. For more information, see Enhanced VPC Routing @@ -15733,6 +16177,10 @@ type PendingModifiedValues struct { // Default: false EnhancedVpcRouting *bool `type:"boolean"` + // The name of the maintenance track that the cluster will change to during + // the next maintenance window. + MaintenanceTrackName *string `type:"string"` + // The pending or in-progress change of the master user password for the cluster. MasterUserPassword *string `type:"string"` @@ -15781,12 +16229,24 @@ func (s *PendingModifiedValues) SetClusterVersion(v string) *PendingModifiedValu return s } +// SetEncryptionType sets the EncryptionType field's value. +func (s *PendingModifiedValues) SetEncryptionType(v string) *PendingModifiedValues { + s.EncryptionType = &v + return s +} + // SetEnhancedVpcRouting sets the EnhancedVpcRouting field's value. func (s *PendingModifiedValues) SetEnhancedVpcRouting(v bool) *PendingModifiedValues { s.EnhancedVpcRouting = &v return s } +// SetMaintenanceTrackName sets the MaintenanceTrackName field's value. +func (s *PendingModifiedValues) SetMaintenanceTrackName(v string) *PendingModifiedValues { + s.MaintenanceTrackName = &v + return s +} + // SetMasterUserPassword sets the MasterUserPassword field's value. func (s *PendingModifiedValues) SetMasterUserPassword(v string) *PendingModifiedValues { s.MasterUserPassword = &v @@ -16290,6 +16750,110 @@ func (s *ResetClusterParameterGroupInput) SetResetAllParameters(v bool) *ResetCl return s } +type ResizeClusterInput struct { + _ struct{} `type:"structure"` + + // A boolean value indicating whether the resize operation is using the classic + // resize process. If you don't provide this parameter or set the value to false + // the resize type is elastic. + Classic *bool `type:"boolean"` + + // The unique identifier for the cluster to resize. + // + // ClusterIdentifier is a required field + ClusterIdentifier *string `type:"string" required:"true"` + + // The new cluster type for the specified cluster. + ClusterType *string `type:"string"` + + // The new node type for the nodes you are adding. + NodeType *string `type:"string"` + + // The new number of nodes for the cluster. + // + // NumberOfNodes is a required field + NumberOfNodes *int64 `type:"integer" required:"true"` +} + +// String returns the string representation +func (s ResizeClusterInput) String() string { + return awsutil.Prettify(s) +} + +// GoString returns the string representation +func (s ResizeClusterInput) GoString() string { + return s.String() +} + +// Validate inspects the fields of the type to determine if they are valid. +func (s *ResizeClusterInput) Validate() error { + invalidParams := request.ErrInvalidParams{Context: "ResizeClusterInput"} + if s.ClusterIdentifier == nil { + invalidParams.Add(request.NewErrParamRequired("ClusterIdentifier")) + } + if s.NumberOfNodes == nil { + invalidParams.Add(request.NewErrParamRequired("NumberOfNodes")) + } + + if invalidParams.Len() > 0 { + return invalidParams + } + return nil +} + +// SetClassic sets the Classic field's value. +func (s *ResizeClusterInput) SetClassic(v bool) *ResizeClusterInput { + s.Classic = &v + return s +} + +// SetClusterIdentifier sets the ClusterIdentifier field's value. +func (s *ResizeClusterInput) SetClusterIdentifier(v string) *ResizeClusterInput { + s.ClusterIdentifier = &v + return s +} + +// SetClusterType sets the ClusterType field's value. +func (s *ResizeClusterInput) SetClusterType(v string) *ResizeClusterInput { + s.ClusterType = &v + return s +} + +// SetNodeType sets the NodeType field's value. +func (s *ResizeClusterInput) SetNodeType(v string) *ResizeClusterInput { + s.NodeType = &v + return s +} + +// SetNumberOfNodes sets the NumberOfNodes field's value. +func (s *ResizeClusterInput) SetNumberOfNodes(v int64) *ResizeClusterInput { + s.NumberOfNodes = &v + return s +} + +type ResizeClusterOutput struct { + _ struct{} `type:"structure"` + + // Describes a cluster. + Cluster *Cluster `type:"structure"` +} + +// String returns the string representation +func (s ResizeClusterOutput) String() string { + return awsutil.Prettify(s) +} + +// GoString returns the string representation +func (s ResizeClusterOutput) GoString() string { + return s.String() +} + +// SetCluster sets the Cluster field's value. +func (s *ResizeClusterOutput) SetCluster(v *Cluster) *ResizeClusterOutput { + s.Cluster = v + return s +} + type RestoreFromClusterSnapshotInput struct { _ struct{} `type:"structure"` @@ -16398,6 +16962,15 @@ type RestoreFromClusterSnapshotInput struct { // snapshot. KmsKeyId *string `type:"string"` + // The name of the maintenance track for the restored cluster. When you take + // a snapshot, the snapshot inherits the MaintenanceTrack value from the cluster. + // The snapshot might be on a different track than the cluster that was the + // source for the snapshot. For example, suppose that you take a snapshot of + // a cluster that is on the current track and then change the cluster to be + // on the trailing track. In this case, the snapshot and the source cluster + // are on different tracks. + MaintenanceTrackName *string `type:"string"` + // The node type that the restored cluster will be provisioned with. // // Default: The node type of the cluster from which the snapshot was taken. @@ -16574,6 +17147,12 @@ func (s *RestoreFromClusterSnapshotInput) SetKmsKeyId(v string) *RestoreFromClus return s } +// SetMaintenanceTrackName sets the MaintenanceTrackName field's value. +func (s *RestoreFromClusterSnapshotInput) SetMaintenanceTrackName(v string) *RestoreFromClusterSnapshotInput { + s.MaintenanceTrackName = &v + return s +} + // SetNodeType sets the NodeType field's value. func (s *RestoreFromClusterSnapshotInput) SetNodeType(v string) *RestoreFromClusterSnapshotInput { s.NodeType = &v @@ -17222,6 +17801,9 @@ type Snapshot struct { // used to encrypt data in the cluster from which the snapshot was taken. KmsKeyId *string `type:"string"` + // The name of the maintenance track for the snapshot. + MaintenanceTrackName *string `type:"string"` + // The master user name for the cluster. MasterUsername *string `type:"string"` @@ -17380,6 +17962,12 @@ func (s *Snapshot) SetKmsKeyId(v string) *Snapshot { return s } +// SetMaintenanceTrackName sets the MaintenanceTrackName field's value. +func (s *Snapshot) SetMaintenanceTrackName(v string) *Snapshot { + s.MaintenanceTrackName = &v + return s +} + // SetMasterUsername sets the MasterUsername field's value. func (s *Snapshot) SetMasterUsername(v string) *Snapshot { s.MasterUsername = &v @@ -17823,6 +18411,39 @@ func (s *TaggedResource) SetTag(v *Tag) *TaggedResource { return s } +// A maintenance track that you can switch the current track to. +type UpdateTarget struct { + _ struct{} `type:"structure"` + + // The cluster version for the new maintenance track. + DatabaseVersion *string `type:"string"` + + // The name of the new maintenance track. + MaintenanceTrackName *string `type:"string"` +} + +// String returns the string representation +func (s UpdateTarget) String() string { + return awsutil.Prettify(s) +} + +// GoString returns the string representation +func (s UpdateTarget) GoString() string { + return s.String() +} + +// SetDatabaseVersion sets the DatabaseVersion field's value. +func (s *UpdateTarget) SetDatabaseVersion(v string) *UpdateTarget { + s.DatabaseVersion = &v + return s +} + +// SetMaintenanceTrackName sets the MaintenanceTrackName field's value. +func (s *UpdateTarget) SetMaintenanceTrackName(v string) *UpdateTarget { + s.MaintenanceTrackName = &v + return s +} + // Describes the members of a VPC security group. type VpcSecurityGroupMembership struct { _ struct{} `type:"structure"` diff --git a/vendor/github.com/aws/aws-sdk-go/service/redshift/errors.go b/vendor/github.com/aws/aws-sdk-go/service/redshift/errors.go index 0cf4ad603..00fb70dae 100644 --- a/vendor/github.com/aws/aws-sdk-go/service/redshift/errors.go +++ b/vendor/github.com/aws/aws-sdk-go/service/redshift/errors.go @@ -294,6 +294,12 @@ const ( // The state of the subnet is invalid. ErrCodeInvalidClusterSubnetStateFault = "InvalidClusterSubnetStateFault" + // ErrCodeInvalidClusterTrackFault for service response error code + // "InvalidClusterTrack". + // + // The provided cluster track name is not valid. + ErrCodeInvalidClusterTrackFault = "InvalidClusterTrack" + // ErrCodeInvalidElasticIpFault for service response error code // "InvalidElasticIpFault". // diff --git a/vendor/github.com/aws/aws-sdk-go/service/s3/api.go b/vendor/github.com/aws/aws-sdk-go/service/s3/api.go index 0e999ca33..104361950 100644 --- a/vendor/github.com/aws/aws-sdk-go/service/s3/api.go +++ b/vendor/github.com/aws/aws-sdk-go/service/s3/api.go @@ -1958,6 +1958,8 @@ const opGetBucketLifecycle = "GetBucketLifecycle" // } // // See also, https://docs.aws.amazon.com/goto/WebAPI/s3-2006-03-01/GetBucketLifecycle +// +// Deprecated: GetBucketLifecycle has been deprecated func (c *S3) GetBucketLifecycleRequest(input *GetBucketLifecycleInput) (req *request.Request, output *GetBucketLifecycleOutput) { if c.Client.Config.Logger != nil { c.Client.Config.Logger.Log("This operation, GetBucketLifecycle, has been deprecated") @@ -1988,6 +1990,8 @@ func (c *S3) GetBucketLifecycleRequest(input *GetBucketLifecycleInput) (req *req // See the AWS API reference guide for Amazon Simple Storage Service's // API operation GetBucketLifecycle for usage and error information. // See also, https://docs.aws.amazon.com/goto/WebAPI/s3-2006-03-01/GetBucketLifecycle +// +// Deprecated: GetBucketLifecycle has been deprecated func (c *S3) GetBucketLifecycle(input *GetBucketLifecycleInput) (*GetBucketLifecycleOutput, error) { req, out := c.GetBucketLifecycleRequest(input) return out, req.Send() @@ -2002,6 +2006,8 @@ func (c *S3) GetBucketLifecycle(input *GetBucketLifecycleInput) (*GetBucketLifec // the context is nil a panic will occur. In the future the SDK may create // sub-contexts for http.Requests. See https://golang.org/pkg/context/ // for more information on using Contexts. +// +// Deprecated: GetBucketLifecycleWithContext has been deprecated func (c *S3) GetBucketLifecycleWithContext(ctx aws.Context, input *GetBucketLifecycleInput, opts ...request.Option) (*GetBucketLifecycleOutput, error) { req, out := c.GetBucketLifecycleRequest(input) req.SetContext(ctx) @@ -2333,6 +2339,8 @@ const opGetBucketNotification = "GetBucketNotification" // } // // See also, https://docs.aws.amazon.com/goto/WebAPI/s3-2006-03-01/GetBucketNotification +// +// Deprecated: GetBucketNotification has been deprecated func (c *S3) GetBucketNotificationRequest(input *GetBucketNotificationConfigurationRequest) (req *request.Request, output *NotificationConfigurationDeprecated) { if c.Client.Config.Logger != nil { c.Client.Config.Logger.Log("This operation, GetBucketNotification, has been deprecated") @@ -2363,6 +2371,8 @@ func (c *S3) GetBucketNotificationRequest(input *GetBucketNotificationConfigurat // See the AWS API reference guide for Amazon Simple Storage Service's // API operation GetBucketNotification for usage and error information. // See also, https://docs.aws.amazon.com/goto/WebAPI/s3-2006-03-01/GetBucketNotification +// +// Deprecated: GetBucketNotification has been deprecated func (c *S3) GetBucketNotification(input *GetBucketNotificationConfigurationRequest) (*NotificationConfigurationDeprecated, error) { req, out := c.GetBucketNotificationRequest(input) return out, req.Send() @@ -2377,6 +2387,8 @@ func (c *S3) GetBucketNotification(input *GetBucketNotificationConfigurationRequ // the context is nil a panic will occur. In the future the SDK may create // sub-contexts for http.Requests. See https://golang.org/pkg/context/ // for more information on using Contexts. +// +// Deprecated: GetBucketNotificationWithContext has been deprecated func (c *S3) GetBucketNotificationWithContext(ctx aws.Context, input *GetBucketNotificationConfigurationRequest, opts ...request.Option) (*NotificationConfigurationDeprecated, error) { req, out := c.GetBucketNotificationRequest(input) req.SetContext(ctx) @@ -4815,6 +4827,8 @@ const opPutBucketLifecycle = "PutBucketLifecycle" // } // // See also, https://docs.aws.amazon.com/goto/WebAPI/s3-2006-03-01/PutBucketLifecycle +// +// Deprecated: PutBucketLifecycle has been deprecated func (c *S3) PutBucketLifecycleRequest(input *PutBucketLifecycleInput) (req *request.Request, output *PutBucketLifecycleOutput) { if c.Client.Config.Logger != nil { c.Client.Config.Logger.Log("This operation, PutBucketLifecycle, has been deprecated") @@ -4847,6 +4861,8 @@ func (c *S3) PutBucketLifecycleRequest(input *PutBucketLifecycleInput) (req *req // See the AWS API reference guide for Amazon Simple Storage Service's // API operation PutBucketLifecycle for usage and error information. // See also, https://docs.aws.amazon.com/goto/WebAPI/s3-2006-03-01/PutBucketLifecycle +// +// Deprecated: PutBucketLifecycle has been deprecated func (c *S3) PutBucketLifecycle(input *PutBucketLifecycleInput) (*PutBucketLifecycleOutput, error) { req, out := c.PutBucketLifecycleRequest(input) return out, req.Send() @@ -4861,6 +4877,8 @@ func (c *S3) PutBucketLifecycle(input *PutBucketLifecycleInput) (*PutBucketLifec // the context is nil a panic will occur. In the future the SDK may create // sub-contexts for http.Requests. See https://golang.org/pkg/context/ // for more information on using Contexts. +// +// Deprecated: PutBucketLifecycleWithContext has been deprecated func (c *S3) PutBucketLifecycleWithContext(ctx aws.Context, input *PutBucketLifecycleInput, opts ...request.Option) (*PutBucketLifecycleOutput, error) { req, out := c.PutBucketLifecycleRequest(input) req.SetContext(ctx) @@ -5126,6 +5144,8 @@ const opPutBucketNotification = "PutBucketNotification" // } // // See also, https://docs.aws.amazon.com/goto/WebAPI/s3-2006-03-01/PutBucketNotification +// +// Deprecated: PutBucketNotification has been deprecated func (c *S3) PutBucketNotificationRequest(input *PutBucketNotificationInput) (req *request.Request, output *PutBucketNotificationOutput) { if c.Client.Config.Logger != nil { c.Client.Config.Logger.Log("This operation, PutBucketNotification, has been deprecated") @@ -5158,6 +5178,8 @@ func (c *S3) PutBucketNotificationRequest(input *PutBucketNotificationInput) (re // See the AWS API reference guide for Amazon Simple Storage Service's // API operation PutBucketNotification for usage and error information. // See also, https://docs.aws.amazon.com/goto/WebAPI/s3-2006-03-01/PutBucketNotification +// +// Deprecated: PutBucketNotification has been deprecated func (c *S3) PutBucketNotification(input *PutBucketNotificationInput) (*PutBucketNotificationOutput, error) { req, out := c.PutBucketNotificationRequest(input) return out, req.Send() @@ -5172,6 +5194,8 @@ func (c *S3) PutBucketNotification(input *PutBucketNotificationInput) (*PutBucke // the context is nil a panic will occur. In the future the SDK may create // sub-contexts for http.Requests. See https://golang.org/pkg/context/ // for more information on using Contexts. +// +// Deprecated: PutBucketNotificationWithContext has been deprecated func (c *S3) PutBucketNotificationWithContext(ctx aws.Context, input *PutBucketNotificationInput, opts ...request.Option) (*PutBucketNotificationOutput, error) { req, out := c.PutBucketNotificationRequest(input) req.SetContext(ctx) @@ -5379,7 +5403,8 @@ func (c *S3) PutBucketReplicationRequest(input *PutBucketReplicationInput) (req // PutBucketReplication API operation for Amazon Simple Storage Service. // // Creates a new replication configuration (or replaces an existing one, if -// present). +// present). For more information, see Cross-Region Replication (CRR) ( https://docs.aws.amazon.com/AmazonS3/latest/dev/crr.html) +// in the Amazon S3 Developer Guide. // // Returns awserr.Error for service API and SDK errors. Use runtime type assertions // with awserr.Error's Code and Message methods to get detailed information about @@ -7212,6 +7237,8 @@ type CloudFunctionConfiguration struct { CloudFunction *string `type:"string"` // Bucket event for which to send notifications. + // + // Deprecated: Event has been deprecated Event *string `deprecated:"true" type:"string" enum:"Event"` Events []*string `locationName:"Event" type:"list" flattened:"true"` @@ -9254,6 +9281,14 @@ func (s DeleteBucketPolicyOutput) GoString() string { type DeleteBucketReplicationInput struct { _ struct{} `type:"structure"` + // Deletes the replication subresource associated with the specified bucket. + // + // There is usually some time lag before replication configuration deletion + // is fully propagated to all the Amazon S3 systems. + // + // For more information, see Cross-Region Replication (CRR) ( https://docs.aws.amazon.com/AmazonS3/latest/dev/crr.html) + // in the Amazon S3 Developer Guide. + // // Bucket is a required field Bucket *string `location:"uri" locationName:"Bucket" type:"string" required:"true"` } @@ -9481,6 +9516,33 @@ func (s *DeleteMarkerEntry) SetVersionId(v string) *DeleteMarkerEntry { return s } +// Specifies whether Amazon S3 should replicate delete makers. +type DeleteMarkerReplication struct { + _ struct{} `type:"structure"` + + // The status of the delete marker replication. + // + // In the current implementation, Amazon S3 does not replicate the delete markers. + // Therefore, the status must be Disabled. + Status *string `type:"string" enum:"DeleteMarkerReplicationStatus"` +} + +// String returns the string representation +func (s DeleteMarkerReplication) String() string { + return awsutil.Prettify(s) +} + +// GoString returns the string representation +func (s DeleteMarkerReplication) GoString() string { + return s.String() +} + +// SetStatus sets the Status field's value. +func (s *DeleteMarkerReplication) SetStatus(v string) *DeleteMarkerReplication { + s.Status = &v + return s +} + type DeleteObjectInput struct { _ struct{} `type:"structure"` @@ -9877,19 +9939,34 @@ type Destination struct { _ struct{} `type:"structure"` // Container for information regarding the access control for replicas. + // + // Use only in a cross-account scenario, where source and destination bucket + // owners are not the same, when you want to change replica ownership to the + // AWS account that owns the destination bucket. If you don't add this element + // to the replication configuration, the replicas are owned by same AWS account + // that owns the source object. AccessControlTranslation *AccessControlTranslation `type:"structure"` - // Account ID of the destination bucket. Currently this is only being verified - // if Access Control Translation is enabled + // Account ID of the destination bucket. Currently Amazon S3 verifies this value + // only if Access Control Translation is enabled. + // + // In a cross-account scenario, if you tell Amazon S3 to change replica ownership + // to the AWS account that owns the destination bucket by adding the AccessControlTranslation + // element, this is the account ID of the destination bucket owner. Account *string `type:"string"` // Amazon resource name (ARN) of the bucket where you want Amazon S3 to store // replicas of the object identified by the rule. // + // If you have multiple rules in your replication configuration, all rules must + // specify the same bucket as the destination. A replication configuration can + // replicate objects only to one destination bucket. + // // Bucket is a required field Bucket *string `type:"string" required:"true"` - // Container for information regarding encryption based configuration for replicas. + // Container that provides encryption-related information. You must specify + // this element if the SourceSelectionCriteria is specified. EncryptionConfiguration *EncryptionConfiguration `type:"structure"` // The class of storage used to store the object. @@ -10026,7 +10103,8 @@ func (s *Encryption) SetKMSKeyId(v string) *Encryption { type EncryptionConfiguration struct { _ struct{} `type:"structure"` - // The id of the KMS key used to encrypt the replica object. + // The ID of the AWS KMS key for the region where the destination bucket resides. + // Amazon S3 uses this key to encrypt the replica object. ReplicaKmsKeyID *string `type:"string"` } @@ -13032,6 +13110,9 @@ type InputSerialization struct { // Specifies JSON as object's input serialization format. JSON *JSONInput `type:"structure"` + + // Specifies Parquet as object's input serialization format. + Parquet *ParquetInput `type:"structure"` } // String returns the string representation @@ -13062,6 +13143,12 @@ func (s *InputSerialization) SetJSON(v *JSONInput) *InputSerialization { return s } +// SetParquet sets the Parquet field's value. +func (s *InputSerialization) SetParquet(v *ParquetInput) *InputSerialization { + s.Parquet = v + return s +} + type InventoryConfiguration struct { _ struct{} `type:"structure"` @@ -13715,6 +13802,8 @@ type LifecycleRule struct { // Prefix identifying one or more objects to which the rule applies. This is // deprecated; use Filter instead. + // + // Deprecated: Prefix has been deprecated Prefix *string `deprecated:"true" type:"string"` // If 'Enabled', the rule is currently being applied. If 'Disabled', the rule @@ -16487,6 +16576,20 @@ func (s *Owner) SetID(v string) *Owner { return s } +type ParquetInput struct { + _ struct{} `type:"structure"` +} + +// String returns the string representation +func (s ParquetInput) String() string { + return awsutil.Prettify(s) +} + +// GoString returns the string representation +func (s ParquetInput) GoString() string { + return s.String() +} + type Part struct { _ struct{} `type:"structure"` @@ -18817,6 +18920,8 @@ type QueueConfigurationDeprecated struct { _ struct{} `type:"structure"` // Bucket event for which to send notifications. + // + // Deprecated: Event has been deprecated Event *string `deprecated:"true" type:"string" enum:"Event"` Events []*string `locationName:"Event" type:"list" flattened:"true"` @@ -19028,8 +19133,8 @@ type ReplicationConfiguration struct { // Role is a required field Role *string `type:"string" required:"true"` - // Container for information about a particular replication rule. Replication - // configuration must have at least one rule and can contain up to 1,000 rules. + // Container for one or more replication rules. Replication configuration must + // have at least one rule and can contain up to 1,000 rules. // // Rules is a required field Rules []*ReplicationRule `locationName:"Rule" type:"list" flattened:"true" required:"true"` @@ -19087,22 +19192,50 @@ func (s *ReplicationConfiguration) SetRules(v []*ReplicationRule) *ReplicationCo type ReplicationRule struct { _ struct{} `type:"structure"` + // Specifies whether Amazon S3 should replicate delete makers. + DeleteMarkerReplication *DeleteMarkerReplication `type:"structure"` + // Container for replication destination information. // // Destination is a required field Destination *Destination `type:"structure" required:"true"` + // Filter that identifies subset of objects to which the replication rule applies. + // A Filter must specify exactly one Prefix, Tag, or an And child element. + Filter *ReplicationRuleFilter `type:"structure"` + // Unique identifier for the rule. The value cannot be longer than 255 characters. ID *string `type:"string"` // Object keyname prefix identifying one or more objects to which the rule applies. - // Maximum prefix length can be up to 1,024 characters. Overlapping prefixes - // are not supported. + // Maximum prefix length can be up to 1,024 characters. // - // Prefix is a required field - Prefix *string `type:"string" required:"true"` + // Deprecated: Prefix has been deprecated + Prefix *string `deprecated:"true" type:"string"` - // Container for filters that define which source objects should be replicated. + // The priority associated with the rule. If you specify multiple rules in a + // replication configuration, then Amazon S3 applies rule priority in the event + // there are conflicts (two or more rules identify the same object based on + // filter specified). The rule with higher priority takes precedence. For example, + // + // * Same object quality prefix based filter criteria If prefixes you specified + // in multiple rules overlap. + // + // * Same object qualify tag based filter criteria specified in multiple + // rules + // + // For more information, see Cross-Region Replication (CRR) ( https://docs.aws.amazon.com/AmazonS3/latest/dev/crr.html) + // in the Amazon S3 Developer Guide. + Priority *int64 `type:"integer"` + + // Container that describes additional filters in identifying source objects + // that you want to replicate. Currently, Amazon S3 supports only the filter + // that you can specify for objects created with server-side encryption using + // an AWS KMS-managed key. You can choose to enable or disable replication of + // these objects. + // + // if you want Amazon S3 to replicate objects created with server-side encryption + // using AWS KMS-managed keys. SourceSelectionCriteria *SourceSelectionCriteria `type:"structure"` // The rule is ignored if status is not Enabled. @@ -19127,9 +19260,6 @@ func (s *ReplicationRule) Validate() error { if s.Destination == nil { invalidParams.Add(request.NewErrParamRequired("Destination")) } - if s.Prefix == nil { - invalidParams.Add(request.NewErrParamRequired("Prefix")) - } if s.Status == nil { invalidParams.Add(request.NewErrParamRequired("Status")) } @@ -19138,6 +19268,11 @@ func (s *ReplicationRule) Validate() error { invalidParams.AddNested("Destination", err.(request.ErrInvalidParams)) } } + if s.Filter != nil { + if err := s.Filter.Validate(); err != nil { + invalidParams.AddNested("Filter", err.(request.ErrInvalidParams)) + } + } if s.SourceSelectionCriteria != nil { if err := s.SourceSelectionCriteria.Validate(); err != nil { invalidParams.AddNested("SourceSelectionCriteria", err.(request.ErrInvalidParams)) @@ -19150,12 +19285,24 @@ func (s *ReplicationRule) Validate() error { return nil } +// SetDeleteMarkerReplication sets the DeleteMarkerReplication field's value. +func (s *ReplicationRule) SetDeleteMarkerReplication(v *DeleteMarkerReplication) *ReplicationRule { + s.DeleteMarkerReplication = v + return s +} + // SetDestination sets the Destination field's value. func (s *ReplicationRule) SetDestination(v *Destination) *ReplicationRule { s.Destination = v return s } +// SetFilter sets the Filter field's value. +func (s *ReplicationRule) SetFilter(v *ReplicationRuleFilter) *ReplicationRule { + s.Filter = v + return s +} + // SetID sets the ID field's value. func (s *ReplicationRule) SetID(v string) *ReplicationRule { s.ID = &v @@ -19168,6 +19315,12 @@ func (s *ReplicationRule) SetPrefix(v string) *ReplicationRule { return s } +// SetPriority sets the Priority field's value. +func (s *ReplicationRule) SetPriority(v int64) *ReplicationRule { + s.Priority = &v + return s +} + // SetSourceSelectionCriteria sets the SourceSelectionCriteria field's value. func (s *ReplicationRule) SetSourceSelectionCriteria(v *SourceSelectionCriteria) *ReplicationRule { s.SourceSelectionCriteria = v @@ -19180,6 +19333,130 @@ func (s *ReplicationRule) SetStatus(v string) *ReplicationRule { return s } +type ReplicationRuleAndOperator struct { + _ struct{} `type:"structure"` + + Prefix *string `type:"string"` + + Tags []*Tag `locationName:"Tag" locationNameList:"Tag" type:"list" flattened:"true"` +} + +// String returns the string representation +func (s ReplicationRuleAndOperator) String() string { + return awsutil.Prettify(s) +} + +// GoString returns the string representation +func (s ReplicationRuleAndOperator) GoString() string { + return s.String() +} + +// Validate inspects the fields of the type to determine if they are valid. +func (s *ReplicationRuleAndOperator) Validate() error { + invalidParams := request.ErrInvalidParams{Context: "ReplicationRuleAndOperator"} + if s.Tags != nil { + for i, v := range s.Tags { + if v == nil { + continue + } + if err := v.Validate(); err != nil { + invalidParams.AddNested(fmt.Sprintf("%s[%v]", "Tags", i), err.(request.ErrInvalidParams)) + } + } + } + + if invalidParams.Len() > 0 { + return invalidParams + } + return nil +} + +// SetPrefix sets the Prefix field's value. +func (s *ReplicationRuleAndOperator) SetPrefix(v string) *ReplicationRuleAndOperator { + s.Prefix = &v + return s +} + +// SetTags sets the Tags field's value. +func (s *ReplicationRuleAndOperator) SetTags(v []*Tag) *ReplicationRuleAndOperator { + s.Tags = v + return s +} + +// Filter that identifies subset of objects to which the replication rule applies. +// A Filter must specify exactly one Prefix, Tag, or an And child element. +type ReplicationRuleFilter struct { + _ struct{} `type:"structure"` + + // Container for specifying rule filters. These filters determine the subset + // of objects to which the rule applies. The element is required only if you + // specify more than one filter. For example: + // + // * You specify both a Prefix and a Tag filters. Then you wrap these in + // an And tag. + // + // * You specify filter based on multiple tags. Then you wrap the Tag elements + // in an And tag. + And *ReplicationRuleAndOperator `type:"structure"` + + // Object keyname prefix that identifies subset of objects to which the rule + // applies. + Prefix *string `type:"string"` + + // Container for specifying a tag key and value. + // + // The rule applies only to objects having the tag in its tagset. + Tag *Tag `type:"structure"` +} + +// String returns the string representation +func (s ReplicationRuleFilter) String() string { + return awsutil.Prettify(s) +} + +// GoString returns the string representation +func (s ReplicationRuleFilter) GoString() string { + return s.String() +} + +// Validate inspects the fields of the type to determine if they are valid. +func (s *ReplicationRuleFilter) Validate() error { + invalidParams := request.ErrInvalidParams{Context: "ReplicationRuleFilter"} + if s.And != nil { + if err := s.And.Validate(); err != nil { + invalidParams.AddNested("And", err.(request.ErrInvalidParams)) + } + } + if s.Tag != nil { + if err := s.Tag.Validate(); err != nil { + invalidParams.AddNested("Tag", err.(request.ErrInvalidParams)) + } + } + + if invalidParams.Len() > 0 { + return invalidParams + } + return nil +} + +// SetAnd sets the And field's value. +func (s *ReplicationRuleFilter) SetAnd(v *ReplicationRuleAndOperator) *ReplicationRuleFilter { + s.And = v + return s +} + +// SetPrefix sets the Prefix field's value. +func (s *ReplicationRuleFilter) SetPrefix(v string) *ReplicationRuleFilter { + s.Prefix = &v + return s +} + +// SetTag sets the Tag field's value. +func (s *ReplicationRuleFilter) SetTag(v *Tag) *ReplicationRuleFilter { + s.Tag = v + return s +} + type RequestPaymentConfiguration struct { _ struct{} `type:"structure"` @@ -20358,6 +20635,8 @@ type SourceSelectionCriteria struct { _ struct{} `type:"structure"` // Container for filter information of selection of KMS Encrypted S3 objects. + // The element is required if you include SourceSelectionCriteria in the replication + // configuration. SseKmsEncryptedObjects *SseKmsEncryptedObjects `type:"structure"` } @@ -20834,6 +21113,8 @@ type TopicConfigurationDeprecated struct { _ struct{} `type:"structure"` // Bucket event for which to send notifications. + // + // Deprecated: Event has been deprecated Event *string `deprecated:"true" type:"string" enum:"Event"` Events []*string `locationName:"Event" type:"list" flattened:"true"` @@ -21705,6 +21986,14 @@ const ( CompressionTypeBzip2 = "BZIP2" ) +const ( + // DeleteMarkerReplicationStatusEnabled is a DeleteMarkerReplicationStatus enum value + DeleteMarkerReplicationStatusEnabled = "Enabled" + + // DeleteMarkerReplicationStatusDisabled is a DeleteMarkerReplicationStatus enum value + DeleteMarkerReplicationStatusDisabled = "Disabled" +) + // Requests Amazon S3 to encode the object keys in the response and specifies // the encoding method to use. An object key may contain any Unicode character; // however, XML 1.0 parser cannot parse some characters, such as characters diff --git a/vendor/github.com/aws/aws-sdk-go/service/s3/customizations.go b/vendor/github.com/aws/aws-sdk-go/service/s3/customizations.go index a55beab96..6f560a409 100644 --- a/vendor/github.com/aws/aws-sdk-go/service/s3/customizations.go +++ b/vendor/github.com/aws/aws-sdk-go/service/s3/customizations.go @@ -3,6 +3,7 @@ package s3 import ( "github.com/aws/aws-sdk-go/aws/client" "github.com/aws/aws-sdk-go/aws/request" + "github.com/aws/aws-sdk-go/internal/s3err" ) func init() { @@ -21,6 +22,7 @@ func defaultInitClientFn(c *client.Client) { // S3 uses custom error unmarshaling logic c.Handlers.UnmarshalError.Clear() c.Handlers.UnmarshalError.PushBack(unmarshalError) + c.Handlers.UnmarshalError.PushBackNamed(s3err.RequestFailureWrapperHandler()) } func defaultInitRequestFn(r *request.Request) { @@ -42,6 +44,7 @@ func defaultInitRequestFn(r *request.Request) { r.Handlers.Validate.PushFront(populateLocationConstraint) case opCopyObject, opUploadPartCopy, opCompleteMultipartUpload: r.Handlers.Unmarshal.PushFront(copyMultipartStatusOKUnmarhsalError) + r.Handlers.Unmarshal.PushBackNamed(s3err.RequestFailureWrapperHandler()) case opPutObject, opUploadPart: r.Handlers.Build.PushBack(computeBodyHashes) // Disabled until #1837 root issue is resolved. diff --git a/vendor/github.com/aws/aws-sdk-go/service/s3/service.go b/vendor/github.com/aws/aws-sdk-go/service/s3/service.go index 20de53f29..d17dcc9da 100644 --- a/vendor/github.com/aws/aws-sdk-go/service/s3/service.go +++ b/vendor/github.com/aws/aws-sdk-go/service/s3/service.go @@ -67,7 +67,9 @@ func newClient(cfg aws.Config, handlers request.Handlers, endpoint, signingRegio } // Handlers - svc.Handlers.Sign.PushBackNamed(v4.SignRequestHandler) + svc.Handlers.Sign.PushBackNamed(v4.BuildNamedHandler(v4.SignRequestHandler.Name, func(s *v4.Signer) { + s.DisableURIPathEscaping = true + })) svc.Handlers.Build.PushBackNamed(restxml.BuildHandler) svc.Handlers.Unmarshal.PushBackNamed(restxml.UnmarshalHandler) svc.Handlers.UnmarshalMeta.PushBackNamed(restxml.UnmarshalMetaHandler) diff --git a/vendor/github.com/aws/aws-sdk-go/service/s3/statusok_error.go b/vendor/github.com/aws/aws-sdk-go/service/s3/statusok_error.go index 9f33efc6c..fde3050f9 100644 --- a/vendor/github.com/aws/aws-sdk-go/service/s3/statusok_error.go +++ b/vendor/github.com/aws/aws-sdk-go/service/s3/statusok_error.go @@ -13,7 +13,11 @@ import ( func copyMultipartStatusOKUnmarhsalError(r *request.Request) { b, err := ioutil.ReadAll(r.HTTPResponse.Body) if err != nil { - r.Error = awserr.New("SerializationError", "unable to read response body", err) + r.Error = awserr.NewRequestFailure( + awserr.New("SerializationError", "unable to read response body", err), + r.HTTPResponse.StatusCode, + r.RequestID, + ) return } body := bytes.NewReader(b) diff --git a/vendor/github.com/aws/aws-sdk-go/service/s3/unmarshal_error.go b/vendor/github.com/aws/aws-sdk-go/service/s3/unmarshal_error.go index bcca8627a..12c0612c8 100644 --- a/vendor/github.com/aws/aws-sdk-go/service/s3/unmarshal_error.go +++ b/vendor/github.com/aws/aws-sdk-go/service/s3/unmarshal_error.go @@ -23,22 +23,17 @@ func unmarshalError(r *request.Request) { defer r.HTTPResponse.Body.Close() defer io.Copy(ioutil.Discard, r.HTTPResponse.Body) - hostID := r.HTTPResponse.Header.Get("X-Amz-Id-2") - // Bucket exists in a different region, and request needs // to be made to the correct region. if r.HTTPResponse.StatusCode == http.StatusMovedPermanently { - r.Error = requestFailure{ - RequestFailure: awserr.NewRequestFailure( - awserr.New("BucketRegionError", - fmt.Sprintf("incorrect region, the bucket is not in '%s' region", - aws.StringValue(r.Config.Region)), - nil), - r.HTTPResponse.StatusCode, - r.RequestID, - ), - hostID: hostID, - } + r.Error = awserr.NewRequestFailure( + awserr.New("BucketRegionError", + fmt.Sprintf("incorrect region, the bucket is not in '%s' region", + aws.StringValue(r.Config.Region)), + nil), + r.HTTPResponse.StatusCode, + r.RequestID, + ) return } @@ -63,14 +58,11 @@ func unmarshalError(r *request.Request) { errMsg = statusText } - r.Error = requestFailure{ - RequestFailure: awserr.NewRequestFailure( - awserr.New(errCode, errMsg, err), - r.HTTPResponse.StatusCode, - r.RequestID, - ), - hostID: hostID, - } + r.Error = awserr.NewRequestFailure( + awserr.New(errCode, errMsg, err), + r.HTTPResponse.StatusCode, + r.RequestID, + ) } // A RequestFailure provides access to the S3 Request ID and Host ID values @@ -83,21 +75,3 @@ type RequestFailure interface { // Host ID is the S3 Host ID needed for debug, and contacting support HostID() string } - -type requestFailure struct { - awserr.RequestFailure - - hostID string -} - -func (r requestFailure) Error() string { - extra := fmt.Sprintf("status code: %d, request id: %s, host id: %s", - r.StatusCode(), r.RequestID(), r.hostID) - return awserr.SprintError(r.Code(), r.Message(), extra, r.OrigErr()) -} -func (r requestFailure) String() string { - return r.Error() -} -func (r requestFailure) HostID() string { - return r.hostID -} diff --git a/vendor/github.com/aws/aws-sdk-go/service/secretsmanager/api.go b/vendor/github.com/aws/aws-sdk-go/service/secretsmanager/api.go index 667e1c1a1..eece96bf3 100644 --- a/vendor/github.com/aws/aws-sdk-go/service/secretsmanager/api.go +++ b/vendor/github.com/aws/aws-sdk-go/service/secretsmanager/api.go @@ -67,8 +67,8 @@ func (c *SecretsManager) CancelRotateSecretRequest(input *CancelRotateSecretInpu // If you cancel a rotation that is in progress, it can leave the VersionStage // labels in an unexpected state. Depending on what step of the rotation was // in progress, you might need to remove the staging label AWSPENDING from the -// partially created version, specified by the SecretVersionId response value. -// You should also evaluate the partially rotated new version to see if it should +// partially created version, specified by the VersionId response value. You +// should also evaluate the partially rotated new version to see if it should // be deleted, which you can do by removing all staging labels from the new // version's VersionStage field. // @@ -1529,9 +1529,9 @@ func (c *SecretsManager) PutSecretValueRequest(input *PutSecretValueInput) (req // then Secrets Manager also automatically moves the staging label AWSPREVIOUS // to the version that AWSCURRENT was removed from. // -// * This operation is idempotent. If a version with a SecretVersionId with -// the same value as the ClientRequestToken parameter already exists and -// you specify the same secret data, the operation succeeds but does nothing. +// * This operation is idempotent. If a version with a VersionId with the +// same value as the ClientRequestToken parameter already exists and you +// specify the same secret data, the operation succeeds but does nothing. // However, if the secret data is different, then the operation fails because // you cannot modify an existing version; you can only create new ones. // @@ -1813,6 +1813,13 @@ func (c *SecretsManager) RotateSecretRequest(input *RotateSecretInput) (req *req // (http://docs.aws.amazon.com/secretsmanager/latest/userguide/rotating-secrets.html) // in the AWS Secrets Manager User Guide. // +// Secrets Manager schedules the next rotation when the previous one is complete. +// Secrets Manager schedules the date by adding the rotation interval (number +// of days) to the actual date of the last rotation. The service chooses the +// hour within that 24-hour date window randomly. The minute is also chosen +// somewhat randomly, but weighted towards the top of the hour and influenced +// by a variety of factors that help distribute load. +// // The rotation function must end with the versions of the secret in one of // two states: // @@ -2204,8 +2211,8 @@ func (c *SecretsManager) UpdateSecretRequest(input *UpdateSecretInput) (req *req // UpdateSecret API operation for AWS Secrets Manager. // -// Modifies many of the details of a secret. If you include a ClientRequestToken -// and either SecretString or SecretBinary then it also creates a new version +// Modifies many of the details of the specified secret. If you include a ClientRequestToken +// and eitherSecretString or SecretBinary then it also creates a new version // attached to the secret. // // To modify the rotation configuration of a secret, use RotateSecret instead. @@ -2215,9 +2222,9 @@ func (c *SecretsManager) UpdateSecretRequest(input *UpdateSecretInput) (req *req // binary data as part of the version of a secret, you must use either the AWS // CLI or one of the AWS SDKs. // -// * If a version with a SecretVersionId with the same value as the ClientRequestToken -// parameter already exists, the operation generates an error. You cannot -// modify an existing version, you can only create new ones. +// * If a version with a VersionId with the same value as the ClientRequestToken +// parameter already exists, the operation results in an error. You cannot +// modify an existing version, you can only create a new version. // // * If you include SecretString or SecretBinary to create a new secret version, // Secrets Manager automatically attaches the staging label AWSCURRENT to @@ -2480,6 +2487,18 @@ type CancelRotateSecretInput struct { // can specify either the Amazon Resource Name (ARN) or the friendly name of // the secret. // + // If you specify an ARN, we generally recommend that you specify a complete + // ARN. You can specify a partial ARN too—for example, if you don’t include + // the final hyphen and six random characters that Secrets Manager adds at the + // end of the ARN when you created the secret. A partial ARN match can work + // as long as it uniquely matches only one secret. However, if your secret has + // a name that ends in a hyphen followed by six characters (before Secrets Manager + // adds the hyphen and six characters to the ARN) and you try to use that as + // a partial ARN, then those characters cause Secrets Manager to assume that + // you’re specifying a complete ARN. This confusion can cause unexpected results. + // To avoid this situation, we recommend that you don’t create secret names + // that end with a hyphen followed by six characters. + // // SecretId is a required field SecretId *string `min:"1" type:"string" required:"true"` } @@ -2592,7 +2611,7 @@ type CreateSecretInput struct { // request fails because you cannot modify an existing version. Instead, // use PutSecretValue to create a new version. // - // This value becomes the SecretVersionId of the new version. + // This value becomes the VersionId of the new version. ClientRequestToken *string `min:"32" type:"string" idempotencyToken:"true"` // (Optional) Specifies a user-provided description of the secret. @@ -2623,6 +2642,11 @@ type CreateSecretInput struct { // The secret name must be ASCII letters, digits, or the following characters // : /_+=.@- // + // Don't end your secret name with a hyphen followed by six characters. If you + // do so, you risk confusion and unexpected results when searching for a secret + // by partial ARN. This is because Secrets Manager automatically adds a hyphen + // and six random characters at the end of the ARN. + // // Name is a required field Name *string `min:"1" type:"string" required:"true"` @@ -2847,6 +2871,18 @@ type DeleteResourcePolicyInput struct { // policy for. You can specify either the Amazon Resource Name (ARN) or the // friendly name of the secret. // + // If you specify an ARN, we generally recommend that you specify a complete + // ARN. You can specify a partial ARN too—for example, if you don’t include + // the final hyphen and six random characters that Secrets Manager adds at the + // end of the ARN when you created the secret. A partial ARN match can work + // as long as it uniquely matches only one secret. However, if your secret has + // a name that ends in a hyphen followed by six characters (before Secrets Manager + // adds the hyphen and six characters to the ARN) and you try to use that as + // a partial ARN, then those characters cause Secrets Manager to assume that + // you’re specifying a complete ARN. This confusion can cause unexpected results. + // To avoid this situation, we recommend that you don’t create secret names + // that end with a hyphen followed by six characters. + // // SecretId is a required field SecretId *string `min:"1" type:"string" required:"true"` } @@ -2919,8 +2955,25 @@ func (s *DeleteResourcePolicyOutput) SetName(v string) *DeleteResourcePolicyOutp type DeleteSecretInput struct { _ struct{} `type:"structure"` + // (Optional) Specifies that the secret is to be deleted without any recovery + // window. You can't use both this parameter and the RecoveryWindowInDays parameter + // in the same API call. + // + // An asynchronous background process performs the actual deletion, so there + // can be a short delay before the operation completes. If you write code to + // delete and then immediately recreate a secret with the same name, ensure + // that your code includes appropriate back off and retry logic. + // + // Use this parameter with caution. This parameter causes the operation to skip + // the normal waiting period before the permanent deletion that AWS would normally + // impose with the RecoveryWindowInDays parameter. If you delete a secret with + // the ForceDeleteWithouRecovery parameter, then you have no opportunity to + // recover the secret. It is permanently lost. + ForceDeleteWithoutRecovery *bool `type:"boolean"` + // (Optional) Specifies the number of days that Secrets Manager waits before - // it can delete the secret. + // it can delete the secret. You can't use both this parameter and the ForceDeleteWithoutRecovery + // parameter in the same API call. // // This value can range from 7 to 30 days. The default value is 30. RecoveryWindowInDays *int64 `type:"long"` @@ -2928,6 +2981,18 @@ type DeleteSecretInput struct { // Specifies the secret that you want to delete. You can specify either the // Amazon Resource Name (ARN) or the friendly name of the secret. // + // If you specify an ARN, we generally recommend that you specify a complete + // ARN. You can specify a partial ARN too—for example, if you don’t include + // the final hyphen and six random characters that Secrets Manager adds at the + // end of the ARN when you created the secret. A partial ARN match can work + // as long as it uniquely matches only one secret. However, if your secret has + // a name that ends in a hyphen followed by six characters (before Secrets Manager + // adds the hyphen and six characters to the ARN) and you try to use that as + // a partial ARN, then those characters cause Secrets Manager to assume that + // you’re specifying a complete ARN. This confusion can cause unexpected results. + // To avoid this situation, we recommend that you don’t create secret names + // that end with a hyphen followed by six characters. + // // SecretId is a required field SecretId *string `min:"1" type:"string" required:"true"` } @@ -2958,6 +3023,12 @@ func (s *DeleteSecretInput) Validate() error { return nil } +// SetForceDeleteWithoutRecovery sets the ForceDeleteWithoutRecovery field's value. +func (s *DeleteSecretInput) SetForceDeleteWithoutRecovery(v bool) *DeleteSecretInput { + s.ForceDeleteWithoutRecovery = &v + return s +} + // SetRecoveryWindowInDays sets the RecoveryWindowInDays field's value. func (s *DeleteSecretInput) SetRecoveryWindowInDays(v int64) *DeleteSecretInput { s.RecoveryWindowInDays = &v @@ -3020,6 +3091,18 @@ type DescribeSecretInput struct { // specify either the Amazon Resource Name (ARN) or the friendly name of the // secret. // + // If you specify an ARN, we generally recommend that you specify a complete + // ARN. You can specify a partial ARN too—for example, if you don’t include + // the final hyphen and six random characters that Secrets Manager adds at the + // end of the ARN when you created the secret. A partial ARN match can work + // as long as it uniquely matches only one secret. However, if your secret has + // a name that ends in a hyphen followed by six characters (before Secrets Manager + // adds the hyphen and six characters to the ARN) and you try to use that as + // a partial ARN, then those characters cause Secrets Manager to assume that + // you’re specifying a complete ARN. This confusion can cause unexpected results. + // To avoid this situation, we recommend that you don’t create secret names + // that end with a hyphen followed by six characters. + // // SecretId is a required field SecretId *string `min:"1" type:"string" required:"true"` } @@ -3088,8 +3171,8 @@ type DescribeSecretOutput struct { // The last date and time that this secret was modified in any way. LastChangedDate *time.Time `type:"timestamp"` - // The last date and time that the Secrets Manager rotation process for this - // secret was invoked. + // The most recent date and time that the Secrets Manager rotation process was + // successfully completed. This value is null if the secret has never rotated. LastRotatedDate *time.Time `type:"timestamp"` // The user-provided friendly name of the secret. @@ -3114,8 +3197,8 @@ type DescribeSecretOutput struct { Tags []*Tag `type:"list"` // A list of all of the currently assigned VersionStage staging labels and the - // SecretVersionId that each is attached to. Staging labels are used to keep - // track of the different versions during the rotation process. + // VersionId that each is attached to. Staging labels are used to keep track + // of the different versions during the rotation process. // // A version that does not have any staging labels attached is considered deprecated // and subject to deletion. Such versions are not included in this list. @@ -3230,6 +3313,12 @@ type GetRandomPasswordInput struct { // Specifies that the generated password should not include punctuation characters. // The default if you do not include this switch parameter is that punctuation // characters can be included. + // + // The following are the punctuation characters that can be included in the + // generated password if you don't explicitly exclude them with ExcludeCharacters + // or ExcludePunctuation: + // + // ! " # $ % & ' ( ) * + , - . / : ; < = > ? @ [ \ ] ^ _ ` { | } ~ ExcludePunctuation *bool `type:"boolean"` // Specifies that the generated password should not include uppercase letters. @@ -3353,6 +3442,18 @@ type GetResourcePolicyInput struct { // policy for. You can specify either the Amazon Resource Name (ARN) or the // friendly name of the secret. // + // If you specify an ARN, we generally recommend that you specify a complete + // ARN. You can specify a partial ARN too—for example, if you don’t include + // the final hyphen and six random characters that Secrets Manager adds at the + // end of the ARN when you created the secret. A partial ARN match can work + // as long as it uniquely matches only one secret. However, if your secret has + // a name that ends in a hyphen followed by six characters (before Secrets Manager + // adds the hyphen and six characters to the ARN) and you try to use that as + // a partial ARN, then those characters cause Secrets Manager to assume that + // you’re specifying a complete ARN. This confusion can cause unexpected results. + // To avoid this situation, we recommend that you don’t create secret names + // that end with a hyphen followed by six characters. + // // SecretId is a required field SecretId *string `min:"1" type:"string" required:"true"` } @@ -3444,12 +3545,24 @@ type GetSecretValueInput struct { // can specify either the Amazon Resource Name (ARN) or the friendly name of // the secret. // + // If you specify an ARN, we generally recommend that you specify a complete + // ARN. You can specify a partial ARN too—for example, if you don’t include + // the final hyphen and six random characters that Secrets Manager adds at the + // end of the ARN when you created the secret. A partial ARN match can work + // as long as it uniquely matches only one secret. However, if your secret has + // a name that ends in a hyphen followed by six characters (before Secrets Manager + // adds the hyphen and six characters to the ARN) and you try to use that as + // a partial ARN, then those characters cause Secrets Manager to assume that + // you’re specifying a complete ARN. This confusion can cause unexpected results. + // To avoid this situation, we recommend that you don’t create secret names + // that end with a hyphen followed by six characters. + // // SecretId is a required field SecretId *string `min:"1" type:"string" required:"true"` // Specifies the unique identifier of the version of the secret that you want // to retrieve. If you specify this parameter then don't specify VersionStage. - // If you don't specify either a VersionStage or SecretVersionId then the default + // If you don't specify either a VersionStage or VersionId then the default // is to perform the operation on the version with the VersionStage value of // AWSCURRENT. // @@ -3461,10 +3574,9 @@ type GetSecretValueInput struct { // attached to the version. // // Staging labels are used to keep track of different versions during the rotation - // process. If you use this parameter then don't specify SecretVersionId. If - // you don't specify either a VersionStage or SecretVersionId, then the default - // is to perform the operation on the version with the VersionStage value of - // AWSCURRENT. + // process. If you use this parameter then don't specify VersionId. If you don't + // specify either a VersionStage or VersionId, then the default is to perform + // the operation on the version with the VersionStage value of AWSCURRENT. VersionStage *string `min:"1" type:"string"` } @@ -3648,6 +3760,18 @@ type ListSecretVersionIdsInput struct { // can specify either the Amazon Resource Name (ARN) or the friendly name of // the secret. // + // If you specify an ARN, we generally recommend that you specify a complete + // ARN. You can specify a partial ARN too—for example, if you don’t include + // the final hyphen and six random characters that Secrets Manager adds at the + // end of the ARN when you created the secret. A partial ARN match can work + // as long as it uniquely matches only one secret. However, if your secret has + // a name that ends in a hyphen followed by six characters (before Secrets Manager + // adds the hyphen and six characters to the ARN) and you try to use that as + // a partial ARN, then those characters cause Secrets Manager to assume that + // you’re specifying a complete ARN. This confusion can cause unexpected results. + // To avoid this situation, we recommend that you don’t create secret names + // that end with a hyphen followed by six characters. + // // SecretId is a required field SecretId *string `min:"1" type:"string" required:"true"` } @@ -3884,6 +4008,18 @@ type PutResourcePolicyInput struct { // Specifies the secret that you want to attach the resource-based policy to. // You can specify either the ARN or the friendly name of the secret. // + // If you specify an ARN, we generally recommend that you specify a complete + // ARN. You can specify a partial ARN too—for example, if you don’t include + // the final hyphen and six random characters that Secrets Manager adds at the + // end of the ARN when you created the secret. A partial ARN match can work + // as long as it uniquely matches only one secret. However, if your secret has + // a name that ends in a hyphen followed by six characters (before Secrets Manager + // adds the hyphen and six characters to the ARN) and you try to use that as + // a partial ARN, then those characters cause Secrets Manager to assume that + // you’re specifying a complete ARN. This confusion can cause unexpected results. + // To avoid this situation, we recommend that you don’t create secret names + // that end with a hyphen followed by six characters. + // // SecretId is a required field SecretId *string `min:"1" type:"string" required:"true"` } @@ -3995,7 +4131,7 @@ type PutSecretValueInput struct { // request fails because you cannot modify an existing secret version. You // can only create new versions to store new secret values. // - // This value becomes the SecretVersionId of the new version. + // This value becomes the VersionId of the new version. ClientRequestToken *string `min:"32" type:"string" idempotencyToken:"true"` // (Optional) Specifies binary data that you want to encrypt and store in the @@ -4015,6 +4151,18 @@ type PutSecretValueInput struct { // either the Amazon Resource Name (ARN) or the friendly name of the secret. // The secret must already exist. // + // If you specify an ARN, we generally recommend that you specify a complete + // ARN. You can specify a partial ARN too—for example, if you don’t include + // the final hyphen and six random characters that Secrets Manager adds at the + // end of the ARN when you created the secret. A partial ARN match can work + // as long as it uniquely matches only one secret. However, if your secret has + // a name that ends in a hyphen followed by six characters (before Secrets Manager + // adds the hyphen and six characters to the ARN) and you try to use that as + // a partial ARN, then those characters cause Secrets Manager to assume that + // you’re specifying a complete ARN. This confusion can cause unexpected results. + // To avoid this situation, we recommend that you don’t create secret names + // that end with a hyphen followed by six characters. + // // SecretId is a required field SecretId *string `min:"1" type:"string" required:"true"` @@ -4178,6 +4326,18 @@ type RestoreSecretInput struct { // deletion. You can specify either the Amazon Resource Name (ARN) or the friendly // name of the secret. // + // If you specify an ARN, we generally recommend that you specify a complete + // ARN. You can specify a partial ARN too—for example, if you don’t include + // the final hyphen and six random characters that Secrets Manager adds at the + // end of the ARN when you created the secret. A partial ARN match can work + // as long as it uniquely matches only one secret. However, if your secret has + // a name that ends in a hyphen followed by six characters (before Secrets Manager + // adds the hyphen and six characters to the ARN) and you try to use that as + // a partial ARN, then those characters cause Secrets Manager to assume that + // you’re specifying a complete ARN. This confusion can cause unexpected results. + // To avoid this situation, we recommend that you don’t create secret names + // that end with a hyphen followed by six characters. + // // SecretId is a required field SecretId *string `min:"1" type:"string" required:"true"` } @@ -4266,19 +4426,7 @@ type RotateSecretInput struct { // // Secrets Manager uses this value to prevent the accidental creation of duplicate // versions if there are failures and retries during the function's processing. - // - // * If the ClientRequestToken value isn't already associated with a version - // of the secret then a new version of the secret is created. - // - // * If a version with this value already exists and that version's SecretString - // and SecretBinary values are the same as the request, then the request - // is ignored (the operation is idempotent). - // - // * If a version with this value already exists and that version's SecretString - // and SecretBinary values are different from the request then an error occurs - // because you cannot modify an existing secret value. - // - // This value becomes the SecretVersionId of the new version. + // This value becomes the VersionId of the new version. ClientRequestToken *string `min:"32" type:"string" idempotencyToken:"true"` // (Optional) Specifies the ARN of the Lambda function that can rotate the secret. @@ -4290,6 +4438,18 @@ type RotateSecretInput struct { // Specifies the secret that you want to rotate. You can specify either the // Amazon Resource Name (ARN) or the friendly name of the secret. // + // If you specify an ARN, we generally recommend that you specify a complete + // ARN. You can specify a partial ARN too—for example, if you don’t include + // the final hyphen and six random characters that Secrets Manager adds at the + // end of the ARN when you created the secret. A partial ARN match can work + // as long as it uniquely matches only one secret. However, if your secret has + // a name that ends in a hyphen followed by six characters (before Secrets Manager + // adds the hyphen and six characters to the ARN) and you try to use that as + // a partial ARN, then those characters cause Secrets Manager to assume that + // you’re specifying a complete ARN. This confusion can cause unexpected results. + // To avoid this situation, we recommend that you don’t create secret names + // that end with a hyphen followed by six characters. + // // SecretId is a required field SecretId *string `min:"1" type:"string" required:"true"` } @@ -4400,6 +4560,13 @@ type RotationRulesType struct { // Specifies the number of days between automatic scheduled rotations of the // secret. + // + // Secrets Manager schedules the next rotation when the previous one is complete. + // Secrets Manager schedules the date by adding the rotation interval (number + // of days) to the actual date of the last rotation. The service chooses the + // hour within that 24-hour date window randomly. The minute is also chosen + // somewhat randomly, but weighted towards the top of the hour and influenced + // by a variety of factors that help distribute load. AutomaticallyAfterDays *int64 `min:"1" type:"long"` } @@ -4694,6 +4861,18 @@ type TagResourceInput struct { // The identifier for the secret that you want to attach tags to. You can specify // either the Amazon Resource Name (ARN) or the friendly name of the secret. // + // If you specify an ARN, we generally recommend that you specify a complete + // ARN. You can specify a partial ARN too—for example, if you don’t include + // the final hyphen and six random characters that Secrets Manager adds at the + // end of the ARN when you created the secret. A partial ARN match can work + // as long as it uniquely matches only one secret. However, if your secret has + // a name that ends in a hyphen followed by six characters (before Secrets Manager + // adds the hyphen and six characters to the ARN) and you try to use that as + // a partial ARN, then those characters cause Secrets Manager to assume that + // you’re specifying a complete ARN. This confusion can cause unexpected results. + // To avoid this situation, we recommend that you don’t create secret names + // that end with a hyphen followed by six characters. + // // SecretId is a required field SecretId *string `min:"1" type:"string" required:"true"` @@ -4782,6 +4961,18 @@ type UntagResourceInput struct { // specify either the Amazon Resource Name (ARN) or the friendly name of the // secret. // + // If you specify an ARN, we generally recommend that you specify a complete + // ARN. You can specify a partial ARN too—for example, if you don’t include + // the final hyphen and six random characters that Secrets Manager adds at the + // end of the ARN when you created the secret. A partial ARN match can work + // as long as it uniquely matches only one secret. However, if your secret has + // a name that ends in a hyphen followed by six characters (before Secrets Manager + // adds the hyphen and six characters to the ARN) and you try to use that as + // a partial ARN, then those characters cause Secrets Manager to assume that + // you’re specifying a complete ARN. This confusion can cause unexpected results. + // To avoid this situation, we recommend that you don’t create secret names + // that end with a hyphen followed by six characters. + // // SecretId is a required field SecretId *string `min:"1" type:"string" required:"true"` @@ -4885,49 +5076,58 @@ type UpdateSecretInput struct { // and SecretBinary values are different from the request then an error occurs // because you cannot modify an existing secret value. // - // This value becomes the SecretVersionId of the new version. + // This value becomes the VersionId of the new version. ClientRequestToken *string `min:"32" type:"string" idempotencyToken:"true"` - // (Optional) Specifies a user-provided description of the secret. + // (Optional) Specifies an updated user-provided description of the secret. Description *string `type:"string"` - // (Optional) Specifies the ARN or alias of the AWS KMS customer master key - // (CMK) to be used to encrypt the protected text in the versions of this secret. - // - // If you don't specify this value, then Secrets Manager defaults to using the - // default CMK in the account (the one named aws/secretsmanager). If a AWS KMS - // CMK with that name doesn't exist, then Secrets Manager creates it for you - // automatically the first time it needs to encrypt a version's Plaintext or - // PlaintextString fields. + // (Optional) Specifies an updated ARN or alias of the AWS KMS customer master + // key (CMK) to be used to encrypt the protected text in new versions of this + // secret. // // You can only use the account's default CMK to encrypt and decrypt if you // call this operation using credentials from the same account that owns the // secret. If the secret is in a different account, then you must create a custom - // CMK and provide the ARN in this field. + // CMK and provide the ARN of that CMK in this field. The user making the call + // must have permissions to both the secret and the CMK in their respective + // accounts. KmsKeyId *string `type:"string"` - // (Optional) Specifies binary data that you want to encrypt and store in the - // new version of the secret. To use this parameter in the command-line tools, - // we recommend that you store your binary data in a file and then use the appropriate - // technique for your tool to pass the contents of the file as a parameter. - // Either SecretBinary or SecretString must have a value, but not both. They - // cannot both be empty. + // (Optional) Specifies updated binary data that you want to encrypt and store + // in the new version of the secret. To use this parameter in the command-line + // tools, we recommend that you store your binary data in a file and then use + // the appropriate technique for your tool to pass the contents of the file + // as a parameter. Either SecretBinary or SecretString must have a value, but + // not both. They cannot both be empty. // // This parameter is not accessible using the Secrets Manager console. // // SecretBinary is automatically base64 encoded/decoded by the SDK. SecretBinary []byte `type:"blob"` - // Specifies the secret that you want to update or to which you want to add + // Specifies the secret that you want to modify or to which you want to add // a new version. You can specify either the Amazon Resource Name (ARN) or the // friendly name of the secret. // + // If you specify an ARN, we generally recommend that you specify a complete + // ARN. You can specify a partial ARN too—for example, if you don’t include + // the final hyphen and six random characters that Secrets Manager adds at the + // end of the ARN when you created the secret. A partial ARN match can work + // as long as it uniquely matches only one secret. However, if your secret has + // a name that ends in a hyphen followed by six characters (before Secrets Manager + // adds the hyphen and six characters to the ARN) and you try to use that as + // a partial ARN, then those characters cause Secrets Manager to assume that + // you’re specifying a complete ARN. This confusion can cause unexpected results. + // To avoid this situation, we recommend that you don’t create secret names + // that end with a hyphen followed by six characters. + // // SecretId is a required field SecretId *string `min:"1" type:"string" required:"true"` - // (Optional) Specifies text data that you want to encrypt and store in this - // new version of the secret. Either SecretBinary or SecretString must have - // a value, but not both. They cannot both be empty. + // (Optional) Specifies updated text data that you want to encrypt and store + // in this new version of the secret. Either SecretBinary or SecretString must + // have a value, but not both. They cannot both be empty. // // If you create this secret by using the Secrets Manager console then Secrets // Manager puts the protected secret text in only the SecretString parameter. @@ -4944,7 +5144,12 @@ type UpdateSecretInput struct { // // If your command-line tool or SDK requires quotation marks around the parameter, // you should use single quotes to avoid confusion with the double quotes required - // in the JSON text. + // in the JSON text. You can also 'escape' the double quote character in the + // embedded JSON text by prefacing each with a backslash. For example, the following + // string is surrounded by double-quotes. All of the embedded double quotes + // are escaped: + // + // "[{\"username\":\"bob\"},{\"password\":\"abc123xyz456\"}]" SecretString *string `type:"string"` } @@ -5016,7 +5221,7 @@ func (s *UpdateSecretInput) SetSecretString(v string) *UpdateSecretInput { type UpdateSecretOutput struct { _ struct{} `type:"structure"` - // The ARN of this secret. + // The ARN of the secret that was updated. // // Secrets Manager automatically adds several random characters to the name // at the end of the ARN when you initially create a secret. This affects only @@ -5026,11 +5231,11 @@ type UpdateSecretOutput struct { // the new secret because the ARNs are different. ARN *string `min:"20" type:"string"` - // The friendly name of this secret. + // The friendly name of the secret that was updated. Name *string `min:"1" type:"string"` - // If a version of the secret was created or updated by this operation, then - // its unique identifier is returned. + // If a new version of the secret was created by this operation, then VersionId + // contains the unique identifier of the new version. VersionId *string `min:"32" type:"string"` } @@ -5066,29 +5271,37 @@ type UpdateSecretVersionStageInput struct { _ struct{} `type:"structure"` // (Optional) The secret version ID that you want to add the staging labels - // to. + // to. If you want to remove a label from a version, then do not specify this + // parameter. // // If any of the staging labels are already attached to a different version - // of the secret, then they are removed from that version before adding them - // to this version. + // of the secret, then you must also specify the RemoveFromVersionId parameter. MoveToVersionId *string `min:"32" type:"string"` - // (Optional) Specifies the secret version ID of the version that the staging - // labels are to be removed from. - // - // If you want to move a label to a new version, you do not have to explicitly - // remove it with this parameter. Adding a label using the MoveToVersionId parameter - // automatically removes it from the old version. However, if you do include - // both the "MoveTo" and "RemoveFrom" parameters, then the move is successful - // only if the staging labels are actually present on the "RemoveFrom" version. - // If a staging label was on a different version than "RemoveFrom", then the - // request fails. + // Specifies the secret version ID of the version that the staging labels are + // to be removed from. If the staging label you are trying to attach to one + // version is already attached to a different version, then you must include + // this parameter and specify the version that the label is to be removed from. + // If the label is attached and you either do not specify this parameter, or + // the version ID does not match, then the operation fails. RemoveFromVersionId *string `min:"32" type:"string"` // Specifies the secret with the version whose list of staging labels you want // to modify. You can specify either the Amazon Resource Name (ARN) or the friendly // name of the secret. // + // If you specify an ARN, we generally recommend that you specify a complete + // ARN. You can specify a partial ARN too—for example, if you don’t include + // the final hyphen and six random characters that Secrets Manager adds at the + // end of the ARN when you created the secret. A partial ARN match can work + // as long as it uniquely matches only one secret. However, if your secret has + // a name that ends in a hyphen followed by six characters (before Secrets Manager + // adds the hyphen and six characters to the ARN) and you try to use that as + // a partial ARN, then those characters cause Secrets Manager to assume that + // you’re specifying a complete ARN. This confusion can cause unexpected results. + // To avoid this situation, we recommend that you don’t create secret names + // that end with a hyphen followed by six characters. + // // SecretId is a required field SecretId *string `min:"1" type:"string" required:"true"` diff --git a/vendor/github.com/aws/aws-sdk-go/service/ses/api.go b/vendor/github.com/aws/aws-sdk-go/service/ses/api.go index f93a8b732..c18664b35 100644 --- a/vendor/github.com/aws/aws-sdk-go/service/ses/api.go +++ b/vendor/github.com/aws/aws-sdk-go/service/ses/api.go @@ -4046,8 +4046,7 @@ func (c *SES) SendBulkTemplatedEmailRequest(input *SendBulkTemplatedEmailInput) // Email Addresses and Domains (http://docs.aws.amazon.com/ses/latest/DeveloperGuide/verify-addresses-and-domains.html) // in the Amazon SES Developer Guide. // -// * The total size of the message, including attachments, must be less than -// 10 MB. +// * The maximum message size is 10 MB. // // * Each Destination parameter must include at least one recipient email // address. The recipient address can be a To: address, a CC: address, or @@ -4056,6 +4055,15 @@ func (c *SES) SendBulkTemplatedEmailRequest(input *SendBulkTemplatedEmailInput) // message will be rejected, even if the message contains other recipients // that are valid. // +// * The message may not include more than 50 recipients, across the To:, +// CC: and BCC: fields. If you need to send an email message to a larger +// audience, you can divide your recipient list into groups of 50 or fewer, +// and then call the SendBulkTemplatedEmail operation several times to send +// the message to each group. +// +// * The number of destinations you can contact in a single call to the API +// may be limited by your account's maximum sending rate. +// // Returns awserr.Error for service API and SDK errors. Use runtime type assertions // with awserr.Error's Code and Message methods to get detailed information about // the error. @@ -4277,8 +4285,7 @@ func (c *SES) SendEmailRequest(input *SendEmailInput) (req *request.Request, out // Email Addresses and Domains (http://docs.aws.amazon.com/ses/latest/DeveloperGuide/verify-addresses-and-domains.html) // in the Amazon SES Developer Guide. // -// * The total size of the message, including attachments, must be smaller -// than 10 MB. +// * The maximum message size is 10 MB. // // * The message must include at least one recipient email address. The recipient // address can be a To: address, a CC: address, or a BCC: address. If a recipient @@ -4397,46 +4404,50 @@ func (c *SES) SendRawEmailRequest(input *SendRawEmailInput) (req *request.Reques // SendRawEmail API operation for Amazon Simple Email Service. // -// Composes an email message and immediately queues it for sending. When calling -// this operation, you may specify the message headers as well as the content. -// The SendRawEmail operation is particularly useful for sending multipart MIME -// emails (such as those that contain both a plain-text and an HTML version). +// Composes an email message and immediately queues it for sending. // -// In order to send email using the SendRawEmail operation, your message must -// meet the following requirements: +// This operation is more flexible than the SendEmail API operation. When you +// use the SendRawEmail operation, you can specify the headers of the message +// as well as its content. This flexibility is useful, for example, when you +// want to send a multipart MIME email (such a message that contains both a +// text and an HTML version). You can also use this operation to send messages +// that include attachments. // -// * The message must be sent from a verified email address or domain. If -// you attempt to send email using a non-verified address or domain, the -// operation will result in an "Email address not verified" error. +// The SendRawEmail operation has the following requirements: // -// * If your account is still in the Amazon SES sandbox, you may only send -// to verified addresses or domains, or to email addresses associated with -// the Amazon SES Mailbox Simulator. For more information, see Verifying -// Email Addresses and Domains (http://docs.aws.amazon.com/ses/latest/DeveloperGuide/verify-addresses-and-domains.html) +// * You can only send email from verified email addresses or domains (http://docs.aws.amazon.com/ses/latest/DeveloperGuide/verify-addresses-and-domains.html). +// If you try to send email from an address that isn't verified, the operation +// results in an "Email address not verified" error. +// +// * If your account is still in the Amazon SES sandbox (http://docs.aws.amazon.com/ses/latest/DeveloperGuide/request-production-access.html), +// you can only send email to other verified addresses in your account, or +// to addresses that are associated with the Amazon SES mailbox simulator +// (http://docs.aws.amazon.com/ses/latest/DeveloperGuide/mailbox-simulator.html). +// +// * The maximum message size, including attachments, is 10 MB. +// +// * Each message has to include at least one recipient address. A recipient +// address includes any address on the To:, CC:, or BCC: lines. +// +// * If you send a single message to more than one recipient address, and +// one of the recipient addresses isn't in a valid format (that is, it's +// not in the format UserName@[SubDomain.]Domain.TopLevelDomain), Amazon +// SES rejects the entire message, even if the other addresses are valid. +// +// * Each message can include up to 50 recipient addresses across the To:, +// CC:, or BCC: lines. If you need to send a single message to more than +// 50 recipients, you have to split the list of recipient addresses into +// groups of less than 50 recipients, and send separate messages to each +// group. +// +// * Amazon SES allows you to specify 8-bit Content-Transfer-Encoding for +// MIME message parts. However, if Amazon SES has to modify the contents +// of your message (for example, if you use open and click tracking), 8-bit +// content isn't preserved. For this reason, we highly recommend that you +// encode all content that isn't 7-bit ASCII. For more information, see MIME +// Encoding (http://docs.aws.amazon.com/ses/latest/DeveloperGuide/send-email-raw.html#send-email-mime-encoding) // in the Amazon SES Developer Guide. // -// * The total size of the message, including attachments, must be smaller -// than 10 MB. -// -// * The message must include at least one recipient email address. The recipient -// address can be a To: address, a CC: address, or a BCC: address. If a recipient -// email address is invalid (that is, it is not in the format UserName@[SubDomain.]Domain.TopLevelDomain), -// the entire message will be rejected, even if the message contains other -// recipients that are valid. -// -// * The message may not include more than 50 recipients, across the To:, -// CC: and BCC: fields. If you need to send an email message to a larger -// audience, you can divide your recipient list into groups of 50 or fewer, -// and then call the SendRawEmail operation several times to send the message -// to each group. -// -// For every message that you send, the total number of recipients (including -// each recipient in the To:, CC: and BCC: fields) is counted against the maximum -// number of emails you can send in a 24-hour period (your sending quota). For -// more information about sending quotas in Amazon SES, see Managing Your Amazon -// SES Sending Limits (http://docs.aws.amazon.com/ses/latest/DeveloperGuide/manage-sending-limits.html) -// in the Amazon SES Developer Guide. -// // Additionally, keep the following considerations in mind when using the SendRawEmail // operation: // @@ -4469,6 +4480,13 @@ func (c *SES) SendRawEmailRequest(input *SendRawEmailInput) (req *request.Reques // see the Using Sending Authorization with Amazon SES (http://docs.aws.amazon.com/ses/latest/DeveloperGuide/sending-authorization.html) // in the Amazon SES Developer Guide. // +// * For every message that you send, the total number of recipients (including +// each recipient in the To:, CC: and BCC: fields) is counted against the +// maximum number of emails you can send in a 24-hour period (your sending +// quota). For more information about sending quotas in Amazon SES, see Managing +// Your Amazon SES Sending Limits (http://docs.aws.amazon.com/ses/latest/DeveloperGuide/manage-sending-limits.html) +// in the Amazon SES Developer Guide. +// // Returns awserr.Error for service API and SDK errors. Use runtime type assertions // with awserr.Error's Code and Message methods to get detailed information about // the error. @@ -4584,8 +4602,7 @@ func (c *SES) SendTemplatedEmailRequest(input *SendTemplatedEmailInput) (req *re // Email Addresses and Domains (http://docs.aws.amazon.com/ses/latest/DeveloperGuide/verify-addresses-and-domains.html) // in the Amazon SES Developer Guide. // -// * The total size of the message, including attachments, must be less than -// 10 MB. +// * The maximum message size is 10 MB. // // * Calls to the SendTemplatedEmail operation may only include one Destination // parameter. A destination is a set of recipients who will receive the same @@ -5138,13 +5155,12 @@ func (c *SES) SetIdentityNotificationTopicRequest(input *SetIdentityNotification // SetIdentityNotificationTopic API operation for Amazon Simple Email Service. // -// Given an identity (an email address or a domain), sets the Amazon Simple -// Notification Service (Amazon SNS) topic to which Amazon SES will publish -// bounce, complaint, and/or delivery notifications for emails sent with that -// identity as the Source. -// -// Unless feedback forwarding is enabled, you must specify Amazon SNS topics -// for bounce and complaint notifications. For more information, see SetIdentityFeedbackForwardingEnabled. +// Sets an Amazon Simple Notification Service (Amazon SNS) topic to use when +// delivering notifications. When you use this operation, you specify a verified +// identity, such as an email address or domain. When you send an email that +// uses the chosen identity in the Source field, Amazon SES sends notifications +// to the topic you specified. You can send bounce, complaint, or delivery notifications +// (or any combination of the three) to the Amazon SNS topic that you specify. // // You can execute this operation no more than once per second. // @@ -12751,18 +12767,26 @@ type SendRawEmailInput struct { // SendRawEmail in this guide, or see the Amazon SES Developer Guide (http://docs.aws.amazon.com/ses/latest/DeveloperGuide/sending-authorization-delegate-sender-tasks-email.html). FromArn *string `type:"string"` - // The raw text of the message. The client is responsible for ensuring the following: + // The raw email message itself. The message has to meet the following criteria: // - // * Message must contain a header and a body, separated by a blank line. + // * The message has to contain a header and a body, separated by a blank + // line. // - // * All required header fields must be present. + // * All of the required header fields must be present in the message. // // * Each part of a multipart MIME message must be formatted properly. // - // * MIME content types must be among those supported by Amazon SES. For - // more information, go to the Amazon SES Developer Guide (http://docs.aws.amazon.com/ses/latest/DeveloperGuide/mime-types.html). + // * Attachments must be of a content type that Amazon SES supports. For + // a list on unsupported content types, see Unsupported Attachment Types + // (http://docs.aws.amazon.com/ses/latest/DeveloperGuide/mime-types.html) + // in the Amazon SES Developer Guide. // - // * Must be base64-encoded. + // * The entire message must be base64-encoded. + // + // * If any of the MIME parts in your message contain content that is outside + // of the 7-bit ASCII character range, we highly recommend that you encode + // that content. For more information, see Sending Raw Email (http://docs.aws.amazon.com/ses/latest/DeveloperGuide/send-email-raw.html) + // in the Amazon SES Developer Guide. // // * Per RFC 5321 (https://tools.ietf.org/html/rfc5321#section-4.5.3.1.6), // the maximum length of each line of text, including the , must not @@ -13552,9 +13576,14 @@ func (s SetIdentityMailFromDomainOutput) GoString() string { type SetIdentityNotificationTopicInput struct { _ struct{} `type:"structure"` - // The identity for which the Amazon SNS topic will be set. You can specify - // an identity by using its name or by using its Amazon Resource Name (ARN). - // Examples: user@example.com, example.com, arn:aws:ses:us-east-1:123456789012:identity/example.com. + // The identity (email address or domain) that you want to set the Amazon SNS + // topic for. + // + // You can only specify a verified identity for this parameter. + // + // You can specify an identity by using its name or by using its Amazon Resource + // Name (ARN). The following examples are all valid identities: sender@example.com, + // example.com, arn:aws:ses:us-east-1:123456789012:identity/example.com. // // Identity is a required field Identity *string `type:"string" required:"true"` diff --git a/vendor/github.com/aws/aws-sdk-go/service/sqs/api.go b/vendor/github.com/aws/aws-sdk-go/service/sqs/api.go index 1b42a7dd6..3cded9321 100644 --- a/vendor/github.com/aws/aws-sdk-go/service/sqs/api.go +++ b/vendor/github.com/aws/aws-sdk-go/service/sqs/api.go @@ -63,21 +63,29 @@ func (c *SQS) AddPermissionRequest(input *AddPermissionInput) (req *request.Requ // // When you create a queue, you have full control access rights for the queue. // Only you, the owner of the queue, can grant or deny permissions to the queue. -// For more information about these permissions, see Shared Queues (http://docs.aws.amazon.com/AWSSimpleQueueService/latest/SQSDeveloperGuide/acp-overview.html) +// For more information about these permissions, see Allow Developers to Write +// Messages to a Shared Queue (http://docs.aws.amazon.com/AWSSimpleQueueService/latest/SQSDeveloperGuide/sqs-writing-an-sqs-policy.html#write-messages-to-shared-queue) // in the Amazon Simple Queue Service Developer Guide. // // AddPermission writes an Amazon-SQS-generated policy. If you want to write // your own policy, use SetQueueAttributes to upload your policy. For more information -// about writing your own policy, see Using The Access Policy Language (http://docs.aws.amazon.com/AWSSimpleQueueService/latest/SQSDeveloperGuide/AccessPolicyLanguage.html) +// about writing your own policy, see Using Custom Policies with the Amazon +// SQS Access Policy Language (http://docs.aws.amazon.com/AWSSimpleQueueService/latest/SQSDeveloperGuide/sqs-creating-custom-policies.html) // in the Amazon Simple Queue Service Developer Guide. // +// An Amazon SQS policy can have a maximum of 7 actions. +// // Some actions take lists of parameters. These lists are specified using the // param.n notation. Values of n are integers starting from 1. For example, // a parameter list with two elements looks like this: // -// &Attribute.1=this +// &Attribute.1=first // -// &Attribute.2=that +// &Attribute.2=second +// +// Cross-account permissions don't apply to this action. For more information, +// see see Grant Cross-Account Permissions to a Role and a User Name (http://docs.aws.amazon.com/AWSSimpleQueueService/latest/SQSDeveloperGuide/sqs-customer-managed-policy-examples.html#grant-cross-account-permissions-to-role-and-user-name) +// in the Amazon Simple Queue Service Developer Guide. // // Returns awserr.Error for service API and SDK errors. Use runtime type assertions // with awserr.Error's Code and Message methods to get detailed information about @@ -88,10 +96,10 @@ func (c *SQS) AddPermissionRequest(input *AddPermissionInput) (req *request.Requ // // Returned Error Codes: // * ErrCodeOverLimit "OverLimit" -// The action that you requested would violate a limit. For example, ReceiveMessage -// returns this error if the maximum number of inflight messages is reached. -// AddPermission returns this error if the maximum number of permissions for -// the queue is reached. +// The specified action violates a limit. For example, ReceiveMessage returns +// this error if the maximum number of inflight messages is reached and AddPermission +// returns this error if the maximum number of permissions for the queue is +// reached. // // See also, https://docs.aws.amazon.com/goto/WebAPI/sqs-2012-11-05/AddPermission func (c *SQS) AddPermission(input *AddPermissionInput) (*AddPermissionOutput, error) { @@ -162,18 +170,15 @@ func (c *SQS) ChangeMessageVisibilityRequest(input *ChangeMessageVisibilityInput // ChangeMessageVisibility API operation for Amazon Simple Queue Service. // // Changes the visibility timeout of a specified message in a queue to a new -// value. The maximum allowed timeout value is 12 hours. Thus, you can't extend -// the timeout of a message in an existing queue to more than a total visibility -// timeout of 12 hours. For more information, see Visibility Timeout (http://docs.aws.amazon.com/AWSSimpleQueueService/latest/SQSDeveloperGuide/sqs-visibility-timeout.html) +// value. The maximum allowed timeout value is 12 hours. For more information, +// see Visibility Timeout (http://docs.aws.amazon.com/AWSSimpleQueueService/latest/SQSDeveloperGuide/sqs-visibility-timeout.html) // in the Amazon Simple Queue Service Developer Guide. // // For example, you have a message with a visibility timeout of 5 minutes. After -// 3 minutes, you call ChangeMessageVisiblity with a timeout of 10 minutes. -// At that time, the timeout for the message is extended by 10 minutes beyond -// the time of the ChangeMessageVisibility action. This results in a total visibility -// timeout of 13 minutes. You can continue to call the ChangeMessageVisibility -// to extend the visibility timeout to a maximum of 12 hours. If you try to -// extend the visibility timeout beyond 12 hours, your request is rejected. +// 3 minutes, you call ChangeMessageVisibility with a timeout of 10 minutes. +// You can continue to call ChangeMessageVisibility to extend the visibility +// timeout to a maximum of 12 hours. If you try to extend the visibility timeout +// beyond 12 hours, your request is rejected. // // A message is considered to be in flight after it's received from a queue // by a consumer, but not yet deleted from the queue. @@ -207,10 +212,10 @@ func (c *SQS) ChangeMessageVisibilityRequest(input *ChangeMessageVisibilityInput // // Returned Error Codes: // * ErrCodeMessageNotInflight "AWS.SimpleQueueService.MessageNotInflight" -// The message referred to isn't in flight. +// The specified message isn't in flight. // // * ErrCodeReceiptHandleIsInvalid "ReceiptHandleIsInvalid" -// The receipt handle provided isn't valid. +// The specified receipt handle isn't valid. // // See also, https://docs.aws.amazon.com/goto/WebAPI/sqs-2012-11-05/ChangeMessageVisibility func (c *SQS) ChangeMessageVisibility(input *ChangeMessageVisibilityInput) (*ChangeMessageVisibilityOutput, error) { @@ -291,9 +296,9 @@ func (c *SQS) ChangeMessageVisibilityBatchRequest(input *ChangeMessageVisibility // param.n notation. Values of n are integers starting from 1. For example, // a parameter list with two elements looks like this: // -// &Attribute.1=this +// &Attribute.1=first // -// &Attribute.2=that +// &Attribute.2=second // // Returns awserr.Error for service API and SDK errors. Use runtime type assertions // with awserr.Error's Code and Message methods to get detailed information about @@ -390,7 +395,7 @@ func (c *SQS) CreateQueueRequest(input *CreateQueueInput) (req *request.Request, // You can't change the queue type after you create it and you can't convert // an existing standard queue into a FIFO queue. You must either create a // new FIFO queue for your application or delete your existing standard queue -// and recreate it as a FIFO queue. For more information, see Moving From +// and recreate it as a FIFO queue. For more information, see Moving From // a Standard Queue to a FIFO Queue (http://docs.aws.amazon.com/AWSSimpleQueueService/latest/SQSDeveloperGuide/FIFO-queues.html#FIFO-queues-moving) // in the Amazon Simple Queue Service Developer Guide. // @@ -418,9 +423,13 @@ func (c *SQS) CreateQueueRequest(input *CreateQueueInput) (req *request.Request, // param.n notation. Values of n are integers starting from 1. For example, // a parameter list with two elements looks like this: // -// &Attribute.1=this +// &Attribute.1=first // -// &Attribute.2=that +// &Attribute.2=second +// +// Cross-account permissions don't apply to this action. For more information, +// see see Grant Cross-Account Permissions to a Role and a User Name (http://docs.aws.amazon.com/AWSSimpleQueueService/latest/SQSDeveloperGuide/sqs-customer-managed-policy-examples.html#grant-cross-account-permissions-to-role-and-user-name) +// in the Amazon Simple Queue Service Developer Guide. // // Returns awserr.Error for service API and SDK errors. Use runtime type assertions // with awserr.Error's Code and Message methods to get detailed information about @@ -432,10 +441,10 @@ func (c *SQS) CreateQueueRequest(input *CreateQueueInput) (req *request.Request, // Returned Error Codes: // * ErrCodeQueueDeletedRecently "AWS.SimpleQueueService.QueueDeletedRecently" // You must wait 60 seconds after deleting a queue before you can create another -// one with the same name. +// queue with the same name. // // * ErrCodeQueueNameExists "QueueAlreadyExists" -// A queue already exists with this name. Amazon SQS returns this error only +// A queue with this name already exists. Amazon SQS returns this error only // if the request includes attributes whose values differ from those of the // existing queue. // @@ -507,26 +516,26 @@ func (c *SQS) DeleteMessageRequest(input *DeleteMessageInput) (req *request.Requ // DeleteMessage API operation for Amazon Simple Queue Service. // -// Deletes the specified message from the specified queue. You specify the message -// by using the message's receipt handle and not the MessageId you receive when -// you send the message. Even if the message is locked by another reader due -// to the visibility timeout setting, it is still deleted from the queue. If -// you leave a message in the queue for longer than the queue's configured retention -// period, Amazon SQS automatically deletes the message. +// Deletes the specified message from the specified queue. To select the message +// to delete, use the ReceiptHandle of the message (not the MessageId which +// you receive when you send the message). Amazon SQS can delete a message from +// a queue even if a visibility timeout setting causes the message to be locked +// by another consumer. Amazon SQS automatically deletes messages left in a +// queue longer than the retention period configured for the queue. // -// The receipt handle is associated with a specific instance of receiving the -// message. If you receive a message more than once, the receipt handle you -// get each time you receive the message is different. If you don't provide -// the most recently received receipt handle for the message when you use the -// DeleteMessage action, the request succeeds, but the message might not be -// deleted. +// The ReceiptHandle is associated with a specific instance of receiving a message. +// If you receive a message more than once, the ReceiptHandle is different each +// time you receive a message. When you use the DeleteMessage action, you must +// provide the most recently received ReceiptHandle for the message (otherwise, +// the request succeeds, but the message might not be deleted). // // For standard queues, it is possible to receive a message even after you delete -// it. This might happen on rare occasions if one of the servers storing a copy -// of the message is unavailable when you send the request to delete the message. -// The copy remains on the server and might be returned to you on a subsequent -// receive request. You should ensure that your application is idempotent, so -// that receiving a message more than once does not cause issues. +// it. This might happen on rare occasions if one of the servers which stores +// a copy of the message is unavailable when you send the request to delete +// the message. The copy remains on the server and might be returned to you +// during a subsequent receive request. You should ensure that your application +// is idempotent, so that receiving a message more than once does not cause +// issues. // // Returns awserr.Error for service API and SDK errors. Use runtime type assertions // with awserr.Error's Code and Message methods to get detailed information about @@ -537,10 +546,10 @@ func (c *SQS) DeleteMessageRequest(input *DeleteMessageInput) (req *request.Requ // // Returned Error Codes: // * ErrCodeInvalidIdFormat "InvalidIdFormat" -// The receipt handle isn't valid for the current version. +// The specified receipt handle isn't valid for the current version. // // * ErrCodeReceiptHandleIsInvalid "ReceiptHandleIsInvalid" -// The receipt handle provided isn't valid. +// The specified receipt handle isn't valid. // // See also, https://docs.aws.amazon.com/goto/WebAPI/sqs-2012-11-05/DeleteMessage func (c *SQS) DeleteMessage(input *DeleteMessageInput) (*DeleteMessageOutput, error) { @@ -620,9 +629,9 @@ func (c *SQS) DeleteMessageBatchRequest(input *DeleteMessageBatchInput) (req *re // param.n notation. Values of n are integers starting from 1. For example, // a parameter list with two elements looks like this: // -// &Attribute.1=this +// &Attribute.1=first // -// &Attribute.2=that +// &Attribute.2=second // // Returns awserr.Error for service API and SDK errors. Use runtime type assertions // with awserr.Error's Code and Message methods to get detailed information about @@ -726,6 +735,10 @@ func (c *SQS) DeleteQueueRequest(input *DeleteQueueInput) (req *request.Request, // When you delete a queue, you must wait at least 60 seconds before creating // a queue with the same name. // +// Cross-account permissions don't apply to this action. For more information, +// see see Grant Cross-Account Permissions to a Role and a User Name (http://docs.aws.amazon.com/AWSSimpleQueueService/latest/SQSDeveloperGuide/sqs-customer-managed-policy-examples.html#grant-cross-account-permissions-to-role-and-user-name) +// in the Amazon Simple Queue Service Developer Guide. +// // Returns awserr.Error for service API and SDK errors. Use runtime type assertions // with awserr.Error's Code and Message methods to get detailed information about // the error. @@ -807,9 +820,9 @@ func (c *SQS) GetQueueAttributesRequest(input *GetQueueAttributesInput) (req *re // param.n notation. Values of n are integers starting from 1. For example, // a parameter list with two elements looks like this: // -// &Attribute.1=this +// &Attribute.1=first // -// &Attribute.2=that +// &Attribute.2=second // // Returns awserr.Error for service API and SDK errors. Use runtime type assertions // with awserr.Error's Code and Message methods to get detailed information about @@ -820,7 +833,7 @@ func (c *SQS) GetQueueAttributesRequest(input *GetQueueAttributesInput) (req *re // // Returned Error Codes: // * ErrCodeInvalidAttributeName "InvalidAttributeName" -// The attribute referred to doesn't exist. +// The specified attribute doesn't exist. // // See also, https://docs.aws.amazon.com/goto/WebAPI/sqs-2012-11-05/GetQueueAttributes func (c *SQS) GetQueueAttributes(input *GetQueueAttributesInput) (*GetQueueAttributesOutput, error) { @@ -888,13 +901,13 @@ func (c *SQS) GetQueueUrlRequest(input *GetQueueUrlInput) (req *request.Request, // GetQueueUrl API operation for Amazon Simple Queue Service. // -// Returns the URL of an existing queue. This action provides a simple way to -// retrieve the URL of an Amazon SQS queue. +// Returns the URL of an existing Amazon SQS queue. // // To access a queue that belongs to another AWS account, use the QueueOwnerAWSAccountId // parameter to specify the account ID of the queue's owner. The queue's owner // must grant you permission to access the queue. For more information about -// shared queue access, see AddPermission or see Shared Queues (http://docs.aws.amazon.com/AWSSimpleQueueService/latest/SQSDeveloperGuide/acp-overview.html) +// shared queue access, see AddPermission or see Allow Developers to Write Messages +// to a Shared Queue (http://docs.aws.amazon.com/AWSSimpleQueueService/latest/SQSDeveloperGuide/sqs-writing-an-sqs-policy.html#write-messages-to-shared-queue) // in the Amazon Simple Queue Service Developer Guide. // // Returns awserr.Error for service API and SDK errors. Use runtime type assertions @@ -906,7 +919,7 @@ func (c *SQS) GetQueueUrlRequest(input *GetQueueUrlInput) (req *request.Request, // // Returned Error Codes: // * ErrCodeQueueDoesNotExist "AWS.SimpleQueueService.NonExistentQueue" -// The queue referred to doesn't exist. +// The specified queue doesn't exist. // // See also, https://docs.aws.amazon.com/goto/WebAPI/sqs-2012-11-05/GetQueueUrl func (c *SQS) GetQueueUrl(input *GetQueueUrlInput) (*GetQueueUrlOutput, error) { @@ -990,7 +1003,7 @@ func (c *SQS) ListDeadLetterSourceQueuesRequest(input *ListDeadLetterSourceQueue // // Returned Error Codes: // * ErrCodeQueueDoesNotExist "AWS.SimpleQueueService.NonExistentQueue" -// The queue referred to doesn't exist. +// The specified queue doesn't exist. // // See also, https://docs.aws.amazon.com/goto/WebAPI/sqs-2012-11-05/ListDeadLetterSourceQueues func (c *SQS) ListDeadLetterSourceQueues(input *ListDeadLetterSourceQueuesInput) (*ListDeadLetterSourceQueuesOutput, error) { @@ -1059,7 +1072,7 @@ func (c *SQS) ListQueueTagsRequest(input *ListQueueTagsInput) (req *request.Requ // ListQueueTags API operation for Amazon Simple Queue Service. // // List all cost allocation tags added to the specified Amazon SQS queue. For -// an overview, see Tagging Amazon SQS Queues (http://docs.aws.amazon.com/AWSSimpleQueueService/latest/SQSDeveloperGuide/sqs-tagging-queues.html) +// an overview, see Tagging Your Amazon SQS Queues (http://docs.aws.amazon.com/AWSSimpleQueueService/latest/SQSDeveloperGuide/sqs-queue-tags.html) // in the Amazon Simple Queue Service Developer Guide. // // When you use queue tags, keep the following guidelines in mind: @@ -1074,10 +1087,14 @@ func (c *SQS) ListQueueTagsRequest(input *ListQueueTagsInput) (req *request.Requ // * A new tag with a key identical to that of an existing tag overwrites // the existing tag. // -// * Tagging API actions are limited to 5 TPS per AWS account. If your application +// * Tagging actions are limited to 5 TPS per AWS account. If your application // requires a higher throughput, file a technical support request (https://console.aws.amazon.com/support/home#/case/create?issueType=technical). // -// For a full list of tag restrictions, see Limits Related to Queues (http://docs.aws.amazon.com/AWSSimpleQueueService/latest/SQSDeveloperGuide/limits-queues.html) +// For a full list of tag restrictions, see Limits Related to Queues (http://docs.aws.amazon.com/AWSSimpleQueueService/latest/SQSDeveloperGuide/sqs-limits.html#limits-queues) +// in the Amazon Simple Queue Service Developer Guide. +// +// Cross-account permissions don't apply to this action. For more information, +// see see Grant Cross-Account Permissions to a Role and a User Name (http://docs.aws.amazon.com/AWSSimpleQueueService/latest/SQSDeveloperGuide/sqs-customer-managed-policy-examples.html#grant-cross-account-permissions-to-role-and-user-name) // in the Amazon Simple Queue Service Developer Guide. // // Returns awserr.Error for service API and SDK errors. Use runtime type assertions @@ -1156,6 +1173,10 @@ func (c *SQS) ListQueuesRequest(input *ListQueuesInput) (req *request.Request, o // is 1,000. If you specify a value for the optional QueueNamePrefix parameter, // only queues with a name that begins with the specified value are returned. // +// Cross-account permissions don't apply to this action. For more information, +// see see Grant Cross-Account Permissions to a Role and a User Name (http://docs.aws.amazon.com/AWSSimpleQueueService/latest/SQSDeveloperGuide/sqs-customer-managed-policy-examples.html#grant-cross-account-permissions-to-role-and-user-name) +// in the Amazon Simple Queue Service Developer Guide. +// // Returns awserr.Error for service API and SDK errors. Use runtime type assertions // with awserr.Error's Code and Message methods to get detailed information about // the error. @@ -1232,14 +1253,17 @@ func (c *SQS) PurgeQueueRequest(input *PurgeQueueInput) (req *request.Request, o // // Deletes the messages in a queue specified by the QueueURL parameter. // -// When you use the PurgeQueue action, you can't retrieve a message deleted +// When you use the PurgeQueue action, you can't retrieve any messages deleted // from a queue. // -// When you purge a queue, the message deletion process takes up to 60 seconds. -// All messages sent to the queue before calling the PurgeQueue action are deleted. -// Messages sent to the queue while it is being purged might be deleted. While -// the queue is being purged, messages sent to the queue before PurgeQueue is -// called might be received, but are deleted within the next minute. +// The message deletion process takes up to 60 seconds. We recommend waiting +// for 60 seconds regardless of your queue's size. +// +// Messages sent to the queue before you call PurgeQueue might be received but +// are deleted within the next minute. +// +// Messages sent to the queue after you call PurgeQueue might be deleted while +// the queue is being purged. // // Returns awserr.Error for service API and SDK errors. Use runtime type assertions // with awserr.Error's Code and Message methods to get detailed information about @@ -1250,7 +1274,7 @@ func (c *SQS) PurgeQueueRequest(input *PurgeQueueInput) (req *request.Request, o // // Returned Error Codes: // * ErrCodeQueueDoesNotExist "AWS.SimpleQueueService.NonExistentQueue" -// The queue referred to doesn't exist. +// The specified queue doesn't exist. // // * ErrCodePurgeQueueInProgress "AWS.SimpleQueueService.PurgeQueueInProgress" // Indicates that the specified queue previously received a PurgeQueue request @@ -1380,10 +1404,10 @@ func (c *SQS) ReceiveMessageRequest(input *ReceiveMessageInput) (req *request.Re // // Returned Error Codes: // * ErrCodeOverLimit "OverLimit" -// The action that you requested would violate a limit. For example, ReceiveMessage -// returns this error if the maximum number of inflight messages is reached. -// AddPermission returns this error if the maximum number of permissions for -// the queue is reached. +// The specified action violates a limit. For example, ReceiveMessage returns +// this error if the maximum number of inflight messages is reached and AddPermission +// returns this error if the maximum number of permissions for the queue is +// reached. // // See also, https://docs.aws.amazon.com/goto/WebAPI/sqs-2012-11-05/ReceiveMessage func (c *SQS) ReceiveMessage(input *ReceiveMessageInput) (*ReceiveMessageOutput, error) { @@ -1454,7 +1478,13 @@ func (c *SQS) RemovePermissionRequest(input *RemovePermissionInput) (req *reques // RemovePermission API operation for Amazon Simple Queue Service. // // Revokes any permissions in the queue policy that matches the specified Label -// parameter. Only the owner of the queue can remove permissions. +// parameter. +// +// Only the owner of a queue can remove permissions from it. +// +// Cross-account permissions don't apply to this action. For more information, +// see see Grant Cross-Account Permissions to a Role and a User Name (http://docs.aws.amazon.com/AWSSimpleQueueService/latest/SQSDeveloperGuide/sqs-customer-managed-policy-examples.html#grant-cross-account-permissions-to-role-and-user-name) +// in the Amazon Simple Queue Service Developer Guide. // // Returns awserr.Error for service API and SDK errors. Use runtime type assertions // with awserr.Error's Code and Message methods to get detailed information about @@ -1646,9 +1676,9 @@ func (c *SQS) SendMessageBatchRequest(input *SendMessageBatchInput) (req *reques // param.n notation. Values of n are integers starting from 1. For example, // a parameter list with two elements looks like this: // -// &Attribute.1=this +// &Attribute.1=first // -// &Attribute.2=that +// &Attribute.2=second // // Returns awserr.Error for service API and SDK errors. Use runtime type assertions // with awserr.Error's Code and Message methods to get detailed information about @@ -1753,6 +1783,10 @@ func (c *SQS) SetQueueAttributesRequest(input *SetQueueAttributesInput) (req *re // this action, we recommend that you structure your code so that it can handle // new attributes gracefully. // +// Cross-account permissions don't apply to this action. For more information, +// see see Grant Cross-Account Permissions to a Role and a User Name (http://docs.aws.amazon.com/AWSSimpleQueueService/latest/SQSDeveloperGuide/sqs-customer-managed-policy-examples.html#grant-cross-account-permissions-to-role-and-user-name) +// in the Amazon Simple Queue Service Developer Guide. +// // Returns awserr.Error for service API and SDK errors. Use runtime type assertions // with awserr.Error's Code and Message methods to get detailed information about // the error. @@ -1762,7 +1796,7 @@ func (c *SQS) SetQueueAttributesRequest(input *SetQueueAttributesInput) (req *re // // Returned Error Codes: // * ErrCodeInvalidAttributeName "InvalidAttributeName" -// The attribute referred to doesn't exist. +// The specified attribute doesn't exist. // // See also, https://docs.aws.amazon.com/goto/WebAPI/sqs-2012-11-05/SetQueueAttributes func (c *SQS) SetQueueAttributes(input *SetQueueAttributesInput) (*SetQueueAttributesOutput, error) { @@ -1833,7 +1867,7 @@ func (c *SQS) TagQueueRequest(input *TagQueueInput) (req *request.Request, outpu // TagQueue API operation for Amazon Simple Queue Service. // // Add cost allocation tags to the specified Amazon SQS queue. For an overview, -// see Tagging Amazon SQS Queues (http://docs.aws.amazon.com/AWSSimpleQueueService/latest/SQSDeveloperGuide/sqs-tagging-queues.html) +// see Tagging Your Amazon SQS Queues (http://docs.aws.amazon.com/AWSSimpleQueueService/latest/SQSDeveloperGuide/sqs-queue-tags.html) // in the Amazon Simple Queue Service Developer Guide. // // When you use queue tags, keep the following guidelines in mind: @@ -1848,10 +1882,14 @@ func (c *SQS) TagQueueRequest(input *TagQueueInput) (req *request.Request, outpu // * A new tag with a key identical to that of an existing tag overwrites // the existing tag. // -// * Tagging API actions are limited to 5 TPS per AWS account. If your application +// * Tagging actions are limited to 5 TPS per AWS account. If your application // requires a higher throughput, file a technical support request (https://console.aws.amazon.com/support/home#/case/create?issueType=technical). // -// For a full list of tag restrictions, see Limits Related to Queues (http://docs.aws.amazon.com/AWSSimpleQueueService/latest/SQSDeveloperGuide/limits-queues.html) +// For a full list of tag restrictions, see Limits Related to Queues (http://docs.aws.amazon.com/AWSSimpleQueueService/latest/SQSDeveloperGuide/sqs-limits.html#limits-queues) +// in the Amazon Simple Queue Service Developer Guide. +// +// Cross-account permissions don't apply to this action. For more information, +// see see Grant Cross-Account Permissions to a Role and a User Name (http://docs.aws.amazon.com/AWSSimpleQueueService/latest/SQSDeveloperGuide/sqs-customer-managed-policy-examples.html#grant-cross-account-permissions-to-role-and-user-name) // in the Amazon Simple Queue Service Developer Guide. // // Returns awserr.Error for service API and SDK errors. Use runtime type assertions @@ -1929,7 +1967,7 @@ func (c *SQS) UntagQueueRequest(input *UntagQueueInput) (req *request.Request, o // UntagQueue API operation for Amazon Simple Queue Service. // // Remove cost allocation tags from the specified Amazon SQS queue. For an overview, -// see Tagging Amazon SQS Queues (http://docs.aws.amazon.com/AWSSimpleQueueService/latest/SQSDeveloperGuide/sqs-tagging-queues.html) +// see Tagging Your Amazon SQS Queues (http://docs.aws.amazon.com/AWSSimpleQueueService/latest/SQSDeveloperGuide/sqs-queue-tags.html) // in the Amazon Simple Queue Service Developer Guide. // // When you use queue tags, keep the following guidelines in mind: @@ -1944,10 +1982,14 @@ func (c *SQS) UntagQueueRequest(input *UntagQueueInput) (req *request.Request, o // * A new tag with a key identical to that of an existing tag overwrites // the existing tag. // -// * Tagging API actions are limited to 5 TPS per AWS account. If your application +// * Tagging actions are limited to 5 TPS per AWS account. If your application // requires a higher throughput, file a technical support request (https://console.aws.amazon.com/support/home#/case/create?issueType=technical). // -// For a full list of tag restrictions, see Limits Related to Queues (http://docs.aws.amazon.com/AWSSimpleQueueService/latest/SQSDeveloperGuide/limits-queues.html) +// For a full list of tag restrictions, see Limits Related to Queues (http://docs.aws.amazon.com/AWSSimpleQueueService/latest/SQSDeveloperGuide/sqs-limits.html#limits-queues) +// in the Amazon Simple Queue Service Developer Guide. +// +// Cross-account permissions don't apply to this action. For more information, +// see see Grant Cross-Account Permissions to a Role and a User Name (http://docs.aws.amazon.com/AWSSimpleQueueService/latest/SQSDeveloperGuide/sqs-customer-managed-policy-examples.html#grant-cross-account-permissions-to-role-and-user-name) // in the Amazon Simple Queue Service Developer Guide. // // Returns awserr.Error for service API and SDK errors. Use runtime type assertions @@ -1984,30 +2026,17 @@ type AddPermissionInput struct { // The AWS account number of the principal (http://docs.aws.amazon.com/general/latest/gr/glos-chap.html#P) // who is given permission. The principal must have an AWS account, but does // not need to be signed up for Amazon SQS. For information about locating the - // AWS account identification, see Your AWS Identifiers (http://docs.aws.amazon.com/AWSSimpleQueueService/latest/SQSDeveloperGuide/AWSCredentials.html) + // AWS account identification, see Your AWS Identifiers (http://docs.aws.amazon.com/AWSSimpleQueueService/latest/SQSDeveloperGuide/sqs-making-api-requests.html#sqs-api-request-authentication) // in the Amazon Simple Queue Service Developer Guide. // // AWSAccountIds is a required field AWSAccountIds []*string `locationNameList:"AWSAccountId" type:"list" flattened:"true" required:"true"` - // The action the client wants to allow for the specified principal. The following - // values are valid: + // The action the client wants to allow for the specified principal. Valid values: + // the name of any action or *. // - // * * - // - // * ChangeMessageVisibility - // - // * DeleteMessage - // - // * GetQueueAttributes - // - // * GetQueueUrl - // - // * ReceiveMessage - // - // * SendMessage - // - // For more information about these actions, see Understanding Permissions (http://docs.aws.amazon.com/AWSSimpleQueueService/latest/SQSDeveloperGuide/acp-overview.html#PermissionTypes) + // For more information about these actions, see Overview of Managing Access + // Permissions to Your Amazon Simple Queue Service Resource (http://docs.aws.amazon.com/AWSSimpleQueueService/latest/SQSDeveloperGuide/sqs-overview-of-managing-access.html) // in the Amazon Simple Queue Service Developer Guide. // // Specifying SendMessage, DeleteMessage, or ChangeMessageVisibility for ActionName.n @@ -2026,7 +2055,7 @@ type AddPermissionInput struct { // The URL of the Amazon SQS queue to which permissions are added. // - // Queue URLs are case-sensitive. + // Queue URLs and names are case-sensitive. // // QueueUrl is a required field QueueUrl *string `type:"string" required:"true"` @@ -2102,8 +2131,8 @@ func (s AddPermissionOutput) GoString() string { return s.String() } -// This is used in the responses of batch API to give a detailed description -// of the result of an action on each entry in the request. +// Gives a detailed description of the result of an action on each entry in +// the request. type BatchResultErrorEntry struct { _ struct{} `type:"structure"` @@ -2120,7 +2149,7 @@ type BatchResultErrorEntry struct { // A message explaining why the action failed on this entry. Message *string `type:"string"` - // Specifies whether the error happened due to the sender's fault. + // Specifies whether the error happened due to the producer. // // SenderFault is a required field SenderFault *bool `type:"boolean" required:"true"` @@ -2171,7 +2200,7 @@ type ChangeMessageVisibilityBatchInput struct { // The URL of the Amazon SQS queue whose messages' visibility is changed. // - // Queue URLs are case-sensitive. + // Queue URLs and names are case-sensitive. // // QueueUrl is a required field QueueUrl *string `type:"string" required:"true"` @@ -2272,7 +2301,7 @@ func (s *ChangeMessageVisibilityBatchOutput) SetSuccessful(v []*ChangeMessageVis // // &ChangeMessageVisibilityBatchRequestEntry.1.Id=change_visibility_msg_2 // -// &ChangeMessageVisibilityBatchRequestEntry.1.ReceiptHandle=Your_Receipt_Handle +// &ChangeMessageVisibilityBatchRequestEntry.1.ReceiptHandle=your_receipt_handle // // &ChangeMessageVisibilityBatchRequestEntry.1.VisibilityTimeout=45 type ChangeMessageVisibilityBatchRequestEntry struct { @@ -2370,7 +2399,7 @@ type ChangeMessageVisibilityInput struct { // The URL of the Amazon SQS queue whose message's visibility is changed. // - // Queue URLs are case-sensitive. + // Queue URLs and names are case-sensitive. // // QueueUrl is a required field QueueUrl *string `type:"string" required:"true"` @@ -2459,16 +2488,15 @@ type CreateQueueInput struct { // // * DelaySeconds - The length of time, in seconds, for which the delivery // of all messages in the queue is delayed. Valid values: An integer from - // 0 to 900 seconds (15 minutes). The default is 0 (zero). + // 0 to 900 seconds (15 minutes). Default: 0. // // * MaximumMessageSize - The limit of how many bytes a message can contain // before Amazon SQS rejects it. Valid values: An integer from 1,024 bytes - // (1 KiB) to 262,144 bytes (256 KiB). The default is 262,144 (256 KiB). - // + // (1 KiB) to 262,144 bytes (256 KiB). Default: 262,144 (256 KiB). // // * MessageRetentionPeriod - The length of time, in seconds, for which Amazon // SQS retains a message. Valid values: An integer from 60 seconds (1 minute) - // to 1,209,600 seconds (14 days). The default is 345,600 (4 days). + // to 1,209,600 seconds (14 days). Default: 345,600 (4 days). // // * Policy - The queue's policy. A valid AWS policy. For more information // about policy structure, see Overview of AWS IAM Policies (http://docs.aws.amazon.com/IAM/latest/UserGuide/PoliciesOverview.html) @@ -2476,7 +2504,7 @@ type CreateQueueInput struct { // // * ReceiveMessageWaitTimeSeconds - The length of time, in seconds, for // which a ReceiveMessage action waits for a message to arrive. Valid values: - // An integer from 0 to 20 (seconds). The default is 0 (zero). + // An integer from 0 to 20 (seconds). Default: 0. // // * RedrivePolicy - The string that includes the parameters for the dead-letter // queue functionality of the source queue. For more information about the @@ -2489,14 +2517,17 @@ type CreateQueueInput struct { // is exceeded. // // maxReceiveCount - The number of times a message is delivered to the source - // queue before being moved to the dead-letter queue. + // queue before being moved to the dead-letter queue. When the ReceiveCount + // for a message exceeds the maxReceiveCount for a queue, Amazon SQS moves + // the message to the dead-letter-queue. // // The dead-letter queue of a FIFO queue must also be a FIFO queue. Similarly, // the dead-letter queue of a standard queue must also be a standard queue. // - // * VisibilityTimeout - The visibility timeout for the queue. Valid values: - // An integer from 0 to 43,200 (12 hours). The default is 30. For more information - // about the visibility timeout, see Visibility Timeout (http://docs.aws.amazon.com/AWSSimpleQueueService/latest/SQSDeveloperGuide/sqs-visibility-timeout.html) + // * VisibilityTimeout - The visibility timeout for the queue, in seconds. + // Valid values: An integer from 0 to 43,200 (12 hours). Default: 30. For + // more information about the visibility timeout, see Visibility Timeout + // (http://docs.aws.amazon.com/AWSSimpleQueueService/latest/SQSDeveloperGuide/sqs-visibility-timeout.html) // in the Amazon Simple Queue Service Developer Guide. // // The following attributes apply only to server-side-encryption (http://docs.aws.amazon.com/AWSSimpleQueueService/latest/SQSDeveloperGuide/sqs-server-side-encryption.html): @@ -2512,10 +2543,10 @@ type CreateQueueInput struct { // Amazon SQS can reuse a data key (http://docs.aws.amazon.com/kms/latest/developerguide/concepts.html#data-keys) // to encrypt or decrypt messages before calling AWS KMS again. An integer // representing seconds, between 60 seconds (1 minute) and 86,400 seconds - // (24 hours). The default is 300 (5 minutes). A shorter time period provides - // better security but results in more calls to KMS which might incur charges - // after Free Tier. For more information, see How Does the Data Key Reuse - // Period Work? (http://docs.aws.amazon.com/AWSSimpleQueueService/latest/SQSDeveloperGuide/sqs-server-side-encryption.html#sqs-how-does-the-data-key-reuse-period-work). + // (24 hours). Default: 300 (5 minutes). A shorter time period provides better + // security but results in more calls to KMS which might incur charges after + // Free Tier. For more information, see How Does the Data Key Reuse Period + // Work? (http://docs.aws.amazon.com/AWSSimpleQueueService/latest/SQSDeveloperGuide/sqs-server-side-encryption.html#sqs-how-does-the-data-key-reuse-period-work). // // // The following attributes apply only to FIFO (first-in-first-out) queues (http://docs.aws.amazon.com/AWSSimpleQueueService/latest/SQSDeveloperGuide/FIFO-queues.html): @@ -2556,20 +2587,6 @@ type CreateQueueInput struct { // message with a MessageDeduplicationId that is the same as the one generated // for the first MessageDeduplicationId, the two messages are treated as // duplicates and only one copy of the message is delivered. - // - // Any other valid special request parameters (such as the following) are ignored: - // - // * ApproximateNumberOfMessages - // - // * ApproximateNumberOfMessagesDelayed - // - // * ApproximateNumberOfMessagesNotVisible - // - // * CreatedTimestamp - // - // * LastModifiedTimestamp - // - // * QueueArn Attributes map[string]*string `locationName:"Attribute" locationNameKey:"Name" locationNameValue:"Value" type:"map" flattened:"true"` // The name of the new queue. The following limits apply to this name: @@ -2581,7 +2598,7 @@ type CreateQueueInput struct { // // * A FIFO queue name must end with the .fifo suffix. // - // Queue names are case-sensitive. + // Queue URLs and names are case-sensitive. // // QueueName is a required field QueueName *string `type:"string" required:"true"` @@ -2656,7 +2673,7 @@ type DeleteMessageBatchInput struct { // The URL of the Amazon SQS queue from which messages are deleted. // - // Queue URLs are case-sensitive. + // Queue URLs and names are case-sensitive. // // QueueUrl is a required field QueueUrl *string `type:"string" required:"true"` @@ -2836,7 +2853,7 @@ type DeleteMessageInput struct { // The URL of the Amazon SQS queue from which messages are deleted. // - // Queue URLs are case-sensitive. + // Queue URLs and names are case-sensitive. // // QueueUrl is a required field QueueUrl *string `type:"string" required:"true"` @@ -2904,7 +2921,7 @@ type DeleteQueueInput struct { // The URL of the Amazon SQS queue to delete. // - // Queue URLs are case-sensitive. + // Queue URLs and names are case-sensitive. // // QueueUrl is a required field QueueUrl *string `type:"string" required:"true"` @@ -2966,18 +2983,18 @@ type GetQueueAttributesInput struct { // // * All - Returns all values. // - // * ApproximateNumberOfMessages - Returns the approximate number of visible - // messages in a queue. For more information, see Resources Required to Process - // Messages (http://docs.aws.amazon.com/AWSSimpleQueueService/latest/SQSDeveloperGuide/sqs-resources-required-process-messages.html) - // in the Amazon Simple Queue Service Developer Guide. + // * ApproximateNumberOfMessages - Returns the approximate number of messages + // available for retrieval from the queue. // // * ApproximateNumberOfMessagesDelayed - Returns the approximate number - // of messages that are waiting to be added to the queue. + // of messages in the queue that are delayed and not available for reading + // immediately. This can happen when the queue is configured as a delay queue + // or when a message has been sent with a delay parameter. // // * ApproximateNumberOfMessagesNotVisible - Returns the approximate number - // of messages that have not timed-out and aren't deleted. For more information, - // see Resources Required to Process Messages (http://docs.aws.amazon.com/AWSSimpleQueueService/latest/SQSDeveloperGuide/sqs-resources-required-process-messages.html) - // in the Amazon Simple Queue Service Developer Guide. + // of messages that are in flight. Messages are considered to be in flight + // if they have been sent to a client but have not yet been deleted or have + // not yet reached the end of their visibility window. // // * CreatedTimestamp - Returns the time when the queue was created in seconds // (epoch time (http://en.wikipedia.org/wiki/Unix_time)). @@ -3011,7 +3028,9 @@ type GetQueueAttributesInput struct { // is exceeded. // // maxReceiveCount - The number of times a message is delivered to the source - // queue before being moved to the dead-letter queue. + // queue before being moved to the dead-letter queue. When the ReceiveCount + // for a message exceeds the maxReceiveCount for a queue, Amazon SQS moves + // the message to the dead-letter-queue. // // * VisibilityTimeout - Returns the visibility timeout for the queue. For // more information about the visibility timeout, see Visibility Timeout @@ -3048,7 +3067,7 @@ type GetQueueAttributesInput struct { // The URL of the Amazon SQS queue whose attribute information is retrieved. // - // Queue URLs are case-sensitive. + // Queue URLs and names are case-sensitive. // // QueueUrl is a required field QueueUrl *string `type:"string" required:"true"` @@ -3119,7 +3138,7 @@ type GetQueueUrlInput struct { // The name of the queue whose URL must be fetched. Maximum 80 characters. Valid // values: alphanumeric characters, hyphens (-), and underscores (_). // - // Queue names are case-sensitive. + // Queue URLs and names are case-sensitive. // // QueueName is a required field QueueName *string `type:"string" required:"true"` @@ -3163,7 +3182,7 @@ func (s *GetQueueUrlInput) SetQueueOwnerAWSAccountId(v string) *GetQueueUrlInput return s } -// For more information, see Responses (http://docs.aws.amazon.com/AWSSimpleQueueService/latest/SQSDeveloperGuide/UnderstandingResponses.html) +// For more information, see Interpreting Responses (http://docs.aws.amazon.com/AWSSimpleQueueService/latest/SQSDeveloperGuide/sqs-api-responses.html) // in the Amazon Simple Queue Service Developer Guide. type GetQueueUrlOutput struct { _ struct{} `type:"structure"` @@ -3193,7 +3212,7 @@ type ListDeadLetterSourceQueuesInput struct { // The URL of a dead-letter queue. // - // Queue URLs are case-sensitive. + // Queue URLs and names are case-sensitive. // // QueueUrl is a required field QueueUrl *string `type:"string" required:"true"` @@ -3322,7 +3341,7 @@ type ListQueuesInput struct { // A string to use for filtering the list results. Only those queues whose name // begins with the specified string are returned. // - // Queue names are case-sensitive. + // Queue URLs and names are case-sensitive. QueueNamePrefix *string `type:"string"` } @@ -3370,8 +3389,24 @@ func (s *ListQueuesOutput) SetQueueUrls(v []*string) *ListQueuesOutput { type Message struct { _ struct{} `type:"structure"` - // SenderId, SentTimestamp, ApproximateReceiveCount, and/or ApproximateFirstReceiveTimestamp. - // SentTimestamp and ApproximateFirstReceiveTimestamp are each returned as an + // A map of the attributes requested in ReceiveMessage to their respective values. + // Supported attributes: + // + // * ApproximateReceiveCount + // + // * ApproximateFirstReceiveTimestamp + // + // * MessageDeduplicationId + // + // * MessageGroupId + // + // * SenderId + // + // * SentTimestamp + // + // * SequenceNumber + // + // ApproximateFirstReceiveTimestamp and SentTimestamp are each returned as an // integer representing the epoch time (http://en.wikipedia.org/wiki/Unix_time) // in milliseconds. Attributes map[string]*string `locationName:"Attribute" locationNameKey:"Name" locationNameValue:"Value" type:"map" flattened:"true"` @@ -3389,7 +3424,7 @@ type Message struct { MD5OfMessageAttributes *string `type:"string"` // Each message attribute consists of a Name, Type, and Value. For more information, - // see Message Attribute Items and Validation (http://docs.aws.amazon.com/AWSSimpleQueueService/latest/SQSDeveloperGuide/sqs-message-attributes.html#message-attributes-items-validation) + // see Amazon SQS Message Attributes (http://docs.aws.amazon.com/AWSSimpleQueueService/latest/SQSDeveloperGuide/sqs-message-attributes.html) // in the Amazon Simple Queue Service Developer Guide. MessageAttributes map[string]*MessageAttributeValue `locationName:"MessageAttribute" locationNameKey:"Name" locationNameValue:"Value" type:"map" flattened:"true"` @@ -3477,8 +3512,8 @@ type MessageAttributeValue struct { // Amazon SQS supports the following logical data types: String, Number, and // Binary. For the Number data type, you must use StringValue. // - // You can also append custom labels. For more information, see Message Attribute - // Data Types and Validation (http://docs.aws.amazon.com/AWSSimpleQueueService/latest/SQSDeveloperGuide/sqs-message-attributes.html#message-attributes-data-types-validation) + // You can also append custom labels. For more information, see Amazon SQS Message + // Attributes (http://docs.aws.amazon.com/AWSSimpleQueueService/latest/SQSDeveloperGuide/sqs-message-attributes.html) // in the Amazon Simple Queue Service Developer Guide. // // DataType is a required field @@ -3550,7 +3585,7 @@ type PurgeQueueInput struct { // The URL of the queue from which the PurgeQueue action deletes messages. // - // Queue URLs are case-sensitive. + // Queue URLs and names are case-sensitive. // // QueueUrl is a required field QueueUrl *string `type:"string" required:"true"` @@ -3602,8 +3637,8 @@ func (s PurgeQueueOutput) GoString() string { type ReceiveMessageInput struct { _ struct{} `type:"structure"` - // A list of attributes that need to be returned along with each message. These - // attributes include: + // A list of s that need to be returned along with each message. These attributes + // include: // // * All - Returns all values. // @@ -3623,51 +3658,19 @@ type ReceiveMessageInput struct { // * SentTimestamp - Returns the time the message was sent to the queue (epoch // time (http://en.wikipedia.org/wiki/Unix_time) in milliseconds). // - // * MessageDeduplicationId - Returns the value provided by the sender that - // calls the SendMessage action. + // * MessageDeduplicationId - Returns the value provided by the producer + // that calls the SendMessage action. // - // * MessageGroupId - Returns the value provided by the sender that calls + // * MessageGroupId - Returns the value provided by the producer that calls // the SendMessage action. Messages with the same MessageGroupId are returned // in sequence. // // * SequenceNumber - Returns the value provided by Amazon SQS. - // - // Any other valid special request parameters (such as the following) are ignored: - // - // * ApproximateNumberOfMessages - // - // * ApproximateNumberOfMessagesDelayed - // - // * ApproximateNumberOfMessagesNotVisible - // - // * CreatedTimestamp - // - // * ContentBasedDeduplication - // - // * DelaySeconds - // - // * FifoQueue - // - // * LastModifiedTimestamp - // - // * MaximumMessageSize - // - // * MessageRetentionPeriod - // - // * Policy - // - // * QueueArn, - // - // * ReceiveMessageWaitTimeSeconds - // - // * RedrivePolicy - // - // * VisibilityTimeout AttributeNames []*string `locationNameList:"AttributeName" type:"list" flattened:"true"` // The maximum number of messages to return. Amazon SQS never returns more messages - // than this value (however, fewer messages might be returned). Valid values - // are 1 to 10. Default is 1. + // than this value (however, fewer messages might be returned). Valid values: + // 1 to 10. Default: 1. MaxNumberOfMessages *int64 `type:"integer"` // The name of the message attribute, where N is the index. @@ -3694,7 +3697,7 @@ type ReceiveMessageInput struct { // The URL of the Amazon SQS queue from which messages are received. // - // Queue URLs are case-sensitive. + // Queue URLs and names are case-sensitive. // // QueueUrl is a required field QueueUrl *string `type:"string" required:"true"` @@ -3726,11 +3729,11 @@ type ReceiveMessageInput struct { // information, see Visibility Timeout (http://docs.aws.amazon.com/AWSSimpleQueueService/latest/SQSDeveloperGuide/sqs-visibility-timeout.html) // in the Amazon Simple Queue Service Developer Guide. // - // If a caller of the ReceiveMessage action is still processing messages when - // the visibility timeout expires and messages become visible, another worker - // reading from the same queue can receive the same messages and therefore - // process duplicates. Also, if a reader whose message processing time is - // longer than the visibility timeout tries to delete the processed messages, + // If a caller of the ReceiveMessage action still processes messages when the + // visibility timeout expires and messages become visible, another worker + // consuming from the same queue can receive the same messages and therefore + // process duplicates. Also, if a consumer whose message processing time + // is longer than the visibility timeout tries to delete the processed messages, // the action fails with an error. // // To mitigate this effect, ensure that your application observes a safe threshold @@ -3750,7 +3753,7 @@ type ReceiveMessageInput struct { // can contain alphanumeric characters (a-z, A-Z, 0-9) and punctuation (!"#$%&'()*+,-./:;<=>?@[\]^_`{|}~). // // For best practices of using ReceiveRequestAttemptId, see Using the ReceiveRequestAttemptId - // Request Parameter (http://docs.aws.amazon.com/AWSSimpleQueueService/latest/SQSDeveloperGuide/FIFO-queue-recommendations.html#using-receiverequestattemptid-request-parameter) + // Request Parameter (http://docs.aws.amazon.com/AWSSimpleQueueService/latest/SQSDeveloperGuide/using-receiverequestattemptid-request-parameter.html) // in the Amazon Simple Queue Service Developer Guide. ReceiveRequestAttemptId *string `type:"string"` @@ -3865,7 +3868,7 @@ type RemovePermissionInput struct { // The URL of the Amazon SQS queue from which permissions are removed. // - // Queue URLs are case-sensitive. + // Queue URLs and names are case-sensitive. // // QueueUrl is a required field QueueUrl *string `type:"string" required:"true"` @@ -3933,7 +3936,7 @@ type SendMessageBatchInput struct { // The URL of the Amazon SQS queue to which batched messages are sent. // - // Queue URLs are case-sensitive. + // Queue URLs and names are case-sensitive. // // QueueUrl is a required field QueueUrl *string `type:"string" required:"true"` @@ -4044,11 +4047,14 @@ type SendMessageBatchRequestEntry struct { // // The Ids of a batch request need to be unique within a request // + // This identifier can have up to 80 characters. The following characters are + // accepted: alphanumeric characters, hyphens(-), and underscores (_). + // // Id is a required field Id *string `type:"string" required:"true"` // Each message attribute consists of a Name, Type, and Value. For more information, - // see Message Attribute Items and Validation (http://docs.aws.amazon.com/AWSSimpleQueueService/latest/SQSDeveloperGuide/sqs-message-attributes.html#message-attributes-items-validation) + // see Amazon SQS Message Attributes (http://docs.aws.amazon.com/AWSSimpleQueueService/latest/SQSDeveloperGuide/sqs-message-attributes.html) // in the Amazon Simple Queue Service Developer Guide. MessageAttributes map[string]*MessageAttributeValue `locationName:"MessageAttribute" locationNameKey:"Name" locationNameValue:"Value" type:"map" flattened:"true"` @@ -4090,18 +4096,21 @@ type SendMessageBatchRequestEntry struct { // one generated for the first MessageDeduplicationId, the two messages are // treated as duplicates and only one copy of the message is delivered. // - // The MessageDeduplicationId is available to the recipient of the message (this + // The MessageDeduplicationId is available to the consumer of the message (this // can be useful for troubleshooting delivery issues). // // If a message is sent successfully but the acknowledgement is lost and the // message is resent with the same MessageDeduplicationId after the deduplication // interval, Amazon SQS can't detect duplicate messages. // + // Amazon SQS continues to keep track of the message deduplication ID even after + // the message is received and deleted. + // // The length of MessageDeduplicationId is 128 characters. MessageDeduplicationId // can contain alphanumeric characters (a-z, A-Z, 0-9) and punctuation (!"#$%&'()*+,-./:;<=>?@[\]^_`{|}~). // // For best practices of using MessageDeduplicationId, see Using the MessageDeduplicationId - // Property (http://docs.aws.amazon.com/AWSSimpleQueueService/latest/SQSDeveloperGuide/FIFO-queue-recommendations.html#using-messagededuplicationid-property) + // Property (http://docs.aws.amazon.com/AWSSimpleQueueService/latest/SQSDeveloperGuide/using-messagededuplicationid-property.html) // in the Amazon Simple Queue Service Developer Guide. MessageDeduplicationId *string `type:"string"` @@ -4112,8 +4121,8 @@ type SendMessageBatchRequestEntry struct { // (however, messages in different message groups might be processed out of // order). To interleave multiple ordered streams within a single queue, use // MessageGroupId values (for example, session data for multiple users). In - // this scenario, multiple readers can process the queue, but the session data - // of each user is processed in a FIFO fashion. + // this scenario, multiple consumers can process the queue, but the session + // data of each user is processed in a FIFO fashion. // // * You must associate a non-empty MessageGroupId with a message. If you // don't provide a MessageGroupId, the action fails. @@ -4122,11 +4131,11 @@ type SendMessageBatchRequestEntry struct { // For each MessageGroupId, the messages are sorted by time sent. The caller // can't specify a MessageGroupId. // - // The length of MessageGroupId is 128 characters. Valid values are alphanumeric + // The length of MessageGroupId is 128 characters. Valid values: alphanumeric // characters and punctuation (!"#$%&'()*+,-./:;<=>?@[\]^_`{|}~). // // For best practices of using MessageGroupId, see Using the MessageGroupId - // Property (http://docs.aws.amazon.com/AWSSimpleQueueService/latest/SQSDeveloperGuide/FIFO-queue-recommendations.html#using-messagegroupid-property) + // Property (http://docs.aws.amazon.com/AWSSimpleQueueService/latest/SQSDeveloperGuide/using-messagegroupid-property.html) // in the Amazon Simple Queue Service Developer Guide. // // MessageGroupId is required for FIFO queues. You can't use it for Standard @@ -4296,7 +4305,7 @@ type SendMessageInput struct { DelaySeconds *int64 `type:"integer"` // Each message attribute consists of a Name, Type, and Value. For more information, - // see Message Attribute Items and Validation (http://docs.aws.amazon.com/AWSSimpleQueueService/latest/SQSDeveloperGuide/sqs-message-attributes.html#message-attributes-items-validation) + // see Amazon SQS Message Attributes (http://docs.aws.amazon.com/AWSSimpleQueueService/latest/SQSDeveloperGuide/sqs-message-attributes.html) // in the Amazon Simple Queue Service Developer Guide. MessageAttributes map[string]*MessageAttributeValue `locationName:"MessageAttribute" locationNameKey:"Name" locationNameValue:"Value" type:"map" flattened:"true"` @@ -4346,18 +4355,21 @@ type SendMessageInput struct { // one generated for the first MessageDeduplicationId, the two messages are // treated as duplicates and only one copy of the message is delivered. // - // The MessageDeduplicationId is available to the recipient of the message (this + // The MessageDeduplicationId is available to the consumer of the message (this // can be useful for troubleshooting delivery issues). // // If a message is sent successfully but the acknowledgement is lost and the // message is resent with the same MessageDeduplicationId after the deduplication // interval, Amazon SQS can't detect duplicate messages. // + // Amazon SQS continues to keep track of the message deduplication ID even after + // the message is received and deleted. + // // The length of MessageDeduplicationId is 128 characters. MessageDeduplicationId // can contain alphanumeric characters (a-z, A-Z, 0-9) and punctuation (!"#$%&'()*+,-./:;<=>?@[\]^_`{|}~). // // For best practices of using MessageDeduplicationId, see Using the MessageDeduplicationId - // Property (http://docs.aws.amazon.com/AWSSimpleQueueService/latest/SQSDeveloperGuide/FIFO-queue-recommendations.html#using-messagededuplicationid-property) + // Property (http://docs.aws.amazon.com/AWSSimpleQueueService/latest/SQSDeveloperGuide/using-messagededuplicationid-property.html) // in the Amazon Simple Queue Service Developer Guide. MessageDeduplicationId *string `type:"string"` @@ -4368,8 +4380,8 @@ type SendMessageInput struct { // (however, messages in different message groups might be processed out of // order). To interleave multiple ordered streams within a single queue, use // MessageGroupId values (for example, session data for multiple users). In - // this scenario, multiple readers can process the queue, but the session data - // of each user is processed in a FIFO fashion. + // this scenario, multiple consumers can process the queue, but the session + // data of each user is processed in a FIFO fashion. // // * You must associate a non-empty MessageGroupId with a message. If you // don't provide a MessageGroupId, the action fails. @@ -4378,11 +4390,11 @@ type SendMessageInput struct { // For each MessageGroupId, the messages are sorted by time sent. The caller // can't specify a MessageGroupId. // - // The length of MessageGroupId is 128 characters. Valid values are alphanumeric + // The length of MessageGroupId is 128 characters. Valid values: alphanumeric // characters and punctuation (!"#$%&'()*+,-./:;<=>?@[\]^_`{|}~). // // For best practices of using MessageGroupId, see Using the MessageGroupId - // Property (http://docs.aws.amazon.com/AWSSimpleQueueService/latest/SQSDeveloperGuide/FIFO-queue-recommendations.html#using-messagegroupid-property) + // Property (http://docs.aws.amazon.com/AWSSimpleQueueService/latest/SQSDeveloperGuide/using-messagegroupid-property.html) // in the Amazon Simple Queue Service Developer Guide. // // MessageGroupId is required for FIFO queues. You can't use it for Standard @@ -4391,7 +4403,7 @@ type SendMessageInput struct { // The URL of the Amazon SQS queue to which a message is sent. // - // Queue URLs are case-sensitive. + // Queue URLs and names are case-sensitive. // // QueueUrl is a required field QueueUrl *string `type:"string" required:"true"` @@ -4543,16 +4555,15 @@ type SetQueueAttributesInput struct { // // * DelaySeconds - The length of time, in seconds, for which the delivery // of all messages in the queue is delayed. Valid values: An integer from - // 0 to 900 (15 minutes). The default is 0 (zero). + // 0 to 900 (15 minutes). Default: 0. // // * MaximumMessageSize - The limit of how many bytes a message can contain // before Amazon SQS rejects it. Valid values: An integer from 1,024 bytes - // (1 KiB) up to 262,144 bytes (256 KiB). The default is 262,144 (256 KiB). - // + // (1 KiB) up to 262,144 bytes (256 KiB). Default: 262,144 (256 KiB). // // * MessageRetentionPeriod - The length of time, in seconds, for which Amazon // SQS retains a message. Valid values: An integer representing seconds, - // from 60 (1 minute) to 1,209,600 (14 days). The default is 345,600 (4 days). + // from 60 (1 minute) to 1,209,600 (14 days). Default: 345,600 (4 days). // // // * Policy - The queue's policy. A valid AWS policy. For more information @@ -4561,7 +4572,7 @@ type SetQueueAttributesInput struct { // // * ReceiveMessageWaitTimeSeconds - The length of time, in seconds, for // which a ReceiveMessage action waits for a message to arrive. Valid values: - // an integer from 0 to 20 (seconds). The default is 0. + // an integer from 0 to 20 (seconds). Default: 0. // // * RedrivePolicy - The string that includes the parameters for the dead-letter // queue functionality of the source queue. For more information about the @@ -4574,14 +4585,17 @@ type SetQueueAttributesInput struct { // is exceeded. // // maxReceiveCount - The number of times a message is delivered to the source - // queue before being moved to the dead-letter queue. + // queue before being moved to the dead-letter queue. When the ReceiveCount + // for a message exceeds the maxReceiveCount for a queue, Amazon SQS moves + // the message to the dead-letter-queue. // // The dead-letter queue of a FIFO queue must also be a FIFO queue. Similarly, // the dead-letter queue of a standard queue must also be a standard queue. // - // * VisibilityTimeout - The visibility timeout for the queue. Valid values: - // an integer from 0 to 43,200 (12 hours). The default is 30. For more information - // about the visibility timeout, see Visibility Timeout (http://docs.aws.amazon.com/AWSSimpleQueueService/latest/SQSDeveloperGuide/sqs-visibility-timeout.html) + // * VisibilityTimeout - The visibility timeout for the queue, in seconds. + // Valid values: an integer from 0 to 43,200 (12 hours). Default: 30. For + // more information about the visibility timeout, see Visibility Timeout + // (http://docs.aws.amazon.com/AWSSimpleQueueService/latest/SQSDeveloperGuide/sqs-visibility-timeout.html) // in the Amazon Simple Queue Service Developer Guide. // // The following attributes apply only to server-side-encryption (http://docs.aws.amazon.com/AWSSimpleQueueService/latest/SQSDeveloperGuide/sqs-server-side-encryption.html): @@ -4597,10 +4611,10 @@ type SetQueueAttributesInput struct { // Amazon SQS can reuse a data key (http://docs.aws.amazon.com/kms/latest/developerguide/concepts.html#data-keys) // to encrypt or decrypt messages before calling AWS KMS again. An integer // representing seconds, between 60 seconds (1 minute) and 86,400 seconds - // (24 hours). The default is 300 (5 minutes). A shorter time period provides - // better security but results in more calls to KMS which might incur charges - // after Free Tier. For more information, see How Does the Data Key Reuse - // Period Work? (http://docs.aws.amazon.com/AWSSimpleQueueService/latest/SQSDeveloperGuide/sqs-server-side-encryption.html#sqs-how-does-the-data-key-reuse-period-work). + // (24 hours). Default: 300 (5 minutes). A shorter time period provides better + // security but results in more calls to KMS which might incur charges after + // Free Tier. For more information, see How Does the Data Key Reuse Period + // Work? (http://docs.aws.amazon.com/AWSSimpleQueueService/latest/SQSDeveloperGuide/sqs-server-side-encryption.html#sqs-how-does-the-data-key-reuse-period-work). // // // The following attribute applies only to FIFO (first-in-first-out) queues @@ -4634,26 +4648,12 @@ type SetQueueAttributesInput struct { // for the first MessageDeduplicationId, the two messages are treated as // duplicates and only one copy of the message is delivered. // - // Any other valid special request parameters (such as the following) are ignored: - // - // * ApproximateNumberOfMessages - // - // * ApproximateNumberOfMessagesDelayed - // - // * ApproximateNumberOfMessagesNotVisible - // - // * CreatedTimestamp - // - // * LastModifiedTimestamp - // - // * QueueArn - // // Attributes is a required field Attributes map[string]*string `locationName:"Attribute" locationNameKey:"Name" locationNameValue:"Value" type:"map" flattened:"true" required:"true"` // The URL of the Amazon SQS queue whose attributes are set. // - // Queue URLs are case-sensitive. + // Queue URLs and names are case-sensitive. // // QueueUrl is a required field QueueUrl *string `type:"string" required:"true"` diff --git a/vendor/github.com/aws/aws-sdk-go/service/sqs/doc.go b/vendor/github.com/aws/aws-sdk-go/service/sqs/doc.go index 7f0c5799f..6f3380359 100644 --- a/vendor/github.com/aws/aws-sdk-go/service/sqs/doc.go +++ b/vendor/github.com/aws/aws-sdk-go/service/sqs/doc.go @@ -31,11 +31,14 @@ // // * Amazon Simple Queue Service Developer Guide // -// Making API Requests (http://docs.aws.amazon.com/AWSSimpleQueueService/latest/SQSDeveloperGuide/MakingRequestsArticle.html) +// Making API Requests (http://docs.aws.amazon.com/AWSSimpleQueueService/latest/SQSDeveloperGuide/sqs-making-api-requests.html) // -// Using Amazon SQS Message Attributes (http://docs.aws.amazon.com/AWSSimpleQueueService/latest/SQSDeveloperGuide/sqs-message-attributes.html) +// Amazon SQS Message Attributes (http://docs.aws.amazon.com/AWSSimpleQueueService/latest/SQSDeveloperGuide/sqs-message-attributes.html) // -// Using Amazon SQS Dead-Letter Queues (http://docs.aws.amazon.com/AWSSimpleQueueService/latest/SQSDeveloperGuide/sqs-dead-letter-queues.html) +// Amazon SQS Dead-Letter Queues (http://docs.aws.amazon.com/AWSSimpleQueueService/latest/SQSDeveloperGuide/sqs-dead-letter-queues.html) +// +// * Amazon SQS in the (http://docs.aws.amazon.com/cli/latest/reference/sqs/index.html)AWS +// CLI Command Reference // // * Amazon Web Services General Reference // diff --git a/vendor/github.com/aws/aws-sdk-go/service/sqs/errors.go b/vendor/github.com/aws/aws-sdk-go/service/sqs/errors.go index 722867d32..89eb40d7f 100644 --- a/vendor/github.com/aws/aws-sdk-go/service/sqs/errors.go +++ b/vendor/github.com/aws/aws-sdk-go/service/sqs/errors.go @@ -25,7 +25,7 @@ const ( // ErrCodeInvalidAttributeName for service response error code // "InvalidAttributeName". // - // The attribute referred to doesn't exist. + // The specified attribute doesn't exist. ErrCodeInvalidAttributeName = "InvalidAttributeName" // ErrCodeInvalidBatchEntryId for service response error code @@ -37,7 +37,7 @@ const ( // ErrCodeInvalidIdFormat for service response error code // "InvalidIdFormat". // - // The receipt handle isn't valid for the current version. + // The specified receipt handle isn't valid for the current version. ErrCodeInvalidIdFormat = "InvalidIdFormat" // ErrCodeInvalidMessageContents for service response error code @@ -49,16 +49,16 @@ const ( // ErrCodeMessageNotInflight for service response error code // "AWS.SimpleQueueService.MessageNotInflight". // - // The message referred to isn't in flight. + // The specified message isn't in flight. ErrCodeMessageNotInflight = "AWS.SimpleQueueService.MessageNotInflight" // ErrCodeOverLimit for service response error code // "OverLimit". // - // The action that you requested would violate a limit. For example, ReceiveMessage - // returns this error if the maximum number of inflight messages is reached. - // AddPermission returns this error if the maximum number of permissions for - // the queue is reached. + // The specified action violates a limit. For example, ReceiveMessage returns + // this error if the maximum number of inflight messages is reached and AddPermission + // returns this error if the maximum number of permissions for the queue is + // reached. ErrCodeOverLimit = "OverLimit" // ErrCodePurgeQueueInProgress for service response error code @@ -73,19 +73,19 @@ const ( // "AWS.SimpleQueueService.QueueDeletedRecently". // // You must wait 60 seconds after deleting a queue before you can create another - // one with the same name. + // queue with the same name. ErrCodeQueueDeletedRecently = "AWS.SimpleQueueService.QueueDeletedRecently" // ErrCodeQueueDoesNotExist for service response error code // "AWS.SimpleQueueService.NonExistentQueue". // - // The queue referred to doesn't exist. + // The specified queue doesn't exist. ErrCodeQueueDoesNotExist = "AWS.SimpleQueueService.NonExistentQueue" // ErrCodeQueueNameExists for service response error code // "QueueAlreadyExists". // - // A queue already exists with this name. Amazon SQS returns this error only + // A queue with this name already exists. Amazon SQS returns this error only // if the request includes attributes whose values differ from those of the // existing queue. ErrCodeQueueNameExists = "QueueAlreadyExists" @@ -93,7 +93,7 @@ const ( // ErrCodeReceiptHandleIsInvalid for service response error code // "ReceiptHandleIsInvalid". // - // The receipt handle provided isn't valid. + // The specified receipt handle isn't valid. ErrCodeReceiptHandleIsInvalid = "ReceiptHandleIsInvalid" // ErrCodeTooManyEntriesInBatchRequest for service response error code diff --git a/vendor/github.com/aws/aws-sdk-go/service/ssm/api.go b/vendor/github.com/aws/aws-sdk-go/service/ssm/api.go index adbb5b2c1..aac567983 100644 --- a/vendor/github.com/aws/aws-sdk-go/service/ssm/api.go +++ b/vendor/github.com/aws/aws-sdk-go/service/ssm/api.go @@ -356,8 +356,8 @@ func (c *SSM) CreateAssociationRequest(input *CreateAssociationInput) (req *requ // or targets. // // When you associate a document with one or more instances using instance IDs -// or tags, the SSM Agent running on the instance processes the document and -// configures the instance as specified. +// or tags, SSM Agent running on the instance processes the document and configures +// the instance as specified. // // If you associate a document with an instance that already has an associated // document, the system throws the AssociationAlreadyExists exception. @@ -489,8 +489,8 @@ func (c *SSM) CreateAssociationBatchRequest(input *CreateAssociationBatchInput) // or targets. // // When you associate a document with one or more instances using instance IDs -// or tags, the SSM Agent running on the instance processes the document and -// configures the instance as specified. +// or tags, SSM Agent running on the instance processes the document and configures +// the instance as specified. // // If you associate a document with an instance that already has an associated // document, the system throws the AssociationAlreadyExists exception. @@ -4685,6 +4685,92 @@ func (c *SSM) DescribePatchGroupsWithContext(ctx aws.Context, input *DescribePat return out, req.Send() } +const opDescribeSessions = "DescribeSessions" + +// DescribeSessionsRequest generates a "aws/request.Request" representing the +// client's request for the DescribeSessions operation. The "output" return +// value will be populated with the request's response once the request completes +// successfuly. +// +// Use "Send" method on the returned Request to send the API call to the service. +// the "output" return value is not valid until after Send returns without error. +// +// See DescribeSessions for more information on using the DescribeSessions +// API call, and error handling. +// +// This method is useful when you want to inject custom logic or configuration +// into the SDK's request lifecycle. Such as custom headers, or retry logic. +// +// +// // Example sending a request using the DescribeSessionsRequest method. +// req, resp := client.DescribeSessionsRequest(params) +// +// err := req.Send() +// if err == nil { // resp is now filled +// fmt.Println(resp) +// } +// +// See also, https://docs.aws.amazon.com/goto/WebAPI/ssm-2014-11-06/DescribeSessions +func (c *SSM) DescribeSessionsRequest(input *DescribeSessionsInput) (req *request.Request, output *DescribeSessionsOutput) { + op := &request.Operation{ + Name: opDescribeSessions, + HTTPMethod: "POST", + HTTPPath: "/", + } + + if input == nil { + input = &DescribeSessionsInput{} + } + + output = &DescribeSessionsOutput{} + req = c.newRequest(op, input, output) + return +} + +// DescribeSessions API operation for Amazon Simple Systems Manager (SSM). +// +// Retrieves a list of all active sessions (both connected and disconnected) +// or terminated sessions from the past 30 days. +// +// Returns awserr.Error for service API and SDK errors. Use runtime type assertions +// with awserr.Error's Code and Message methods to get detailed information about +// the error. +// +// See the AWS API reference guide for Amazon Simple Systems Manager (SSM)'s +// API operation DescribeSessions for usage and error information. +// +// Returned Error Codes: +// * ErrCodeInternalServerError "InternalServerError" +// An error occurred on the server side. +// +// * ErrCodeInvalidFilterKey "InvalidFilterKey" +// The specified key is not valid. +// +// * ErrCodeInvalidNextToken "InvalidNextToken" +// The specified token is not valid. +// +// See also, https://docs.aws.amazon.com/goto/WebAPI/ssm-2014-11-06/DescribeSessions +func (c *SSM) DescribeSessions(input *DescribeSessionsInput) (*DescribeSessionsOutput, error) { + req, out := c.DescribeSessionsRequest(input) + return out, req.Send() +} + +// DescribeSessionsWithContext is the same as DescribeSessions with the addition of +// the ability to pass a context and additional request options. +// +// See DescribeSessions for details on how to use this API operation. +// +// The context must be non-nil and will be used for request cancellation. If +// the context is nil a panic will occur. In the future the SDK may create +// sub-contexts for http.Requests. See https://golang.org/pkg/context/ +// for more information on using Contexts. +func (c *SSM) DescribeSessionsWithContext(ctx aws.Context, input *DescribeSessionsInput, opts ...request.Option) (*DescribeSessionsOutput, error) { + req, out := c.DescribeSessionsRequest(input) + req.SetContext(ctx) + req.ApplyOptions(opts...) + return out, req.Send() +} + const opGetAutomationExecution = "GetAutomationExecution" // GetAutomationExecutionRequest generates a "aws/request.Request" representing the @@ -4872,6 +4958,86 @@ func (c *SSM) GetCommandInvocationWithContext(ctx aws.Context, input *GetCommand return out, req.Send() } +const opGetConnectionStatus = "GetConnectionStatus" + +// GetConnectionStatusRequest generates a "aws/request.Request" representing the +// client's request for the GetConnectionStatus operation. The "output" return +// value will be populated with the request's response once the request completes +// successfuly. +// +// Use "Send" method on the returned Request to send the API call to the service. +// the "output" return value is not valid until after Send returns without error. +// +// See GetConnectionStatus for more information on using the GetConnectionStatus +// API call, and error handling. +// +// This method is useful when you want to inject custom logic or configuration +// into the SDK's request lifecycle. Such as custom headers, or retry logic. +// +// +// // Example sending a request using the GetConnectionStatusRequest method. +// req, resp := client.GetConnectionStatusRequest(params) +// +// err := req.Send() +// if err == nil { // resp is now filled +// fmt.Println(resp) +// } +// +// See also, https://docs.aws.amazon.com/goto/WebAPI/ssm-2014-11-06/GetConnectionStatus +func (c *SSM) GetConnectionStatusRequest(input *GetConnectionStatusInput) (req *request.Request, output *GetConnectionStatusOutput) { + op := &request.Operation{ + Name: opGetConnectionStatus, + HTTPMethod: "POST", + HTTPPath: "/", + } + + if input == nil { + input = &GetConnectionStatusInput{} + } + + output = &GetConnectionStatusOutput{} + req = c.newRequest(op, input, output) + return +} + +// GetConnectionStatus API operation for Amazon Simple Systems Manager (SSM). +// +// Retrieves the Session Manager connection status for an instance to determine +// whether it is connected and ready to receive Session Manager connections. +// +// Returns awserr.Error for service API and SDK errors. Use runtime type assertions +// with awserr.Error's Code and Message methods to get detailed information about +// the error. +// +// See the AWS API reference guide for Amazon Simple Systems Manager (SSM)'s +// API operation GetConnectionStatus for usage and error information. +// +// Returned Error Codes: +// * ErrCodeInternalServerError "InternalServerError" +// An error occurred on the server side. +// +// See also, https://docs.aws.amazon.com/goto/WebAPI/ssm-2014-11-06/GetConnectionStatus +func (c *SSM) GetConnectionStatus(input *GetConnectionStatusInput) (*GetConnectionStatusOutput, error) { + req, out := c.GetConnectionStatusRequest(input) + return out, req.Send() +} + +// GetConnectionStatusWithContext is the same as GetConnectionStatus with the addition of +// the ability to pass a context and additional request options. +// +// See GetConnectionStatus for details on how to use this API operation. +// +// The context must be non-nil and will be used for request cancellation. If +// the context is nil a panic will occur. In the future the SDK may create +// sub-contexts for http.Requests. See https://golang.org/pkg/context/ +// for more information on using Contexts. +func (c *SSM) GetConnectionStatusWithContext(ctx aws.Context, input *GetConnectionStatusInput, opts ...request.Option) (*GetConnectionStatusOutput, error) { + req, out := c.GetConnectionStatusRequest(input) + req.SetContext(ctx) + req.ApplyOptions(opts...) + return out, req.Send() +} + const opGetDefaultPatchBaseline = "GetDefaultPatchBaseline" // GetDefaultPatchBaselineRequest generates a "aws/request.Request" representing the @@ -5187,12 +5353,19 @@ func (c *SSM) GetInventoryRequest(input *GetInventoryInput) (req *request.Reques // The filter name is not valid. Verify the you entered the correct name and // try again. // +// * ErrCodeInvalidInventoryGroupException "InvalidInventoryGroupException" +// The specified inventory group is not valid. +// // * ErrCodeInvalidNextToken "InvalidNextToken" // The specified token is not valid. // // * ErrCodeInvalidTypeNameException "InvalidTypeNameException" // The parameter type name is not valid. // +// * ErrCodeInvalidAggregatorException "InvalidAggregatorException" +// The specified aggregator is not valid for inventory groups. Verify that the +// aggregator uses a valid inventory type such as AWS:Application or AWS:InstanceInformation. +// // * ErrCodeInvalidResultAttributeException "InvalidResultAttributeException" // The specified inventory item result attribute is not valid. // @@ -6387,6 +6560,127 @@ func (c *SSM) GetPatchBaselineForPatchGroupWithContext(ctx aws.Context, input *G return out, req.Send() } +const opLabelParameterVersion = "LabelParameterVersion" + +// LabelParameterVersionRequest generates a "aws/request.Request" representing the +// client's request for the LabelParameterVersion operation. The "output" return +// value will be populated with the request's response once the request completes +// successfuly. +// +// Use "Send" method on the returned Request to send the API call to the service. +// the "output" return value is not valid until after Send returns without error. +// +// See LabelParameterVersion for more information on using the LabelParameterVersion +// API call, and error handling. +// +// This method is useful when you want to inject custom logic or configuration +// into the SDK's request lifecycle. Such as custom headers, or retry logic. +// +// +// // Example sending a request using the LabelParameterVersionRequest method. +// req, resp := client.LabelParameterVersionRequest(params) +// +// err := req.Send() +// if err == nil { // resp is now filled +// fmt.Println(resp) +// } +// +// See also, https://docs.aws.amazon.com/goto/WebAPI/ssm-2014-11-06/LabelParameterVersion +func (c *SSM) LabelParameterVersionRequest(input *LabelParameterVersionInput) (req *request.Request, output *LabelParameterVersionOutput) { + op := &request.Operation{ + Name: opLabelParameterVersion, + HTTPMethod: "POST", + HTTPPath: "/", + } + + if input == nil { + input = &LabelParameterVersionInput{} + } + + output = &LabelParameterVersionOutput{} + req = c.newRequest(op, input, output) + return +} + +// LabelParameterVersion API operation for Amazon Simple Systems Manager (SSM). +// +// A parameter label is a user-defined alias to help you manage different versions +// of a parameter. When you modify a parameter, Systems Manager automatically +// saves a new version and increments the version number by one. A label can +// help you remember the purpose of a parameter when there are multiple versions. +// +// Parameter labels have the following requirements and restrictions. +// +// * A version of a parameter can have a maximum of 10 labels. +// +// * You can't attach the same label to different versions of the same parameter. +// For example, if version 1 has the label Production, then you can't attach +// Production to version 2. +// +// * You can move a label from one version of a parameter to another. +// +// * You can't create a label when you create a new parameter. You must attach +// a label to a specific version of a parameter. +// +// * You can't delete a parameter label. If you no longer want to use a parameter +// label, then you must move it to a different version of a parameter. +// +// * A label can have a maximum of 100 characters. +// +// * Labels can contain letters (case sensitive), numbers, periods (.), hyphens +// (-), or underscores (_). +// +// * Labels can't begin with a number, "aws," or "ssm" (not case sensitive). +// If a label fails to meet these requirements, then the label is not associated +// with a parameter and the system displays it in the list of InvalidLabels. +// +// Returns awserr.Error for service API and SDK errors. Use runtime type assertions +// with awserr.Error's Code and Message methods to get detailed information about +// the error. +// +// See the AWS API reference guide for Amazon Simple Systems Manager (SSM)'s +// API operation LabelParameterVersion for usage and error information. +// +// Returned Error Codes: +// * ErrCodeInternalServerError "InternalServerError" +// An error occurred on the server side. +// +// * ErrCodeTooManyUpdates "TooManyUpdates" +// There are concurrent updates for a resource that supports one update at a +// time. +// +// * ErrCodeParameterNotFound "ParameterNotFound" +// The parameter could not be found. Verify the name and try again. +// +// * ErrCodeParameterVersionNotFound "ParameterVersionNotFound" +// The specified parameter version was not found. Verify the parameter name +// and version, and try again. +// +// * ErrCodeParameterVersionLabelLimitExceeded "ParameterVersionLabelLimitExceeded" +// A parameter version can have a maximum of ten labels. +// +// See also, https://docs.aws.amazon.com/goto/WebAPI/ssm-2014-11-06/LabelParameterVersion +func (c *SSM) LabelParameterVersion(input *LabelParameterVersionInput) (*LabelParameterVersionOutput, error) { + req, out := c.LabelParameterVersionRequest(input) + return out, req.Send() +} + +// LabelParameterVersionWithContext is the same as LabelParameterVersion with the addition of +// the ability to pass a context and additional request options. +// +// See LabelParameterVersion for details on how to use this API operation. +// +// The context must be non-nil and will be used for request cancellation. If +// the context is nil a panic will occur. In the future the SDK may create +// sub-contexts for http.Requests. See https://golang.org/pkg/context/ +// for more information on using Contexts. +func (c *SSM) LabelParameterVersionWithContext(ctx aws.Context, input *LabelParameterVersionInput, opts ...request.Option) (*LabelParameterVersionOutput, error) { + req, out := c.LabelParameterVersionRequest(input) + req.SetContext(ctx) + req.ApplyOptions(opts...) + return out, req.Send() +} + const opListAssociationVersions = "ListAssociationVersions" // ListAssociationVersionsRequest generates a "aws/request.Request" representing the @@ -8676,6 +8970,96 @@ func (c *SSM) RemoveTagsFromResourceWithContext(ctx aws.Context, input *RemoveTa return out, req.Send() } +const opResumeSession = "ResumeSession" + +// ResumeSessionRequest generates a "aws/request.Request" representing the +// client's request for the ResumeSession operation. The "output" return +// value will be populated with the request's response once the request completes +// successfuly. +// +// Use "Send" method on the returned Request to send the API call to the service. +// the "output" return value is not valid until after Send returns without error. +// +// See ResumeSession for more information on using the ResumeSession +// API call, and error handling. +// +// This method is useful when you want to inject custom logic or configuration +// into the SDK's request lifecycle. Such as custom headers, or retry logic. +// +// +// // Example sending a request using the ResumeSessionRequest method. +// req, resp := client.ResumeSessionRequest(params) +// +// err := req.Send() +// if err == nil { // resp is now filled +// fmt.Println(resp) +// } +// +// See also, https://docs.aws.amazon.com/goto/WebAPI/ssm-2014-11-06/ResumeSession +func (c *SSM) ResumeSessionRequest(input *ResumeSessionInput) (req *request.Request, output *ResumeSessionOutput) { + op := &request.Operation{ + Name: opResumeSession, + HTTPMethod: "POST", + HTTPPath: "/", + } + + if input == nil { + input = &ResumeSessionInput{} + } + + output = &ResumeSessionOutput{} + req = c.newRequest(op, input, output) + return +} + +// ResumeSession API operation for Amazon Simple Systems Manager (SSM). +// +// Reconnects a session to an instance after it has been disconnected. Connections +// can be resumed for disconnected sessions, but not terminated sessions. +// +// This command is primarily for use by client machines to automatically reconnect +// during intermittent network issues. It is not intended for any other use. +// +// Returns awserr.Error for service API and SDK errors. Use runtime type assertions +// with awserr.Error's Code and Message methods to get detailed information about +// the error. +// +// See the AWS API reference guide for Amazon Simple Systems Manager (SSM)'s +// API operation ResumeSession for usage and error information. +// +// Returned Error Codes: +// * ErrCodeDoesNotExistException "DoesNotExistException" +// Error returned when the ID specified for a resource, such as a Maintenance +// Window or Patch baseline, doesn't exist. +// +// For information about resource limits in Systems Manager, see AWS Systems +// Manager Limits (http://docs.aws.amazon.com/general/latest/gr/aws_service_limits.html#limits_ssm). +// +// * ErrCodeInternalServerError "InternalServerError" +// An error occurred on the server side. +// +// See also, https://docs.aws.amazon.com/goto/WebAPI/ssm-2014-11-06/ResumeSession +func (c *SSM) ResumeSession(input *ResumeSessionInput) (*ResumeSessionOutput, error) { + req, out := c.ResumeSessionRequest(input) + return out, req.Send() +} + +// ResumeSessionWithContext is the same as ResumeSession with the addition of +// the ability to pass a context and additional request options. +// +// See ResumeSession for details on how to use this API operation. +// +// The context must be non-nil and will be used for request cancellation. If +// the context is nil a panic will occur. In the future the SDK may create +// sub-contexts for http.Requests. See https://golang.org/pkg/context/ +// for more information on using Contexts. +func (c *SSM) ResumeSessionWithContext(ctx aws.Context, input *ResumeSessionInput, opts ...request.Option) (*ResumeSessionOutput, error) { + req, out := c.ResumeSessionRequest(input) + req.SetContext(ctx) + req.ApplyOptions(opts...) + return out, req.Send() +} + const opSendAutomationSignal = "SendAutomationSignal" // SendAutomationSignalRequest generates a "aws/request.Request" representing the @@ -9081,6 +9465,102 @@ func (c *SSM) StartAutomationExecutionWithContext(ctx aws.Context, input *StartA return out, req.Send() } +const opStartSession = "StartSession" + +// StartSessionRequest generates a "aws/request.Request" representing the +// client's request for the StartSession operation. The "output" return +// value will be populated with the request's response once the request completes +// successfuly. +// +// Use "Send" method on the returned Request to send the API call to the service. +// the "output" return value is not valid until after Send returns without error. +// +// See StartSession for more information on using the StartSession +// API call, and error handling. +// +// This method is useful when you want to inject custom logic or configuration +// into the SDK's request lifecycle. Such as custom headers, or retry logic. +// +// +// // Example sending a request using the StartSessionRequest method. +// req, resp := client.StartSessionRequest(params) +// +// err := req.Send() +// if err == nil { // resp is now filled +// fmt.Println(resp) +// } +// +// See also, https://docs.aws.amazon.com/goto/WebAPI/ssm-2014-11-06/StartSession +func (c *SSM) StartSessionRequest(input *StartSessionInput) (req *request.Request, output *StartSessionOutput) { + op := &request.Operation{ + Name: opStartSession, + HTTPMethod: "POST", + HTTPPath: "/", + } + + if input == nil { + input = &StartSessionInput{} + } + + output = &StartSessionOutput{} + req = c.newRequest(op, input, output) + return +} + +// StartSession API operation for Amazon Simple Systems Manager (SSM). +// +// Initiates a connection to a target (for example, an instance) for a Session +// Manager session. Returns a URL and token that can be used to open a WebSocket +// connection for sending input and receiving outputs. +// +// AWS CLI usage: start-session is an interactive command that requires the +// Session Manager plugin to be installed on the client machine making the call. +// For information, see Install the Session Manager Plugin for the AWS CLI +// (http://docs.aws.amazon.com/systems-manager/latest/userguide/session-manager-working-with-install-plugin.html) +// in the AWS Systems Manager User Guide. +// +// Returns awserr.Error for service API and SDK errors. Use runtime type assertions +// with awserr.Error's Code and Message methods to get detailed information about +// the error. +// +// See the AWS API reference guide for Amazon Simple Systems Manager (SSM)'s +// API operation StartSession for usage and error information. +// +// Returned Error Codes: +// * ErrCodeInvalidDocument "InvalidDocument" +// The specified document does not exist. +// +// * ErrCodeTargetNotConnected "TargetNotConnected" +// The specified target instance for the session is not fully configured for +// use with Session Manager. For more information, see Getting Started with +// Session Manager (http://docs.aws.amazon.com/systems-manager/latest/userguide/session-manager-getting-started.html) +// in the AWS Systems Manager User Guide. +// +// * ErrCodeInternalServerError "InternalServerError" +// An error occurred on the server side. +// +// See also, https://docs.aws.amazon.com/goto/WebAPI/ssm-2014-11-06/StartSession +func (c *SSM) StartSession(input *StartSessionInput) (*StartSessionOutput, error) { + req, out := c.StartSessionRequest(input) + return out, req.Send() +} + +// StartSessionWithContext is the same as StartSession with the addition of +// the ability to pass a context and additional request options. +// +// See StartSession for details on how to use this API operation. +// +// The context must be non-nil and will be used for request cancellation. If +// the context is nil a panic will occur. In the future the SDK may create +// sub-contexts for http.Requests. See https://golang.org/pkg/context/ +// for more information on using Contexts. +func (c *SSM) StartSessionWithContext(ctx aws.Context, input *StartSessionInput, opts ...request.Option) (*StartSessionOutput, error) { + req, out := c.StartSessionRequest(input) + req.SetContext(ctx) + req.ApplyOptions(opts...) + return out, req.Send() +} + const opStopAutomationExecution = "StopAutomationExecution" // StopAutomationExecutionRequest generates a "aws/request.Request" representing the @@ -9167,6 +9647,94 @@ func (c *SSM) StopAutomationExecutionWithContext(ctx aws.Context, input *StopAut return out, req.Send() } +const opTerminateSession = "TerminateSession" + +// TerminateSessionRequest generates a "aws/request.Request" representing the +// client's request for the TerminateSession operation. The "output" return +// value will be populated with the request's response once the request completes +// successfuly. +// +// Use "Send" method on the returned Request to send the API call to the service. +// the "output" return value is not valid until after Send returns without error. +// +// See TerminateSession for more information on using the TerminateSession +// API call, and error handling. +// +// This method is useful when you want to inject custom logic or configuration +// into the SDK's request lifecycle. Such as custom headers, or retry logic. +// +// +// // Example sending a request using the TerminateSessionRequest method. +// req, resp := client.TerminateSessionRequest(params) +// +// err := req.Send() +// if err == nil { // resp is now filled +// fmt.Println(resp) +// } +// +// See also, https://docs.aws.amazon.com/goto/WebAPI/ssm-2014-11-06/TerminateSession +func (c *SSM) TerminateSessionRequest(input *TerminateSessionInput) (req *request.Request, output *TerminateSessionOutput) { + op := &request.Operation{ + Name: opTerminateSession, + HTTPMethod: "POST", + HTTPPath: "/", + } + + if input == nil { + input = &TerminateSessionInput{} + } + + output = &TerminateSessionOutput{} + req = c.newRequest(op, input, output) + return +} + +// TerminateSession API operation for Amazon Simple Systems Manager (SSM). +// +// Permanently ends a session and closes the data connection between the Session +// Manager client and SSM Agent on the instance. A terminated session cannot +// be resumed. +// +// Returns awserr.Error for service API and SDK errors. Use runtime type assertions +// with awserr.Error's Code and Message methods to get detailed information about +// the error. +// +// See the AWS API reference guide for Amazon Simple Systems Manager (SSM)'s +// API operation TerminateSession for usage and error information. +// +// Returned Error Codes: +// * ErrCodeDoesNotExistException "DoesNotExistException" +// Error returned when the ID specified for a resource, such as a Maintenance +// Window or Patch baseline, doesn't exist. +// +// For information about resource limits in Systems Manager, see AWS Systems +// Manager Limits (http://docs.aws.amazon.com/general/latest/gr/aws_service_limits.html#limits_ssm). +// +// * ErrCodeInternalServerError "InternalServerError" +// An error occurred on the server side. +// +// See also, https://docs.aws.amazon.com/goto/WebAPI/ssm-2014-11-06/TerminateSession +func (c *SSM) TerminateSession(input *TerminateSessionInput) (*TerminateSessionOutput, error) { + req, out := c.TerminateSessionRequest(input) + return out, req.Send() +} + +// TerminateSessionWithContext is the same as TerminateSession with the addition of +// the ability to pass a context and additional request options. +// +// See TerminateSession for details on how to use this API operation. +// +// The context must be non-nil and will be used for request cancellation. If +// the context is nil a panic will occur. In the future the SDK may create +// sub-contexts for http.Requests. See https://golang.org/pkg/context/ +// for more information on using Contexts. +func (c *SSM) TerminateSessionWithContext(ctx aws.Context, input *TerminateSessionInput, opts ...request.Option) (*TerminateSessionOutput, error) { + req, out := c.TerminateSessionRequest(input) + req.SetContext(ctx) + req.ApplyOptions(opts...) + return out, req.Send() +} + const opUpdateAssociation = "UpdateAssociation" // UpdateAssociationRequest generates a "aws/request.Request" representing the @@ -11212,6 +11780,9 @@ type AutomationExecution struct { // The target of the execution. Target *string `type:"string"` + // The specified key-value mapping of document parameters to target resources. + TargetMaps []map[string][]*string `type:"list"` + // The parameter name. TargetParameterName *string `min:"1" type:"string"` @@ -11349,6 +11920,12 @@ func (s *AutomationExecution) SetTarget(v string) *AutomationExecution { return s } +// SetTargetMaps sets the TargetMaps field's value. +func (s *AutomationExecution) SetTargetMaps(v []map[string][]*string) *AutomationExecution { + s.TargetMaps = v + return s +} + // SetTargetParameterName sets the TargetParameterName field's value. func (s *AutomationExecution) SetTargetParameterName(v string) *AutomationExecution { s.TargetParameterName = &v @@ -11481,6 +12058,9 @@ type AutomationExecutionMetadata struct { // The list of execution outputs as defined in the Automation document. Target *string `type:"string"` + // The specified key-value mapping of document parameters to target resources. + TargetMaps []map[string][]*string `type:"list"` + // The list of execution outputs as defined in the Automation document. TargetParameterName *string `min:"1" type:"string"` @@ -11606,6 +12186,12 @@ func (s *AutomationExecutionMetadata) SetTarget(v string) *AutomationExecutionMe return s } +// SetTargetMaps sets the TargetMaps field's value. +func (s *AutomationExecutionMetadata) SetTargetMaps(v []map[string][]*string) *AutomationExecutionMetadata { + s.TargetMaps = v + return s +} + // SetTargetParameterName sets the TargetParameterName field's value. func (s *AutomationExecutionMetadata) SetTargetParameterName(v string) *AutomationExecutionMetadata { s.TargetParameterName = &v @@ -12022,7 +12608,44 @@ type CommandFilter struct { // Key is a required field Key *string `locationName:"key" type:"string" required:"true" enum:"CommandFilterKey"` - // The filter value. + // The filter value. Valid values for each filter key are as follows: + // + // * InvokedAfter: A timestamp to limit your results. For example, specify + // 2018-07-07T00:00:00Z to see results occurring July 7, 2018, and later. + // + // * InvokedBefore: A timestamp to limit your results. For example, specify + // 2018-07-07T00:00:00Z to see results before July 7, 2018. + // + // * Status: Specify a valid command status to see a list of all command + // executions with that status. Status values you can specify include: + // + // Pending + // + // InProgress + // + // Success + // + // Cancelled + // + // Failed + // + // TimedOut + // + // Cancelling + // + // * DocumentName: The name of the SSM document for which you want to see + // command results. + // + // For example, specify AWS-RunPatchBaseline to see command executions that + // used this SSM document to perform security patching operations on instances. + // + // + // * ExecutionStage: An enum whose value can be either Executing or Complete. + // + // Specify Executing to see a list of command executions that are currently + // still running. + // + // Specify Complete to see a list of command exeuctions that have already completed. // // Value is a required field Value *string `locationName:"value" min:"1" type:"string" required:"true"` @@ -13667,6 +14290,21 @@ type CreatePatchBaselineInput struct { // in the AWS Systems Manager User Guide. RejectedPatches []*string `type:"list"` + // The action for Patch Manager to take on patches included in the RejectedPackages + // list. + // + // * ALLOW_AS_DEPENDENCY: A package in the Rejected patches list is installed + // only if it is a dependency of another package. It is considered compliant + // with the patch baseline, and its status is reported as InstalledOther. + // This is the default action if no option is specified. + // + // * BLOCK: Packages in the RejectedPatches list, and packages that include + // them as dependencies, are not installed under any circumstances. If a + // package was installed before it was added to the Rejected patches list, + // it is considered non-compliant with the patch baseline, and its status + // is reported as InstalledRejected. + RejectedPatchesAction *string `type:"string" enum:"PatchAction"` + // Information about the patches to use to update the instances, including target // operating systems and source repositories. Applies to Linux instances only. Sources []*PatchSource `type:"list"` @@ -13784,6 +14422,12 @@ func (s *CreatePatchBaselineInput) SetRejectedPatches(v []*string) *CreatePatchB return s } +// SetRejectedPatchesAction sets the RejectedPatchesAction field's value. +func (s *CreatePatchBaselineInput) SetRejectedPatchesAction(v string) *CreatePatchBaselineInput { + s.RejectedPatchesAction = &v + return s +} + // SetSources sets the Sources field's value. func (s *CreatePatchBaselineInput) SetSources(v []*PatchSource) *CreatePatchBaselineInput { s.Sources = v @@ -16054,7 +16698,14 @@ type DescribeInstanceInformationInput struct { // One or more filters. Use a filter to return a more specific list of instances. Filters []*InstanceInformationStringFilter `type:"list"` - // One or more filters. Use a filter to return a more specific list of instances. + // This is a legacy method. We recommend that you don't use this method. Instead, + // use the InstanceInformationFilter action. The InstanceInformationFilter action + // enables you to return instance information by using tags that are specified + // as a key-value mapping. + // + // If you do use this method, then you can't use the InstanceInformationFilter + // action. Using this method and the InstanceInformationFilter action causes + // an exception error. InstanceInformationFilterList []*InstanceInformationFilter `type:"list"` // The maximum number of items to return for this call. The call also returns @@ -17600,6 +18251,14 @@ type DescribePatchGroupStateOutput struct { // The number of instances with installed patches. InstancesWithInstalledPatches *int64 `type:"integer"` + // The number of instances with patches installed that are specified in a RejectedPatches + // list. Patches with a status of InstalledRejected were typically installed + // before they were added to a RejectedPatches list. + // + // If ALLOW_AS_DEPENDENCY is the specified option for RejectedPatchesAction, + // the value of InstancesWithInstalledRejectedPatches will always be 0 (zero). + InstancesWithInstalledRejectedPatches *int64 `type:"integer"` + // The number of instances with missing patches from the patch baseline. InstancesWithMissingPatches *int64 `type:"integer"` @@ -17641,6 +18300,12 @@ func (s *DescribePatchGroupStateOutput) SetInstancesWithInstalledPatches(v int64 return s } +// SetInstancesWithInstalledRejectedPatches sets the InstancesWithInstalledRejectedPatches field's value. +func (s *DescribePatchGroupStateOutput) SetInstancesWithInstalledRejectedPatches(v int64) *DescribePatchGroupStateOutput { + s.InstancesWithInstalledRejectedPatches = &v + return s +} + // SetInstancesWithMissingPatches sets the InstancesWithMissingPatches field's value. func (s *DescribePatchGroupStateOutput) SetInstancesWithMissingPatches(v int64) *DescribePatchGroupStateOutput { s.InstancesWithMissingPatches = &v @@ -17755,6 +18420,123 @@ func (s *DescribePatchGroupsOutput) SetNextToken(v string) *DescribePatchGroupsO return s } +type DescribeSessionsInput struct { + _ struct{} `type:"structure"` + + // One or more filters to limit the type of sessions returned by the request. + Filters []*SessionFilter `min:"1" type:"list"` + + // The maximum number of items to return for this call. The call also returns + // a token that you can specify in a subsequent call to get the next set of + // results. + MaxResults *int64 `min:"1" type:"integer"` + + // The token for the next set of items to return. (You received this token from + // a previous call.) + NextToken *string `type:"string"` + + // The session status to retrieve a list of sessions for. For example, "Active". + // + // State is a required field + State *string `type:"string" required:"true" enum:"SessionState"` +} + +// String returns the string representation +func (s DescribeSessionsInput) String() string { + return awsutil.Prettify(s) +} + +// GoString returns the string representation +func (s DescribeSessionsInput) GoString() string { + return s.String() +} + +// Validate inspects the fields of the type to determine if they are valid. +func (s *DescribeSessionsInput) Validate() error { + invalidParams := request.ErrInvalidParams{Context: "DescribeSessionsInput"} + if s.Filters != nil && len(s.Filters) < 1 { + invalidParams.Add(request.NewErrParamMinLen("Filters", 1)) + } + if s.MaxResults != nil && *s.MaxResults < 1 { + invalidParams.Add(request.NewErrParamMinValue("MaxResults", 1)) + } + if s.State == nil { + invalidParams.Add(request.NewErrParamRequired("State")) + } + if s.Filters != nil { + for i, v := range s.Filters { + if v == nil { + continue + } + if err := v.Validate(); err != nil { + invalidParams.AddNested(fmt.Sprintf("%s[%v]", "Filters", i), err.(request.ErrInvalidParams)) + } + } + } + + if invalidParams.Len() > 0 { + return invalidParams + } + return nil +} + +// SetFilters sets the Filters field's value. +func (s *DescribeSessionsInput) SetFilters(v []*SessionFilter) *DescribeSessionsInput { + s.Filters = v + return s +} + +// SetMaxResults sets the MaxResults field's value. +func (s *DescribeSessionsInput) SetMaxResults(v int64) *DescribeSessionsInput { + s.MaxResults = &v + return s +} + +// SetNextToken sets the NextToken field's value. +func (s *DescribeSessionsInput) SetNextToken(v string) *DescribeSessionsInput { + s.NextToken = &v + return s +} + +// SetState sets the State field's value. +func (s *DescribeSessionsInput) SetState(v string) *DescribeSessionsInput { + s.State = &v + return s +} + +type DescribeSessionsOutput struct { + _ struct{} `type:"structure"` + + // The token for the next set of items to return. (You received this token from + // a previous call.) + NextToken *string `type:"string"` + + // A list of sessions meeting the request parameters. + Sessions []*Session `type:"list"` +} + +// String returns the string representation +func (s DescribeSessionsOutput) String() string { + return awsutil.Prettify(s) +} + +// GoString returns the string representation +func (s DescribeSessionsOutput) GoString() string { + return s.String() +} + +// SetNextToken sets the NextToken field's value. +func (s *DescribeSessionsOutput) SetNextToken(v string) *DescribeSessionsOutput { + s.NextToken = &v + return s +} + +// SetSessions sets the Sessions field's value. +func (s *DescribeSessionsOutput) SetSessions(v []*Session) *DescribeSessionsOutput { + s.Sessions = v + return s +} + // A default version of a document. type DocumentDefaultVersionDescription struct { _ struct{} `type:"structure"` @@ -18811,6 +19593,80 @@ func (s *GetCommandInvocationOutput) SetStatusDetails(v string) *GetCommandInvoc return s } +type GetConnectionStatusInput struct { + _ struct{} `type:"structure"` + + // The ID of the instance. + // + // Target is a required field + Target *string `min:"1" type:"string" required:"true"` +} + +// String returns the string representation +func (s GetConnectionStatusInput) String() string { + return awsutil.Prettify(s) +} + +// GoString returns the string representation +func (s GetConnectionStatusInput) GoString() string { + return s.String() +} + +// Validate inspects the fields of the type to determine if they are valid. +func (s *GetConnectionStatusInput) Validate() error { + invalidParams := request.ErrInvalidParams{Context: "GetConnectionStatusInput"} + if s.Target == nil { + invalidParams.Add(request.NewErrParamRequired("Target")) + } + if s.Target != nil && len(*s.Target) < 1 { + invalidParams.Add(request.NewErrParamMinLen("Target", 1)) + } + + if invalidParams.Len() > 0 { + return invalidParams + } + return nil +} + +// SetTarget sets the Target field's value. +func (s *GetConnectionStatusInput) SetTarget(v string) *GetConnectionStatusInput { + s.Target = &v + return s +} + +type GetConnectionStatusOutput struct { + _ struct{} `type:"structure"` + + // The status of the connection to the instance. For example, 'Connected' or + // 'Not Connected'. + Status *string `type:"string" enum:"ConnectionStatus"` + + // The ID of the instance to check connection status. + Target *string `min:"1" type:"string"` +} + +// String returns the string representation +func (s GetConnectionStatusOutput) String() string { + return awsutil.Prettify(s) +} + +// GoString returns the string representation +func (s GetConnectionStatusOutput) GoString() string { + return s.String() +} + +// SetStatus sets the Status field's value. +func (s *GetConnectionStatusOutput) SetStatus(v string) *GetConnectionStatusOutput { + s.Status = &v + return s +} + +// SetTarget sets the Target field's value. +func (s *GetConnectionStatusOutput) SetTarget(v string) *GetConnectionStatusOutput { + s.Target = &v + return s +} + type GetDefaultPatchBaselineInput struct { _ struct{} `type:"structure"` @@ -20810,6 +21666,11 @@ type GetPatchBaselineOutput struct { // A list of explicitly rejected patches for the baseline. RejectedPatches []*string `type:"list"` + // The action specified to take on patches included in the RejectedPatches list. + // A patch can be allowed only if it is a dependency of another package, or + // blocked entirely along with packages that include it as a dependency. + RejectedPatchesAction *string `type:"string" enum:"PatchAction"` + // Information about the patches to use to update the instances, including target // operating systems and source repositories. Applies to Linux instances only. Sources []*PatchSource `type:"list"` @@ -20903,6 +21764,12 @@ func (s *GetPatchBaselineOutput) SetRejectedPatches(v []*string) *GetPatchBaseli return s } +// SetRejectedPatchesAction sets the RejectedPatchesAction field's value. +func (s *GetPatchBaselineOutput) SetRejectedPatchesAction(v string) *GetPatchBaselineOutput { + s.RejectedPatchesAction = &v + return s +} + // SetSources sets the Sources field's value. func (s *GetPatchBaselineOutput) SetSources(v []*PatchSource) *GetPatchBaselineOutput { s.Sources = v @@ -21371,7 +22238,12 @@ func (s *InstanceInformation) SetResourceType(v string) *InstanceInformation { return s } -// Describes a filter for a specific list of instances. +// Describes a filter for a specific list of instances. You can filter instances +// information by using tags. You specify tags by using a key-value mapping. +// +// Use this action instead of the DescribeInstanceInformationRequest$InstanceInformationFilterList +// method. The InstanceInformationFilterList method is a legacy method and does +// not support tags. type InstanceInformationFilter struct { _ struct{} `type:"structure"` @@ -21505,6 +22377,16 @@ type InstancePatchState struct { // during the last patching operation, but failed to install. FailedCount *int64 `type:"integer"` + // An https URL or an Amazon S3 path-style URL to a list of patches to be installed. + // This patch installation list, which you maintain in an Amazon S3 bucket in + // YAML format and specify in the SSM document AWS-RunPatchBaseline, overrides + // the patches specified by the default patch baseline. + // + // For more information about the InstallOverrideList parameter, see About the + // SSM Document AWS-RunPatchBaseline (http://docs.aws.amazon.com/systems-manager/latest/userguide/patch-manager-about-aws-runpatchbaseline.html) + // in the AWS Systems Manager User Guide. + InstallOverrideList *string `min:"1" type:"string"` + // The number of patches from the patch baseline that are installed on the instance. InstalledCount *int64 `type:"integer"` @@ -21512,6 +22394,14 @@ type InstancePatchState struct { // on the instance. InstalledOtherCount *int64 `type:"integer"` + // The number of instances with patches installed that are specified in a RejectedPatches + // list. Patches with a status of InstalledRejected were typically installed + // before they were added to a RejectedPatches list. + // + // If ALLOW_AS_DEPENDENCY is the specified option for RejectedPatchesAction, + // the value of InstalledRejectedCount will always be 0 (zero). + InstalledRejectedCount *int64 `type:"integer"` + // The ID of the managed instance the high-level patch compliance information // was collected for. // @@ -21578,6 +22468,12 @@ func (s *InstancePatchState) SetFailedCount(v int64) *InstancePatchState { return s } +// SetInstallOverrideList sets the InstallOverrideList field's value. +func (s *InstancePatchState) SetInstallOverrideList(v string) *InstancePatchState { + s.InstallOverrideList = &v + return s +} + // SetInstalledCount sets the InstalledCount field's value. func (s *InstancePatchState) SetInstalledCount(v int64) *InstancePatchState { s.InstalledCount = &v @@ -21590,6 +22486,12 @@ func (s *InstancePatchState) SetInstalledOtherCount(v int64) *InstancePatchState return s } +// SetInstalledRejectedCount sets the InstalledRejectedCount field's value. +func (s *InstancePatchState) SetInstalledRejectedCount(v int64) *InstancePatchState { + s.InstalledRejectedCount = &v + return s +} + // SetInstanceId sets the InstanceId field's value. func (s *InstancePatchState) SetInstanceId(v string) *InstancePatchState { s.InstanceId = &v @@ -21729,6 +22631,11 @@ type InventoryAggregator struct { // The inventory type and attribute name for aggregation. Expression *string `min:"1" type:"string"` + + // A user-defined set of one or more filters on which to aggregate inventory + // data. Groups return a count of resources that match and don't match the specified + // criteria. + Groups []*InventoryGroup `min:"1" type:"list"` } // String returns the string representation @@ -21750,6 +22657,9 @@ func (s *InventoryAggregator) Validate() error { if s.Expression != nil && len(*s.Expression) < 1 { invalidParams.Add(request.NewErrParamMinLen("Expression", 1)) } + if s.Groups != nil && len(s.Groups) < 1 { + invalidParams.Add(request.NewErrParamMinLen("Groups", 1)) + } if s.Aggregators != nil { for i, v := range s.Aggregators { if v == nil { @@ -21760,6 +22670,16 @@ func (s *InventoryAggregator) Validate() error { } } } + if s.Groups != nil { + for i, v := range s.Groups { + if v == nil { + continue + } + if err := v.Validate(); err != nil { + invalidParams.AddNested(fmt.Sprintf("%s[%v]", "Groups", i), err.(request.ErrInvalidParams)) + } + } + } if invalidParams.Len() > 0 { return invalidParams @@ -21779,6 +22699,12 @@ func (s *InventoryAggregator) SetExpression(v string) *InventoryAggregator { return s } +// SetGroups sets the Groups field's value. +func (s *InventoryAggregator) SetGroups(v []*InventoryGroup) *InventoryAggregator { + s.Groups = v + return s +} + // Status information returned by the DeleteInventory action. type InventoryDeletionStatusItem struct { _ struct{} `type:"structure"` @@ -22015,6 +22941,79 @@ func (s *InventoryFilter) SetValues(v []*string) *InventoryFilter { return s } +// A user-defined set of one or more filters on which to aggregate inventory +// data. Groups return a count of resources that match and don't match the specified +// criteria. +type InventoryGroup struct { + _ struct{} `type:"structure"` + + // Filters define the criteria for the group. The matchingCount field displays + // the number of resources that match the criteria. The notMatchingCount field + // displays the number of resources that don't match the criteria. + // + // Filters is a required field + Filters []*InventoryFilter `min:"1" type:"list" required:"true"` + + // The name of the group. + // + // Name is a required field + Name *string `min:"1" type:"string" required:"true"` +} + +// String returns the string representation +func (s InventoryGroup) String() string { + return awsutil.Prettify(s) +} + +// GoString returns the string representation +func (s InventoryGroup) GoString() string { + return s.String() +} + +// Validate inspects the fields of the type to determine if they are valid. +func (s *InventoryGroup) Validate() error { + invalidParams := request.ErrInvalidParams{Context: "InventoryGroup"} + if s.Filters == nil { + invalidParams.Add(request.NewErrParamRequired("Filters")) + } + if s.Filters != nil && len(s.Filters) < 1 { + invalidParams.Add(request.NewErrParamMinLen("Filters", 1)) + } + if s.Name == nil { + invalidParams.Add(request.NewErrParamRequired("Name")) + } + if s.Name != nil && len(*s.Name) < 1 { + invalidParams.Add(request.NewErrParamMinLen("Name", 1)) + } + if s.Filters != nil { + for i, v := range s.Filters { + if v == nil { + continue + } + if err := v.Validate(); err != nil { + invalidParams.AddNested(fmt.Sprintf("%s[%v]", "Filters", i), err.(request.ErrInvalidParams)) + } + } + } + + if invalidParams.Len() > 0 { + return invalidParams + } + return nil +} + +// SetFilters sets the Filters field's value. +func (s *InventoryGroup) SetFilters(v []*InventoryFilter) *InventoryGroup { + s.Filters = v + return s +} + +// SetName sets the Name field's value. +func (s *InventoryGroup) SetName(v string) *InventoryGroup { + s.Name = &v + return s +} + // Information collected from managed instances based on your inventory policy // document type InventoryItem struct { @@ -22325,6 +23324,100 @@ func (s *InventoryResultItem) SetTypeName(v string) *InventoryResultItem { return s } +type LabelParameterVersionInput struct { + _ struct{} `type:"structure"` + + // One or more labels to attach to the specified parameter version. + // + // Labels is a required field + Labels []*string `min:"1" type:"list" required:"true"` + + // The parameter name on which you want to attach one or more labels. + // + // Name is a required field + Name *string `min:"1" type:"string" required:"true"` + + // The specific version of the parameter on which you want to attach one or + // more labels. If no version is specified, the system attaches the label to + // the latest version.) + ParameterVersion *int64 `type:"long"` +} + +// String returns the string representation +func (s LabelParameterVersionInput) String() string { + return awsutil.Prettify(s) +} + +// GoString returns the string representation +func (s LabelParameterVersionInput) GoString() string { + return s.String() +} + +// Validate inspects the fields of the type to determine if they are valid. +func (s *LabelParameterVersionInput) Validate() error { + invalidParams := request.ErrInvalidParams{Context: "LabelParameterVersionInput"} + if s.Labels == nil { + invalidParams.Add(request.NewErrParamRequired("Labels")) + } + if s.Labels != nil && len(s.Labels) < 1 { + invalidParams.Add(request.NewErrParamMinLen("Labels", 1)) + } + if s.Name == nil { + invalidParams.Add(request.NewErrParamRequired("Name")) + } + if s.Name != nil && len(*s.Name) < 1 { + invalidParams.Add(request.NewErrParamMinLen("Name", 1)) + } + + if invalidParams.Len() > 0 { + return invalidParams + } + return nil +} + +// SetLabels sets the Labels field's value. +func (s *LabelParameterVersionInput) SetLabels(v []*string) *LabelParameterVersionInput { + s.Labels = v + return s +} + +// SetName sets the Name field's value. +func (s *LabelParameterVersionInput) SetName(v string) *LabelParameterVersionInput { + s.Name = &v + return s +} + +// SetParameterVersion sets the ParameterVersion field's value. +func (s *LabelParameterVersionInput) SetParameterVersion(v int64) *LabelParameterVersionInput { + s.ParameterVersion = &v + return s +} + +type LabelParameterVersionOutput struct { + _ struct{} `type:"structure"` + + // The label does not meet the requirements. For information about parameter + // label requirements, see Labeling Parameters (http://docs.aws.amazon.com/systems-manager/latest/userguide/sysman-paramstore-labels.html) + // in the AWS Systems Manager User Guide. + InvalidLabels []*string `min:"1" type:"list"` +} + +// String returns the string representation +func (s LabelParameterVersionOutput) String() string { + return awsutil.Prettify(s) +} + +// GoString returns the string representation +func (s LabelParameterVersionOutput) GoString() string { + return s.String() +} + +// SetInvalidLabels sets the InvalidLabels field's value. +func (s *LabelParameterVersionOutput) SetInvalidLabels(v []*string) *LabelParameterVersionOutput { + s.InvalidLabels = v + return s +} + type ListAssociationVersionsInput struct { _ struct{} `type:"structure"` @@ -25011,9 +26104,28 @@ func (s *OutputSource) SetOutputSourceType(v string) *OutputSource { type Parameter struct { _ struct{} `type:"structure"` + // The Amazon Resource Name (ARN) of the parameter. + ARN *string `type:"string"` + + // Date the parameter was last changed or updated and the parameter version + // was created. + LastModifiedDate *time.Time `type:"timestamp"` + // The name of the parameter. Name *string `min:"1" type:"string"` + // Either the version number or the label used to retrieve the parameter value. + // Specify selectors by using one of the following formats: + // + // parameter_name:version + // + // parameter_name:label + Selector *string `type:"string"` + + // Applies to parameters that reference information in other AWS services. SourceResult + // is the raw result or response from the source. + SourceResult *string `type:"string"` + // The type of parameter. Valid values include the following: String, String // list, Secure string. Type *string `type:"string" enum:"ParameterType"` @@ -25035,12 +26147,36 @@ func (s Parameter) GoString() string { return s.String() } +// SetARN sets the ARN field's value. +func (s *Parameter) SetARN(v string) *Parameter { + s.ARN = &v + return s +} + +// SetLastModifiedDate sets the LastModifiedDate field's value. +func (s *Parameter) SetLastModifiedDate(v time.Time) *Parameter { + s.LastModifiedDate = &v + return s +} + // SetName sets the Name field's value. func (s *Parameter) SetName(v string) *Parameter { s.Name = &v return s } +// SetSelector sets the Selector field's value. +func (s *Parameter) SetSelector(v string) *Parameter { + s.Selector = &v + return s +} + +// SetSourceResult sets the SourceResult field's value. +func (s *Parameter) SetSourceResult(v string) *Parameter { + s.SourceResult = &v + return s +} + // SetType sets the Type field's value. func (s *Parameter) SetType(v string) *Parameter { s.Type = &v @@ -25074,6 +26210,9 @@ type ParameterHistory struct { // The ID of the query key used for this parameter. KeyId *string `min:"1" type:"string"` + // Labels assigned to the parameter version. + Labels []*string `min:"1" type:"list"` + // Date the parameter was last changed or updated. LastModifiedDate *time.Time `type:"timestamp"` @@ -25121,6 +26260,12 @@ func (s *ParameterHistory) SetKeyId(v string) *ParameterHistory { return s } +// SetLabels sets the Labels field's value. +func (s *ParameterHistory) SetLabels(v []*string) *ParameterHistory { + s.Labels = v + return s +} + // SetLastModifiedDate sets the LastModifiedDate field's value. func (s *ParameterHistory) SetLastModifiedDate(v time.Time) *ParameterHistory { s.LastModifiedDate = &v @@ -27288,10 +28433,20 @@ type RegisterTaskWithMaintenanceWindowInput struct { // order with tasks that have the same priority scheduled in parallel. Priority *int64 `type:"integer"` - // The role that should be assumed when executing the task. + // The role to assume when running the Maintenance Window task. // - // ServiceRoleArn is a required field - ServiceRoleArn *string `type:"string" required:"true"` + // If you do not specify a service role ARN, Systems Manager will use your account's + // service-linked role for Systems Manager by default. If no service-linked + // role for Systems Manager exists in your account, it will be created when + // you run RegisterTaskWithMaintenanceWindow without specifying a service role + // ARN. + // + // For more information, see Service-Linked Role Permissions for Systems Manager + // (http://docs.aws.amazon.com/systems-manager/latest/userguide/using-service-linked-roles.html#slr-permissions) + // and Should I Use a Service-Linked Role or a Custom Service Role to Run Maintenance + // Window Tasks? (http://docs.aws.amazon.com/systems-manager/latest/userguide/sysman-maintenance-permissions.html#maintenance-window-tasks-service-role) + // in the AWS Systems Manager User Guide. + ServiceRoleArn *string `type:"string"` // The targets (either instances or Maintenance Window targets). // @@ -27368,9 +28523,6 @@ func (s *RegisterTaskWithMaintenanceWindowInput) Validate() error { if s.Name != nil && len(*s.Name) < 3 { invalidParams.Add(request.NewErrParamMinLen("Name", 3)) } - if s.ServiceRoleArn == nil { - invalidParams.Add(request.NewErrParamRequired("ServiceRoleArn")) - } if s.Targets == nil { invalidParams.Add(request.NewErrParamRequired("Targets")) } @@ -27962,6 +29114,98 @@ func (s *ResultAttribute) SetTypeName(v string) *ResultAttribute { return s } +type ResumeSessionInput struct { + _ struct{} `type:"structure"` + + // The ID of the disconnected session to resume. + // + // SessionId is a required field + SessionId *string `min:"1" type:"string" required:"true"` +} + +// String returns the string representation +func (s ResumeSessionInput) String() string { + return awsutil.Prettify(s) +} + +// GoString returns the string representation +func (s ResumeSessionInput) GoString() string { + return s.String() +} + +// Validate inspects the fields of the type to determine if they are valid. +func (s *ResumeSessionInput) Validate() error { + invalidParams := request.ErrInvalidParams{Context: "ResumeSessionInput"} + if s.SessionId == nil { + invalidParams.Add(request.NewErrParamRequired("SessionId")) + } + if s.SessionId != nil && len(*s.SessionId) < 1 { + invalidParams.Add(request.NewErrParamMinLen("SessionId", 1)) + } + + if invalidParams.Len() > 0 { + return invalidParams + } + return nil +} + +// SetSessionId sets the SessionId field's value. +func (s *ResumeSessionInput) SetSessionId(v string) *ResumeSessionInput { + s.SessionId = &v + return s +} + +type ResumeSessionOutput struct { + _ struct{} `type:"structure"` + + // The ID of the session. + SessionId *string `min:"1" type:"string"` + + // A URL back to SSM Agent on the instance that the Session Manager client uses + // to send commands and receive output from the instance. Format: wss://ssm-messages.region.amazonaws.com/v1/data-channel/session-id?stream=(input|output). + // + // region represents the Region identifier for an AWS Region supported by AWS + // Systems Manager, such as us-east-2 for the US East (Ohio) Region. For a list + // of supported region values, see the Region column in the AWS Systems Manager + // table of regions and endpoints (http://docs.aws.amazon.com/general/latest/gr/rande.html#ssm_region) + // in the AWS General Reference. + // + // session-id represents the ID of a Session Manager session, such as 1a2b3c4dEXAMPLE. + StreamUrl *string `type:"string"` + + // An encrypted token value containing session and caller information. Used + // to authenticate the connection to the instance. + TokenValue *string `type:"string"` +} + +// String returns the string representation +func (s ResumeSessionOutput) String() string { + return awsutil.Prettify(s) +} + +// GoString returns the string representation +func (s ResumeSessionOutput) GoString() string { + return s.String() +} + +// SetSessionId sets the SessionId field's value. +func (s *ResumeSessionOutput) SetSessionId(v string) *ResumeSessionOutput { + s.SessionId = &v + return s +} + +// SetStreamUrl sets the StreamUrl field's value. +func (s *ResumeSessionOutput) SetStreamUrl(v string) *ResumeSessionOutput { + s.StreamUrl = &v + return s +} + +// SetTokenValue sets the TokenValue field's value. +func (s *ResumeSessionOutput) SetTokenValue(v string) *ResumeSessionOutput { + s.TokenValue = &v + return s +} + // An Amazon S3 bucket where you want to store the results of this request. type S3OutputLocation struct { _ struct{} `type:"structure"` @@ -28406,6 +29650,220 @@ func (s *SendCommandOutput) SetCommand(v *Command) *SendCommandOutput { return s } +// Information about a Session Manager connection to an instance. +type Session struct { + _ struct{} `type:"structure"` + + // Reserved for future use. + Details *string `min:"1" type:"string"` + + // The name of the Session Manager SSM document used to define the parameters + // and plugin settings for the session. For example, SSM-SessionManagerRunShell. + DocumentName *string `type:"string"` + + // The date and time, in ISO-8601 Extended format, when the session was terminated. + EndDate *time.Time `type:"timestamp"` + + // Reserved for future use. + OutputUrl *SessionManagerOutputUrl `type:"structure"` + + // The ID of the AWS user account that started the session. + Owner *string `min:"1" type:"string"` + + // The ID of the session. + SessionId *string `min:"1" type:"string"` + + // The date and time, in ISO-8601 Extended format, when the session began. + StartDate *time.Time `type:"timestamp"` + + // The status of the session. For example, "Connected" or "Terminated". + Status *string `type:"string" enum:"SessionStatus"` + + // The instance that the Session Manager session connected to. + Target *string `min:"1" type:"string"` +} + +// String returns the string representation +func (s Session) String() string { + return awsutil.Prettify(s) +} + +// GoString returns the string representation +func (s Session) GoString() string { + return s.String() +} + +// SetDetails sets the Details field's value. +func (s *Session) SetDetails(v string) *Session { + s.Details = &v + return s +} + +// SetDocumentName sets the DocumentName field's value. +func (s *Session) SetDocumentName(v string) *Session { + s.DocumentName = &v + return s +} + +// SetEndDate sets the EndDate field's value. +func (s *Session) SetEndDate(v time.Time) *Session { + s.EndDate = &v + return s +} + +// SetOutputUrl sets the OutputUrl field's value. +func (s *Session) SetOutputUrl(v *SessionManagerOutputUrl) *Session { + s.OutputUrl = v + return s +} + +// SetOwner sets the Owner field's value. +func (s *Session) SetOwner(v string) *Session { + s.Owner = &v + return s +} + +// SetSessionId sets the SessionId field's value. +func (s *Session) SetSessionId(v string) *Session { + s.SessionId = &v + return s +} + +// SetStartDate sets the StartDate field's value. +func (s *Session) SetStartDate(v time.Time) *Session { + s.StartDate = &v + return s +} + +// SetStatus sets the Status field's value. +func (s *Session) SetStatus(v string) *Session { + s.Status = &v + return s +} + +// SetTarget sets the Target field's value. +func (s *Session) SetTarget(v string) *Session { + s.Target = &v + return s +} + +// Describes a filter for Session Manager information. +type SessionFilter struct { + _ struct{} `type:"structure"` + + // The name of the filter. + // + // Key is a required field + Key *string `locationName:"key" type:"string" required:"true" enum:"SessionFilterKey"` + + // The filter value. Valid values for each filter key are as follows: + // + // * InvokedAfter: Specify a timestamp to limit your results. For example, + // specify 2018-08-29T00:00:00Z to see sessions that started August 29, 2018, + // and later. + // + // * InvokedBefore: Specify a timestamp to limit your results. For example, + // specify 2018-08-29T00:00:00Z to see sessions that started before August + // 29, 2018. + // + // * Target: Specify an instance to which session connections have been made. + // + // * Owner: Specify an AWS user account to see a list of sessions started + // by that user. + // + // * Status: Specify a valid session status to see a list of all sessions + // with that status. Status values you can specify include: + // + // Connected + // + // Connecting + // + // Disconnected + // + // Terminated + // + // Terminating + // + // Failed + // + // Value is a required field + Value *string `locationName:"value" min:"1" type:"string" required:"true"` +} + +// String returns the string representation +func (s SessionFilter) String() string { + return awsutil.Prettify(s) +} + +// GoString returns the string representation +func (s SessionFilter) GoString() string { + return s.String() +} + +// Validate inspects the fields of the type to determine if they are valid. +func (s *SessionFilter) Validate() error { + invalidParams := request.ErrInvalidParams{Context: "SessionFilter"} + if s.Key == nil { + invalidParams.Add(request.NewErrParamRequired("Key")) + } + if s.Value == nil { + invalidParams.Add(request.NewErrParamRequired("Value")) + } + if s.Value != nil && len(*s.Value) < 1 { + invalidParams.Add(request.NewErrParamMinLen("Value", 1)) + } + + if invalidParams.Len() > 0 { + return invalidParams + } + return nil +} + +// SetKey sets the Key field's value. +func (s *SessionFilter) SetKey(v string) *SessionFilter { + s.Key = &v + return s +} + +// SetValue sets the Value field's value. +func (s *SessionFilter) SetValue(v string) *SessionFilter { + s.Value = &v + return s +} + +// Reserved for future use. +type SessionManagerOutputUrl struct { + _ struct{} `type:"structure"` + + // Reserved for future use. + CloudWatchOutputUrl *string `min:"1" type:"string"` + + // Reserved for future use. + S3OutputUrl *string `min:"1" type:"string"` +} + +// String returns the string representation +func (s SessionManagerOutputUrl) String() string { + return awsutil.Prettify(s) +} + +// GoString returns the string representation +func (s SessionManagerOutputUrl) GoString() string { + return s.String() +} + +// SetCloudWatchOutputUrl sets the CloudWatchOutputUrl field's value. +func (s *SessionManagerOutputUrl) SetCloudWatchOutputUrl(v string) *SessionManagerOutputUrl { + s.CloudWatchOutputUrl = &v + return s +} + +// SetS3OutputUrl sets the S3OutputUrl field's value. +func (s *SessionManagerOutputUrl) SetS3OutputUrl(v string) *SessionManagerOutputUrl { + s.S3OutputUrl = &v + return s +} + // The number of managed instances found for each patch severity level defined // in the request filter. type SeveritySummary struct { @@ -28587,6 +30045,10 @@ type StartAutomationExecutionInput struct { // in the Automation document. Parameters map[string][]*string `min:"1" type:"map"` + // A key-value mapping of document parameters to target resources. Both Targets + // and TargetMaps cannot be specified together. + TargetMaps []map[string][]*string `type:"list"` + // The name of the parameter used as the target resource for the rate-controlled // execution. Required if you specify Targets. TargetParameterName *string `min:"1" type:"string"` @@ -28685,6 +30147,12 @@ func (s *StartAutomationExecutionInput) SetParameters(v map[string][]*string) *S return s } +// SetTargetMaps sets the TargetMaps field's value. +func (s *StartAutomationExecutionInput) SetTargetMaps(v []map[string][]*string) *StartAutomationExecutionInput { + s.TargetMaps = v + return s +} + // SetTargetParameterName sets the TargetParameterName field's value. func (s *StartAutomationExecutionInput) SetTargetParameterName(v string) *StartAutomationExecutionInput { s.TargetParameterName = &v @@ -28720,6 +30188,118 @@ func (s *StartAutomationExecutionOutput) SetAutomationExecutionId(v string) *Sta return s } +type StartSessionInput struct { + _ struct{} `type:"structure"` + + // The name of the SSM document to define the parameters and plugin settings + // for the session. For example, SSM-SessionManagerRunShell. If no document + // name is provided, a shell to the instance is launched by default. + DocumentName *string `type:"string"` + + // Reserved for future use. + Parameters map[string][]*string `type:"map"` + + // The instance to connect to for the session. + // + // Target is a required field + Target *string `min:"1" type:"string" required:"true"` +} + +// String returns the string representation +func (s StartSessionInput) String() string { + return awsutil.Prettify(s) +} + +// GoString returns the string representation +func (s StartSessionInput) GoString() string { + return s.String() +} + +// Validate inspects the fields of the type to determine if they are valid. +func (s *StartSessionInput) Validate() error { + invalidParams := request.ErrInvalidParams{Context: "StartSessionInput"} + if s.Target == nil { + invalidParams.Add(request.NewErrParamRequired("Target")) + } + if s.Target != nil && len(*s.Target) < 1 { + invalidParams.Add(request.NewErrParamMinLen("Target", 1)) + } + + if invalidParams.Len() > 0 { + return invalidParams + } + return nil +} + +// SetDocumentName sets the DocumentName field's value. +func (s *StartSessionInput) SetDocumentName(v string) *StartSessionInput { + s.DocumentName = &v + return s +} + +// SetParameters sets the Parameters field's value. +func (s *StartSessionInput) SetParameters(v map[string][]*string) *StartSessionInput { + s.Parameters = v + return s +} + +// SetTarget sets the Target field's value. +func (s *StartSessionInput) SetTarget(v string) *StartSessionInput { + s.Target = &v + return s +} + +type StartSessionOutput struct { + _ struct{} `type:"structure"` + + // The ID of the session. + SessionId *string `min:"1" type:"string"` + + // A URL back to SSM Agent on the instance that the Session Manager client uses + // to send commands and receive output from the instance. Format: wss://ssm-messages.region.amazonaws.com/v1/data-channel/session-id?stream=(input|output) + // + // region represents the Region identifier for an AWS Region supported by AWS + // Systems Manager, such as us-east-2 for the US East (Ohio) Region. For a list + // of supported region values, see the Region column in the AWS Systems Manager + // table of regions and endpoints (http://docs.aws.amazon.com/general/latest/gr/rande.html#ssm_region) + // in the AWS General Reference. + // + // session-id represents the ID of a Session Manager session, such as 1a2b3c4dEXAMPLE. + StreamUrl *string `type:"string"` + + // An encrypted token value containing session and caller information. Used + // to authenticate the connection to the instance. + TokenValue *string `type:"string"` +} + +// String returns the string representation +func (s StartSessionOutput) String() string { + return awsutil.Prettify(s) +} + +// GoString returns the string representation +func (s StartSessionOutput) GoString() string { + return s.String() +} + +// SetSessionId sets the SessionId field's value. +func (s *StartSessionOutput) SetSessionId(v string) *StartSessionOutput { + s.SessionId = &v + return s +} + +// SetStreamUrl sets the StreamUrl field's value. +func (s *StartSessionOutput) SetStreamUrl(v string) *StartSessionOutput { + s.StreamUrl = &v + return s +} + +// SetTokenValue sets the TokenValue field's value. +func (s *StartSessionOutput) SetTokenValue(v string) *StartSessionOutput { + s.TokenValue = &v + return s +} + // Detailed information about an the execution state of an Automation step. type StepExecution struct { _ struct{} `type:"structure"` @@ -28745,21 +30325,19 @@ type StepExecution struct { // Fully-resolved values passed into the step before execution. Inputs map[string]*string `type:"map"` - // Enable this option to designate a step as critical for the successful completion - // of the Automation. If a step with this designation fails, then Automation - // reports the final status of the Automation as Failed. + // The flag which can be used to help decide whether the failure of current + // step leads to the Automation failure. IsCritical *bool `type:"boolean"` - // Enable this option to stop an Automation execution at the end of a specific - // step. The Automation execution stops if the step execution failed or succeeded. + // The flag which can be used to end automation no matter whether the step succeeds + // or fails. IsEnd *bool `type:"boolean"` // The maximum number of tries to run the action of the step. The default value // is 1. MaxAttempts *int64 `type:"integer"` - // Specifies which step in an Automation to process next after successfully - // completing a step. + // The next step after the step succeeds. NextStep *string `type:"string"` // The action to take if the step fails. The default value is Abort. @@ -28790,14 +30368,11 @@ type StepExecution struct { // The timeout seconds of the step. TimeoutSeconds *int64 `type:"long"` - // ValidNextSteps offer different strategies for managing an Automation workflow - // when a step finishes. Automation dynamically processes ValidNextSteps when - // a step is completed. For example, you can specify Abort to stop the Automation - // when a step fails or Continue to ignore the failure of the current step and - // allow Automation to continue processing the next step. You can also specify - // step:step_name to jump to a designated step after a step succeeds. The result - // of the current step dynamically determines the ValidNextSteps. If a step - // finishes and no ValidNextStep is designated, then the Automation stops. + // Strategies used when step fails, we support Continue and Abort. Abort will + // fail the automation when the step fails. Continue will ignore the failure + // of current step and allow automation to execute the next step. With conditional + // branching, we add step:stepName to support the automation to go to another + // specific step. ValidNextSteps []*string `type:"list"` } @@ -29174,6 +30749,70 @@ func (s *Target) SetValues(v []*string) *Target { return s } +type TerminateSessionInput struct { + _ struct{} `type:"structure"` + + // The ID of the session to terminate. + // + // SessionId is a required field + SessionId *string `min:"1" type:"string" required:"true"` +} + +// String returns the string representation +func (s TerminateSessionInput) String() string { + return awsutil.Prettify(s) +} + +// GoString returns the string representation +func (s TerminateSessionInput) GoString() string { + return s.String() +} + +// Validate inspects the fields of the type to determine if they are valid. +func (s *TerminateSessionInput) Validate() error { + invalidParams := request.ErrInvalidParams{Context: "TerminateSessionInput"} + if s.SessionId == nil { + invalidParams.Add(request.NewErrParamRequired("SessionId")) + } + if s.SessionId != nil && len(*s.SessionId) < 1 { + invalidParams.Add(request.NewErrParamMinLen("SessionId", 1)) + } + + if invalidParams.Len() > 0 { + return invalidParams + } + return nil +} + +// SetSessionId sets the SessionId field's value. +func (s *TerminateSessionInput) SetSessionId(v string) *TerminateSessionInput { + s.SessionId = &v + return s +} + +type TerminateSessionOutput struct { + _ struct{} `type:"structure"` + + // The ID of the session that has been terminated. + SessionId *string `min:"1" type:"string"` +} + +// String returns the string representation +func (s TerminateSessionOutput) String() string { + return awsutil.Prettify(s) +} + +// GoString returns the string representation +func (s TerminateSessionOutput) GoString() string { + return s.String() +} + +// SetSessionId sets the SessionId field's value. +func (s *TerminateSessionOutput) SetSessionId(v string) *TerminateSessionOutput { + s.SessionId = &v + return s +} + type UpdateAssociationInput struct { _ struct{} `type:"structure"` @@ -30050,6 +31689,18 @@ type UpdateMaintenanceWindowTaskInput struct { // The IAM service role ARN to modify. The system assumes this role during task // execution. + // + // If you do not specify a service role ARN, Systems Manager will use your account's + // service-linked role for Systems Manager by default. If no service-linked + // role for Systems Manager exists in your account, it will be created when + // you run RegisterTaskWithMaintenanceWindow without specifying a service role + // ARN. + // + // For more information, see Service-Linked Role Permissions for Systems Manager + // (http://docs.aws.amazon.com/systems-manager/latest/userguide/using-service-linked-roles.html#slr-permissions) + // and Should I Use a Service-Linked Role or a Custom Service Role to Run Maintenance + // Window Tasks? (http://docs.aws.amazon.com/systems-manager/latest/userguide/sysman-maintenance-permissions.html#maintenance-window-tasks-service-role) + // in the AWS Systems Manager User Guide. ServiceRoleArn *string `type:"string"` // The targets (either instances or tags) to modify. Instances are specified @@ -30491,6 +32142,21 @@ type UpdatePatchBaselineInput struct { // in the AWS Systems Manager User Guide. RejectedPatches []*string `type:"list"` + // The action for Patch Manager to take on patches included in the RejectedPackages + // list. + // + // * ALLOW_AS_DEPENDENCY: A package in the Rejected patches list is installed + // only if it is a dependency of another package. It is considered compliant + // with the patch baseline, and its status is reported as InstalledOther. + // This is the default action if no option is specified. + // + // * BLOCK: Packages in the RejectedPatches list, and packages that include + // them as dependencies, are not installed under any circumstances. If a + // package was installed before it was added to the Rejected patches list, + // it is considered non-compliant with the patch baseline, and its status + // is reported as InstalledRejected. + RejectedPatchesAction *string `type:"string" enum:"PatchAction"` + // If True, then all fields that are required by the CreatePatchBaseline action // are also required for this API request. Optional fields that are not specified // are set to null. @@ -30607,6 +32273,12 @@ func (s *UpdatePatchBaselineInput) SetRejectedPatches(v []*string) *UpdatePatchB return s } +// SetRejectedPatchesAction sets the RejectedPatchesAction field's value. +func (s *UpdatePatchBaselineInput) SetRejectedPatchesAction(v string) *UpdatePatchBaselineInput { + s.RejectedPatchesAction = &v + return s +} + // SetReplace sets the Replace field's value. func (s *UpdatePatchBaselineInput) SetReplace(v bool) *UpdatePatchBaselineInput { s.Replace = &v @@ -30661,6 +32333,11 @@ type UpdatePatchBaselineOutput struct { // A list of explicitly rejected patches for the baseline. RejectedPatches []*string `type:"list"` + // The action specified to take on patches included in the RejectedPatches list. + // A patch can be allowed only if it is a dependency of another package, or + // blocked entirely along with packages that include it as a dependency. + RejectedPatchesAction *string `type:"string" enum:"PatchAction"` + // Information about the patches to use to update the instances, including target // operating systems and source repositories. Applies to Linux instances only. Sources []*PatchSource `type:"list"` @@ -30748,6 +32425,12 @@ func (s *UpdatePatchBaselineOutput) SetRejectedPatches(v []*string) *UpdatePatch return s } +// SetRejectedPatchesAction sets the RejectedPatchesAction field's value. +func (s *UpdatePatchBaselineOutput) SetRejectedPatchesAction(v string) *UpdatePatchBaselineOutput { + s.RejectedPatchesAction = &v + return s +} + // SetSources sets the Sources field's value. func (s *UpdatePatchBaselineOutput) SetSources(v []*PatchSource) *UpdatePatchBaselineOutput { s.Sources = v @@ -30879,6 +32562,12 @@ const ( // CommandFilterKeyStatus is a CommandFilterKey enum value CommandFilterKeyStatus = "Status" + + // CommandFilterKeyExecutionStage is a CommandFilterKey enum value + CommandFilterKeyExecutionStage = "ExecutionStage" + + // CommandFilterKeyDocumentName is a CommandFilterKey enum value + CommandFilterKeyDocumentName = "DocumentName" ) const ( @@ -30995,6 +32684,14 @@ const ( ComplianceStatusNonCompliant = "NON_COMPLIANT" ) +const ( + // ConnectionStatusConnected is a ConnectionStatus enum value + ConnectionStatusConnected = "Connected" + + // ConnectionStatusNotConnected is a ConnectionStatus enum value + ConnectionStatusNotConnected = "NotConnected" +) + const ( // DescribeActivationsFilterKeysActivationIds is a DescribeActivationsFilterKeys enum value DescribeActivationsFilterKeysActivationIds = "ActivationIds" @@ -31072,6 +32769,9 @@ const ( // DocumentTypeAutomation is a DocumentType enum value DocumentTypeAutomation = "Automation" + + // DocumentTypeSession is a DocumentType enum value + DocumentTypeSession = "Session" ) const ( @@ -31164,6 +32864,9 @@ const ( // InventoryQueryOperatorTypeGreaterThan is a InventoryQueryOperatorType enum value InventoryQueryOperatorTypeGreaterThan = "GreaterThan" + + // InventoryQueryOperatorTypeExists is a InventoryQueryOperatorType enum value + InventoryQueryOperatorTypeExists = "Exists" ) const ( @@ -31303,6 +33006,14 @@ const ( ParametersFilterKeyKeyId = "KeyId" ) +const ( + // PatchActionAllowAsDependency is a PatchAction enum value + PatchActionAllowAsDependency = "ALLOW_AS_DEPENDENCY" + + // PatchActionBlock is a PatchAction enum value + PatchActionBlock = "BLOCK" +) + const ( // PatchComplianceDataStateInstalled is a PatchComplianceDataState enum value PatchComplianceDataStateInstalled = "INSTALLED" @@ -31310,6 +33021,9 @@ const ( // PatchComplianceDataStateInstalledOther is a PatchComplianceDataState enum value PatchComplianceDataStateInstalledOther = "INSTALLED_OTHER" + // PatchComplianceDataStateInstalledRejected is a PatchComplianceDataState enum value + PatchComplianceDataStateInstalledRejected = "INSTALLED_REJECTED" + // PatchComplianceDataStateMissing is a PatchComplianceDataState enum value PatchComplianceDataStateMissing = "MISSING" @@ -31437,6 +33151,51 @@ const ( ResourceTypeForTaggingPatchBaseline = "PatchBaseline" ) +const ( + // SessionFilterKeyInvokedAfter is a SessionFilterKey enum value + SessionFilterKeyInvokedAfter = "InvokedAfter" + + // SessionFilterKeyInvokedBefore is a SessionFilterKey enum value + SessionFilterKeyInvokedBefore = "InvokedBefore" + + // SessionFilterKeyTarget is a SessionFilterKey enum value + SessionFilterKeyTarget = "Target" + + // SessionFilterKeyOwner is a SessionFilterKey enum value + SessionFilterKeyOwner = "Owner" + + // SessionFilterKeyStatus is a SessionFilterKey enum value + SessionFilterKeyStatus = "Status" +) + +const ( + // SessionStateActive is a SessionState enum value + SessionStateActive = "Active" + + // SessionStateHistory is a SessionState enum value + SessionStateHistory = "History" +) + +const ( + // SessionStatusConnected is a SessionStatus enum value + SessionStatusConnected = "Connected" + + // SessionStatusConnecting is a SessionStatus enum value + SessionStatusConnecting = "Connecting" + + // SessionStatusDisconnected is a SessionStatus enum value + SessionStatusDisconnected = "Disconnected" + + // SessionStatusTerminated is a SessionStatus enum value + SessionStatusTerminated = "Terminated" + + // SessionStatusTerminating is a SessionStatus enum value + SessionStatusTerminating = "Terminating" + + // SessionStatusFailed is a SessionStatus enum value + SessionStatusFailed = "Failed" +) + const ( // SignalTypeApprove is a SignalType enum value SignalTypeApprove = "Approve" diff --git a/vendor/github.com/aws/aws-sdk-go/service/ssm/errors.go b/vendor/github.com/aws/aws-sdk-go/service/ssm/errors.go index b95f36009..da7ff9e64 100644 --- a/vendor/github.com/aws/aws-sdk-go/service/ssm/errors.go +++ b/vendor/github.com/aws/aws-sdk-go/service/ssm/errors.go @@ -196,6 +196,13 @@ const ( // or ActivationCode and try again. ErrCodeInvalidActivationId = "InvalidActivationId" + // ErrCodeInvalidAggregatorException for service response error code + // "InvalidAggregatorException". + // + // The specified aggregator is not valid for inventory groups. Verify that the + // aggregator uses a valid inventory type such as AWS:Application or AWS:InstanceInformation. + ErrCodeInvalidAggregatorException = "InvalidAggregatorException" + // ErrCodeInvalidAllowedPatternException for service response error code // "InvalidAllowedPatternException". // @@ -335,6 +342,12 @@ const ( // The specified filter value is not valid. ErrCodeInvalidInstanceInformationFilterValue = "InvalidInstanceInformationFilterValue" + // ErrCodeInvalidInventoryGroupException for service response error code + // "InvalidInventoryGroupException". + // + // The specified inventory group is not valid. + ErrCodeInvalidInventoryGroupException = "InvalidInventoryGroupException" + // ErrCodeInvalidInventoryItemContextException for service response error code // "InvalidInventoryItemContextException". // @@ -524,6 +537,12 @@ const ( // The parameter name is not valid. ErrCodeParameterPatternMismatchException = "ParameterPatternMismatchException" + // ErrCodeParameterVersionLabelLimitExceeded for service response error code + // "ParameterVersionLabelLimitExceeded". + // + // A parameter version can have a maximum of ten labels. + ErrCodeParameterVersionLabelLimitExceeded = "ParameterVersionLabelLimitExceeded" + // ErrCodeParameterVersionNotFound for service response error code // "ParameterVersionNotFound". // @@ -591,6 +610,15 @@ const ( // operation, but the target is still referenced in a task. ErrCodeTargetInUseException = "TargetInUseException" + // ErrCodeTargetNotConnected for service response error code + // "TargetNotConnected". + // + // The specified target instance for the session is not fully configured for + // use with Session Manager. For more information, see Getting Started with + // Session Manager (http://docs.aws.amazon.com/systems-manager/latest/userguide/session-manager-getting-started.html) + // in the AWS Systems Manager User Guide. + ErrCodeTargetNotConnected = "TargetNotConnected" + // ErrCodeTooManyTagsError for service response error code // "TooManyTagsError". // diff --git a/vendor/github.com/aws/aws-sdk-go/service/storagegateway/api.go b/vendor/github.com/aws/aws-sdk-go/service/storagegateway/api.go index 0a366fb59..0774a4920 100644 --- a/vendor/github.com/aws/aws-sdk-go/service/storagegateway/api.go +++ b/vendor/github.com/aws/aws-sdk-go/service/storagegateway/api.go @@ -792,7 +792,7 @@ func (c *StorageGateway) CreateNFSFileShareRequest(input *CreateNFSFileShareInpu // Creates a Network File System (NFS) file share on an existing file gateway. // In Storage Gateway, a file share is a file system mount point backed by Amazon // S3 cloud storage. Storage Gateway exposes file shares using a NFS interface. -// This operation is only supported in the file gateway type. +// This operation is only supported for file gateways. // // File gateway requires AWS Security Token Service (AWS STS) to be activated // to enable you create a file share. Make sure AWS STS is activated in the @@ -888,16 +888,16 @@ func (c *StorageGateway) CreateSMBFileShareRequest(input *CreateSMBFileShareInpu // Creates a Server Message Block (SMB) file share on an existing file gateway. // In Storage Gateway, a file share is a file system mount point backed by Amazon // S3 cloud storage. Storage Gateway expose file shares using a SMB interface. -// This operation is only supported in the file gateway type. +// This operation is only supported for file gateways. // -// File gateway requires AWS Security Token Service (AWS STS) to be activated -// to enable you create a file share. Make sure AWS STS is activated in the -// region you are creating your file gateway in. If AWS STS is not activated -// in the region, activate it. For information about how to activate AWS STS, -// see Activating and Deactivating AWS STS in an AWS Region in the AWS Identity -// and Access Management User Guide. +// File gateways require AWS Security Token Service (AWS STS) to be activated +// to enable you to create a file share. Make sure that AWS STS is activated +// in the AWS Region you are creating your file gateway in. If AWS STS is not +// activated in this AWS Region, activate it. For information about how to activate +// AWS STS, see Activating and Deactivating AWS STS in an AWS Region (http://docs.aws.amazon.com/IAM/latest/UserGuide/id_credentials_temp_enable-regions.html) +// in the AWS Identity and Access Management User Guide. // -// File gateway does not support creating hard or symbolic links on a file share. +// File gateways don't support creating hard or symbolic links on a file share. // // Returns awserr.Error for service API and SDK errors. Use runtime type assertions // with awserr.Error's Code and Message methods to get detailed information about @@ -1645,7 +1645,7 @@ func (c *StorageGateway) DeleteFileShareRequest(input *DeleteFileShareInput) (re // DeleteFileShare API operation for AWS Storage Gateway. // // Deletes a file share from a file gateway. This operation is only supported -// in the file gateway type. +// for file gateways. // // Returns awserr.Error for service API and SDK errors. Use runtime type assertions // with awserr.Error's Code and Message methods to get detailed information about @@ -2715,8 +2715,7 @@ func (c *StorageGateway) DescribeNFSFileSharesRequest(input *DescribeNFSFileShar // DescribeNFSFileShares API operation for AWS Storage Gateway. // // Gets a description for one or more Network File System (NFS) file shares -// from a file gateway. This operation is only supported in the file gateway -// type. +// from a file gateway. This operation is only supported for file gateways. // // Returns awserr.Error for service API and SDK errors. Use runtime type assertions // with awserr.Error's Code and Message methods to get detailed information about @@ -2801,8 +2800,7 @@ func (c *StorageGateway) DescribeSMBFileSharesRequest(input *DescribeSMBFileShar // DescribeSMBFileShares API operation for AWS Storage Gateway. // // Gets a description for one or more Server Message Block (SMB) file shares -// from a file gateway. This operation is only supported in the file gateway -// type. +// from a file gateway. This operation is only supported for file gateways. // // Returns awserr.Error for service API and SDK errors. Use runtime type assertions // with awserr.Error's Code and Message methods to get detailed information about @@ -2887,7 +2885,7 @@ func (c *StorageGateway) DescribeSMBSettingsRequest(input *DescribeSMBSettingsIn // DescribeSMBSettings API operation for AWS Storage Gateway. // // Gets a description of a Server Message Block (SMB) file share settings from -// a file gateway. This operation is only supported in the file gateway type. +// a file gateway. This operation is only supported for file gateways. // // Returns awserr.Error for service API and SDK errors. Use runtime type assertions // with awserr.Error's Code and Message methods to get detailed information about @@ -3993,7 +3991,7 @@ func (c *StorageGateway) JoinDomainRequest(input *JoinDomainInput) (req *request // JoinDomain API operation for AWS Storage Gateway. // // Adds a file gateway to an Active Directory domain. This operation is only -// supported in the file gateway type that supports the SMB file protocol. +// supported for file gateways that support the SMB file protocol. // // Returns awserr.Error for service API and SDK errors. Use runtime type assertions // with awserr.Error's Code and Message methods to get detailed information about @@ -4079,7 +4077,7 @@ func (c *StorageGateway) ListFileSharesRequest(input *ListFileSharesInput) (req // // Gets a list of the file shares for a specific file gateway, or the list of // file shares that belong to the calling user account. This operation is only -// supported in the file gateway type. +// supported for file gateways. // // Returns awserr.Error for service API and SDK errors. Use runtime type assertions // with awserr.Error's Code and Message methods to get detailed information about @@ -4923,7 +4921,7 @@ func (c *StorageGateway) NotifyWhenUploadedRequest(input *NotifyWhenUploadedInpu // is done, Storage Gateway sends you notification through an Amazon CloudWatch // Event. You can configure CloudWatch Events to send the notification through // event targets such as Amazon SNS or AWS Lambda function. This operation is -// only supported in the file gateway type. +// only supported for file gateways. // // For more information, see Getting File Upload Notification in the Storage // Gateway User Guide (https://docs.aws.amazon.com/storagegateway/latest/userguide/monitoring-file-gateway.html#get-upload-notification). @@ -5013,7 +5011,9 @@ func (c *StorageGateway) RefreshCacheRequest(input *RefreshCacheInput) (req *req // Refreshes the cache for the specified file share. This operation finds objects // in the Amazon S3 bucket that were added, removed or replaced since the gateway // last listed the bucket's contents and cached the results. This operation -// is only supported in the file gateway type. +// is only supported in the file gateway type. You can subscribe to be notified +// through an Amazon CloudWatch event when your RefreshCache operation completes. +// For more information, see Getting Notified About File Operations (https://docs.aws.amazon.com/storagegateway/latest/userguide/monitoring-file-gateway.html#get-notification). // // Returns awserr.Error for service API and SDK errors. Use runtime type assertions // with awserr.Error's Code and Message methods to get detailed information about @@ -5550,8 +5550,8 @@ func (c *StorageGateway) SetSMBGuestPasswordRequest(input *SetSMBGuestPasswordIn // SetSMBGuestPassword API operation for AWS Storage Gateway. // -// Sets the password for the guest user “smbguest”. "smbguest" is the user when -// the Authentication method for the file share is “GuestAccess”. +// Sets the password for the guest user smbguest. The smbguest user is the user +// when the authentication method for the file share is set to GuestAccess. // // Returns awserr.Error for service API and SDK errors. Use runtime type assertions // with awserr.Error's Code and Message methods to get detailed information about @@ -6393,20 +6393,19 @@ func (c *StorageGateway) UpdateSMBFileShareRequest(input *UpdateSMBFileShareInpu // UpdateSMBFileShare API operation for AWS Storage Gateway. // -// Updates a Server Message Block (SMB) file share. This operation is only supported -// in the file gateway type. +// Updates a Server Message Block (SMB) file share. // // To leave a file share field unchanged, set the corresponding input field -// to null. This operation is only supported in the file gateway type. +// to null. This operation is only supported for file gateways. // -// File gateway requires AWS Security Token Service (AWS STS) to be activated -// to enable you create a file share. Make sure AWS STS is activated in the -// region you are creating your file gateway in. If AWS STS is not activated -// in the region, activate it. For information about how to activate AWS STS, -// see Activating and Deactivating AWS STS in an AWS Region in the AWS Identity -// and Access Management User Guide. +// File gateways require AWS Security Token Service (AWS STS) to be activated +// to enable you to create a file share. Make sure that AWS STS is activated +// in the AWS Region you are creating your file gateway in. If AWS STS is not +// activated in this AWS Region, activate it. For information about how to activate +// AWS STS, see Activating and Deactivating AWS STS in an AWS Region (http://docs.aws.amazon.com/IAM/latest/UserGuide/id_credentials_temp_enable-regions.html) +// in the AWS Identity and Access Management User Guide. // -// File gateway does not support creating hard or symbolic links on a file share. +// File gateways don't support creating hard or symbolic links on a file share. // // Returns awserr.Error for service API and SDK errors. Use runtime type assertions // with awserr.Error's Code and Message methods to get detailed information about @@ -6688,7 +6687,7 @@ type ActivateGatewayInput struct { // A value that defines the type of gateway to activate. The type specified // is critical to all later functions of the gateway and cannot be changed after - // activation. The default value is STORED. + // activation. The default value is CACHED. // // Valid Values: "STORED", "CACHED", "VTL", "FILE_S3" GatewayType *string `min:"2" type:"string"` @@ -7178,8 +7177,8 @@ type CachediSCSIVolume struct { // don’t have this time stamp. CreatedDate *time.Time `type:"timestamp"` - // The Amazon Resource Name (ARN) of the KMS key used for Amazon S3 server side - // encryption. This value can only be set when KMSEncrypted is true. Optional. + // The Amazon Resource Name (ARN) of the AWS KMS key used for Amazon S3 server + // side encryption. This value can only be set when KMSEncrypted is true. Optional. KMSKey *string `min:"20" type:"string"` // If the cached volume was created from a snapshot, this field contains the @@ -7541,8 +7540,8 @@ type CreateCachediSCSIVolumeInput struct { // false to use a key managed by Amazon S3. Optional. KMSEncrypted *bool `type:"boolean"` - // The Amazon Resource Name (ARN) of the KMS key used for Amazon S3 server side - // encryption. This value can only be set when KMSEncrypted is true. Optional. + // The Amazon Resource Name (ARN) of the AWS KMS key used for Amazon S3 server + // side encryption. This value can only be set when KMSEncrypted is true. Optional. KMSKey *string `min:"20" type:"string"` // The network interface of the gateway on which to expose the iSCSI target. @@ -7732,8 +7731,8 @@ type CreateNFSFileShareInput struct { // ClientToken is a required field ClientToken *string `min:"5" type:"string" required:"true"` - // The default storage class for objects put into an Amazon S3 bucket by file - // gateway. Possible values are S3_STANDARD, S3_STANDARD_IA or S3_ONEZONE_IA. + // The default storage class for objects put into an Amazon S3 bucket by the + // file gateway. Possible values are S3_STANDARD, S3_STANDARD_IA, or S3_ONEZONE_IA. // If this field is not populated, the default value S3_STANDARD is used. Optional. DefaultStorageClass *string `min:"5" type:"string"` @@ -7743,17 +7742,17 @@ type CreateNFSFileShareInput struct { // GatewayARN is a required field GatewayARN *string `min:"50" type:"string" required:"true"` - // Enables guessing of the MIME type for uploaded objects based on file extensions. - // Set this value to true to enable MIME type guessing, and otherwise to false. - // The default value is true. + // A value that enables guessing of the MIME type for uploaded objects based + // on file extensions. Set this value to true to enable MIME type guessing, + // and otherwise to false. The default value is true. GuessMIMETypeEnabled *bool `type:"boolean"` // True to use Amazon S3 server side encryption with your own AWS KMS key, or // false to use a key managed by Amazon S3. Optional. KMSEncrypted *bool `type:"boolean"` - // The Amazon Resource Name (ARN) KMS key used for Amazon S3 server side encryption. - // This value can only be set when KMSEncrypted is true. Optional. + // The Amazon Resource Name (ARN) AWS KMS key used for Amazon S3 server side + // encryption. This value can only be set when KMSEncrypted is true. Optional. KMSKey *string `min:"20" type:"string"` // The ARN of the backed storage used for storing file data. @@ -7764,17 +7763,16 @@ type CreateNFSFileShareInput struct { // File share default values. Optional. NFSFileShareDefaults *NFSFileShareDefaults `type:"structure"` - // Sets the access control list permission for objects in the Amazon S3 bucket - // that a file gateway puts objects into. The default value is "private". + // A value that sets the access control list permission for objects in the S3 + // bucket that a file gateway puts objects into. The default value is "private". ObjectACL *string `type:"string" enum:"ObjectACL"` - // Sets the write status of a file share. This value is true if the write status - // is read-only, and otherwise false. + // A value that sets the write status of a file share. This value is true if + // the write status is read-only, and otherwise false. ReadOnly *bool `type:"boolean"` - // Sets who pays the cost of the request and the data download from the Amazon - // S3 bucket. Set this value to true if you want the requester to pay instead - // of the bucket owner, and otherwise to false. + // A value that sets the access control list permission for objects in the Amazon + // S3 bucket that a file gateway puts objects into. The default value is private. RequesterPays *bool `type:"boolean"` // The ARN of the AWS Identity and Access Management (IAM) role that a file @@ -7785,11 +7783,11 @@ type CreateNFSFileShareInput struct { // Maps a user to anonymous user. Valid options are the following: // - // * "RootSquash" - Only root is mapped to anonymous user. + // * RootSquash - Only root is mapped to anonymous user. // - // * "NoSquash" - No one is mapped to anonymous user. + // * NoSquash - No one is mapped to anonymous user // - // * "AllSquash" - Everyone is mapped to anonymous user. + // * AllSquash - Everyone is mapped to anonymous user. Squash *string `min:"5" type:"string"` } @@ -7968,7 +7966,7 @@ type CreateSMBFileShareInput struct { // The authentication method that users use to access the file share. // - // Valid values: "ActiveDirectory" or "GuestAccess". The default is "ActiveDirectory". + // Valid values are ActiveDirectory or GuestAccess. The default is ActiveDirectory. Authentication *string `min:"5" type:"string"` // A unique string value that you supply that is used by file gateway to ensure @@ -7977,8 +7975,8 @@ type CreateSMBFileShareInput struct { // ClientToken is a required field ClientToken *string `min:"5" type:"string" required:"true"` - // The default storage class for objects put into an Amazon S3 bucket by file - // gateway. Possible values are S3_STANDARD, S3_STANDARD_IA or S3_ONEZONE_IA. + // The default storage class for objects put into an Amazon S3 bucket by the + // file gateway. Possible values are S3_STANDARD, S3_STANDARD_IA, or S3_ONEZONE_IA. // If this field is not populated, the default value S3_STANDARD is used. Optional. DefaultStorageClass *string `min:"5" type:"string"` @@ -7988,21 +7986,22 @@ type CreateSMBFileShareInput struct { // GatewayARN is a required field GatewayARN *string `min:"50" type:"string" required:"true"` - // Enables guessing of the MIME type for uploaded objects based on file extensions. - // Set this value to true to enable MIME type guessing, and otherwise to false. - // The default value is true. + // A value that enables guessing of the MIME type for uploaded objects based + // on file extensions. Set this value to true to enable MIME type guessing, + // and otherwise to false. The default value is true. GuessMIMETypeEnabled *bool `type:"boolean"` - // A list of users in the Active Directory that are not allowed to access the - // file share. Can only be set if Authentication is set to "ActiveDirectory". + // A list of users or groups in the Active Directory that are not allowed to + // access the file share. A group must be prefixed with the @ character. For + // example @group1. Can only be set if Authentication is set to ActiveDirectory. InvalidUserList []*string `type:"list"` // True to use Amazon S3 server side encryption with your own AWS KMS key, or // false to use a key managed by Amazon S3. Optional. KMSEncrypted *bool `type:"boolean"` - // The Amazon Resource Name (ARN) KMS key used for Amazon S3 server side encryption. - // This value can only be set when KMSEncrypted is true. Optional. + // The Amazon Resource Name (ARN) of the AWS KMS key used for Amazon S3 server + // side encryption. This value can only be set when KMSEncrypted is true. Optional. KMSKey *string `min:"20" type:"string"` // The ARN of the backed storage used for storing file data. @@ -8010,17 +8009,16 @@ type CreateSMBFileShareInput struct { // LocationARN is a required field LocationARN *string `min:"16" type:"string" required:"true"` - // Sets the access control list permission for objects in the Amazon S3 bucket - // that a file gateway puts objects into. The default value is "private". + // A value that sets the access control list permission for objects in the S3 + // bucket that a file gateway puts objects into. The default value is "private". ObjectACL *string `type:"string" enum:"ObjectACL"` - // Sets the write status of a file share. This value is true if the write status - // is read-only, and otherwise false. + // A value that sets the write status of a file share. This value is true if + // the write status is read-only, and otherwise false. ReadOnly *bool `type:"boolean"` - // Sets who pays the cost of the request and the data download from the Amazon - // S3 bucket. Set this value to true if you want the requester to pay instead - // of the bucket owner, and otherwise to false. + // A value that sets the access control list permission for objects in the Amazon + // S3 bucket that a file gateway puts objects into. The default value is private. RequesterPays *bool `type:"boolean"` // The ARN of the AWS Identity and Access Management (IAM) role that a file @@ -8029,8 +8027,9 @@ type CreateSMBFileShareInput struct { // Role is a required field Role *string `min:"20" type:"string" required:"true"` - // A list of users in the Active Directory that are allowed to access the file - // share. Can only be set if Authentication is set to "ActiveDirectory". + // A list of users or groups in the Active Directory that are allowed to access + // the file share. A group must be prefixed with the @ character. For example + // @group1. Can only be set if Authentication is set to ActiveDirectory. ValidUserList []*string `type:"list"` } @@ -8415,6 +8414,14 @@ type CreateStorediSCSIVolumeInput struct { // GatewayARN is a required field GatewayARN *string `min:"50" type:"string" required:"true"` + // True to use Amazon S3 server side encryption with your own AWS KMS key, or + // false to use a key managed by Amazon S3. Optional. + KMSEncrypted *bool `type:"boolean"` + + // The Amazon Resource Name (ARN) of the KMS key used for Amazon S3 server side + // encryption. This value can only be set when KMSEncrypted is true. Optional. + KMSKey *string `min:"20" type:"string"` + // The network interface of the gateway on which to expose the iSCSI target. // Only IPv4 addresses are accepted. Use DescribeGatewayInformation to get a // list of the network interfaces available on a gateway. @@ -8473,6 +8480,9 @@ func (s *CreateStorediSCSIVolumeInput) Validate() error { if s.GatewayARN != nil && len(*s.GatewayARN) < 50 { invalidParams.Add(request.NewErrParamMinLen("GatewayARN", 50)) } + if s.KMSKey != nil && len(*s.KMSKey) < 20 { + invalidParams.Add(request.NewErrParamMinLen("KMSKey", 20)) + } if s.NetworkInterfaceId == nil { invalidParams.Add(request.NewErrParamRequired("NetworkInterfaceId")) } @@ -8504,6 +8514,18 @@ func (s *CreateStorediSCSIVolumeInput) SetGatewayARN(v string) *CreateStorediSCS return s } +// SetKMSEncrypted sets the KMSEncrypted field's value. +func (s *CreateStorediSCSIVolumeInput) SetKMSEncrypted(v bool) *CreateStorediSCSIVolumeInput { + s.KMSEncrypted = &v + return s +} + +// SetKMSKey sets the KMSKey field's value. +func (s *CreateStorediSCSIVolumeInput) SetKMSKey(v string) *CreateStorediSCSIVolumeInput { + s.KMSKey = &v + return s +} + // SetNetworkInterfaceId sets the NetworkInterfaceId field's value. func (s *CreateStorediSCSIVolumeInput) SetNetworkInterfaceId(v string) *CreateStorediSCSIVolumeInput { s.NetworkInterfaceId = &v @@ -8586,8 +8608,8 @@ type CreateTapeWithBarcodeInput struct { // false to use a key managed by Amazon S3. Optional. KMSEncrypted *bool `type:"boolean"` - // The Amazon Resource Name (ARN) of the KMS Key used for Amazon S3 server side - // encryption. This value can only be set when KMSEncrypted is true. Optional. + // The Amazon Resource Name (ARN) of the AWS KMS Key used for Amazon S3 server + // side encryption. This value can only be set when KMSEncrypted is true. Optional. KMSKey *string `min:"20" type:"string"` // The barcode that you want to assign to the tape. @@ -8722,8 +8744,8 @@ type CreateTapesInput struct { // false to use a key managed by Amazon S3. Optional. KMSEncrypted *bool `type:"boolean"` - // The Amazon Resource Name (ARN) of the KMS key used for Amazon S3 server side - // encryption. This value can only be set when KMSEncrypted is true. Optional. + // The Amazon Resource Name (ARN) of the AWS KMS key used for Amazon S3 server + // side encryption. This value can only be set when KMSEncrypted is true. Optional. KMSKey *string `min:"20" type:"string"` // The number of virtual tapes that you want to create. @@ -10543,7 +10565,7 @@ type DescribeTapeArchivesOutput struct { Marker *string `min:"1" type:"string"` // An array of virtual tape objects in the virtual tape shelf (VTS). The description - // includes of the Amazon Resource Name(ARN) of the virtual tapes. The information + // includes of the Amazon Resource Name (ARN) of the virtual tapes. The information // returned includes the Amazon Resource Names (ARNs) of the tapes, size of // the tapes, status of the tapes, progress of the description and tape barcode. TapeArchives []*TapeArchive `type:"list"` @@ -11143,7 +11165,7 @@ type DeviceiSCSIAttributes struct { // The port used to communicate with iSCSI VTL device targets. NetworkInterfacePort *int64 `type:"integer"` - // Specifies the unique Amazon Resource Name(ARN) that encodes the iSCSI qualified + // Specifies the unique Amazon Resource Name (ARN) that encodes the iSCSI qualified // name(iqn) of a tape drive or media changer target. TargetARN *string `min:"50" type:"string"` } @@ -11229,7 +11251,7 @@ func (s *DisableGatewayInput) SetGatewayARN(v string) *DisableGatewayInput { type DisableGatewayOutput struct { _ struct{} `type:"structure"` - // The unique Amazon Resource Name of the disabled gateway. + // The unique Amazon Resource Name (ARN) of the disabled gateway. GatewayARN *string `min:"50" type:"string"` } @@ -11490,8 +11512,8 @@ type JoinDomainInput struct { // DomainName is a required field DomainName *string `type:"string" required:"true"` - // The unique Amazon Resource Name of the file gateway you want to add to the - // Active Directory domain. + // The unique Amazon Resource Name (ARN) of the file gateway you want to add + // to the Active Directory domain. // // GatewayARN is a required field GatewayARN *string `min:"50" type:"string" required:"true"` @@ -11572,7 +11594,7 @@ func (s *JoinDomainInput) SetUserName(v string) *JoinDomainInput { type JoinDomainOutput struct { _ struct{} `type:"structure"` - // The unique Amazon Resource Name of the gateway that joined the domain. + // The unique Amazon Resource Name (ARN) of the gateway that joined the domain. GatewayARN *string `min:"50" type:"string"` } @@ -12339,8 +12361,8 @@ func (s *ListVolumesOutput) SetVolumeInfos(v []*VolumeInfo) *ListVolumesOutput { // folders stored as Amazon S3 objects in S3 buckets don't, by default, have // Unix file permissions assigned to them. Upon discovery in an S3 bucket by // Storage Gateway, the S3 objects that represent files and folders are assigned -// these default Unix permissions. This operation is only supported in the file -// gateway type. +// these default Unix permissions. This operation is only supported for file +// gateways. type NFSFileShareDefaults struct { _ struct{} `type:"structure"` @@ -12422,8 +12444,8 @@ type NFSFileShareInfo struct { // must contain either valid IP addresses or valid CIDR blocks. ClientList []*string `min:"1" type:"list"` - // The default storage class for objects put into an Amazon S3 bucket by file - // gateway. Possible values are S3_STANDARD, S3_STANDARD_IA or S3_ONEZONE_IA. + // The default storage class for objects put into an Amazon S3 bucket by the + // file gateway. Possible values are S3_STANDARD, S3_STANDARD_IA, or S3_ONEZONE_IA. // If this field is not populated, the default value S3_STANDARD is used. Optional. DefaultStorageClass *string `min:"5" type:"string"` @@ -12441,17 +12463,17 @@ type NFSFileShareInfo struct { // to return a list of gateways for your account and region. GatewayARN *string `min:"50" type:"string"` - // Enables guessing of the MIME type for uploaded objects based on file extensions. - // Set this value to true to enable MIME type guessing, and otherwise to false. - // The default value is true. + // A value that enables guessing of the MIME type for uploaded objects based + // on file extensions. Set this value to true to enable MIME type guessing, + // and otherwise to false. The default value is true. GuessMIMETypeEnabled *bool `type:"boolean"` - // True to use Amazon S3 server side encryption with your own KMS key, or false - // to use a key managed by Amazon S3. Optional. + // True to use Amazon S3 server side encryption with your own AWS KMS key, or + // false to use a key managed by Amazon S3. Optional. KMSEncrypted *bool `type:"boolean"` - // The Amazon Resource Name (ARN) of the KMS key used for Amazon S3 server side - // encryption. This value can only be set when KMSEncrypted is true. Optional. + // The Amazon Resource Name (ARN) of the AWS KMS key used for Amazon S3 server + // side encryption. This value can only be set when KMSEncrypted is true. Optional. KMSKey *string `min:"20" type:"string"` // The ARN of the backend storage used for storing file data. @@ -12461,24 +12483,23 @@ type NFSFileShareInfo struct { // folders stored as Amazon S3 objects in S3 buckets don't, by default, have // Unix file permissions assigned to them. Upon discovery in an S3 bucket by // Storage Gateway, the S3 objects that represent files and folders are assigned - // these default Unix permissions. This operation is only supported in the file - // gateway type. + // these default Unix permissions. This operation is only supported for file + // gateways. NFSFileShareDefaults *NFSFileShareDefaults `type:"structure"` - // Sets the access control list permission for objects in the S3 bucket that - // a file gateway puts objects into. The default value is "private". + // A value that sets the access control list permission for objects in the S3 + // bucket that a file gateway puts objects into. The default value is "private". ObjectACL *string `type:"string" enum:"ObjectACL"` // The file share path used by the NFS client to identify the mount point. Path *string `type:"string"` - // Sets the write status of a file share. This value is true if the write status - // is read-only, and otherwise false. + // A value that sets the write status of a file share. This value is true if + // the write status is read-only, and otherwise false. ReadOnly *bool `type:"boolean"` - // Sets who pays the cost of the request and the data download from the Amazon - // S3 bucket. Set this value to true if you want the requester to pay instead - // of the bucket owner, and otherwise to false. + // A value that sets the access control list permission for objects in the Amazon + // S3 bucket that a file gateway puts objects into. The default value is private. RequesterPays *bool `type:"boolean"` // The ARN of the IAM role that file gateway assumes when it accesses the underlying @@ -12487,11 +12508,11 @@ type NFSFileShareInfo struct { // The user mapped to anonymous user. Valid options are the following: // - // * "RootSquash" - Only root is mapped to anonymous user. + // * RootSquash - Only root is mapped to anonymous user. // - // * "NoSquash" - No one is mapped to anonymous user + // * NoSquash - No one is mapped to anonymous user // - // * "AllSquash" - Everyone is mapped to anonymous user. + // * AllSquash - Everyone is mapped to anonymous user. Squash *string `min:"5" type:"string"` } @@ -12733,6 +12754,21 @@ type RefreshCacheInput struct { // // FileShareARN is a required field FileShareARN *string `min:"50" type:"string" required:"true"` + + // A comma-separated list of the paths of folders to refresh in the cache. The + // default is ["/"]. The default refreshes objects and folders at the root of + // the Amazon S3 bucket. If Recursive is set to "true", the entire S3 bucket + // that the file share has access to is refreshed. + FolderList []*string `min:"1" type:"list"` + + // A value that specifies whether to recursively refresh folders in the cache. + // The refresh includes folders that were in the cache the last time the gateway + // listed the folder's contents. If this value set to "true", each folder that + // is listed in FolderList is recursively updated. Otherwise, subfolders listed + // in FolderList are not refreshed. Only objects that are in folders listed + // directly under FolderList are found and used for the update. The default + // is "true". + Recursive *bool `type:"boolean"` } // String returns the string representation @@ -12754,6 +12790,9 @@ func (s *RefreshCacheInput) Validate() error { if s.FileShareARN != nil && len(*s.FileShareARN) < 50 { invalidParams.Add(request.NewErrParamMinLen("FileShareARN", 50)) } + if s.FolderList != nil && len(s.FolderList) < 1 { + invalidParams.Add(request.NewErrParamMinLen("FolderList", 1)) + } if invalidParams.Len() > 0 { return invalidParams @@ -12767,11 +12806,28 @@ func (s *RefreshCacheInput) SetFileShareARN(v string) *RefreshCacheInput { return s } +// SetFolderList sets the FolderList field's value. +func (s *RefreshCacheInput) SetFolderList(v []*string) *RefreshCacheInput { + s.FolderList = v + return s +} + +// SetRecursive sets the Recursive field's value. +func (s *RefreshCacheInput) SetRecursive(v bool) *RefreshCacheInput { + s.Recursive = &v + return s +} + +// RefreshCacheOutput type RefreshCacheOutput struct { _ struct{} `type:"structure"` // The Amazon Resource Name (ARN) of the file share. FileShareARN *string `min:"50" type:"string"` + + // The randomly generated ID of the notification that was sent. This ID is in + // UUID format. + NotificationId *string `min:"1" type:"string"` } // String returns the string representation @@ -12790,6 +12846,12 @@ func (s *RefreshCacheOutput) SetFileShareARN(v string) *RefreshCacheOutput { return s } +// SetNotificationId sets the NotificationId field's value. +func (s *RefreshCacheOutput) SetNotificationId(v string) *RefreshCacheOutput { + s.NotificationId = &v + return s +} + // RemoveTagsFromResourceInput type RemoveTagsFromResourceInput struct { _ struct{} `type:"structure"` @@ -13116,16 +13178,17 @@ func (s *RetrieveTapeRecoveryPointOutput) SetTapeARN(v string) *RetrieveTapeReco // The Windows file permissions and ownership information assigned, by default, // to native S3 objects when file gateway discovers them in S3 buckets. This -// operation is only supported in file gateways. +// operation is only supported for file gateways. type SMBFileShareInfo struct { _ struct{} `type:"structure"` - // The authentication method of the file share. Valid values: "ActiveDirectory" - // or "GuestAccess". The default is "ActiveDirectory". + // The authentication method of the file share. + // + // Valid values are ActiveDirectory or GuestAccess. The default is ActiveDirectory. Authentication *string `min:"5" type:"string"` - // The default storage class for objects put into an Amazon S3 bucket by file - // gateway. Possible values are S3_STANDARD, S3_STANDARD_IA or S3_ONEZONE_IA. + // The default storage class for objects put into an Amazon S3 bucket by the + // file gateway. Possible values are S3_STANDARD, S3_STANDARD_IA, or S3_ONEZONE_IA. // If this field is not populated, the default value S3_STANDARD is used. Optional. DefaultStorageClass *string `min:"5" type:"string"` @@ -13143,48 +13206,49 @@ type SMBFileShareInfo struct { // to return a list of gateways for your account and region. GatewayARN *string `min:"50" type:"string"` - // Enables guessing of the MIME type for uploaded objects based on file extensions. - // Set this value to true to enable MIME type guessing, and otherwise to false. - // The default value is true. + // A value that enables guessing of the MIME type for uploaded objects based + // on file extensions. Set this value to true to enable MIME type guessing, + // and otherwise to false. The default value is true. GuessMIMETypeEnabled *bool `type:"boolean"` - // A list of users in the Active Directory that are not allowed to access the - // file share. Can only be set if Authentication is set to "ActiveDirectory". + // A list of users or groups in the Active Directory that are not allowed to + // access the file share. A group must be prefixed with the @ character. For + // example @group1. Can only be set if Authentication is set to ActiveDirectory. InvalidUserList []*string `type:"list"` - // True to use Amazon S3 server side encryption with your own KMS key, or false - // to use a key managed by Amazon S3. Optional. + // True to use Amazon S3 server-side encryption with your own AWS KMS key, or + // false to use a key managed by Amazon S3. Optional. KMSEncrypted *bool `type:"boolean"` - // The Amazon Resource Name (ARN) of the KMS key used for Amazon S3 server side - // encryption. This value can only be set when KMSEncrypted is true. Optional. + // The Amazon Resource Name (ARN) of the AWS KMS key used for Amazon S3 server + // side encryption. This value can only be set when KMSEncrypted is true. Optional. KMSKey *string `min:"20" type:"string"` // The ARN of the backend storage used for storing file data. LocationARN *string `min:"16" type:"string"` - // Sets the access control list permission for objects in the S3 bucket that - // a file gateway puts objects into. The default value is "private". + // A value that sets the access control list permission for objects in the S3 + // bucket that a file gateway puts objects into. The default value is "private". ObjectACL *string `type:"string" enum:"ObjectACL"` // The file share path used by the SMB client to identify the mount point. Path *string `type:"string"` - // Sets the write status of a file share. This value is true if the write status - // is read-only, and otherwise false. + // A value that sets the write status of a file share. This value is true if + // the write status is read-only, and otherwise false. ReadOnly *bool `type:"boolean"` - // Sets who pays the cost of the request and the data download from the Amazon - // S3 bucket. Set this value to true if you want the requester to pay instead - // of the bucket owner, and otherwise to false. + // A value that sets the access control list permission for objects in the Amazon + // S3 bucket that a file gateway puts objects into. The default value is private. RequesterPays *bool `type:"boolean"` // The ARN of the IAM role that file gateway assumes when it accesses the underlying // storage. Role *string `min:"20" type:"string"` - // A list of users in the Active Directory that are allowed to access the file - // share. Can only be set if Authentication is set to "ActiveDirectory". + // A list of users or groups in the Active Directory that are allowed to access + // the file share. A group must be prefixed with the @ character. For example + // @group1. Can only be set if Authentication is set to ActiveDirectory. ValidUserList []*string `type:"list"` } @@ -13394,7 +13458,7 @@ type SetSMBGuestPasswordInput struct { // GatewayARN is a required field GatewayARN *string `min:"50" type:"string" required:"true"` - // The password you want to set for your SMB Server. + // The password that you want to set for your SMB Server. // // Password is a required field Password *string `min:"6" type:"string" required:"true"` @@ -13612,6 +13676,10 @@ type StorediSCSIVolume struct { // don’t have this time stamp. CreatedDate *time.Time `type:"timestamp"` + // The Amazon Resource Name (ARN) of the AWS KMS key used for Amazon S3 server + // side encryption. This value can only be set when KMSEncrypted is true. Optional. + KMSKey *string `min:"20" type:"string"` + // Indicates if when the stored volume was created, existing data on the underlying // local disk was preserved. // @@ -13673,6 +13741,12 @@ func (s *StorediSCSIVolume) SetCreatedDate(v time.Time) *StorediSCSIVolume { return s } +// SetKMSKey sets the KMSKey field's value. +func (s *StorediSCSIVolume) SetKMSKey(v string) *StorediSCSIVolume { + s.KMSKey = &v + return s +} + // SetPreservedExistingData sets the PreservedExistingData field's value. func (s *StorediSCSIVolume) SetPreservedExistingData(v bool) *StorediSCSIVolume { s.PreservedExistingData = &v @@ -13794,8 +13868,8 @@ func (s *Tag) SetValue(v string) *Tag { type Tape struct { _ struct{} `type:"structure"` - // The Amazon Resource Name (ARN) of the KMS key used for Amazon S3 server side - // encryption. This value can only be set when KMSEncrypted is true. Optional. + // The Amazon Resource Name (ARN) of the AWS KMS key used for Amazon S3 server + // side encryption. This value can only be set when KMSEncrypted is true. Optional. KMSKey *string `min:"20" type:"string"` // For archiving virtual tapes, indicates how much data remains to be uploaded @@ -13903,8 +13977,8 @@ type TapeArchive struct { // format. CompletionTime *time.Time `type:"timestamp"` - // The Amazon Resource Name (ARN) of the KMS key used for Amazon S3 server side - // encryption. This value can only be set when KMSEncrypted is true. Optional. + // The Amazon Resource Name (ARN) of the AWS KMS key used for Amazon S3 server + // side encryption. This value can only be set when KMSEncrypted is true. Optional. KMSKey *string `min:"20" type:"string"` // The Amazon Resource Name (ARN) of the tape gateway that the virtual tape @@ -14646,8 +14720,8 @@ type UpdateNFSFileShareInput struct { // must contain either valid IP addresses or valid CIDR blocks. ClientList []*string `min:"1" type:"list"` - // The default storage class for objects put into an Amazon S3 bucket by a file - // gateway. Possible values are S3_STANDARD, S3_STANDARD_IA or S3_ONEZONE_IA. + // The default storage class for objects put into an Amazon S3 bucket by the + // file gateway. Possible values are S3_STANDARD, S3_STANDARD_IA, or S3_ONEZONE_IA. // If this field is not populated, the default value S3_STANDARD is used. Optional. DefaultStorageClass *string `min:"5" type:"string"` @@ -14656,42 +14730,41 @@ type UpdateNFSFileShareInput struct { // FileShareARN is a required field FileShareARN *string `min:"50" type:"string" required:"true"` - // Enables guessing of the MIME type for uploaded objects based on file extensions. - // Set this value to true to enable MIME type guessing, and otherwise to false. - // The default value is true. + // A value that enables guessing of the MIME type for uploaded objects based + // on file extensions. Set this value to true to enable MIME type guessing, + // and otherwise to false. The default value is true. GuessMIMETypeEnabled *bool `type:"boolean"` // True to use Amazon S3 server side encryption with your own AWS KMS key, or // false to use a key managed by Amazon S3. Optional. KMSEncrypted *bool `type:"boolean"` - // The Amazon Resource Name (ARN) of the KMS key used for Amazon S3 server side - // encryption. This value can only be set when KMSEncrypted is true. Optional. + // The Amazon Resource Name (ARN) of the AWS KMS key used for Amazon S3 server + // side encryption. This value can only be set when KMSEncrypted is true. Optional. KMSKey *string `min:"20" type:"string"` // The default values for the file share. Optional. NFSFileShareDefaults *NFSFileShareDefaults `type:"structure"` - // Sets the access control list permission for objects in the S3 bucket that - // a file gateway puts objects into. The default value is "private". + // A value that sets the access control list permission for objects in the S3 + // bucket that a file gateway puts objects into. The default value is "private". ObjectACL *string `type:"string" enum:"ObjectACL"` - // Sets the write status of a file share. This value is true if the write status - // is read-only, and otherwise false. + // A value that sets the write status of a file share. This value is true if + // the write status is read-only, and otherwise false. ReadOnly *bool `type:"boolean"` - // Sets who pays the cost of the request and the data download from the Amazon - // S3 bucket. Set this value to true if you want the requester to pay instead - // of the bucket owner, and otherwise to false. + // A value that sets the access control list permission for objects in the Amazon + // S3 bucket that a file gateway puts objects into. The default value is private. RequesterPays *bool `type:"boolean"` // The user mapped to anonymous user. Valid options are the following: // - // * "RootSquash" - Only root is mapped to anonymous user. + // * RootSquash - Only root is mapped to anonymous user. // - // * "NoSquash" - No one is mapped to anonymous user + // * NoSquash - No one is mapped to anonymous user // - // * "AllSquash" - Everyone is mapped to anonymous user. + // * AllSquash - Everyone is mapped to anonymous user. Squash *string `min:"5" type:"string"` } @@ -14832,48 +14905,49 @@ func (s *UpdateNFSFileShareOutput) SetFileShareARN(v string) *UpdateNFSFileShare type UpdateSMBFileShareInput struct { _ struct{} `type:"structure"` - // The default storage class for objects put into an Amazon S3 bucket by file - // gateway. Possible values are S3_STANDARD, S3_STANDARD_IA or S3_ONEZONE_IA. + // The default storage class for objects put into an Amazon S3 bucket by the + // file gateway. Possible values are S3_STANDARD, S3_STANDARD_IA, or S3_ONEZONE_IA. // If this field is not populated, the default value S3_STANDARD is used. Optional. DefaultStorageClass *string `min:"5" type:"string"` - // The Amazon Resource Name (ARN) of the SMB file share you want to update. + // The Amazon Resource Name (ARN) of the SMB file share that you want to update. // // FileShareARN is a required field FileShareARN *string `min:"50" type:"string" required:"true"` - // Enables guessing of the MIME type for uploaded objects based on file extensions. - // Set this value to true to enable MIME type guessing, and otherwise to false. - // The default value is true. + // A value that enables guessing of the MIME type for uploaded objects based + // on file extensions. Set this value to true to enable MIME type guessing, + // and otherwise to false. The default value is true. GuessMIMETypeEnabled *bool `type:"boolean"` - // A list of users in the Active Directory that are not allowed to access the - // file share. Can only be set if Authentication is set to "ActiveDirectory". + // A list of users or groups in the Active Directory that are not allowed to + // access the file share. A group must be prefixed with the @ character. For + // example @group1. Can only be set if Authentication is set to ActiveDirectory. InvalidUserList []*string `type:"list"` // True to use Amazon S3 server side encryption with your own AWS KMS key, or // false to use a key managed by Amazon S3. Optional. KMSEncrypted *bool `type:"boolean"` - // The Amazon Resource Name (ARN) KMS key used for Amazon S3 server side encryption. - // This value can only be set when KMSEncrypted is true. Optional. + // The Amazon Resource Name (ARN) of the AWS KMS key used for Amazon S3 server + // side encryption. This value can only be set when KMSEncrypted is true. Optional. KMSKey *string `min:"20" type:"string"` - // Sets the access control list permission for objects in the Amazon S3 bucket - // that a file gateway puts objects into. The default value is "private". + // A value that sets the access control list permission for objects in the S3 + // bucket that a file gateway puts objects into. The default value is "private". ObjectACL *string `type:"string" enum:"ObjectACL"` - // Sets the write status of a file share. This value is true if the write status - // is read-only, and otherwise false. + // A value that sets the write status of a file share. This value is true if + // the write status is read-only, and otherwise false. ReadOnly *bool `type:"boolean"` - // Sets who pays the cost of the request and the data download from the Amazon - // S3 bucket. Set this value to true if you want the requester to pay instead - // of the bucket owner, and otherwise to false. + // A value that sets the access control list permission for objects in the Amazon + // S3 bucket that a file gateway puts objects into. The default value is private. RequesterPays *bool `type:"boolean"` - // A list of users in the Active Directory that are allowed to access the file - // share. Can only be set if Authentication is set to "ActiveDirectory". + // A list of users or groups in the Active Directory that are allowed to access + // the file share. A group must be prefixed with the @ character. For example + // @group1. Can only be set if Authentication is set to ActiveDirectory. ValidUserList []*string `type:"list"` } @@ -15641,8 +15715,8 @@ const ( FileShareTypeSmb = "SMB" ) -// Sets the access control list permission for objects in the S3 bucket that -// a file gateway puts objects into. The default value is "private". +// A value that sets the access control list permission for objects in the S3 +// bucket that a file gateway puts objects into. The default value is "private". const ( // ObjectACLPrivate is a ObjectACL enum value ObjectACLPrivate = "private" diff --git a/vendor/github.com/aws/aws-sdk-go/service/storagegateway/doc.go b/vendor/github.com/aws/aws-sdk-go/service/storagegateway/doc.go index 12f57f240..b53d44223 100644 --- a/vendor/github.com/aws/aws-sdk-go/service/storagegateway/doc.go +++ b/vendor/github.com/aws/aws-sdk-go/service/storagegateway/doc.go @@ -29,8 +29,8 @@ // of requests and responses. // // * AWS Storage Gateway Regions and Endpoints: (http://docs.aws.amazon.com/general/latest/gr/rande.html#sg_region) -// Provides a list of each region and endpoints available for use with AWS -// Storage Gateway. +// Provides a list of each AWS region and endpoints available for use with +// AWS Storage Gateway. // // AWS Storage Gateway resource IDs are in uppercase. When you use these resource // IDs with the Amazon EC2 API, EC2 expects resource IDs in lowercase. You must diff --git a/vendor/github.com/aws/aws-sdk-go/service/waf/api.go b/vendor/github.com/aws/aws-sdk-go/service/waf/api.go index e08ff3ee9..0d9abe4d7 100644 --- a/vendor/github.com/aws/aws-sdk-go/service/waf/api.go +++ b/vendor/github.com/aws/aws-sdk-go/service/waf/api.go @@ -2094,6 +2094,93 @@ func (c *WAF) DeleteIPSetWithContext(ctx aws.Context, input *DeleteIPSetInput, o return out, req.Send() } +const opDeleteLoggingConfiguration = "DeleteLoggingConfiguration" + +// DeleteLoggingConfigurationRequest generates a "aws/request.Request" representing the +// client's request for the DeleteLoggingConfiguration operation. The "output" return +// value will be populated with the request's response once the request completes +// successfuly. +// +// Use "Send" method on the returned Request to send the API call to the service. +// the "output" return value is not valid until after Send returns without error. +// +// See DeleteLoggingConfiguration for more information on using the DeleteLoggingConfiguration +// API call, and error handling. +// +// This method is useful when you want to inject custom logic or configuration +// into the SDK's request lifecycle. Such as custom headers, or retry logic. +// +// +// // Example sending a request using the DeleteLoggingConfigurationRequest method. +// req, resp := client.DeleteLoggingConfigurationRequest(params) +// +// err := req.Send() +// if err == nil { // resp is now filled +// fmt.Println(resp) +// } +// +// See also, https://docs.aws.amazon.com/goto/WebAPI/waf-2015-08-24/DeleteLoggingConfiguration +func (c *WAF) DeleteLoggingConfigurationRequest(input *DeleteLoggingConfigurationInput) (req *request.Request, output *DeleteLoggingConfigurationOutput) { + op := &request.Operation{ + Name: opDeleteLoggingConfiguration, + HTTPMethod: "POST", + HTTPPath: "/", + } + + if input == nil { + input = &DeleteLoggingConfigurationInput{} + } + + output = &DeleteLoggingConfigurationOutput{} + req = c.newRequest(op, input, output) + return +} + +// DeleteLoggingConfiguration API operation for AWS WAF. +// +// Permanently deletes the LoggingConfiguration from the specified web ACL. +// +// Returns awserr.Error for service API and SDK errors. Use runtime type assertions +// with awserr.Error's Code and Message methods to get detailed information about +// the error. +// +// See the AWS API reference guide for AWS WAF's +// API operation DeleteLoggingConfiguration for usage and error information. +// +// Returned Error Codes: +// * ErrCodeInternalErrorException "WAFInternalErrorException" +// The operation failed because of a system problem, even though the request +// was valid. Retry your request. +// +// * ErrCodeNonexistentItemException "WAFNonexistentItemException" +// The operation failed because the referenced object doesn't exist. +// +// * ErrCodeStaleDataException "WAFStaleDataException" +// The operation failed because you tried to create, update, or delete an object +// by using a change token that has already been used. +// +// See also, https://docs.aws.amazon.com/goto/WebAPI/waf-2015-08-24/DeleteLoggingConfiguration +func (c *WAF) DeleteLoggingConfiguration(input *DeleteLoggingConfigurationInput) (*DeleteLoggingConfigurationOutput, error) { + req, out := c.DeleteLoggingConfigurationRequest(input) + return out, req.Send() +} + +// DeleteLoggingConfigurationWithContext is the same as DeleteLoggingConfiguration with the addition of +// the ability to pass a context and additional request options. +// +// See DeleteLoggingConfiguration for details on how to use this API operation. +// +// The context must be non-nil and will be used for request cancellation. If +// the context is nil a panic will occur. In the future the SDK may create +// sub-contexts for http.Requests. See https://golang.org/pkg/context/ +// for more information on using Contexts. +func (c *WAF) DeleteLoggingConfigurationWithContext(ctx aws.Context, input *DeleteLoggingConfigurationInput, opts ...request.Option) (*DeleteLoggingConfigurationOutput, error) { + req, out := c.DeleteLoggingConfigurationRequest(input) + req.SetContext(ctx) + req.ApplyOptions(opts...) + return out, req.Send() +} + const opDeletePermissionPolicy = "DeletePermissionPolicy" // DeletePermissionPolicyRequest generates a "aws/request.Request" representing the @@ -2778,6 +2865,24 @@ func (c *WAF) DeleteRuleGroupRequest(input *DeleteRuleGroupInput) (req *request. // // * You tried to delete an IPSet that references one or more IP addresses. // +// * ErrCodeInvalidOperationException "WAFInvalidOperationException" +// The operation failed because there was nothing to do. For example: +// +// * You tried to remove a Rule from a WebACL, but the Rule isn't in the +// specified WebACL. +// +// * You tried to remove an IP address from an IPSet, but the IP address +// isn't in the specified IPSet. +// +// * You tried to remove a ByteMatchTuple from a ByteMatchSet, but the ByteMatchTuple +// isn't in the specified WebACL. +// +// * You tried to add a Rule to a WebACL, but the Rule already exists in +// the specified WebACL. +// +// * You tried to add a ByteMatchTuple to a ByteMatchSet, but the ByteMatchTuple +// already exists in the specified WebACL. +// // See also, https://docs.aws.amazon.com/goto/WebAPI/waf-2015-08-24/DeleteRuleGroup func (c *WAF) DeleteRuleGroup(input *DeleteRuleGroupInput) (*DeleteRuleGroupOutput, error) { req, out := c.DeleteRuleGroupRequest(input) @@ -3753,6 +3858,89 @@ func (c *WAF) GetIPSetWithContext(ctx aws.Context, input *GetIPSetInput, opts .. return out, req.Send() } +const opGetLoggingConfiguration = "GetLoggingConfiguration" + +// GetLoggingConfigurationRequest generates a "aws/request.Request" representing the +// client's request for the GetLoggingConfiguration operation. The "output" return +// value will be populated with the request's response once the request completes +// successfuly. +// +// Use "Send" method on the returned Request to send the API call to the service. +// the "output" return value is not valid until after Send returns without error. +// +// See GetLoggingConfiguration for more information on using the GetLoggingConfiguration +// API call, and error handling. +// +// This method is useful when you want to inject custom logic or configuration +// into the SDK's request lifecycle. Such as custom headers, or retry logic. +// +// +// // Example sending a request using the GetLoggingConfigurationRequest method. +// req, resp := client.GetLoggingConfigurationRequest(params) +// +// err := req.Send() +// if err == nil { // resp is now filled +// fmt.Println(resp) +// } +// +// See also, https://docs.aws.amazon.com/goto/WebAPI/waf-2015-08-24/GetLoggingConfiguration +func (c *WAF) GetLoggingConfigurationRequest(input *GetLoggingConfigurationInput) (req *request.Request, output *GetLoggingConfigurationOutput) { + op := &request.Operation{ + Name: opGetLoggingConfiguration, + HTTPMethod: "POST", + HTTPPath: "/", + } + + if input == nil { + input = &GetLoggingConfigurationInput{} + } + + output = &GetLoggingConfigurationOutput{} + req = c.newRequest(op, input, output) + return +} + +// GetLoggingConfiguration API operation for AWS WAF. +// +// Returns the LoggingConfiguration for the specified web ACL. +// +// Returns awserr.Error for service API and SDK errors. Use runtime type assertions +// with awserr.Error's Code and Message methods to get detailed information about +// the error. +// +// See the AWS API reference guide for AWS WAF's +// API operation GetLoggingConfiguration for usage and error information. +// +// Returned Error Codes: +// * ErrCodeInternalErrorException "WAFInternalErrorException" +// The operation failed because of a system problem, even though the request +// was valid. Retry your request. +// +// * ErrCodeNonexistentItemException "WAFNonexistentItemException" +// The operation failed because the referenced object doesn't exist. +// +// See also, https://docs.aws.amazon.com/goto/WebAPI/waf-2015-08-24/GetLoggingConfiguration +func (c *WAF) GetLoggingConfiguration(input *GetLoggingConfigurationInput) (*GetLoggingConfigurationOutput, error) { + req, out := c.GetLoggingConfigurationRequest(input) + return out, req.Send() +} + +// GetLoggingConfigurationWithContext is the same as GetLoggingConfiguration with the addition of +// the ability to pass a context and additional request options. +// +// See GetLoggingConfiguration for details on how to use this API operation. +// +// The context must be non-nil and will be used for request cancellation. If +// the context is nil a panic will occur. In the future the SDK may create +// sub-contexts for http.Requests. See https://golang.org/pkg/context/ +// for more information on using Contexts. +func (c *WAF) GetLoggingConfigurationWithContext(ctx aws.Context, input *GetLoggingConfigurationInput, opts ...request.Option) (*GetLoggingConfigurationOutput, error) { + req, out := c.GetLoggingConfigurationRequest(input) + req.SetContext(ctx) + req.ApplyOptions(opts...) + return out, req.Send() +} + const opGetPermissionPolicy = "GetPermissionPolicy" // GetPermissionPolicyRequest generates a "aws/request.Request" representing the @@ -5196,6 +5384,118 @@ func (c *WAF) ListIPSetsWithContext(ctx aws.Context, input *ListIPSetsInput, opt return out, req.Send() } +const opListLoggingConfigurations = "ListLoggingConfigurations" + +// ListLoggingConfigurationsRequest generates a "aws/request.Request" representing the +// client's request for the ListLoggingConfigurations operation. The "output" return +// value will be populated with the request's response once the request completes +// successfuly. +// +// Use "Send" method on the returned Request to send the API call to the service. +// the "output" return value is not valid until after Send returns without error. +// +// See ListLoggingConfigurations for more information on using the ListLoggingConfigurations +// API call, and error handling. +// +// This method is useful when you want to inject custom logic or configuration +// into the SDK's request lifecycle. Such as custom headers, or retry logic. +// +// +// // Example sending a request using the ListLoggingConfigurationsRequest method. +// req, resp := client.ListLoggingConfigurationsRequest(params) +// +// err := req.Send() +// if err == nil { // resp is now filled +// fmt.Println(resp) +// } +// +// See also, https://docs.aws.amazon.com/goto/WebAPI/waf-2015-08-24/ListLoggingConfigurations +func (c *WAF) ListLoggingConfigurationsRequest(input *ListLoggingConfigurationsInput) (req *request.Request, output *ListLoggingConfigurationsOutput) { + op := &request.Operation{ + Name: opListLoggingConfigurations, + HTTPMethod: "POST", + HTTPPath: "/", + } + + if input == nil { + input = &ListLoggingConfigurationsInput{} + } + + output = &ListLoggingConfigurationsOutput{} + req = c.newRequest(op, input, output) + return +} + +// ListLoggingConfigurations API operation for AWS WAF. +// +// Returns an array of LoggingConfiguration objects. +// +// Returns awserr.Error for service API and SDK errors. Use runtime type assertions +// with awserr.Error's Code and Message methods to get detailed information about +// the error. +// +// See the AWS API reference guide for AWS WAF's +// API operation ListLoggingConfigurations for usage and error information. +// +// Returned Error Codes: +// * ErrCodeInternalErrorException "WAFInternalErrorException" +// The operation failed because of a system problem, even though the request +// was valid. Retry your request. +// +// * ErrCodeNonexistentItemException "WAFNonexistentItemException" +// The operation failed because the referenced object doesn't exist. +// +// * ErrCodeInvalidParameterException "WAFInvalidParameterException" +// The operation failed because AWS WAF didn't recognize a parameter in the +// request. For example: +// +// * You specified an invalid parameter name. +// +// * You specified an invalid value. +// +// * You tried to update an object (ByteMatchSet, IPSet, Rule, or WebACL) +// using an action other than INSERT or DELETE. +// +// * You tried to create a WebACL with a DefaultActionType other than ALLOW, +// BLOCK, or COUNT. +// +// * You tried to create a RateBasedRule with a RateKey value other than +// IP. +// +// * You tried to update a WebACL with a WafActionType other than ALLOW, +// BLOCK, or COUNT. +// +// * You tried to update a ByteMatchSet with a FieldToMatchType other than +// HEADER, METHOD, QUERY_STRING, URI, or BODY. +// +// * You tried to update a ByteMatchSet with a Field of HEADER but no value +// for Data. +// +// * Your request references an ARN that is malformed, or corresponds to +// a resource with which a web ACL cannot be associated. +// +// See also, https://docs.aws.amazon.com/goto/WebAPI/waf-2015-08-24/ListLoggingConfigurations +func (c *WAF) ListLoggingConfigurations(input *ListLoggingConfigurationsInput) (*ListLoggingConfigurationsOutput, error) { + req, out := c.ListLoggingConfigurationsRequest(input) + return out, req.Send() +} + +// ListLoggingConfigurationsWithContext is the same as ListLoggingConfigurations with the addition of +// the ability to pass a context and additional request options. +// +// See ListLoggingConfigurations for details on how to use this API operation. +// +// The context must be non-nil and will be used for request cancellation. If +// the context is nil a panic will occur. In the future the SDK may create +// sub-contexts for http.Requests. See https://golang.org/pkg/context/ +// for more information on using Contexts. +func (c *WAF) ListLoggingConfigurationsWithContext(ctx aws.Context, input *ListLoggingConfigurationsInput, opts ...request.Option) (*ListLoggingConfigurationsOutput, error) { + req, out := c.ListLoggingConfigurationsRequest(input) + req.SetContext(ctx) + req.ApplyOptions(opts...) + return out, req.Send() +} + const opListRateBasedRules = "ListRateBasedRules" // ListRateBasedRulesRequest generates a "aws/request.Request" representing the @@ -6031,6 +6331,108 @@ func (c *WAF) ListXssMatchSetsWithContext(ctx aws.Context, input *ListXssMatchSe return out, req.Send() } +const opPutLoggingConfiguration = "PutLoggingConfiguration" + +// PutLoggingConfigurationRequest generates a "aws/request.Request" representing the +// client's request for the PutLoggingConfiguration operation. The "output" return +// value will be populated with the request's response once the request completes +// successfuly. +// +// Use "Send" method on the returned Request to send the API call to the service. +// the "output" return value is not valid until after Send returns without error. +// +// See PutLoggingConfiguration for more information on using the PutLoggingConfiguration +// API call, and error handling. +// +// This method is useful when you want to inject custom logic or configuration +// into the SDK's request lifecycle. Such as custom headers, or retry logic. +// +// +// // Example sending a request using the PutLoggingConfigurationRequest method. +// req, resp := client.PutLoggingConfigurationRequest(params) +// +// err := req.Send() +// if err == nil { // resp is now filled +// fmt.Println(resp) +// } +// +// See also, https://docs.aws.amazon.com/goto/WebAPI/waf-2015-08-24/PutLoggingConfiguration +func (c *WAF) PutLoggingConfigurationRequest(input *PutLoggingConfigurationInput) (req *request.Request, output *PutLoggingConfigurationOutput) { + op := &request.Operation{ + Name: opPutLoggingConfiguration, + HTTPMethod: "POST", + HTTPPath: "/", + } + + if input == nil { + input = &PutLoggingConfigurationInput{} + } + + output = &PutLoggingConfigurationOutput{} + req = c.newRequest(op, input, output) + return +} + +// PutLoggingConfiguration API operation for AWS WAF. +// +// Associates a LoggingConfiguration with a specified web ACL. +// +// You can access information about all traffic that AWS WAF inspects using +// the following steps: +// +// Create an Amazon Kinesis Data Firehose delivery stream. For more information, +// see Creating an Amazon Kinesis Data Firehose Delivery Stream (https://docs.aws.amazon.com/firehose/latest/dev/what-is-this-service.html). +// +// Associate that delivery stream to your web ACL using a PutLoggingConfiguration +// request. +// +// When you successfully enable logging using a PutLoggingConfiguration request, +// AWS WAF will create a service linked role with the necessary permissions +// to write logs to the Amazon Kinesis Data Firehose delivery stream. For more +// information, see Logging Web ACL Traffic Information (http://docs.aws.amazon.com/waf/latest/developerguide/logging.html) +// in the AWS WAF Developer Guide. +// +// Returns awserr.Error for service API and SDK errors. Use runtime type assertions +// with awserr.Error's Code and Message methods to get detailed information about +// the error. +// +// See the AWS API reference guide for AWS WAF's +// API operation PutLoggingConfiguration for usage and error information. +// +// Returned Error Codes: +// * ErrCodeInternalErrorException "WAFInternalErrorException" +// The operation failed because of a system problem, even though the request +// was valid. Retry your request. +// +// * ErrCodeNonexistentItemException "WAFNonexistentItemException" +// The operation failed because the referenced object doesn't exist. +// +// * ErrCodeStaleDataException "WAFStaleDataException" +// The operation failed because you tried to create, update, or delete an object +// by using a change token that has already been used. +// +// See also, https://docs.aws.amazon.com/goto/WebAPI/waf-2015-08-24/PutLoggingConfiguration +func (c *WAF) PutLoggingConfiguration(input *PutLoggingConfigurationInput) (*PutLoggingConfigurationOutput, error) { + req, out := c.PutLoggingConfigurationRequest(input) + return out, req.Send() +} + +// PutLoggingConfigurationWithContext is the same as PutLoggingConfiguration with the addition of +// the ability to pass a context and additional request options. +// +// See PutLoggingConfiguration for details on how to use this API operation. +// +// The context must be non-nil and will be used for request cancellation. If +// the context is nil a panic will occur. In the future the SDK may create +// sub-contexts for http.Requests. See https://golang.org/pkg/context/ +// for more information on using Contexts. +func (c *WAF) PutLoggingConfigurationWithContext(ctx aws.Context, input *PutLoggingConfigurationInput, opts ...request.Option) (*PutLoggingConfigurationOutput, error) { + req, out := c.PutLoggingConfigurationRequest(input) + req.SetContext(ctx) + req.ApplyOptions(opts...) + return out, req.Send() +} + const opPutPermissionPolicy = "PutPermissionPolicy" // PutPermissionPolicyRequest generates a "aws/request.Request" representing the @@ -6086,8 +6488,9 @@ func (c *WAF) PutPermissionPolicyRequest(input *PutPermissionPolicyInput) (req * // // * Effect must specify Allow. // -// * The Action in the policy must be waf:UpdateWebACL and waf-regional:UpdateWebACL. -// Any extra or wildcard actions in the policy will be rejected. +// * The Action in the policy must be waf:UpdateWebACL, waf-regional:UpdateWebACL, +// waf:GetRuleGroup and waf-regional:GetRuleGroup . Any extra or wildcard +// actions in the policy will be rejected. // // * The policy cannot include a Resource parameter. // @@ -6132,8 +6535,9 @@ func (c *WAF) PutPermissionPolicyRequest(input *PutPermissionPolicyInput) (req * // // * Effect must specify Allow. // -// * The Action in the policy must be waf:UpdateWebACL or waf-regional:UpdateWebACL. -// Any extra or wildcard actions in the policy will be rejected. +// * The Action in the policy must be waf:UpdateWebACL, waf-regional:UpdateWebACL, +// waf:GetRuleGroup and waf-regional:GetRuleGroup . Any extra or wildcard +// actions in the policy will be rejected. // // * The policy cannot include a Resource parameter. // @@ -6279,9 +6683,6 @@ func (c *WAF) UpdateByteMatchSetRequest(input *UpdateByteMatchSetInput) (req *re // * You tried to add a Rule to a WebACL, but the Rule already exists in // the specified WebACL. // -// * You tried to add an IP address to an IPSet, but the IP address already -// exists in the specified IPSet. -// // * You tried to add a ByteMatchTuple to a ByteMatchSet, but the ByteMatchTuple // already exists in the specified WebACL. // @@ -6473,9 +6874,6 @@ func (c *WAF) UpdateGeoMatchSetRequest(input *UpdateGeoMatchSetInput) (req *requ // * You tried to add a Rule to a WebACL, but the Rule already exists in // the specified WebACL. // -// * You tried to add an IP address to an IPSet, but the IP address already -// exists in the specified IPSet. -// // * You tried to add a ByteMatchTuple to a ByteMatchSet, but the ByteMatchTuple // already exists in the specified WebACL. // @@ -6620,9 +7018,10 @@ func (c *WAF) UpdateIPSetRequest(input *UpdateIPSetInput) (req *request.Request, // range of IP addresses from 192.0.2.0 to 192.0.2.255) or 192.0.2.44/32 // (for the individual IP address 192.0.2.44). // -// AWS WAF supports /8, /16, /24, and /32 IP address ranges for IPv4, and /24, -// /32, /48, /56, /64 and /128 for IPv6. For more information about CIDR notation, -// see the Wikipedia entry Classless Inter-Domain Routing (https://en.wikipedia.org/wiki/Classless_Inter-Domain_Routing). +// AWS WAF supports IPv4 address ranges: /8 and any range between /16 through +// /32. AWS WAF supports IPv6 address ranges: /16, /24, /32, /48, /56, /64, +// and /128. For more information about CIDR notation, see the Wikipedia entry +// Classless Inter-Domain Routing (https://en.wikipedia.org/wiki/Classless_Inter-Domain_Routing). // // IPv6 addresses can be represented using any of the following formats: // @@ -6654,6 +7053,8 @@ func (c *WAF) UpdateIPSetRequest(input *UpdateIPSetInput) (req *request.Request, // and/or the IP addresses that you want to delete. If you want to change an // IP address, you delete the existing IP address and add the new one. // +// You can insert a maximum of 1000 addresses in a single request. +// // For more information about how to use the AWS WAF API to allow or block HTTP // requests, see the AWS WAF Developer Guide (http://docs.aws.amazon.com/waf/latest/developerguide/). // @@ -6692,9 +7093,6 @@ func (c *WAF) UpdateIPSetRequest(input *UpdateIPSetInput) (req *request.Request, // * You tried to add a Rule to a WebACL, but the Rule already exists in // the specified WebACL. // -// * You tried to add an IP address to an IPSet, but the IP address already -// exists in the specified IPSet. -// // * You tried to add a ByteMatchTuple to a ByteMatchSet, but the ByteMatchTuple // already exists in the specified WebACL. // @@ -6900,9 +7298,6 @@ func (c *WAF) UpdateRateBasedRuleRequest(input *UpdateRateBasedRuleInput) (req * // * You tried to add a Rule to a WebACL, but the Rule already exists in // the specified WebACL. // -// * You tried to add an IP address to an IPSet, but the IP address already -// exists in the specified IPSet. -// // * You tried to add a ByteMatchTuple to a ByteMatchSet, but the ByteMatchTuple // already exists in the specified WebACL. // @@ -7128,9 +7523,6 @@ func (c *WAF) UpdateRegexMatchSetRequest(input *UpdateRegexMatchSetInput) (req * // * You tried to add a Rule to a WebACL, but the Rule already exists in // the specified WebACL. // -// * You tried to add an IP address to an IPSet, but the IP address already -// exists in the specified IPSet. -// // * You tried to add a ByteMatchTuple to a ByteMatchSet, but the ByteMatchTuple // already exists in the specified WebACL. // @@ -7292,9 +7684,6 @@ func (c *WAF) UpdateRegexPatternSetRequest(input *UpdateRegexPatternSetInput) (r // * You tried to add a Rule to a WebACL, but the Rule already exists in // the specified WebACL. // -// * You tried to add an IP address to an IPSet, but the IP address already -// exists in the specified IPSet. -// // * You tried to add a ByteMatchTuple to a ByteMatchSet, but the ByteMatchTuple // already exists in the specified WebACL. // @@ -7440,9 +7829,6 @@ func (c *WAF) UpdateRuleRequest(input *UpdateRuleInput) (req *request.Request, o // * You tried to add a Rule to a WebACL, but the Rule already exists in // the specified WebACL. // -// * You tried to add an IP address to an IPSet, but the IP address already -// exists in the specified IPSet. -// // * You tried to add a ByteMatchTuple to a ByteMatchSet, but the ByteMatchTuple // already exists in the specified WebACL. // @@ -7648,9 +8034,6 @@ func (c *WAF) UpdateRuleGroupRequest(input *UpdateRuleGroupInput) (req *request. // * You tried to add a Rule to a WebACL, but the Rule already exists in // the specified WebACL. // -// * You tried to add an IP address to an IPSet, but the IP address already -// exists in the specified IPSet. -// // * You tried to add a ByteMatchTuple to a ByteMatchSet, but the ByteMatchTuple // already exists in the specified WebACL. // @@ -7770,6 +8153,8 @@ func (c *WAF) UpdateSizeConstraintSetRequest(input *UpdateSizeConstraintSetInput // of the request body are not supported because the AWS resource forwards // only the first 8192 bytes of your request to AWS WAF. // +// You can only specify a single type of TextTransformation. +// // * A ComparisonOperator used for evaluating the selected part of the request // against the specified Size, such as equals, greater than, less than, and // so on. @@ -7830,9 +8215,6 @@ func (c *WAF) UpdateSizeConstraintSetRequest(input *UpdateSizeConstraintSetInput // * You tried to add a Rule to a WebACL, but the Rule already exists in // the specified WebACL. // -// * You tried to add an IP address to an IPSet, but the IP address already -// exists in the specified IPSet. -// // * You tried to add a ByteMatchTuple to a ByteMatchSet, but the ByteMatchTuple // already exists in the specified WebACL. // @@ -7972,12 +8354,15 @@ func (c *WAF) UpdateSqlInjectionMatchSetRequest(input *UpdateSqlInjectionMatchSe // object and add a new one. // // * FieldToMatch: The part of web requests that you want AWS WAF to inspect -// and, if you want AWS WAF to inspect a header, the name of the header. +// and, if you want AWS WAF to inspect a header or custom query parameter, +// the name of the header or parameter. // // * TextTransformation: Which text transformation, if any, to perform on // the web request before inspecting the request for snippets of malicious // SQL code. // +// You can only specify a single type of TextTransformation. +// // You use SqlInjectionMatchSet objects to specify which CloudFront requests // you want to allow, block, or count. For example, if you're receiving requests // that contain snippets of SQL code in the query string and you want to block @@ -8028,9 +8413,6 @@ func (c *WAF) UpdateSqlInjectionMatchSetRequest(input *UpdateSqlInjectionMatchSe // * You tried to add a Rule to a WebACL, but the Rule already exists in // the specified WebACL. // -// * You tried to add an IP address to an IPSet, but the IP address already -// exists in the specified IPSet. -// // * You tried to add a ByteMatchTuple to a ByteMatchSet, but the ByteMatchTuple // already exists in the specified WebACL. // @@ -8242,9 +8624,6 @@ func (c *WAF) UpdateWebACLRequest(input *UpdateWebACLInput) (req *request.Reques // * You tried to add a Rule to a WebACL, but the Rule already exists in // the specified WebACL. // -// * You tried to add an IP address to an IPSet, but the IP address already -// exists in the specified IPSet. -// // * You tried to add a ByteMatchTuple to a ByteMatchSet, but the ByteMatchTuple // already exists in the specified WebACL. // @@ -8387,12 +8766,15 @@ func (c *WAF) UpdateXssMatchSetRequest(input *UpdateXssMatchSetInput) (req *requ // add a new one. // // * FieldToMatch: The part of web requests that you want AWS WAF to inspect -// and, if you want AWS WAF to inspect a header, the name of the header. +// and, if you want AWS WAF to inspect a header or custom query parameter, +// the name of the header or parameter. // // * TextTransformation: Which text transformation, if any, to perform on // the web request before inspecting the request for cross-site scripting // attacks. // +// You can only specify a single type of TextTransformation. +// // You use XssMatchSet objects to specify which CloudFront requests you want // to allow, block, or count. For example, if you're receiving requests that // contain cross-site scripting attacks in the request body and you want to @@ -8443,9 +8825,6 @@ func (c *WAF) UpdateXssMatchSetRequest(input *UpdateXssMatchSetInput) (req *requ // * You tried to add a Rule to a WebACL, but the Rule already exists in // the specified WebACL. // -// * You tried to add an IP address to an IPSet, but the IP address already -// exists in the specified IPSet. -// // * You tried to add a ByteMatchTuple to a ByteMatchSet, but the ByteMatchTuple // already exists in the specified WebACL. // @@ -8923,6 +9302,14 @@ type ByteMatchTuple struct { // of the body, you can create a size constraint set. For more information, // see CreateSizeConstraintSet. // + // * SINGLE_QUERY_ARG: The parameter in the query string that you will inspect, + // such as UserName or SalesRegion. The maximum length for SINGLE_QUERY_ARG + // is 30 characters. + // + // * ALL_QUERY_ARGS: Similar to SINGLE_QUERY_ARG, but instead of inspecting + // a single parameter, AWS WAF inspects all parameters within the query string + // for the value or regex pattern that you specify in TargetString. + // // If TargetString includes alphabetic characters A-Z and a-z, note that the // value is case sensitive. // @@ -8951,11 +9338,13 @@ type ByteMatchTuple struct { // AWS WAF performs the transformation on TargetString before inspecting a request // for a match. // + // You can only specify a single type of TextTransformation. + // // CMD_LINE // - // When you're concerned that attackers are injecting an operating system commandline - // command and using unusual formatting to disguise some or all of the command, - // use this option to perform the following transformations: + // When you're concerned that attackers are injecting an operating system command + // line command and using unusual formatting to disguise some or all of the + // command, use this option to perform the following transformations: // // * Delete the following characters: \ " ' ^ // @@ -10583,6 +10972,62 @@ func (s *DeleteIPSetOutput) SetChangeToken(v string) *DeleteIPSetOutput { return s } +type DeleteLoggingConfigurationInput struct { + _ struct{} `type:"structure"` + + // The Amazon Resource Name (ARN) of the web ACL from which you want to delete + // the LoggingConfiguration. + // + // ResourceArn is a required field + ResourceArn *string `min:"1" type:"string" required:"true"` +} + +// String returns the string representation +func (s DeleteLoggingConfigurationInput) String() string { + return awsutil.Prettify(s) +} + +// GoString returns the string representation +func (s DeleteLoggingConfigurationInput) GoString() string { + return s.String() +} + +// Validate inspects the fields of the type to determine if they are valid. +func (s *DeleteLoggingConfigurationInput) Validate() error { + invalidParams := request.ErrInvalidParams{Context: "DeleteLoggingConfigurationInput"} + if s.ResourceArn == nil { + invalidParams.Add(request.NewErrParamRequired("ResourceArn")) + } + if s.ResourceArn != nil && len(*s.ResourceArn) < 1 { + invalidParams.Add(request.NewErrParamMinLen("ResourceArn", 1)) + } + + if invalidParams.Len() > 0 { + return invalidParams + } + return nil +} + +// SetResourceArn sets the ResourceArn field's value. +func (s *DeleteLoggingConfigurationInput) SetResourceArn(v string) *DeleteLoggingConfigurationInput { + s.ResourceArn = &v + return s +} + +type DeleteLoggingConfigurationOutput struct { + _ struct{} `type:"structure"` +} + +// String returns the string representation +func (s DeleteLoggingConfigurationOutput) String() string { + return awsutil.Prettify(s) +} + +// GoString returns the string representation +func (s DeleteLoggingConfigurationOutput) GoString() string { + return s.String() +} + type DeletePermissionPolicyInput struct { _ struct{} `type:"structure"` @@ -11406,10 +11851,14 @@ type FieldToMatch struct { _ struct{} `type:"structure"` // When the value of Type is HEADER, enter the name of the header that you want - // AWS WAF to search, for example, User-Agent or Referer. If the value of Type - // is any other value, omit Data. + // AWS WAF to search, for example, User-Agent or Referer. The name of the header + // is not case sensitive. // - // The name of the header is not case sensitive. + // When the value of Type is SINGLE_QUERY_ARG, enter the name of the parameter + // that you want AWS WAF to search, for example, UserName or SalesRegion. The + // parameter name is not case sensitive. + // + // If the value of Type is any other value, omit Data. Data *string `type:"string"` // The part of the web request that you want AWS WAF to search for a specified @@ -11437,6 +11886,14 @@ type FieldToMatch struct { // of the body, you can create a size constraint set. For more information, // see CreateSizeConstraintSet. // + // * SINGLE_QUERY_ARG: The parameter in the query string that you will inspect, + // such as UserName or SalesRegion. The maximum length for SINGLE_QUERY_ARG + // is 30 characters. + // + // * ALL_QUERY_ARGS: Similar to SINGLE_QUERY_ARG, but rather than inspecting + // a single parameter, AWS WAF will inspect all parameters within the query + // for the value or regex pattern that you specify in TargetString. + // // Type is a required field Type *string `type:"string" required:"true" enum:"MatchFieldType"` } @@ -11997,6 +12454,71 @@ func (s *GetIPSetOutput) SetIPSet(v *IPSet) *GetIPSetOutput { return s } +type GetLoggingConfigurationInput struct { + _ struct{} `type:"structure"` + + // The Amazon Resource Name (ARN) of the web ACL for which you want to get the + // LoggingConfiguration. + // + // ResourceArn is a required field + ResourceArn *string `min:"1" type:"string" required:"true"` +} + +// String returns the string representation +func (s GetLoggingConfigurationInput) String() string { + return awsutil.Prettify(s) +} + +// GoString returns the string representation +func (s GetLoggingConfigurationInput) GoString() string { + return s.String() +} + +// Validate inspects the fields of the type to determine if they are valid. +func (s *GetLoggingConfigurationInput) Validate() error { + invalidParams := request.ErrInvalidParams{Context: "GetLoggingConfigurationInput"} + if s.ResourceArn == nil { + invalidParams.Add(request.NewErrParamRequired("ResourceArn")) + } + if s.ResourceArn != nil && len(*s.ResourceArn) < 1 { + invalidParams.Add(request.NewErrParamMinLen("ResourceArn", 1)) + } + + if invalidParams.Len() > 0 { + return invalidParams + } + return nil +} + +// SetResourceArn sets the ResourceArn field's value. +func (s *GetLoggingConfigurationInput) SetResourceArn(v string) *GetLoggingConfigurationInput { + s.ResourceArn = &v + return s +} + +type GetLoggingConfigurationOutput struct { + _ struct{} `type:"structure"` + + // The LoggingConfiguration for the specified web ACL. + LoggingConfiguration *LoggingConfiguration `type:"structure"` +} + +// String returns the string representation +func (s GetLoggingConfigurationOutput) String() string { + return awsutil.Prettify(s) +} + +// GoString returns the string representation +func (s GetLoggingConfigurationOutput) GoString() string { + return s.String() +} + +// SetLoggingConfiguration sets the LoggingConfiguration field's value. +func (s *GetLoggingConfigurationOutput) SetLoggingConfiguration(v *LoggingConfiguration) *GetLoggingConfigurationOutput { + s.LoggingConfiguration = v + return s +} + type GetPermissionPolicyInput struct { _ struct{} `type:"structure"` @@ -13059,15 +13581,15 @@ func (s *HTTPRequest) SetURI(v string) *HTTPRequest { } // Contains one or more IP addresses or blocks of IP addresses specified in -// Classless Inter-Domain Routing (CIDR) notation. AWS WAF supports /8, /16, -// /24, and /32 IP address ranges for IPv4, and /24, /32, /48, /56, /64 and -// /128 for IPv6. +// Classless Inter-Domain Routing (CIDR) notation. AWS WAF supports IPv4 address +// ranges: /8 and any range between /16 through /32. AWS WAF supports IPv6 address +// ranges: /16, /24, /32, /48, /56, /64, and /128. // // To specify an individual IP address, you specify the four-part IP address // followed by a /32, for example, 192.0.2.0/31. To block a range of IP addresses, -// you can specify a /128, /64, /56, /48, /32, /24, /16, or /8 CIDR. For more -// information about CIDR notation, see the Wikipedia entry Classless Inter-Domain -// Routing (https://en.wikipedia.org/wiki/Classless_Inter-Domain_Routing). +// you can specify /8 or any range between /16 through /32 (for IPv4) or /16, +// /24, /32, /48, /56, /64, or /128 (for IPv6). For more information about CIDR +// notation, see the Wikipedia entry Classless Inter-Domain Routing (https://en.wikipedia.org/wiki/Classless_Inter-Domain_Routing). type IPSet struct { _ struct{} `type:"structure"` @@ -13656,6 +14178,94 @@ func (s *ListIPSetsOutput) SetNextMarker(v string) *ListIPSetsOutput { return s } +type ListLoggingConfigurationsInput struct { + _ struct{} `type:"structure"` + + // Specifies the number of LoggingConfigurations that you want AWS WAF to return + // for this request. If you have more LoggingConfigurations than the number + // that you specify for Limit, the response includes a NextMarker value that + // you can use to get another batch of LoggingConfigurations. + Limit *int64 `type:"integer"` + + // If you specify a value for Limit and you have more LoggingConfigurations + // than the value of Limit, AWS WAF returns a NextMarker value in the response + // that allows you to list another group of LoggingConfigurations. For the second + // and subsequent ListLoggingConfigurations requests, specify the value of NextMarker + // from the previous response to get information about another batch of ListLoggingConfigurations. + NextMarker *string `min:"1" type:"string"` +} + +// String returns the string representation +func (s ListLoggingConfigurationsInput) String() string { + return awsutil.Prettify(s) +} + +// GoString returns the string representation +func (s ListLoggingConfigurationsInput) GoString() string { + return s.String() +} + +// Validate inspects the fields of the type to determine if they are valid. +func (s *ListLoggingConfigurationsInput) Validate() error { + invalidParams := request.ErrInvalidParams{Context: "ListLoggingConfigurationsInput"} + if s.NextMarker != nil && len(*s.NextMarker) < 1 { + invalidParams.Add(request.NewErrParamMinLen("NextMarker", 1)) + } + + if invalidParams.Len() > 0 { + return invalidParams + } + return nil +} + +// SetLimit sets the Limit field's value. +func (s *ListLoggingConfigurationsInput) SetLimit(v int64) *ListLoggingConfigurationsInput { + s.Limit = &v + return s +} + +// SetNextMarker sets the NextMarker field's value. +func (s *ListLoggingConfigurationsInput) SetNextMarker(v string) *ListLoggingConfigurationsInput { + s.NextMarker = &v + return s +} + +type ListLoggingConfigurationsOutput struct { + _ struct{} `type:"structure"` + + // An array of LoggingConfiguration objects. + LoggingConfigurations []*LoggingConfiguration `type:"list"` + + // If you have more LoggingConfigurations than the number that you specified + // for Limit in the request, the response includes a NextMarker value. To list + // more LoggingConfigurations, submit another ListLoggingConfigurations request, + // and specify the NextMarker value from the response in the NextMarker value + // in the next request. + NextMarker *string `min:"1" type:"string"` +} + +// String returns the string representation +func (s ListLoggingConfigurationsOutput) String() string { + return awsutil.Prettify(s) +} + +// GoString returns the string representation +func (s ListLoggingConfigurationsOutput) GoString() string { + return s.String() +} + +// SetLoggingConfigurations sets the LoggingConfigurations field's value. +func (s *ListLoggingConfigurationsOutput) SetLoggingConfigurations(v []*LoggingConfiguration) *ListLoggingConfigurationsOutput { + s.LoggingConfigurations = v + return s +} + +// SetNextMarker sets the NextMarker field's value. +func (s *ListLoggingConfigurationsOutput) SetNextMarker(v string) *ListLoggingConfigurationsOutput { + s.NextMarker = &v + return s +} + type ListRateBasedRulesInput struct { _ struct{} `type:"structure"` @@ -14538,6 +15148,88 @@ func (s *ListXssMatchSetsOutput) SetXssMatchSets(v []*XssMatchSetSummary) *ListX return s } +// The Amazon Kinesis Data Firehose delivery streams, RedactedFields information, +// and the web ACL Amazon Resource Name (ARN). +type LoggingConfiguration struct { + _ struct{} `type:"structure"` + + // An array of Amazon Kinesis Data Firehose delivery stream ARNs. + // + // LogDestinationConfigs is a required field + LogDestinationConfigs []*string `min:"1" type:"list" required:"true"` + + // The parts of the request that you want redacted from the logs. For example, + // if you redact the cookie field, the cookie field in the delivery stream will + // be xxx. + RedactedFields []*FieldToMatch `type:"list"` + + // The Amazon Resource Name (ARN) of the web ACL that you want to associate + // with LogDestinationConfigs. + // + // ResourceArn is a required field + ResourceArn *string `min:"1" type:"string" required:"true"` +} + +// String returns the string representation +func (s LoggingConfiguration) String() string { + return awsutil.Prettify(s) +} + +// GoString returns the string representation +func (s LoggingConfiguration) GoString() string { + return s.String() +} + +// Validate inspects the fields of the type to determine if they are valid. +func (s *LoggingConfiguration) Validate() error { + invalidParams := request.ErrInvalidParams{Context: "LoggingConfiguration"} + if s.LogDestinationConfigs == nil { + invalidParams.Add(request.NewErrParamRequired("LogDestinationConfigs")) + } + if s.LogDestinationConfigs != nil && len(s.LogDestinationConfigs) < 1 { + invalidParams.Add(request.NewErrParamMinLen("LogDestinationConfigs", 1)) + } + if s.ResourceArn == nil { + invalidParams.Add(request.NewErrParamRequired("ResourceArn")) + } + if s.ResourceArn != nil && len(*s.ResourceArn) < 1 { + invalidParams.Add(request.NewErrParamMinLen("ResourceArn", 1)) + } + if s.RedactedFields != nil { + for i, v := range s.RedactedFields { + if v == nil { + continue + } + if err := v.Validate(); err != nil { + invalidParams.AddNested(fmt.Sprintf("%s[%v]", "RedactedFields", i), err.(request.ErrInvalidParams)) + } + } + } + + if invalidParams.Len() > 0 { + return invalidParams + } + return nil +} + +// SetLogDestinationConfigs sets the LogDestinationConfigs field's value. +func (s *LoggingConfiguration) SetLogDestinationConfigs(v []*string) *LoggingConfiguration { + s.LogDestinationConfigs = v + return s +} + +// SetRedactedFields sets the RedactedFields field's value. +func (s *LoggingConfiguration) SetRedactedFields(v []*FieldToMatch) *LoggingConfiguration { + s.RedactedFields = v + return s +} + +// SetResourceArn sets the ResourceArn field's value. +func (s *LoggingConfiguration) SetResourceArn(v string) *LoggingConfiguration { + s.ResourceArn = &v + return s +} + // Specifies the ByteMatchSet, IPSet, SqlInjectionMatchSet, XssMatchSet, RegexMatchSet, // GeoMatchSet, and SizeConstraintSet objects that you want to add to a Rule // and, for each object, indicates whether you want to negate the settings, @@ -14566,7 +15258,7 @@ type Predicate struct { // Negated is a required field Negated *bool `type:"boolean" required:"true"` - // The type of predicate in a Rule, such as ByteMatchSet or IPSet. + // The type of predicate in a Rule, such as ByteMatch or IPSet. // // Type is a required field Type *string `type:"string" required:"true" enum:"PredicateType"` @@ -14622,6 +15314,74 @@ func (s *Predicate) SetType(v string) *Predicate { return s } +type PutLoggingConfigurationInput struct { + _ struct{} `type:"structure"` + + // The Amazon Kinesis Data Firehose delivery streams that contains the inspected + // traffic information, the redacted fields details, and the Amazon Resource + // Name (ARN) of the web ACL to monitor. + // + // LoggingConfiguration is a required field + LoggingConfiguration *LoggingConfiguration `type:"structure" required:"true"` +} + +// String returns the string representation +func (s PutLoggingConfigurationInput) String() string { + return awsutil.Prettify(s) +} + +// GoString returns the string representation +func (s PutLoggingConfigurationInput) GoString() string { + return s.String() +} + +// Validate inspects the fields of the type to determine if they are valid. +func (s *PutLoggingConfigurationInput) Validate() error { + invalidParams := request.ErrInvalidParams{Context: "PutLoggingConfigurationInput"} + if s.LoggingConfiguration == nil { + invalidParams.Add(request.NewErrParamRequired("LoggingConfiguration")) + } + if s.LoggingConfiguration != nil { + if err := s.LoggingConfiguration.Validate(); err != nil { + invalidParams.AddNested("LoggingConfiguration", err.(request.ErrInvalidParams)) + } + } + + if invalidParams.Len() > 0 { + return invalidParams + } + return nil +} + +// SetLoggingConfiguration sets the LoggingConfiguration field's value. +func (s *PutLoggingConfigurationInput) SetLoggingConfiguration(v *LoggingConfiguration) *PutLoggingConfigurationInput { + s.LoggingConfiguration = v + return s +} + +type PutLoggingConfigurationOutput struct { + _ struct{} `type:"structure"` + + // The LoggingConfiguration that you submitted in the request. + LoggingConfiguration *LoggingConfiguration `type:"structure"` +} + +// String returns the string representation +func (s PutLoggingConfigurationOutput) String() string { + return awsutil.Prettify(s) +} + +// GoString returns the string representation +func (s PutLoggingConfigurationOutput) GoString() string { + return s.String() +} + +// SetLoggingConfiguration sets the LoggingConfiguration field's value. +func (s *PutLoggingConfigurationOutput) SetLoggingConfiguration(v *LoggingConfiguration) *PutLoggingConfigurationOutput { + s.LoggingConfiguration = v + return s +} + type PutPermissionPolicyInput struct { _ struct{} `type:"structure"` @@ -15010,6 +15770,8 @@ type RegexMatchTuple struct { // AWS WAF performs the transformation on RegexPatternSet before inspecting // a request for a match. // + // You can only specify a single type of TextTransformation. + // // CMD_LINE // // When you're concerned that attackers are injecting an operating system commandline @@ -15763,6 +16525,8 @@ type SizeConstraint struct { // AWS WAF performs the transformation on FieldToMatch before inspecting a request // for a match. // + // You can only specify a single type of TextTransformation. + // // Note that if you choose BODY for the value of Type, you must choose NONE // for TextTransformation because CloudFront forwards only the first 8192 bytes // for inspection. @@ -16240,11 +17004,13 @@ type SqlInjectionMatchTuple struct { // AWS WAF performs the transformation on FieldToMatch before inspecting a request // for a match. // + // You can only specify a single type of TextTransformation. + // // CMD_LINE // - // When you're concerned that attackers are injecting an operating system commandline - // command and using unusual formatting to disguise some or all of the command, - // use this option to perform the following transformations: + // When you're concerned that attackers are injecting an operating system command + // line command and using unusual formatting to disguise some or all of the + // command, use this option to perform the following transformations: // // * Delete the following characters: \ " ' ^ // @@ -16732,6 +17498,8 @@ type UpdateIPSetInput struct { // // * IPSetDescriptor: Contains Type and Value // + // You can insert a maximum of 1000 addresses in a single request. + // // Updates is a required field Updates []*IPSetUpdate `min:"1" type:"list" required:"true"` } @@ -18363,11 +19131,13 @@ type XssMatchTuple struct { // AWS WAF performs the transformation on FieldToMatch before inspecting a request // for a match. // + // You can only specify a single type of TextTransformation. + // // CMD_LINE // - // When you're concerned that attackers are injecting an operating system commandline - // command and using unusual formatting to disguise some or all of the command, - // use this option to perform the following transformations: + // When you're concerned that attackers are injecting an operating system command + // line command and using unusual formatting to disguise some or all of the + // command, use this option to perform the following transformations: // // * Delete the following characters: \ " ' ^ // @@ -19292,6 +20062,12 @@ const ( // MatchFieldTypeBody is a MatchFieldType enum value MatchFieldTypeBody = "BODY" + + // MatchFieldTypeSingleQueryArg is a MatchFieldType enum value + MatchFieldTypeSingleQueryArg = "SINGLE_QUERY_ARG" + + // MatchFieldTypeAllQueryArgs is a MatchFieldType enum value + MatchFieldTypeAllQueryArgs = "ALL_QUERY_ARGS" ) const ( diff --git a/vendor/github.com/aws/aws-sdk-go/service/waf/errors.go b/vendor/github.com/aws/aws-sdk-go/service/waf/errors.go index 97850b5df..02c9752b0 100644 --- a/vendor/github.com/aws/aws-sdk-go/service/waf/errors.go +++ b/vendor/github.com/aws/aws-sdk-go/service/waf/errors.go @@ -41,9 +41,6 @@ const ( // * You tried to add a Rule to a WebACL, but the Rule already exists in // the specified WebACL. // - // * You tried to add an IP address to an IPSet, but the IP address already - // exists in the specified IPSet. - // // * You tried to add a ByteMatchTuple to a ByteMatchSet, but the ByteMatchTuple // already exists in the specified WebACL. ErrCodeInvalidOperationException = "WAFInvalidOperationException" @@ -93,8 +90,9 @@ const ( // // * Effect must specify Allow. // - // * The Action in the policy must be waf:UpdateWebACL or waf-regional:UpdateWebACL. - // Any extra or wildcard actions in the policy will be rejected. + // * The Action in the policy must be waf:UpdateWebACL, waf-regional:UpdateWebACL, + // waf:GetRuleGroup and waf-regional:GetRuleGroup . Any extra or wildcard + // actions in the policy will be rejected. // // * The policy cannot include a Resource parameter. // diff --git a/vendor/github.com/aws/aws-sdk-go/service/wafregional/api.go b/vendor/github.com/aws/aws-sdk-go/service/wafregional/api.go index cd5c09e23..470cefe49 100644 --- a/vendor/github.com/aws/aws-sdk-go/service/wafregional/api.go +++ b/vendor/github.com/aws/aws-sdk-go/service/wafregional/api.go @@ -2212,6 +2212,93 @@ func (c *WAFRegional) DeleteIPSetWithContext(ctx aws.Context, input *waf.DeleteI return out, req.Send() } +const opDeleteLoggingConfiguration = "DeleteLoggingConfiguration" + +// DeleteLoggingConfigurationRequest generates a "aws/request.Request" representing the +// client's request for the DeleteLoggingConfiguration operation. The "output" return +// value will be populated with the request's response once the request completes +// successfuly. +// +// Use "Send" method on the returned Request to send the API call to the service. +// the "output" return value is not valid until after Send returns without error. +// +// See DeleteLoggingConfiguration for more information on using the DeleteLoggingConfiguration +// API call, and error handling. +// +// This method is useful when you want to inject custom logic or configuration +// into the SDK's request lifecycle. Such as custom headers, or retry logic. +// +// +// // Example sending a request using the DeleteLoggingConfigurationRequest method. +// req, resp := client.DeleteLoggingConfigurationRequest(params) +// +// err := req.Send() +// if err == nil { // resp is now filled +// fmt.Println(resp) +// } +// +// See also, https://docs.aws.amazon.com/goto/WebAPI/waf-regional-2016-11-28/DeleteLoggingConfiguration +func (c *WAFRegional) DeleteLoggingConfigurationRequest(input *waf.DeleteLoggingConfigurationInput) (req *request.Request, output *waf.DeleteLoggingConfigurationOutput) { + op := &request.Operation{ + Name: opDeleteLoggingConfiguration, + HTTPMethod: "POST", + HTTPPath: "/", + } + + if input == nil { + input = &waf.DeleteLoggingConfigurationInput{} + } + + output = &waf.DeleteLoggingConfigurationOutput{} + req = c.newRequest(op, input, output) + return +} + +// DeleteLoggingConfiguration API operation for AWS WAF Regional. +// +// Permanently deletes the LoggingConfiguration from the specified web ACL. +// +// Returns awserr.Error for service API and SDK errors. Use runtime type assertions +// with awserr.Error's Code and Message methods to get detailed information about +// the error. +// +// See the AWS API reference guide for AWS WAF Regional's +// API operation DeleteLoggingConfiguration for usage and error information. +// +// Returned Error Codes: +// * ErrCodeWAFInternalErrorException "WAFInternalErrorException" +// The operation failed because of a system problem, even though the request +// was valid. Retry your request. +// +// * ErrCodeWAFNonexistentItemException "WAFNonexistentItemException" +// The operation failed because the referenced object doesn't exist. +// +// * ErrCodeWAFStaleDataException "WAFStaleDataException" +// The operation failed because you tried to create, update, or delete an object +// by using a change token that has already been used. +// +// See also, https://docs.aws.amazon.com/goto/WebAPI/waf-regional-2016-11-28/DeleteLoggingConfiguration +func (c *WAFRegional) DeleteLoggingConfiguration(input *waf.DeleteLoggingConfigurationInput) (*waf.DeleteLoggingConfigurationOutput, error) { + req, out := c.DeleteLoggingConfigurationRequest(input) + return out, req.Send() +} + +// DeleteLoggingConfigurationWithContext is the same as DeleteLoggingConfiguration with the addition of +// the ability to pass a context and additional request options. +// +// See DeleteLoggingConfiguration for details on how to use this API operation. +// +// The context must be non-nil and will be used for request cancellation. If +// the context is nil a panic will occur. In the future the SDK may create +// sub-contexts for http.Requests. See https://golang.org/pkg/context/ +// for more information on using Contexts. +func (c *WAFRegional) DeleteLoggingConfigurationWithContext(ctx aws.Context, input *waf.DeleteLoggingConfigurationInput, opts ...request.Option) (*waf.DeleteLoggingConfigurationOutput, error) { + req, out := c.DeleteLoggingConfigurationRequest(input) + req.SetContext(ctx) + req.ApplyOptions(opts...) + return out, req.Send() +} + const opDeletePermissionPolicy = "DeletePermissionPolicy" // DeletePermissionPolicyRequest generates a "aws/request.Request" representing the @@ -2896,6 +2983,24 @@ func (c *WAFRegional) DeleteRuleGroupRequest(input *waf.DeleteRuleGroupInput) (r // // * You tried to delete an IPSet that references one or more IP addresses. // +// * ErrCodeWAFInvalidOperationException "WAFInvalidOperationException" +// The operation failed because there was nothing to do. For example: +// +// * You tried to remove a Rule from a WebACL, but the Rule isn't in the +// specified WebACL. +// +// * You tried to remove an IP address from an IPSet, but the IP address +// isn't in the specified IPSet. +// +// * You tried to remove a ByteMatchTuple from a ByteMatchSet, but the ByteMatchTuple +// isn't in the specified WebACL. +// +// * You tried to add a Rule to a WebACL, but the Rule already exists in +// the specified WebACL. +// +// * You tried to add a ByteMatchTuple to a ByteMatchSet, but the ByteMatchTuple +// already exists in the specified WebACL. +// // See also, https://docs.aws.amazon.com/goto/WebAPI/waf-regional-2016-11-28/DeleteRuleGroup func (c *WAFRegional) DeleteRuleGroup(input *waf.DeleteRuleGroupInput) (*waf.DeleteRuleGroupOutput, error) { req, out := c.DeleteRuleGroupRequest(input) @@ -3987,6 +4092,89 @@ func (c *WAFRegional) GetIPSetWithContext(ctx aws.Context, input *waf.GetIPSetIn return out, req.Send() } +const opGetLoggingConfiguration = "GetLoggingConfiguration" + +// GetLoggingConfigurationRequest generates a "aws/request.Request" representing the +// client's request for the GetLoggingConfiguration operation. The "output" return +// value will be populated with the request's response once the request completes +// successfuly. +// +// Use "Send" method on the returned Request to send the API call to the service. +// the "output" return value is not valid until after Send returns without error. +// +// See GetLoggingConfiguration for more information on using the GetLoggingConfiguration +// API call, and error handling. +// +// This method is useful when you want to inject custom logic or configuration +// into the SDK's request lifecycle. Such as custom headers, or retry logic. +// +// +// // Example sending a request using the GetLoggingConfigurationRequest method. +// req, resp := client.GetLoggingConfigurationRequest(params) +// +// err := req.Send() +// if err == nil { // resp is now filled +// fmt.Println(resp) +// } +// +// See also, https://docs.aws.amazon.com/goto/WebAPI/waf-regional-2016-11-28/GetLoggingConfiguration +func (c *WAFRegional) GetLoggingConfigurationRequest(input *waf.GetLoggingConfigurationInput) (req *request.Request, output *waf.GetLoggingConfigurationOutput) { + op := &request.Operation{ + Name: opGetLoggingConfiguration, + HTTPMethod: "POST", + HTTPPath: "/", + } + + if input == nil { + input = &waf.GetLoggingConfigurationInput{} + } + + output = &waf.GetLoggingConfigurationOutput{} + req = c.newRequest(op, input, output) + return +} + +// GetLoggingConfiguration API operation for AWS WAF Regional. +// +// Returns the LoggingConfiguration for the specified web ACL. +// +// Returns awserr.Error for service API and SDK errors. Use runtime type assertions +// with awserr.Error's Code and Message methods to get detailed information about +// the error. +// +// See the AWS API reference guide for AWS WAF Regional's +// API operation GetLoggingConfiguration for usage and error information. +// +// Returned Error Codes: +// * ErrCodeWAFInternalErrorException "WAFInternalErrorException" +// The operation failed because of a system problem, even though the request +// was valid. Retry your request. +// +// * ErrCodeWAFNonexistentItemException "WAFNonexistentItemException" +// The operation failed because the referenced object doesn't exist. +// +// See also, https://docs.aws.amazon.com/goto/WebAPI/waf-regional-2016-11-28/GetLoggingConfiguration +func (c *WAFRegional) GetLoggingConfiguration(input *waf.GetLoggingConfigurationInput) (*waf.GetLoggingConfigurationOutput, error) { + req, out := c.GetLoggingConfigurationRequest(input) + return out, req.Send() +} + +// GetLoggingConfigurationWithContext is the same as GetLoggingConfiguration with the addition of +// the ability to pass a context and additional request options. +// +// See GetLoggingConfiguration for details on how to use this API operation. +// +// The context must be non-nil and will be used for request cancellation. If +// the context is nil a panic will occur. In the future the SDK may create +// sub-contexts for http.Requests. See https://golang.org/pkg/context/ +// for more information on using Contexts. +func (c *WAFRegional) GetLoggingConfigurationWithContext(ctx aws.Context, input *waf.GetLoggingConfigurationInput, opts ...request.Option) (*waf.GetLoggingConfigurationOutput, error) { + req, out := c.GetLoggingConfigurationRequest(input) + req.SetContext(ctx) + req.ApplyOptions(opts...) + return out, req.Send() +} + const opGetPermissionPolicy = "GetPermissionPolicy" // GetPermissionPolicyRequest generates a "aws/request.Request" representing the @@ -5550,6 +5738,118 @@ func (c *WAFRegional) ListIPSetsWithContext(ctx aws.Context, input *waf.ListIPSe return out, req.Send() } +const opListLoggingConfigurations = "ListLoggingConfigurations" + +// ListLoggingConfigurationsRequest generates a "aws/request.Request" representing the +// client's request for the ListLoggingConfigurations operation. The "output" return +// value will be populated with the request's response once the request completes +// successfuly. +// +// Use "Send" method on the returned Request to send the API call to the service. +// the "output" return value is not valid until after Send returns without error. +// +// See ListLoggingConfigurations for more information on using the ListLoggingConfigurations +// API call, and error handling. +// +// This method is useful when you want to inject custom logic or configuration +// into the SDK's request lifecycle. Such as custom headers, or retry logic. +// +// +// // Example sending a request using the ListLoggingConfigurationsRequest method. +// req, resp := client.ListLoggingConfigurationsRequest(params) +// +// err := req.Send() +// if err == nil { // resp is now filled +// fmt.Println(resp) +// } +// +// See also, https://docs.aws.amazon.com/goto/WebAPI/waf-regional-2016-11-28/ListLoggingConfigurations +func (c *WAFRegional) ListLoggingConfigurationsRequest(input *waf.ListLoggingConfigurationsInput) (req *request.Request, output *waf.ListLoggingConfigurationsOutput) { + op := &request.Operation{ + Name: opListLoggingConfigurations, + HTTPMethod: "POST", + HTTPPath: "/", + } + + if input == nil { + input = &waf.ListLoggingConfigurationsInput{} + } + + output = &waf.ListLoggingConfigurationsOutput{} + req = c.newRequest(op, input, output) + return +} + +// ListLoggingConfigurations API operation for AWS WAF Regional. +// +// Returns an array of LoggingConfiguration objects. +// +// Returns awserr.Error for service API and SDK errors. Use runtime type assertions +// with awserr.Error's Code and Message methods to get detailed information about +// the error. +// +// See the AWS API reference guide for AWS WAF Regional's +// API operation ListLoggingConfigurations for usage and error information. +// +// Returned Error Codes: +// * ErrCodeWAFInternalErrorException "WAFInternalErrorException" +// The operation failed because of a system problem, even though the request +// was valid. Retry your request. +// +// * ErrCodeWAFNonexistentItemException "WAFNonexistentItemException" +// The operation failed because the referenced object doesn't exist. +// +// * ErrCodeWAFInvalidParameterException "WAFInvalidParameterException" +// The operation failed because AWS WAF didn't recognize a parameter in the +// request. For example: +// +// * You specified an invalid parameter name. +// +// * You specified an invalid value. +// +// * You tried to update an object (ByteMatchSet, IPSet, Rule, or WebACL) +// using an action other than INSERT or DELETE. +// +// * You tried to create a WebACL with a DefaultActionType other than ALLOW, +// BLOCK, or COUNT. +// +// * You tried to create a RateBasedRule with a RateKey value other than +// IP. +// +// * You tried to update a WebACL with a WafActionType other than ALLOW, +// BLOCK, or COUNT. +// +// * You tried to update a ByteMatchSet with a FieldToMatchType other than +// HEADER, METHOD, QUERY_STRING, URI, or BODY. +// +// * You tried to update a ByteMatchSet with a Field of HEADER but no value +// for Data. +// +// * Your request references an ARN that is malformed, or corresponds to +// a resource with which a web ACL cannot be associated. +// +// See also, https://docs.aws.amazon.com/goto/WebAPI/waf-regional-2016-11-28/ListLoggingConfigurations +func (c *WAFRegional) ListLoggingConfigurations(input *waf.ListLoggingConfigurationsInput) (*waf.ListLoggingConfigurationsOutput, error) { + req, out := c.ListLoggingConfigurationsRequest(input) + return out, req.Send() +} + +// ListLoggingConfigurationsWithContext is the same as ListLoggingConfigurations with the addition of +// the ability to pass a context and additional request options. +// +// See ListLoggingConfigurations for details on how to use this API operation. +// +// The context must be non-nil and will be used for request cancellation. If +// the context is nil a panic will occur. In the future the SDK may create +// sub-contexts for http.Requests. See https://golang.org/pkg/context/ +// for more information on using Contexts. +func (c *WAFRegional) ListLoggingConfigurationsWithContext(ctx aws.Context, input *waf.ListLoggingConfigurationsInput, opts ...request.Option) (*waf.ListLoggingConfigurationsOutput, error) { + req, out := c.ListLoggingConfigurationsRequest(input) + req.SetContext(ctx) + req.ApplyOptions(opts...) + return out, req.Send() +} + const opListRateBasedRules = "ListRateBasedRules" // ListRateBasedRulesRequest generates a "aws/request.Request" representing the @@ -6472,6 +6772,108 @@ func (c *WAFRegional) ListXssMatchSetsWithContext(ctx aws.Context, input *waf.Li return out, req.Send() } +const opPutLoggingConfiguration = "PutLoggingConfiguration" + +// PutLoggingConfigurationRequest generates a "aws/request.Request" representing the +// client's request for the PutLoggingConfiguration operation. The "output" return +// value will be populated with the request's response once the request completes +// successfuly. +// +// Use "Send" method on the returned Request to send the API call to the service. +// the "output" return value is not valid until after Send returns without error. +// +// See PutLoggingConfiguration for more information on using the PutLoggingConfiguration +// API call, and error handling. +// +// This method is useful when you want to inject custom logic or configuration +// into the SDK's request lifecycle. Such as custom headers, or retry logic. +// +// +// // Example sending a request using the PutLoggingConfigurationRequest method. +// req, resp := client.PutLoggingConfigurationRequest(params) +// +// err := req.Send() +// if err == nil { // resp is now filled +// fmt.Println(resp) +// } +// +// See also, https://docs.aws.amazon.com/goto/WebAPI/waf-regional-2016-11-28/PutLoggingConfiguration +func (c *WAFRegional) PutLoggingConfigurationRequest(input *waf.PutLoggingConfigurationInput) (req *request.Request, output *waf.PutLoggingConfigurationOutput) { + op := &request.Operation{ + Name: opPutLoggingConfiguration, + HTTPMethod: "POST", + HTTPPath: "/", + } + + if input == nil { + input = &waf.PutLoggingConfigurationInput{} + } + + output = &waf.PutLoggingConfigurationOutput{} + req = c.newRequest(op, input, output) + return +} + +// PutLoggingConfiguration API operation for AWS WAF Regional. +// +// Associates a LoggingConfiguration with a specified web ACL. +// +// You can access information about all traffic that AWS WAF inspects using +// the following steps: +// +// Create an Amazon Kinesis Data Firehose delivery stream. For more information, +// see Creating an Amazon Kinesis Data Firehose Delivery Stream (https://docs.aws.amazon.com/firehose/latest/dev/what-is-this-service.html). +// +// Associate that delivery stream to your web ACL using a PutLoggingConfiguration +// request. +// +// When you successfully enable logging using a PutLoggingConfiguration request, +// AWS WAF will create a service linked role with the necessary permissions +// to write logs to the Amazon Kinesis Data Firehose delivery stream. For more +// information, see Logging Web ACL Traffic Information (http://docs.aws.amazon.com/waf/latest/developerguide/logging.html) +// in the AWS WAF Developer Guide. +// +// Returns awserr.Error for service API and SDK errors. Use runtime type assertions +// with awserr.Error's Code and Message methods to get detailed information about +// the error. +// +// See the AWS API reference guide for AWS WAF Regional's +// API operation PutLoggingConfiguration for usage and error information. +// +// Returned Error Codes: +// * ErrCodeWAFInternalErrorException "WAFInternalErrorException" +// The operation failed because of a system problem, even though the request +// was valid. Retry your request. +// +// * ErrCodeWAFNonexistentItemException "WAFNonexistentItemException" +// The operation failed because the referenced object doesn't exist. +// +// * ErrCodeWAFStaleDataException "WAFStaleDataException" +// The operation failed because you tried to create, update, or delete an object +// by using a change token that has already been used. +// +// See also, https://docs.aws.amazon.com/goto/WebAPI/waf-regional-2016-11-28/PutLoggingConfiguration +func (c *WAFRegional) PutLoggingConfiguration(input *waf.PutLoggingConfigurationInput) (*waf.PutLoggingConfigurationOutput, error) { + req, out := c.PutLoggingConfigurationRequest(input) + return out, req.Send() +} + +// PutLoggingConfigurationWithContext is the same as PutLoggingConfiguration with the addition of +// the ability to pass a context and additional request options. +// +// See PutLoggingConfiguration for details on how to use this API operation. +// +// The context must be non-nil and will be used for request cancellation. If +// the context is nil a panic will occur. In the future the SDK may create +// sub-contexts for http.Requests. See https://golang.org/pkg/context/ +// for more information on using Contexts. +func (c *WAFRegional) PutLoggingConfigurationWithContext(ctx aws.Context, input *waf.PutLoggingConfigurationInput, opts ...request.Option) (*waf.PutLoggingConfigurationOutput, error) { + req, out := c.PutLoggingConfigurationRequest(input) + req.SetContext(ctx) + req.ApplyOptions(opts...) + return out, req.Send() +} + const opPutPermissionPolicy = "PutPermissionPolicy" // PutPermissionPolicyRequest generates a "aws/request.Request" representing the @@ -6527,8 +6929,9 @@ func (c *WAFRegional) PutPermissionPolicyRequest(input *waf.PutPermissionPolicyI // // * Effect must specify Allow. // -// * The Action in the policy must be waf:UpdateWebACL and waf-regional:UpdateWebACL. -// Any extra or wildcard actions in the policy will be rejected. +// * The Action in the policy must be waf:UpdateWebACL, waf-regional:UpdateWebACL, +// waf:GetRuleGroup and waf-regional:GetRuleGroup . Any extra or wildcard +// actions in the policy will be rejected. // // * The policy cannot include a Resource parameter. // @@ -6573,8 +6976,9 @@ func (c *WAFRegional) PutPermissionPolicyRequest(input *waf.PutPermissionPolicyI // // * Effect must specify Allow. // -// * The Action in the policy must be waf:UpdateWebACL or waf-regional:UpdateWebACL. -// Any extra or wildcard actions in the policy will be rejected. +// * The Action in the policy must be waf:UpdateWebACL, waf-regional:UpdateWebACL, +// waf:GetRuleGroup and waf-regional:GetRuleGroup . Any extra or wildcard +// actions in the policy will be rejected. // // * The policy cannot include a Resource parameter. // @@ -6720,9 +7124,6 @@ func (c *WAFRegional) UpdateByteMatchSetRequest(input *waf.UpdateByteMatchSetInp // * You tried to add a Rule to a WebACL, but the Rule already exists in // the specified WebACL. // -// * You tried to add an IP address to an IPSet, but the IP address already -// exists in the specified IPSet. -// // * You tried to add a ByteMatchTuple to a ByteMatchSet, but the ByteMatchTuple // already exists in the specified WebACL. // @@ -6914,9 +7315,6 @@ func (c *WAFRegional) UpdateGeoMatchSetRequest(input *waf.UpdateGeoMatchSetInput // * You tried to add a Rule to a WebACL, but the Rule already exists in // the specified WebACL. // -// * You tried to add an IP address to an IPSet, but the IP address already -// exists in the specified IPSet. -// // * You tried to add a ByteMatchTuple to a ByteMatchSet, but the ByteMatchTuple // already exists in the specified WebACL. // @@ -7061,9 +7459,10 @@ func (c *WAFRegional) UpdateIPSetRequest(input *waf.UpdateIPSetInput) (req *requ // range of IP addresses from 192.0.2.0 to 192.0.2.255) or 192.0.2.44/32 // (for the individual IP address 192.0.2.44). // -// AWS WAF supports /8, /16, /24, and /32 IP address ranges for IPv4, and /24, -// /32, /48, /56, /64 and /128 for IPv6. For more information about CIDR notation, -// see the Wikipedia entry Classless Inter-Domain Routing (https://en.wikipedia.org/wiki/Classless_Inter-Domain_Routing). +// AWS WAF supports IPv4 address ranges: /8 and any range between /16 through +// /32. AWS WAF supports IPv6 address ranges: /16, /24, /32, /48, /56, /64, +// and /128. For more information about CIDR notation, see the Wikipedia entry +// Classless Inter-Domain Routing (https://en.wikipedia.org/wiki/Classless_Inter-Domain_Routing). // // IPv6 addresses can be represented using any of the following formats: // @@ -7095,6 +7494,8 @@ func (c *WAFRegional) UpdateIPSetRequest(input *waf.UpdateIPSetInput) (req *requ // and/or the IP addresses that you want to delete. If you want to change an // IP address, you delete the existing IP address and add the new one. // +// You can insert a maximum of 1000 addresses in a single request. +// // For more information about how to use the AWS WAF API to allow or block HTTP // requests, see the AWS WAF Developer Guide (http://docs.aws.amazon.com/waf/latest/developerguide/). // @@ -7133,9 +7534,6 @@ func (c *WAFRegional) UpdateIPSetRequest(input *waf.UpdateIPSetInput) (req *requ // * You tried to add a Rule to a WebACL, but the Rule already exists in // the specified WebACL. // -// * You tried to add an IP address to an IPSet, but the IP address already -// exists in the specified IPSet. -// // * You tried to add a ByteMatchTuple to a ByteMatchSet, but the ByteMatchTuple // already exists in the specified WebACL. // @@ -7341,9 +7739,6 @@ func (c *WAFRegional) UpdateRateBasedRuleRequest(input *waf.UpdateRateBasedRuleI // * You tried to add a Rule to a WebACL, but the Rule already exists in // the specified WebACL. // -// * You tried to add an IP address to an IPSet, but the IP address already -// exists in the specified IPSet. -// // * You tried to add a ByteMatchTuple to a ByteMatchSet, but the ByteMatchTuple // already exists in the specified WebACL. // @@ -7569,9 +7964,6 @@ func (c *WAFRegional) UpdateRegexMatchSetRequest(input *waf.UpdateRegexMatchSetI // * You tried to add a Rule to a WebACL, but the Rule already exists in // the specified WebACL. // -// * You tried to add an IP address to an IPSet, but the IP address already -// exists in the specified IPSet. -// // * You tried to add a ByteMatchTuple to a ByteMatchSet, but the ByteMatchTuple // already exists in the specified WebACL. // @@ -7733,9 +8125,6 @@ func (c *WAFRegional) UpdateRegexPatternSetRequest(input *waf.UpdateRegexPattern // * You tried to add a Rule to a WebACL, but the Rule already exists in // the specified WebACL. // -// * You tried to add an IP address to an IPSet, but the IP address already -// exists in the specified IPSet. -// // * You tried to add a ByteMatchTuple to a ByteMatchSet, but the ByteMatchTuple // already exists in the specified WebACL. // @@ -7881,9 +8270,6 @@ func (c *WAFRegional) UpdateRuleRequest(input *waf.UpdateRuleInput) (req *reques // * You tried to add a Rule to a WebACL, but the Rule already exists in // the specified WebACL. // -// * You tried to add an IP address to an IPSet, but the IP address already -// exists in the specified IPSet. -// // * You tried to add a ByteMatchTuple to a ByteMatchSet, but the ByteMatchTuple // already exists in the specified WebACL. // @@ -8089,9 +8475,6 @@ func (c *WAFRegional) UpdateRuleGroupRequest(input *waf.UpdateRuleGroupInput) (r // * You tried to add a Rule to a WebACL, but the Rule already exists in // the specified WebACL. // -// * You tried to add an IP address to an IPSet, but the IP address already -// exists in the specified IPSet. -// // * You tried to add a ByteMatchTuple to a ByteMatchSet, but the ByteMatchTuple // already exists in the specified WebACL. // @@ -8211,6 +8594,8 @@ func (c *WAFRegional) UpdateSizeConstraintSetRequest(input *waf.UpdateSizeConstr // of the request body are not supported because the AWS resource forwards // only the first 8192 bytes of your request to AWS WAF. // +// You can only specify a single type of TextTransformation. +// // * A ComparisonOperator used for evaluating the selected part of the request // against the specified Size, such as equals, greater than, less than, and // so on. @@ -8271,9 +8656,6 @@ func (c *WAFRegional) UpdateSizeConstraintSetRequest(input *waf.UpdateSizeConstr // * You tried to add a Rule to a WebACL, but the Rule already exists in // the specified WebACL. // -// * You tried to add an IP address to an IPSet, but the IP address already -// exists in the specified IPSet. -// // * You tried to add a ByteMatchTuple to a ByteMatchSet, but the ByteMatchTuple // already exists in the specified WebACL. // @@ -8413,12 +8795,15 @@ func (c *WAFRegional) UpdateSqlInjectionMatchSetRequest(input *waf.UpdateSqlInje // object and add a new one. // // * FieldToMatch: The part of web requests that you want AWS WAF to inspect -// and, if you want AWS WAF to inspect a header, the name of the header. +// and, if you want AWS WAF to inspect a header or custom query parameter, +// the name of the header or parameter. // // * TextTransformation: Which text transformation, if any, to perform on // the web request before inspecting the request for snippets of malicious // SQL code. // +// You can only specify a single type of TextTransformation. +// // You use SqlInjectionMatchSet objects to specify which CloudFront requests // you want to allow, block, or count. For example, if you're receiving requests // that contain snippets of SQL code in the query string and you want to block @@ -8469,9 +8854,6 @@ func (c *WAFRegional) UpdateSqlInjectionMatchSetRequest(input *waf.UpdateSqlInje // * You tried to add a Rule to a WebACL, but the Rule already exists in // the specified WebACL. // -// * You tried to add an IP address to an IPSet, but the IP address already -// exists in the specified IPSet. -// // * You tried to add a ByteMatchTuple to a ByteMatchSet, but the ByteMatchTuple // already exists in the specified WebACL. // @@ -8683,9 +9065,6 @@ func (c *WAFRegional) UpdateWebACLRequest(input *waf.UpdateWebACLInput) (req *re // * You tried to add a Rule to a WebACL, but the Rule already exists in // the specified WebACL. // -// * You tried to add an IP address to an IPSet, but the IP address already -// exists in the specified IPSet. -// // * You tried to add a ByteMatchTuple to a ByteMatchSet, but the ByteMatchTuple // already exists in the specified WebACL. // @@ -8828,12 +9207,15 @@ func (c *WAFRegional) UpdateXssMatchSetRequest(input *waf.UpdateXssMatchSetInput // add a new one. // // * FieldToMatch: The part of web requests that you want AWS WAF to inspect -// and, if you want AWS WAF to inspect a header, the name of the header. +// and, if you want AWS WAF to inspect a header or custom query parameter, +// the name of the header or parameter. // // * TextTransformation: Which text transformation, if any, to perform on // the web request before inspecting the request for cross-site scripting // attacks. // +// You can only specify a single type of TextTransformation. +// // You use XssMatchSet objects to specify which CloudFront requests you want // to allow, block, or count. For example, if you're receiving requests that // contain cross-site scripting attacks in the request body and you want to @@ -8884,9 +9266,6 @@ func (c *WAFRegional) UpdateXssMatchSetRequest(input *waf.UpdateXssMatchSetInput // * You tried to add a Rule to a WebACL, but the Rule already exists in // the specified WebACL. // -// * You tried to add an IP address to an IPSet, but the IP address already -// exists in the specified IPSet. -// // * You tried to add a ByteMatchTuple to a ByteMatchSet, but the ByteMatchTuple // already exists in the specified WebACL. // @@ -10046,6 +10425,12 @@ const ( // MatchFieldTypeBody is a MatchFieldType enum value MatchFieldTypeBody = "BODY" + + // MatchFieldTypeSingleQueryArg is a MatchFieldType enum value + MatchFieldTypeSingleQueryArg = "SINGLE_QUERY_ARG" + + // MatchFieldTypeAllQueryArgs is a MatchFieldType enum value + MatchFieldTypeAllQueryArgs = "ALL_QUERY_ARGS" ) const ( diff --git a/vendor/github.com/aws/aws-sdk-go/service/wafregional/errors.go b/vendor/github.com/aws/aws-sdk-go/service/wafregional/errors.go index 793dbc2fc..fed17a991 100644 --- a/vendor/github.com/aws/aws-sdk-go/service/wafregional/errors.go +++ b/vendor/github.com/aws/aws-sdk-go/service/wafregional/errors.go @@ -41,9 +41,6 @@ const ( // * You tried to add a Rule to a WebACL, but the Rule already exists in // the specified WebACL. // - // * You tried to add an IP address to an IPSet, but the IP address already - // exists in the specified IPSet. - // // * You tried to add a ByteMatchTuple to a ByteMatchSet, but the ByteMatchTuple // already exists in the specified WebACL. ErrCodeWAFInvalidOperationException = "WAFInvalidOperationException" @@ -93,8 +90,9 @@ const ( // // * Effect must specify Allow. // - // * The Action in the policy must be waf:UpdateWebACL or waf-regional:UpdateWebACL. - // Any extra or wildcard actions in the policy will be rejected. + // * The Action in the policy must be waf:UpdateWebACL, waf-regional:UpdateWebACL, + // waf:GetRuleGroup and waf-regional:GetRuleGroup . Any extra or wildcard + // actions in the policy will be rejected. // // * The policy cannot include a Resource parameter. // diff --git a/vendor/github.com/coreos/etcd/auth/authpb/auth.pb.go b/vendor/github.com/coreos/etcd/auth/authpb/auth.pb.go index 009ebda70..1a940c39b 100644 --- a/vendor/github.com/coreos/etcd/auth/authpb/auth.pb.go +++ b/vendor/github.com/coreos/etcd/auth/authpb/auth.pb.go @@ -1,6 +1,5 @@ -// Code generated by protoc-gen-gogo. +// Code generated by protoc-gen-gogo. DO NOT EDIT. // source: auth.proto -// DO NOT EDIT! /* Package authpb is a generated protocol buffer package. @@ -22,6 +21,8 @@ import ( math "math" + _ "github.com/gogo/protobuf/gogoproto" + io "io" ) @@ -217,24 +218,6 @@ func (m *Role) MarshalTo(dAtA []byte) (int, error) { return i, nil } -func encodeFixed64Auth(dAtA []byte, offset int, v uint64) int { - dAtA[offset] = uint8(v) - dAtA[offset+1] = uint8(v >> 8) - dAtA[offset+2] = uint8(v >> 16) - dAtA[offset+3] = uint8(v >> 24) - dAtA[offset+4] = uint8(v >> 32) - dAtA[offset+5] = uint8(v >> 40) - dAtA[offset+6] = uint8(v >> 48) - dAtA[offset+7] = uint8(v >> 56) - return offset + 8 -} -func encodeFixed32Auth(dAtA []byte, offset int, v uint32) int { - dAtA[offset] = uint8(v) - dAtA[offset+1] = uint8(v >> 8) - dAtA[offset+2] = uint8(v >> 16) - dAtA[offset+3] = uint8(v >> 24) - return offset + 4 -} func encodeVarintAuth(dAtA []byte, offset int, v uint64) int { for v >= 1<<7 { dAtA[offset] = uint8(v&0x7f | 0x80) diff --git a/vendor/github.com/coreos/etcd/client/README.md b/vendor/github.com/coreos/etcd/client/README.md index c0ec81901..2be731ede 100644 --- a/vendor/github.com/coreos/etcd/client/README.md +++ b/vendor/github.com/coreos/etcd/client/README.md @@ -25,8 +25,8 @@ package main import ( "log" "time" + "context" - "golang.org/x/net/context" "github.com/coreos/etcd/client" ) diff --git a/vendor/github.com/coreos/etcd/client/auth_role.go b/vendor/github.com/coreos/etcd/client/auth_role.go index d15e00dd7..b6ba7e150 100644 --- a/vendor/github.com/coreos/etcd/client/auth_role.go +++ b/vendor/github.com/coreos/etcd/client/auth_role.go @@ -16,11 +16,10 @@ package client import ( "bytes" + "context" "encoding/json" "net/http" "net/url" - - "golang.org/x/net/context" ) type Role struct { diff --git a/vendor/github.com/coreos/etcd/client/auth_user.go b/vendor/github.com/coreos/etcd/client/auth_user.go index 97c3f3181..8e7e2efe8 100644 --- a/vendor/github.com/coreos/etcd/client/auth_user.go +++ b/vendor/github.com/coreos/etcd/client/auth_user.go @@ -16,12 +16,11 @@ package client import ( "bytes" + "context" "encoding/json" "net/http" "net/url" "path" - - "golang.org/x/net/context" ) var ( diff --git a/vendor/github.com/coreos/etcd/client/client.go b/vendor/github.com/coreos/etcd/client/client.go index 498dfbcc8..e68745056 100644 --- a/vendor/github.com/coreos/etcd/client/client.go +++ b/vendor/github.com/coreos/etcd/client/client.go @@ -15,6 +15,7 @@ package client import ( + "context" "encoding/json" "errors" "fmt" @@ -29,8 +30,6 @@ import ( "time" "github.com/coreos/etcd/version" - - "golang.org/x/net/context" ) var ( @@ -372,12 +371,7 @@ func (c *httpClusterClient) Do(ctx context.Context, act httpAction) (*http.Respo if err == context.Canceled || err == context.DeadlineExceeded { return nil, nil, err } - if isOneShot { - return nil, nil, err - } - continue - } - if resp.StatusCode/100 == 5 { + } else if resp.StatusCode/100 == 5 { switch resp.StatusCode { case http.StatusInternalServerError, http.StatusServiceUnavailable: // TODO: make sure this is a no leader response @@ -385,10 +379,16 @@ func (c *httpClusterClient) Do(ctx context.Context, act httpAction) (*http.Respo default: cerr.Errors = append(cerr.Errors, fmt.Errorf("client: etcd member %s returns server error [%s]", eps[k].String(), http.StatusText(resp.StatusCode))) } - if isOneShot { - return nil, nil, cerr.Errors[0] + err = cerr.Errors[0] + } + if err != nil { + if !isOneShot { + continue } - continue + c.Lock() + c.pinned = (k + 1) % leps + c.Unlock() + return nil, nil, err } if k != pinned { c.Lock() @@ -670,8 +670,15 @@ func (r *redirectedHTTPAction) HTTPRequest(ep url.URL) *http.Request { } func shuffleEndpoints(r *rand.Rand, eps []url.URL) []url.URL { - p := r.Perm(len(eps)) - neps := make([]url.URL, len(eps)) + // copied from Go 1.9<= rand.Rand.Perm + n := len(eps) + p := make([]int, n) + for i := 0; i < n; i++ { + j := r.Intn(i + 1) + p[i] = p[j] + p[j] = i + } + neps := make([]url.URL, n) for i, k := range p { neps[i] = eps[k] } diff --git a/vendor/github.com/coreos/etcd/client/doc.go b/vendor/github.com/coreos/etcd/client/doc.go index 32fdfb52c..ad4eca4e1 100644 --- a/vendor/github.com/coreos/etcd/client/doc.go +++ b/vendor/github.com/coreos/etcd/client/doc.go @@ -19,9 +19,9 @@ Create a Config and exchange it for a Client: import ( "net/http" + "context" "github.com/coreos/etcd/client" - "golang.org/x/net/context" ) cfg := client.Config{ @@ -59,7 +59,7 @@ Use a custom context to set timeouts on your operations: ctx, cancel := context.WithTimeout(context.Background(), 5*time.Second) defer cancel() - // set a new key, ignoring it's previous state + // set a new key, ignoring its previous state _, err := kAPI.Set(ctx, "/ping", "pong", nil) if err != nil { if err == context.DeadlineExceeded { diff --git a/vendor/github.com/coreos/etcd/client/keys.generated.go b/vendor/github.com/coreos/etcd/client/keys.generated.go index 216139c9c..237fdbe8f 100644 --- a/vendor/github.com/coreos/etcd/client/keys.generated.go +++ b/vendor/github.com/coreos/etcd/client/keys.generated.go @@ -8,49 +8,50 @@ package client import ( "errors" "fmt" - codec1978 "github.com/ugorji/go/codec" "reflect" "runtime" time "time" + + codec1978 "github.com/ugorji/go/codec" ) const ( // ----- content types ---- - codecSelferC_UTF81819 = 1 - codecSelferC_RAW1819 = 0 + codecSelferC_UTF87612 = 1 + codecSelferC_RAW7612 = 0 // ----- value types used ---- - codecSelferValueTypeArray1819 = 10 - codecSelferValueTypeMap1819 = 9 + codecSelferValueTypeArray7612 = 10 + codecSelferValueTypeMap7612 = 9 // ----- containerStateValues ---- - codecSelfer_containerMapKey1819 = 2 - codecSelfer_containerMapValue1819 = 3 - codecSelfer_containerMapEnd1819 = 4 - codecSelfer_containerArrayElem1819 = 6 - codecSelfer_containerArrayEnd1819 = 7 + codecSelfer_containerMapKey7612 = 2 + codecSelfer_containerMapValue7612 = 3 + codecSelfer_containerMapEnd7612 = 4 + codecSelfer_containerArrayElem7612 = 6 + codecSelfer_containerArrayEnd7612 = 7 ) var ( - codecSelferBitsize1819 = uint8(reflect.TypeOf(uint(0)).Bits()) - codecSelferOnlyMapOrArrayEncodeToStructErr1819 = errors.New(`only encoded map or array can be decoded into a struct`) + codecSelferBitsize7612 = uint8(reflect.TypeOf(uint(0)).Bits()) + codecSelferOnlyMapOrArrayEncodeToStructErr7612 = errors.New(`only encoded map or array can be decoded into a struct`) ) -type codecSelfer1819 struct{} +type codecSelfer7612 struct{} func init() { - if codec1978.GenVersion != 5 { + if codec1978.GenVersion != 8 { _, file, _, _ := runtime.Caller(0) err := fmt.Errorf("codecgen version mismatch: current: %v, need %v. Re-generate file: %v", - 5, codec1978.GenVersion, file) + 8, codec1978.GenVersion, file) panic(err) } if false { // reference the types, but skip this branch at build/run time - var v0 time.Time + var v0 time.Duration _ = v0 } } -func (x *Response) CodecEncodeSelf(e *codec1978.Encoder) { - var h codecSelfer1819 +func (x *Error) CodecEncodeSelf(e *codec1978.Encoder) { + var h codecSelfer7612 z, r := codec1978.GenHelperEncoder(e) _, _, _ = h, z, r if x == nil { @@ -63,86 +64,100 @@ func (x *Response) CodecEncodeSelf(e *codec1978.Encoder) { } else { yysep2 := !z.EncBinary() yy2arr2 := z.EncBasicHandle().StructToArray - var yyq2 [3]bool - _, _, _ = yysep2, yyq2, yy2arr2 + _, _ = yysep2, yy2arr2 const yyr2 bool = false - var yynn2 int if yyr2 || yy2arr2 { - r.EncodeArrayStart(3) + r.WriteArrayStart(4) } else { - yynn2 = 3 - for _, b := range yyq2 { - if b { - yynn2++ - } - } - r.EncodeMapStart(yynn2) - yynn2 = 0 + r.WriteMapStart(4) } if yyr2 || yy2arr2 { - z.EncSendContainerState(codecSelfer_containerArrayElem1819) + r.WriteArrayElem() yym4 := z.EncBinary() _ = yym4 if false { } else { - r.EncodeString(codecSelferC_UTF81819, string(x.Action)) + r.EncodeInt(int64(x.Code)) } } else { - z.EncSendContainerState(codecSelfer_containerMapKey1819) - r.EncodeString(codecSelferC_UTF81819, string("action")) - z.EncSendContainerState(codecSelfer_containerMapValue1819) + r.WriteMapElemKey() + r.EncodeString(codecSelferC_UTF87612, string("errorCode")) + r.WriteMapElemValue() yym5 := z.EncBinary() _ = yym5 if false { } else { - r.EncodeString(codecSelferC_UTF81819, string(x.Action)) + r.EncodeInt(int64(x.Code)) } } if yyr2 || yy2arr2 { - z.EncSendContainerState(codecSelfer_containerArrayElem1819) - if x.Node == nil { - r.EncodeNil() + r.WriteArrayElem() + yym7 := z.EncBinary() + _ = yym7 + if false { } else { - x.Node.CodecEncodeSelf(e) + r.EncodeString(codecSelferC_UTF87612, string(x.Message)) } } else { - z.EncSendContainerState(codecSelfer_containerMapKey1819) - r.EncodeString(codecSelferC_UTF81819, string("node")) - z.EncSendContainerState(codecSelfer_containerMapValue1819) - if x.Node == nil { - r.EncodeNil() + r.WriteMapElemKey() + r.EncodeString(codecSelferC_UTF87612, string("message")) + r.WriteMapElemValue() + yym8 := z.EncBinary() + _ = yym8 + if false { } else { - x.Node.CodecEncodeSelf(e) + r.EncodeString(codecSelferC_UTF87612, string(x.Message)) } } if yyr2 || yy2arr2 { - z.EncSendContainerState(codecSelfer_containerArrayElem1819) - if x.PrevNode == nil { - r.EncodeNil() + r.WriteArrayElem() + yym10 := z.EncBinary() + _ = yym10 + if false { } else { - x.PrevNode.CodecEncodeSelf(e) + r.EncodeString(codecSelferC_UTF87612, string(x.Cause)) } } else { - z.EncSendContainerState(codecSelfer_containerMapKey1819) - r.EncodeString(codecSelferC_UTF81819, string("prevNode")) - z.EncSendContainerState(codecSelfer_containerMapValue1819) - if x.PrevNode == nil { - r.EncodeNil() + r.WriteMapElemKey() + r.EncodeString(codecSelferC_UTF87612, string("cause")) + r.WriteMapElemValue() + yym11 := z.EncBinary() + _ = yym11 + if false { } else { - x.PrevNode.CodecEncodeSelf(e) + r.EncodeString(codecSelferC_UTF87612, string(x.Cause)) } } if yyr2 || yy2arr2 { - z.EncSendContainerState(codecSelfer_containerArrayEnd1819) + r.WriteArrayElem() + yym13 := z.EncBinary() + _ = yym13 + if false { + } else { + r.EncodeUint(uint64(x.Index)) + } } else { - z.EncSendContainerState(codecSelfer_containerMapEnd1819) + r.WriteMapElemKey() + r.EncodeString(codecSelferC_UTF87612, string("index")) + r.WriteMapElemValue() + yym14 := z.EncBinary() + _ = yym14 + if false { + } else { + r.EncodeUint(uint64(x.Index)) + } + } + if yyr2 || yy2arr2 { + r.WriteArrayEnd() + } else { + r.WriteMapEnd() } } } } -func (x *Response) CodecDecodeSelf(d *codec1978.Decoder) { - var h codecSelfer1819 +func (x *Error) CodecDecodeSelf(d *codec1978.Decoder) { + var h codecSelfer7612 z, r := codec1978.GenHelperDecoder(d) _, _, _ = h, z, r yym1 := z.DecBinary() @@ -151,28 +166,28 @@ func (x *Response) CodecDecodeSelf(d *codec1978.Decoder) { } else if z.HasExtensions() && z.DecExt(x) { } else { yyct2 := r.ContainerType() - if yyct2 == codecSelferValueTypeMap1819 { + if yyct2 == codecSelferValueTypeMap7612 { yyl2 := r.ReadMapStart() if yyl2 == 0 { - z.DecSendContainerState(codecSelfer_containerMapEnd1819) + r.ReadMapEnd() } else { x.codecDecodeSelfFromMap(yyl2, d) } - } else if yyct2 == codecSelferValueTypeArray1819 { + } else if yyct2 == codecSelferValueTypeArray7612 { yyl2 := r.ReadArrayStart() if yyl2 == 0 { - z.DecSendContainerState(codecSelfer_containerArrayEnd1819) + r.ReadArrayEnd() } else { x.codecDecodeSelfFromArray(yyl2, d) } } else { - panic(codecSelferOnlyMapOrArrayEncodeToStructErr1819) + panic(codecSelferOnlyMapOrArrayEncodeToStructErr7612) } } } -func (x *Response) codecDecodeSelfFromMap(l int, d *codec1978.Decoder) { - var h codecSelfer1819 +func (x *Error) codecDecodeSelfFromMap(l int, d *codec1978.Decoder) { + var h codecSelfer7612 z, r := codec1978.GenHelperDecoder(d) _, _, _ = h, z, r var yys3Slc = z.DecScratchBuffer() // default slice to decode into @@ -188,10 +203,1816 @@ func (x *Response) codecDecodeSelfFromMap(l int, d *codec1978.Decoder) { break } } - z.DecSendContainerState(codecSelfer_containerMapKey1819) - yys3Slc = r.DecodeBytes(yys3Slc, true, true) + r.ReadMapElemKey() + yys3Slc = r.DecodeStringAsBytes() yys3 := string(yys3Slc) - z.DecSendContainerState(codecSelfer_containerMapValue1819) + r.ReadMapElemValue() + switch yys3 { + case "errorCode": + if r.TryDecodeAsNil() { + x.Code = 0 + } else { + yyv4 := &x.Code + yym5 := z.DecBinary() + _ = yym5 + if false { + } else { + *((*int)(yyv4)) = int(r.DecodeInt(codecSelferBitsize7612)) + } + } + case "message": + if r.TryDecodeAsNil() { + x.Message = "" + } else { + yyv6 := &x.Message + yym7 := z.DecBinary() + _ = yym7 + if false { + } else { + *((*string)(yyv6)) = r.DecodeString() + } + } + case "cause": + if r.TryDecodeAsNil() { + x.Cause = "" + } else { + yyv8 := &x.Cause + yym9 := z.DecBinary() + _ = yym9 + if false { + } else { + *((*string)(yyv8)) = r.DecodeString() + } + } + case "index": + if r.TryDecodeAsNil() { + x.Index = 0 + } else { + yyv10 := &x.Index + yym11 := z.DecBinary() + _ = yym11 + if false { + } else { + *((*uint64)(yyv10)) = uint64(r.DecodeUint(64)) + } + } + default: + z.DecStructFieldNotFound(-1, yys3) + } // end switch yys3 + } // end for yyj3 + r.ReadMapEnd() +} + +func (x *Error) codecDecodeSelfFromArray(l int, d *codec1978.Decoder) { + var h codecSelfer7612 + z, r := codec1978.GenHelperDecoder(d) + _, _, _ = h, z, r + var yyj12 int + var yyb12 bool + var yyhl12 bool = l >= 0 + yyj12++ + if yyhl12 { + yyb12 = yyj12 > l + } else { + yyb12 = r.CheckBreak() + } + if yyb12 { + r.ReadArrayEnd() + return + } + r.ReadArrayElem() + if r.TryDecodeAsNil() { + x.Code = 0 + } else { + yyv13 := &x.Code + yym14 := z.DecBinary() + _ = yym14 + if false { + } else { + *((*int)(yyv13)) = int(r.DecodeInt(codecSelferBitsize7612)) + } + } + yyj12++ + if yyhl12 { + yyb12 = yyj12 > l + } else { + yyb12 = r.CheckBreak() + } + if yyb12 { + r.ReadArrayEnd() + return + } + r.ReadArrayElem() + if r.TryDecodeAsNil() { + x.Message = "" + } else { + yyv15 := &x.Message + yym16 := z.DecBinary() + _ = yym16 + if false { + } else { + *((*string)(yyv15)) = r.DecodeString() + } + } + yyj12++ + if yyhl12 { + yyb12 = yyj12 > l + } else { + yyb12 = r.CheckBreak() + } + if yyb12 { + r.ReadArrayEnd() + return + } + r.ReadArrayElem() + if r.TryDecodeAsNil() { + x.Cause = "" + } else { + yyv17 := &x.Cause + yym18 := z.DecBinary() + _ = yym18 + if false { + } else { + *((*string)(yyv17)) = r.DecodeString() + } + } + yyj12++ + if yyhl12 { + yyb12 = yyj12 > l + } else { + yyb12 = r.CheckBreak() + } + if yyb12 { + r.ReadArrayEnd() + return + } + r.ReadArrayElem() + if r.TryDecodeAsNil() { + x.Index = 0 + } else { + yyv19 := &x.Index + yym20 := z.DecBinary() + _ = yym20 + if false { + } else { + *((*uint64)(yyv19)) = uint64(r.DecodeUint(64)) + } + } + for { + yyj12++ + if yyhl12 { + yyb12 = yyj12 > l + } else { + yyb12 = r.CheckBreak() + } + if yyb12 { + break + } + r.ReadArrayElem() + z.DecStructFieldNotFound(yyj12-1, "") + } + r.ReadArrayEnd() +} + +func (x PrevExistType) CodecEncodeSelf(e *codec1978.Encoder) { + var h codecSelfer7612 + z, r := codec1978.GenHelperEncoder(e) + _, _, _ = h, z, r + yym1 := z.EncBinary() + _ = yym1 + if false { + } else if z.HasExtensions() && z.EncExt(x) { + } else { + r.EncodeString(codecSelferC_UTF87612, string(x)) + } +} + +func (x *PrevExistType) CodecDecodeSelf(d *codec1978.Decoder) { + var h codecSelfer7612 + z, r := codec1978.GenHelperDecoder(d) + _, _, _ = h, z, r + yym1 := z.DecBinary() + _ = yym1 + if false { + } else if z.HasExtensions() && z.DecExt(x) { + } else { + *((*string)(x)) = r.DecodeString() + } +} + +func (x *WatcherOptions) CodecEncodeSelf(e *codec1978.Encoder) { + var h codecSelfer7612 + z, r := codec1978.GenHelperEncoder(e) + _, _, _ = h, z, r + if x == nil { + r.EncodeNil() + } else { + yym1 := z.EncBinary() + _ = yym1 + if false { + } else if z.HasExtensions() && z.EncExt(x) { + } else { + yysep2 := !z.EncBinary() + yy2arr2 := z.EncBasicHandle().StructToArray + _, _ = yysep2, yy2arr2 + const yyr2 bool = false + if yyr2 || yy2arr2 { + r.WriteArrayStart(2) + } else { + r.WriteMapStart(2) + } + if yyr2 || yy2arr2 { + r.WriteArrayElem() + yym4 := z.EncBinary() + _ = yym4 + if false { + } else { + r.EncodeUint(uint64(x.AfterIndex)) + } + } else { + r.WriteMapElemKey() + r.EncodeString(codecSelferC_UTF87612, string("AfterIndex")) + r.WriteMapElemValue() + yym5 := z.EncBinary() + _ = yym5 + if false { + } else { + r.EncodeUint(uint64(x.AfterIndex)) + } + } + if yyr2 || yy2arr2 { + r.WriteArrayElem() + yym7 := z.EncBinary() + _ = yym7 + if false { + } else { + r.EncodeBool(bool(x.Recursive)) + } + } else { + r.WriteMapElemKey() + r.EncodeString(codecSelferC_UTF87612, string("Recursive")) + r.WriteMapElemValue() + yym8 := z.EncBinary() + _ = yym8 + if false { + } else { + r.EncodeBool(bool(x.Recursive)) + } + } + if yyr2 || yy2arr2 { + r.WriteArrayEnd() + } else { + r.WriteMapEnd() + } + } + } +} + +func (x *WatcherOptions) CodecDecodeSelf(d *codec1978.Decoder) { + var h codecSelfer7612 + z, r := codec1978.GenHelperDecoder(d) + _, _, _ = h, z, r + yym1 := z.DecBinary() + _ = yym1 + if false { + } else if z.HasExtensions() && z.DecExt(x) { + } else { + yyct2 := r.ContainerType() + if yyct2 == codecSelferValueTypeMap7612 { + yyl2 := r.ReadMapStart() + if yyl2 == 0 { + r.ReadMapEnd() + } else { + x.codecDecodeSelfFromMap(yyl2, d) + } + } else if yyct2 == codecSelferValueTypeArray7612 { + yyl2 := r.ReadArrayStart() + if yyl2 == 0 { + r.ReadArrayEnd() + } else { + x.codecDecodeSelfFromArray(yyl2, d) + } + } else { + panic(codecSelferOnlyMapOrArrayEncodeToStructErr7612) + } + } +} + +func (x *WatcherOptions) codecDecodeSelfFromMap(l int, d *codec1978.Decoder) { + var h codecSelfer7612 + z, r := codec1978.GenHelperDecoder(d) + _, _, _ = h, z, r + var yys3Slc = z.DecScratchBuffer() // default slice to decode into + _ = yys3Slc + var yyhl3 bool = l >= 0 + for yyj3 := 0; ; yyj3++ { + if yyhl3 { + if yyj3 >= l { + break + } + } else { + if r.CheckBreak() { + break + } + } + r.ReadMapElemKey() + yys3Slc = r.DecodeStringAsBytes() + yys3 := string(yys3Slc) + r.ReadMapElemValue() + switch yys3 { + case "AfterIndex": + if r.TryDecodeAsNil() { + x.AfterIndex = 0 + } else { + yyv4 := &x.AfterIndex + yym5 := z.DecBinary() + _ = yym5 + if false { + } else { + *((*uint64)(yyv4)) = uint64(r.DecodeUint(64)) + } + } + case "Recursive": + if r.TryDecodeAsNil() { + x.Recursive = false + } else { + yyv6 := &x.Recursive + yym7 := z.DecBinary() + _ = yym7 + if false { + } else { + *((*bool)(yyv6)) = r.DecodeBool() + } + } + default: + z.DecStructFieldNotFound(-1, yys3) + } // end switch yys3 + } // end for yyj3 + r.ReadMapEnd() +} + +func (x *WatcherOptions) codecDecodeSelfFromArray(l int, d *codec1978.Decoder) { + var h codecSelfer7612 + z, r := codec1978.GenHelperDecoder(d) + _, _, _ = h, z, r + var yyj8 int + var yyb8 bool + var yyhl8 bool = l >= 0 + yyj8++ + if yyhl8 { + yyb8 = yyj8 > l + } else { + yyb8 = r.CheckBreak() + } + if yyb8 { + r.ReadArrayEnd() + return + } + r.ReadArrayElem() + if r.TryDecodeAsNil() { + x.AfterIndex = 0 + } else { + yyv9 := &x.AfterIndex + yym10 := z.DecBinary() + _ = yym10 + if false { + } else { + *((*uint64)(yyv9)) = uint64(r.DecodeUint(64)) + } + } + yyj8++ + if yyhl8 { + yyb8 = yyj8 > l + } else { + yyb8 = r.CheckBreak() + } + if yyb8 { + r.ReadArrayEnd() + return + } + r.ReadArrayElem() + if r.TryDecodeAsNil() { + x.Recursive = false + } else { + yyv11 := &x.Recursive + yym12 := z.DecBinary() + _ = yym12 + if false { + } else { + *((*bool)(yyv11)) = r.DecodeBool() + } + } + for { + yyj8++ + if yyhl8 { + yyb8 = yyj8 > l + } else { + yyb8 = r.CheckBreak() + } + if yyb8 { + break + } + r.ReadArrayElem() + z.DecStructFieldNotFound(yyj8-1, "") + } + r.ReadArrayEnd() +} + +func (x *CreateInOrderOptions) CodecEncodeSelf(e *codec1978.Encoder) { + var h codecSelfer7612 + z, r := codec1978.GenHelperEncoder(e) + _, _, _ = h, z, r + if x == nil { + r.EncodeNil() + } else { + yym1 := z.EncBinary() + _ = yym1 + if false { + } else if z.HasExtensions() && z.EncExt(x) { + } else { + yysep2 := !z.EncBinary() + yy2arr2 := z.EncBasicHandle().StructToArray + _, _ = yysep2, yy2arr2 + const yyr2 bool = false + if yyr2 || yy2arr2 { + r.WriteArrayStart(1) + } else { + r.WriteMapStart(1) + } + if yyr2 || yy2arr2 { + r.WriteArrayElem() + yym4 := z.EncBinary() + _ = yym4 + if false { + } else if z.HasExtensions() && z.EncExt(x.TTL) { + } else { + r.EncodeInt(int64(x.TTL)) + } + } else { + r.WriteMapElemKey() + r.EncodeString(codecSelferC_UTF87612, string("TTL")) + r.WriteMapElemValue() + yym5 := z.EncBinary() + _ = yym5 + if false { + } else if z.HasExtensions() && z.EncExt(x.TTL) { + } else { + r.EncodeInt(int64(x.TTL)) + } + } + if yyr2 || yy2arr2 { + r.WriteArrayEnd() + } else { + r.WriteMapEnd() + } + } + } +} + +func (x *CreateInOrderOptions) CodecDecodeSelf(d *codec1978.Decoder) { + var h codecSelfer7612 + z, r := codec1978.GenHelperDecoder(d) + _, _, _ = h, z, r + yym1 := z.DecBinary() + _ = yym1 + if false { + } else if z.HasExtensions() && z.DecExt(x) { + } else { + yyct2 := r.ContainerType() + if yyct2 == codecSelferValueTypeMap7612 { + yyl2 := r.ReadMapStart() + if yyl2 == 0 { + r.ReadMapEnd() + } else { + x.codecDecodeSelfFromMap(yyl2, d) + } + } else if yyct2 == codecSelferValueTypeArray7612 { + yyl2 := r.ReadArrayStart() + if yyl2 == 0 { + r.ReadArrayEnd() + } else { + x.codecDecodeSelfFromArray(yyl2, d) + } + } else { + panic(codecSelferOnlyMapOrArrayEncodeToStructErr7612) + } + } +} + +func (x *CreateInOrderOptions) codecDecodeSelfFromMap(l int, d *codec1978.Decoder) { + var h codecSelfer7612 + z, r := codec1978.GenHelperDecoder(d) + _, _, _ = h, z, r + var yys3Slc = z.DecScratchBuffer() // default slice to decode into + _ = yys3Slc + var yyhl3 bool = l >= 0 + for yyj3 := 0; ; yyj3++ { + if yyhl3 { + if yyj3 >= l { + break + } + } else { + if r.CheckBreak() { + break + } + } + r.ReadMapElemKey() + yys3Slc = r.DecodeStringAsBytes() + yys3 := string(yys3Slc) + r.ReadMapElemValue() + switch yys3 { + case "TTL": + if r.TryDecodeAsNil() { + x.TTL = 0 + } else { + yyv4 := &x.TTL + yym5 := z.DecBinary() + _ = yym5 + if false { + } else if z.HasExtensions() && z.DecExt(yyv4) { + } else { + *((*int64)(yyv4)) = int64(r.DecodeInt(64)) + } + } + default: + z.DecStructFieldNotFound(-1, yys3) + } // end switch yys3 + } // end for yyj3 + r.ReadMapEnd() +} + +func (x *CreateInOrderOptions) codecDecodeSelfFromArray(l int, d *codec1978.Decoder) { + var h codecSelfer7612 + z, r := codec1978.GenHelperDecoder(d) + _, _, _ = h, z, r + var yyj6 int + var yyb6 bool + var yyhl6 bool = l >= 0 + yyj6++ + if yyhl6 { + yyb6 = yyj6 > l + } else { + yyb6 = r.CheckBreak() + } + if yyb6 { + r.ReadArrayEnd() + return + } + r.ReadArrayElem() + if r.TryDecodeAsNil() { + x.TTL = 0 + } else { + yyv7 := &x.TTL + yym8 := z.DecBinary() + _ = yym8 + if false { + } else if z.HasExtensions() && z.DecExt(yyv7) { + } else { + *((*int64)(yyv7)) = int64(r.DecodeInt(64)) + } + } + for { + yyj6++ + if yyhl6 { + yyb6 = yyj6 > l + } else { + yyb6 = r.CheckBreak() + } + if yyb6 { + break + } + r.ReadArrayElem() + z.DecStructFieldNotFound(yyj6-1, "") + } + r.ReadArrayEnd() +} + +func (x *SetOptions) CodecEncodeSelf(e *codec1978.Encoder) { + var h codecSelfer7612 + z, r := codec1978.GenHelperEncoder(e) + _, _, _ = h, z, r + if x == nil { + r.EncodeNil() + } else { + yym1 := z.EncBinary() + _ = yym1 + if false { + } else if z.HasExtensions() && z.EncExt(x) { + } else { + yysep2 := !z.EncBinary() + yy2arr2 := z.EncBasicHandle().StructToArray + _, _ = yysep2, yy2arr2 + const yyr2 bool = false + if yyr2 || yy2arr2 { + r.WriteArrayStart(7) + } else { + r.WriteMapStart(7) + } + if yyr2 || yy2arr2 { + r.WriteArrayElem() + yym4 := z.EncBinary() + _ = yym4 + if false { + } else { + r.EncodeString(codecSelferC_UTF87612, string(x.PrevValue)) + } + } else { + r.WriteMapElemKey() + r.EncodeString(codecSelferC_UTF87612, string("PrevValue")) + r.WriteMapElemValue() + yym5 := z.EncBinary() + _ = yym5 + if false { + } else { + r.EncodeString(codecSelferC_UTF87612, string(x.PrevValue)) + } + } + if yyr2 || yy2arr2 { + r.WriteArrayElem() + yym7 := z.EncBinary() + _ = yym7 + if false { + } else { + r.EncodeUint(uint64(x.PrevIndex)) + } + } else { + r.WriteMapElemKey() + r.EncodeString(codecSelferC_UTF87612, string("PrevIndex")) + r.WriteMapElemValue() + yym8 := z.EncBinary() + _ = yym8 + if false { + } else { + r.EncodeUint(uint64(x.PrevIndex)) + } + } + if yyr2 || yy2arr2 { + r.WriteArrayElem() + x.PrevExist.CodecEncodeSelf(e) + } else { + r.WriteMapElemKey() + r.EncodeString(codecSelferC_UTF87612, string("PrevExist")) + r.WriteMapElemValue() + x.PrevExist.CodecEncodeSelf(e) + } + if yyr2 || yy2arr2 { + r.WriteArrayElem() + yym13 := z.EncBinary() + _ = yym13 + if false { + } else if z.HasExtensions() && z.EncExt(x.TTL) { + } else { + r.EncodeInt(int64(x.TTL)) + } + } else { + r.WriteMapElemKey() + r.EncodeString(codecSelferC_UTF87612, string("TTL")) + r.WriteMapElemValue() + yym14 := z.EncBinary() + _ = yym14 + if false { + } else if z.HasExtensions() && z.EncExt(x.TTL) { + } else { + r.EncodeInt(int64(x.TTL)) + } + } + if yyr2 || yy2arr2 { + r.WriteArrayElem() + yym16 := z.EncBinary() + _ = yym16 + if false { + } else { + r.EncodeBool(bool(x.Refresh)) + } + } else { + r.WriteMapElemKey() + r.EncodeString(codecSelferC_UTF87612, string("Refresh")) + r.WriteMapElemValue() + yym17 := z.EncBinary() + _ = yym17 + if false { + } else { + r.EncodeBool(bool(x.Refresh)) + } + } + if yyr2 || yy2arr2 { + r.WriteArrayElem() + yym19 := z.EncBinary() + _ = yym19 + if false { + } else { + r.EncodeBool(bool(x.Dir)) + } + } else { + r.WriteMapElemKey() + r.EncodeString(codecSelferC_UTF87612, string("Dir")) + r.WriteMapElemValue() + yym20 := z.EncBinary() + _ = yym20 + if false { + } else { + r.EncodeBool(bool(x.Dir)) + } + } + if yyr2 || yy2arr2 { + r.WriteArrayElem() + yym22 := z.EncBinary() + _ = yym22 + if false { + } else { + r.EncodeBool(bool(x.NoValueOnSuccess)) + } + } else { + r.WriteMapElemKey() + r.EncodeString(codecSelferC_UTF87612, string("NoValueOnSuccess")) + r.WriteMapElemValue() + yym23 := z.EncBinary() + _ = yym23 + if false { + } else { + r.EncodeBool(bool(x.NoValueOnSuccess)) + } + } + if yyr2 || yy2arr2 { + r.WriteArrayEnd() + } else { + r.WriteMapEnd() + } + } + } +} + +func (x *SetOptions) CodecDecodeSelf(d *codec1978.Decoder) { + var h codecSelfer7612 + z, r := codec1978.GenHelperDecoder(d) + _, _, _ = h, z, r + yym1 := z.DecBinary() + _ = yym1 + if false { + } else if z.HasExtensions() && z.DecExt(x) { + } else { + yyct2 := r.ContainerType() + if yyct2 == codecSelferValueTypeMap7612 { + yyl2 := r.ReadMapStart() + if yyl2 == 0 { + r.ReadMapEnd() + } else { + x.codecDecodeSelfFromMap(yyl2, d) + } + } else if yyct2 == codecSelferValueTypeArray7612 { + yyl2 := r.ReadArrayStart() + if yyl2 == 0 { + r.ReadArrayEnd() + } else { + x.codecDecodeSelfFromArray(yyl2, d) + } + } else { + panic(codecSelferOnlyMapOrArrayEncodeToStructErr7612) + } + } +} + +func (x *SetOptions) codecDecodeSelfFromMap(l int, d *codec1978.Decoder) { + var h codecSelfer7612 + z, r := codec1978.GenHelperDecoder(d) + _, _, _ = h, z, r + var yys3Slc = z.DecScratchBuffer() // default slice to decode into + _ = yys3Slc + var yyhl3 bool = l >= 0 + for yyj3 := 0; ; yyj3++ { + if yyhl3 { + if yyj3 >= l { + break + } + } else { + if r.CheckBreak() { + break + } + } + r.ReadMapElemKey() + yys3Slc = r.DecodeStringAsBytes() + yys3 := string(yys3Slc) + r.ReadMapElemValue() + switch yys3 { + case "PrevValue": + if r.TryDecodeAsNil() { + x.PrevValue = "" + } else { + yyv4 := &x.PrevValue + yym5 := z.DecBinary() + _ = yym5 + if false { + } else { + *((*string)(yyv4)) = r.DecodeString() + } + } + case "PrevIndex": + if r.TryDecodeAsNil() { + x.PrevIndex = 0 + } else { + yyv6 := &x.PrevIndex + yym7 := z.DecBinary() + _ = yym7 + if false { + } else { + *((*uint64)(yyv6)) = uint64(r.DecodeUint(64)) + } + } + case "PrevExist": + if r.TryDecodeAsNil() { + x.PrevExist = "" + } else { + yyv8 := &x.PrevExist + yyv8.CodecDecodeSelf(d) + } + case "TTL": + if r.TryDecodeAsNil() { + x.TTL = 0 + } else { + yyv9 := &x.TTL + yym10 := z.DecBinary() + _ = yym10 + if false { + } else if z.HasExtensions() && z.DecExt(yyv9) { + } else { + *((*int64)(yyv9)) = int64(r.DecodeInt(64)) + } + } + case "Refresh": + if r.TryDecodeAsNil() { + x.Refresh = false + } else { + yyv11 := &x.Refresh + yym12 := z.DecBinary() + _ = yym12 + if false { + } else { + *((*bool)(yyv11)) = r.DecodeBool() + } + } + case "Dir": + if r.TryDecodeAsNil() { + x.Dir = false + } else { + yyv13 := &x.Dir + yym14 := z.DecBinary() + _ = yym14 + if false { + } else { + *((*bool)(yyv13)) = r.DecodeBool() + } + } + case "NoValueOnSuccess": + if r.TryDecodeAsNil() { + x.NoValueOnSuccess = false + } else { + yyv15 := &x.NoValueOnSuccess + yym16 := z.DecBinary() + _ = yym16 + if false { + } else { + *((*bool)(yyv15)) = r.DecodeBool() + } + } + default: + z.DecStructFieldNotFound(-1, yys3) + } // end switch yys3 + } // end for yyj3 + r.ReadMapEnd() +} + +func (x *SetOptions) codecDecodeSelfFromArray(l int, d *codec1978.Decoder) { + var h codecSelfer7612 + z, r := codec1978.GenHelperDecoder(d) + _, _, _ = h, z, r + var yyj17 int + var yyb17 bool + var yyhl17 bool = l >= 0 + yyj17++ + if yyhl17 { + yyb17 = yyj17 > l + } else { + yyb17 = r.CheckBreak() + } + if yyb17 { + r.ReadArrayEnd() + return + } + r.ReadArrayElem() + if r.TryDecodeAsNil() { + x.PrevValue = "" + } else { + yyv18 := &x.PrevValue + yym19 := z.DecBinary() + _ = yym19 + if false { + } else { + *((*string)(yyv18)) = r.DecodeString() + } + } + yyj17++ + if yyhl17 { + yyb17 = yyj17 > l + } else { + yyb17 = r.CheckBreak() + } + if yyb17 { + r.ReadArrayEnd() + return + } + r.ReadArrayElem() + if r.TryDecodeAsNil() { + x.PrevIndex = 0 + } else { + yyv20 := &x.PrevIndex + yym21 := z.DecBinary() + _ = yym21 + if false { + } else { + *((*uint64)(yyv20)) = uint64(r.DecodeUint(64)) + } + } + yyj17++ + if yyhl17 { + yyb17 = yyj17 > l + } else { + yyb17 = r.CheckBreak() + } + if yyb17 { + r.ReadArrayEnd() + return + } + r.ReadArrayElem() + if r.TryDecodeAsNil() { + x.PrevExist = "" + } else { + yyv22 := &x.PrevExist + yyv22.CodecDecodeSelf(d) + } + yyj17++ + if yyhl17 { + yyb17 = yyj17 > l + } else { + yyb17 = r.CheckBreak() + } + if yyb17 { + r.ReadArrayEnd() + return + } + r.ReadArrayElem() + if r.TryDecodeAsNil() { + x.TTL = 0 + } else { + yyv23 := &x.TTL + yym24 := z.DecBinary() + _ = yym24 + if false { + } else if z.HasExtensions() && z.DecExt(yyv23) { + } else { + *((*int64)(yyv23)) = int64(r.DecodeInt(64)) + } + } + yyj17++ + if yyhl17 { + yyb17 = yyj17 > l + } else { + yyb17 = r.CheckBreak() + } + if yyb17 { + r.ReadArrayEnd() + return + } + r.ReadArrayElem() + if r.TryDecodeAsNil() { + x.Refresh = false + } else { + yyv25 := &x.Refresh + yym26 := z.DecBinary() + _ = yym26 + if false { + } else { + *((*bool)(yyv25)) = r.DecodeBool() + } + } + yyj17++ + if yyhl17 { + yyb17 = yyj17 > l + } else { + yyb17 = r.CheckBreak() + } + if yyb17 { + r.ReadArrayEnd() + return + } + r.ReadArrayElem() + if r.TryDecodeAsNil() { + x.Dir = false + } else { + yyv27 := &x.Dir + yym28 := z.DecBinary() + _ = yym28 + if false { + } else { + *((*bool)(yyv27)) = r.DecodeBool() + } + } + yyj17++ + if yyhl17 { + yyb17 = yyj17 > l + } else { + yyb17 = r.CheckBreak() + } + if yyb17 { + r.ReadArrayEnd() + return + } + r.ReadArrayElem() + if r.TryDecodeAsNil() { + x.NoValueOnSuccess = false + } else { + yyv29 := &x.NoValueOnSuccess + yym30 := z.DecBinary() + _ = yym30 + if false { + } else { + *((*bool)(yyv29)) = r.DecodeBool() + } + } + for { + yyj17++ + if yyhl17 { + yyb17 = yyj17 > l + } else { + yyb17 = r.CheckBreak() + } + if yyb17 { + break + } + r.ReadArrayElem() + z.DecStructFieldNotFound(yyj17-1, "") + } + r.ReadArrayEnd() +} + +func (x *GetOptions) CodecEncodeSelf(e *codec1978.Encoder) { + var h codecSelfer7612 + z, r := codec1978.GenHelperEncoder(e) + _, _, _ = h, z, r + if x == nil { + r.EncodeNil() + } else { + yym1 := z.EncBinary() + _ = yym1 + if false { + } else if z.HasExtensions() && z.EncExt(x) { + } else { + yysep2 := !z.EncBinary() + yy2arr2 := z.EncBasicHandle().StructToArray + _, _ = yysep2, yy2arr2 + const yyr2 bool = false + if yyr2 || yy2arr2 { + r.WriteArrayStart(3) + } else { + r.WriteMapStart(3) + } + if yyr2 || yy2arr2 { + r.WriteArrayElem() + yym4 := z.EncBinary() + _ = yym4 + if false { + } else { + r.EncodeBool(bool(x.Recursive)) + } + } else { + r.WriteMapElemKey() + r.EncodeString(codecSelferC_UTF87612, string("Recursive")) + r.WriteMapElemValue() + yym5 := z.EncBinary() + _ = yym5 + if false { + } else { + r.EncodeBool(bool(x.Recursive)) + } + } + if yyr2 || yy2arr2 { + r.WriteArrayElem() + yym7 := z.EncBinary() + _ = yym7 + if false { + } else { + r.EncodeBool(bool(x.Sort)) + } + } else { + r.WriteMapElemKey() + r.EncodeString(codecSelferC_UTF87612, string("Sort")) + r.WriteMapElemValue() + yym8 := z.EncBinary() + _ = yym8 + if false { + } else { + r.EncodeBool(bool(x.Sort)) + } + } + if yyr2 || yy2arr2 { + r.WriteArrayElem() + yym10 := z.EncBinary() + _ = yym10 + if false { + } else { + r.EncodeBool(bool(x.Quorum)) + } + } else { + r.WriteMapElemKey() + r.EncodeString(codecSelferC_UTF87612, string("Quorum")) + r.WriteMapElemValue() + yym11 := z.EncBinary() + _ = yym11 + if false { + } else { + r.EncodeBool(bool(x.Quorum)) + } + } + if yyr2 || yy2arr2 { + r.WriteArrayEnd() + } else { + r.WriteMapEnd() + } + } + } +} + +func (x *GetOptions) CodecDecodeSelf(d *codec1978.Decoder) { + var h codecSelfer7612 + z, r := codec1978.GenHelperDecoder(d) + _, _, _ = h, z, r + yym1 := z.DecBinary() + _ = yym1 + if false { + } else if z.HasExtensions() && z.DecExt(x) { + } else { + yyct2 := r.ContainerType() + if yyct2 == codecSelferValueTypeMap7612 { + yyl2 := r.ReadMapStart() + if yyl2 == 0 { + r.ReadMapEnd() + } else { + x.codecDecodeSelfFromMap(yyl2, d) + } + } else if yyct2 == codecSelferValueTypeArray7612 { + yyl2 := r.ReadArrayStart() + if yyl2 == 0 { + r.ReadArrayEnd() + } else { + x.codecDecodeSelfFromArray(yyl2, d) + } + } else { + panic(codecSelferOnlyMapOrArrayEncodeToStructErr7612) + } + } +} + +func (x *GetOptions) codecDecodeSelfFromMap(l int, d *codec1978.Decoder) { + var h codecSelfer7612 + z, r := codec1978.GenHelperDecoder(d) + _, _, _ = h, z, r + var yys3Slc = z.DecScratchBuffer() // default slice to decode into + _ = yys3Slc + var yyhl3 bool = l >= 0 + for yyj3 := 0; ; yyj3++ { + if yyhl3 { + if yyj3 >= l { + break + } + } else { + if r.CheckBreak() { + break + } + } + r.ReadMapElemKey() + yys3Slc = r.DecodeStringAsBytes() + yys3 := string(yys3Slc) + r.ReadMapElemValue() + switch yys3 { + case "Recursive": + if r.TryDecodeAsNil() { + x.Recursive = false + } else { + yyv4 := &x.Recursive + yym5 := z.DecBinary() + _ = yym5 + if false { + } else { + *((*bool)(yyv4)) = r.DecodeBool() + } + } + case "Sort": + if r.TryDecodeAsNil() { + x.Sort = false + } else { + yyv6 := &x.Sort + yym7 := z.DecBinary() + _ = yym7 + if false { + } else { + *((*bool)(yyv6)) = r.DecodeBool() + } + } + case "Quorum": + if r.TryDecodeAsNil() { + x.Quorum = false + } else { + yyv8 := &x.Quorum + yym9 := z.DecBinary() + _ = yym9 + if false { + } else { + *((*bool)(yyv8)) = r.DecodeBool() + } + } + default: + z.DecStructFieldNotFound(-1, yys3) + } // end switch yys3 + } // end for yyj3 + r.ReadMapEnd() +} + +func (x *GetOptions) codecDecodeSelfFromArray(l int, d *codec1978.Decoder) { + var h codecSelfer7612 + z, r := codec1978.GenHelperDecoder(d) + _, _, _ = h, z, r + var yyj10 int + var yyb10 bool + var yyhl10 bool = l >= 0 + yyj10++ + if yyhl10 { + yyb10 = yyj10 > l + } else { + yyb10 = r.CheckBreak() + } + if yyb10 { + r.ReadArrayEnd() + return + } + r.ReadArrayElem() + if r.TryDecodeAsNil() { + x.Recursive = false + } else { + yyv11 := &x.Recursive + yym12 := z.DecBinary() + _ = yym12 + if false { + } else { + *((*bool)(yyv11)) = r.DecodeBool() + } + } + yyj10++ + if yyhl10 { + yyb10 = yyj10 > l + } else { + yyb10 = r.CheckBreak() + } + if yyb10 { + r.ReadArrayEnd() + return + } + r.ReadArrayElem() + if r.TryDecodeAsNil() { + x.Sort = false + } else { + yyv13 := &x.Sort + yym14 := z.DecBinary() + _ = yym14 + if false { + } else { + *((*bool)(yyv13)) = r.DecodeBool() + } + } + yyj10++ + if yyhl10 { + yyb10 = yyj10 > l + } else { + yyb10 = r.CheckBreak() + } + if yyb10 { + r.ReadArrayEnd() + return + } + r.ReadArrayElem() + if r.TryDecodeAsNil() { + x.Quorum = false + } else { + yyv15 := &x.Quorum + yym16 := z.DecBinary() + _ = yym16 + if false { + } else { + *((*bool)(yyv15)) = r.DecodeBool() + } + } + for { + yyj10++ + if yyhl10 { + yyb10 = yyj10 > l + } else { + yyb10 = r.CheckBreak() + } + if yyb10 { + break + } + r.ReadArrayElem() + z.DecStructFieldNotFound(yyj10-1, "") + } + r.ReadArrayEnd() +} + +func (x *DeleteOptions) CodecEncodeSelf(e *codec1978.Encoder) { + var h codecSelfer7612 + z, r := codec1978.GenHelperEncoder(e) + _, _, _ = h, z, r + if x == nil { + r.EncodeNil() + } else { + yym1 := z.EncBinary() + _ = yym1 + if false { + } else if z.HasExtensions() && z.EncExt(x) { + } else { + yysep2 := !z.EncBinary() + yy2arr2 := z.EncBasicHandle().StructToArray + _, _ = yysep2, yy2arr2 + const yyr2 bool = false + if yyr2 || yy2arr2 { + r.WriteArrayStart(4) + } else { + r.WriteMapStart(4) + } + if yyr2 || yy2arr2 { + r.WriteArrayElem() + yym4 := z.EncBinary() + _ = yym4 + if false { + } else { + r.EncodeString(codecSelferC_UTF87612, string(x.PrevValue)) + } + } else { + r.WriteMapElemKey() + r.EncodeString(codecSelferC_UTF87612, string("PrevValue")) + r.WriteMapElemValue() + yym5 := z.EncBinary() + _ = yym5 + if false { + } else { + r.EncodeString(codecSelferC_UTF87612, string(x.PrevValue)) + } + } + if yyr2 || yy2arr2 { + r.WriteArrayElem() + yym7 := z.EncBinary() + _ = yym7 + if false { + } else { + r.EncodeUint(uint64(x.PrevIndex)) + } + } else { + r.WriteMapElemKey() + r.EncodeString(codecSelferC_UTF87612, string("PrevIndex")) + r.WriteMapElemValue() + yym8 := z.EncBinary() + _ = yym8 + if false { + } else { + r.EncodeUint(uint64(x.PrevIndex)) + } + } + if yyr2 || yy2arr2 { + r.WriteArrayElem() + yym10 := z.EncBinary() + _ = yym10 + if false { + } else { + r.EncodeBool(bool(x.Recursive)) + } + } else { + r.WriteMapElemKey() + r.EncodeString(codecSelferC_UTF87612, string("Recursive")) + r.WriteMapElemValue() + yym11 := z.EncBinary() + _ = yym11 + if false { + } else { + r.EncodeBool(bool(x.Recursive)) + } + } + if yyr2 || yy2arr2 { + r.WriteArrayElem() + yym13 := z.EncBinary() + _ = yym13 + if false { + } else { + r.EncodeBool(bool(x.Dir)) + } + } else { + r.WriteMapElemKey() + r.EncodeString(codecSelferC_UTF87612, string("Dir")) + r.WriteMapElemValue() + yym14 := z.EncBinary() + _ = yym14 + if false { + } else { + r.EncodeBool(bool(x.Dir)) + } + } + if yyr2 || yy2arr2 { + r.WriteArrayEnd() + } else { + r.WriteMapEnd() + } + } + } +} + +func (x *DeleteOptions) CodecDecodeSelf(d *codec1978.Decoder) { + var h codecSelfer7612 + z, r := codec1978.GenHelperDecoder(d) + _, _, _ = h, z, r + yym1 := z.DecBinary() + _ = yym1 + if false { + } else if z.HasExtensions() && z.DecExt(x) { + } else { + yyct2 := r.ContainerType() + if yyct2 == codecSelferValueTypeMap7612 { + yyl2 := r.ReadMapStart() + if yyl2 == 0 { + r.ReadMapEnd() + } else { + x.codecDecodeSelfFromMap(yyl2, d) + } + } else if yyct2 == codecSelferValueTypeArray7612 { + yyl2 := r.ReadArrayStart() + if yyl2 == 0 { + r.ReadArrayEnd() + } else { + x.codecDecodeSelfFromArray(yyl2, d) + } + } else { + panic(codecSelferOnlyMapOrArrayEncodeToStructErr7612) + } + } +} + +func (x *DeleteOptions) codecDecodeSelfFromMap(l int, d *codec1978.Decoder) { + var h codecSelfer7612 + z, r := codec1978.GenHelperDecoder(d) + _, _, _ = h, z, r + var yys3Slc = z.DecScratchBuffer() // default slice to decode into + _ = yys3Slc + var yyhl3 bool = l >= 0 + for yyj3 := 0; ; yyj3++ { + if yyhl3 { + if yyj3 >= l { + break + } + } else { + if r.CheckBreak() { + break + } + } + r.ReadMapElemKey() + yys3Slc = r.DecodeStringAsBytes() + yys3 := string(yys3Slc) + r.ReadMapElemValue() + switch yys3 { + case "PrevValue": + if r.TryDecodeAsNil() { + x.PrevValue = "" + } else { + yyv4 := &x.PrevValue + yym5 := z.DecBinary() + _ = yym5 + if false { + } else { + *((*string)(yyv4)) = r.DecodeString() + } + } + case "PrevIndex": + if r.TryDecodeAsNil() { + x.PrevIndex = 0 + } else { + yyv6 := &x.PrevIndex + yym7 := z.DecBinary() + _ = yym7 + if false { + } else { + *((*uint64)(yyv6)) = uint64(r.DecodeUint(64)) + } + } + case "Recursive": + if r.TryDecodeAsNil() { + x.Recursive = false + } else { + yyv8 := &x.Recursive + yym9 := z.DecBinary() + _ = yym9 + if false { + } else { + *((*bool)(yyv8)) = r.DecodeBool() + } + } + case "Dir": + if r.TryDecodeAsNil() { + x.Dir = false + } else { + yyv10 := &x.Dir + yym11 := z.DecBinary() + _ = yym11 + if false { + } else { + *((*bool)(yyv10)) = r.DecodeBool() + } + } + default: + z.DecStructFieldNotFound(-1, yys3) + } // end switch yys3 + } // end for yyj3 + r.ReadMapEnd() +} + +func (x *DeleteOptions) codecDecodeSelfFromArray(l int, d *codec1978.Decoder) { + var h codecSelfer7612 + z, r := codec1978.GenHelperDecoder(d) + _, _, _ = h, z, r + var yyj12 int + var yyb12 bool + var yyhl12 bool = l >= 0 + yyj12++ + if yyhl12 { + yyb12 = yyj12 > l + } else { + yyb12 = r.CheckBreak() + } + if yyb12 { + r.ReadArrayEnd() + return + } + r.ReadArrayElem() + if r.TryDecodeAsNil() { + x.PrevValue = "" + } else { + yyv13 := &x.PrevValue + yym14 := z.DecBinary() + _ = yym14 + if false { + } else { + *((*string)(yyv13)) = r.DecodeString() + } + } + yyj12++ + if yyhl12 { + yyb12 = yyj12 > l + } else { + yyb12 = r.CheckBreak() + } + if yyb12 { + r.ReadArrayEnd() + return + } + r.ReadArrayElem() + if r.TryDecodeAsNil() { + x.PrevIndex = 0 + } else { + yyv15 := &x.PrevIndex + yym16 := z.DecBinary() + _ = yym16 + if false { + } else { + *((*uint64)(yyv15)) = uint64(r.DecodeUint(64)) + } + } + yyj12++ + if yyhl12 { + yyb12 = yyj12 > l + } else { + yyb12 = r.CheckBreak() + } + if yyb12 { + r.ReadArrayEnd() + return + } + r.ReadArrayElem() + if r.TryDecodeAsNil() { + x.Recursive = false + } else { + yyv17 := &x.Recursive + yym18 := z.DecBinary() + _ = yym18 + if false { + } else { + *((*bool)(yyv17)) = r.DecodeBool() + } + } + yyj12++ + if yyhl12 { + yyb12 = yyj12 > l + } else { + yyb12 = r.CheckBreak() + } + if yyb12 { + r.ReadArrayEnd() + return + } + r.ReadArrayElem() + if r.TryDecodeAsNil() { + x.Dir = false + } else { + yyv19 := &x.Dir + yym20 := z.DecBinary() + _ = yym20 + if false { + } else { + *((*bool)(yyv19)) = r.DecodeBool() + } + } + for { + yyj12++ + if yyhl12 { + yyb12 = yyj12 > l + } else { + yyb12 = r.CheckBreak() + } + if yyb12 { + break + } + r.ReadArrayElem() + z.DecStructFieldNotFound(yyj12-1, "") + } + r.ReadArrayEnd() +} + +func (x *Response) CodecEncodeSelf(e *codec1978.Encoder) { + var h codecSelfer7612 + z, r := codec1978.GenHelperEncoder(e) + _, _, _ = h, z, r + if x == nil { + r.EncodeNil() + } else { + yym1 := z.EncBinary() + _ = yym1 + if false { + } else if z.HasExtensions() && z.EncExt(x) { + } else { + yysep2 := !z.EncBinary() + yy2arr2 := z.EncBasicHandle().StructToArray + _, _ = yysep2, yy2arr2 + const yyr2 bool = false + if yyr2 || yy2arr2 { + r.WriteArrayStart(3) + } else { + r.WriteMapStart(3) + } + if yyr2 || yy2arr2 { + r.WriteArrayElem() + yym4 := z.EncBinary() + _ = yym4 + if false { + } else { + r.EncodeString(codecSelferC_UTF87612, string(x.Action)) + } + } else { + r.WriteMapElemKey() + r.EncodeString(codecSelferC_UTF87612, string("action")) + r.WriteMapElemValue() + yym5 := z.EncBinary() + _ = yym5 + if false { + } else { + r.EncodeString(codecSelferC_UTF87612, string(x.Action)) + } + } + var yyn6 bool + if x.Node == nil { + yyn6 = true + goto LABEL6 + } + LABEL6: + if yyr2 || yy2arr2 { + if yyn6 { + r.WriteArrayElem() + r.EncodeNil() + } else { + r.WriteArrayElem() + if x.Node == nil { + r.EncodeNil() + } else { + x.Node.CodecEncodeSelf(e) + } + } + } else { + r.WriteMapElemKey() + r.EncodeString(codecSelferC_UTF87612, string("node")) + r.WriteMapElemValue() + if yyn6 { + r.EncodeNil() + } else { + if x.Node == nil { + r.EncodeNil() + } else { + x.Node.CodecEncodeSelf(e) + } + } + } + var yyn9 bool + if x.PrevNode == nil { + yyn9 = true + goto LABEL9 + } + LABEL9: + if yyr2 || yy2arr2 { + if yyn9 { + r.WriteArrayElem() + r.EncodeNil() + } else { + r.WriteArrayElem() + if x.PrevNode == nil { + r.EncodeNil() + } else { + x.PrevNode.CodecEncodeSelf(e) + } + } + } else { + r.WriteMapElemKey() + r.EncodeString(codecSelferC_UTF87612, string("prevNode")) + r.WriteMapElemValue() + if yyn9 { + r.EncodeNil() + } else { + if x.PrevNode == nil { + r.EncodeNil() + } else { + x.PrevNode.CodecEncodeSelf(e) + } + } + } + if yyr2 || yy2arr2 { + r.WriteArrayEnd() + } else { + r.WriteMapEnd() + } + } + } +} + +func (x *Response) CodecDecodeSelf(d *codec1978.Decoder) { + var h codecSelfer7612 + z, r := codec1978.GenHelperDecoder(d) + _, _, _ = h, z, r + yym1 := z.DecBinary() + _ = yym1 + if false { + } else if z.HasExtensions() && z.DecExt(x) { + } else { + yyct2 := r.ContainerType() + if yyct2 == codecSelferValueTypeMap7612 { + yyl2 := r.ReadMapStart() + if yyl2 == 0 { + r.ReadMapEnd() + } else { + x.codecDecodeSelfFromMap(yyl2, d) + } + } else if yyct2 == codecSelferValueTypeArray7612 { + yyl2 := r.ReadArrayStart() + if yyl2 == 0 { + r.ReadArrayEnd() + } else { + x.codecDecodeSelfFromArray(yyl2, d) + } + } else { + panic(codecSelferOnlyMapOrArrayEncodeToStructErr7612) + } + } +} + +func (x *Response) codecDecodeSelfFromMap(l int, d *codec1978.Decoder) { + var h codecSelfer7612 + z, r := codec1978.GenHelperDecoder(d) + _, _, _ = h, z, r + var yys3Slc = z.DecScratchBuffer() // default slice to decode into + _ = yys3Slc + var yyhl3 bool = l >= 0 + for yyj3 := 0; ; yyj3++ { + if yyhl3 { + if yyj3 >= l { + break + } + } else { + if r.CheckBreak() { + break + } + } + r.ReadMapElemKey() + yys3Slc = r.DecodeStringAsBytes() + yys3 := string(yys3Slc) + r.ReadMapElemValue() switch yys3 { case "action": if r.TryDecodeAsNil() { @@ -206,6 +2027,9 @@ func (x *Response) codecDecodeSelfFromMap(l int, d *codec1978.Decoder) { } } case "node": + if x.Node == nil { + x.Node = new(Node) + } if r.TryDecodeAsNil() { if x.Node != nil { x.Node = nil @@ -217,6 +2041,9 @@ func (x *Response) codecDecodeSelfFromMap(l int, d *codec1978.Decoder) { x.Node.CodecDecodeSelf(d) } case "prevNode": + if x.PrevNode == nil { + x.PrevNode = new(Node) + } if r.TryDecodeAsNil() { if x.PrevNode != nil { x.PrevNode = nil @@ -231,11 +2058,11 @@ func (x *Response) codecDecodeSelfFromMap(l int, d *codec1978.Decoder) { z.DecStructFieldNotFound(-1, yys3) } // end switch yys3 } // end for yyj3 - z.DecSendContainerState(codecSelfer_containerMapEnd1819) + r.ReadMapEnd() } func (x *Response) codecDecodeSelfFromArray(l int, d *codec1978.Decoder) { - var h codecSelfer1819 + var h codecSelfer7612 z, r := codec1978.GenHelperDecoder(d) _, _, _ = h, z, r var yyj8 int @@ -248,10 +2075,10 @@ func (x *Response) codecDecodeSelfFromArray(l int, d *codec1978.Decoder) { yyb8 = r.CheckBreak() } if yyb8 { - z.DecSendContainerState(codecSelfer_containerArrayEnd1819) + r.ReadArrayEnd() return } - z.DecSendContainerState(codecSelfer_containerArrayElem1819) + r.ReadArrayElem() if r.TryDecodeAsNil() { x.Action = "" } else { @@ -263,6 +2090,9 @@ func (x *Response) codecDecodeSelfFromArray(l int, d *codec1978.Decoder) { *((*string)(yyv9)) = r.DecodeString() } } + if x.Node == nil { + x.Node = new(Node) + } yyj8++ if yyhl8 { yyb8 = yyj8 > l @@ -270,10 +2100,10 @@ func (x *Response) codecDecodeSelfFromArray(l int, d *codec1978.Decoder) { yyb8 = r.CheckBreak() } if yyb8 { - z.DecSendContainerState(codecSelfer_containerArrayEnd1819) + r.ReadArrayEnd() return } - z.DecSendContainerState(codecSelfer_containerArrayElem1819) + r.ReadArrayElem() if r.TryDecodeAsNil() { if x.Node != nil { x.Node = nil @@ -284,6 +2114,9 @@ func (x *Response) codecDecodeSelfFromArray(l int, d *codec1978.Decoder) { } x.Node.CodecDecodeSelf(d) } + if x.PrevNode == nil { + x.PrevNode = new(Node) + } yyj8++ if yyhl8 { yyb8 = yyj8 > l @@ -291,10 +2124,10 @@ func (x *Response) codecDecodeSelfFromArray(l int, d *codec1978.Decoder) { yyb8 = r.CheckBreak() } if yyb8 { - z.DecSendContainerState(codecSelfer_containerArrayEnd1819) + r.ReadArrayEnd() return } - z.DecSendContainerState(codecSelfer_containerArrayElem1819) + r.ReadArrayElem() if r.TryDecodeAsNil() { if x.PrevNode != nil { x.PrevNode = nil @@ -315,14 +2148,14 @@ func (x *Response) codecDecodeSelfFromArray(l int, d *codec1978.Decoder) { if yyb8 { break } - z.DecSendContainerState(codecSelfer_containerArrayElem1819) + r.ReadArrayElem() z.DecStructFieldNotFound(yyj8-1, "") } - z.DecSendContainerState(codecSelfer_containerArrayEnd1819) + r.ReadArrayEnd() } func (x *Node) CodecEncodeSelf(e *codec1978.Encoder) { - var h codecSelfer1819 + var h codecSelfer7612 z, r := codec1978.GenHelperEncoder(e) _, _, _ = h, z, r if x == nil { @@ -336,45 +2169,44 @@ func (x *Node) CodecEncodeSelf(e *codec1978.Encoder) { yysep2 := !z.EncBinary() yy2arr2 := z.EncBasicHandle().StructToArray var yyq2 [8]bool - _, _, _ = yysep2, yyq2, yy2arr2 + _ = yyq2 + _, _ = yysep2, yy2arr2 const yyr2 bool = false yyq2[1] = x.Dir != false yyq2[6] = x.Expiration != nil yyq2[7] = x.TTL != 0 - var yynn2 int if yyr2 || yy2arr2 { - r.EncodeArrayStart(8) + r.WriteArrayStart(8) } else { - yynn2 = 5 + var yynn2 = 5 for _, b := range yyq2 { if b { yynn2++ } } - r.EncodeMapStart(yynn2) - yynn2 = 0 + r.WriteMapStart(yynn2) } if yyr2 || yy2arr2 { - z.EncSendContainerState(codecSelfer_containerArrayElem1819) + r.WriteArrayElem() yym4 := z.EncBinary() _ = yym4 if false { } else { - r.EncodeString(codecSelferC_UTF81819, string(x.Key)) + r.EncodeString(codecSelferC_UTF87612, string(x.Key)) } } else { - z.EncSendContainerState(codecSelfer_containerMapKey1819) - r.EncodeString(codecSelferC_UTF81819, string("key")) - z.EncSendContainerState(codecSelfer_containerMapValue1819) + r.WriteMapElemKey() + r.EncodeString(codecSelferC_UTF87612, string("key")) + r.WriteMapElemValue() yym5 := z.EncBinary() _ = yym5 if false { } else { - r.EncodeString(codecSelferC_UTF81819, string(x.Key)) + r.EncodeString(codecSelferC_UTF87612, string(x.Key)) } } if yyr2 || yy2arr2 { - z.EncSendContainerState(codecSelfer_containerArrayElem1819) + r.WriteArrayElem() if yyq2[1] { yym7 := z.EncBinary() _ = yym7 @@ -387,9 +2219,9 @@ func (x *Node) CodecEncodeSelf(e *codec1978.Encoder) { } } else { if yyq2[1] { - z.EncSendContainerState(codecSelfer_containerMapKey1819) - r.EncodeString(codecSelferC_UTF81819, string("dir")) - z.EncSendContainerState(codecSelfer_containerMapValue1819) + r.WriteMapElemKey() + r.EncodeString(codecSelferC_UTF87612, string("dir")) + r.WriteMapElemValue() yym8 := z.EncBinary() _ = yym8 if false { @@ -399,35 +2231,35 @@ func (x *Node) CodecEncodeSelf(e *codec1978.Encoder) { } } if yyr2 || yy2arr2 { - z.EncSendContainerState(codecSelfer_containerArrayElem1819) + r.WriteArrayElem() yym10 := z.EncBinary() _ = yym10 if false { } else { - r.EncodeString(codecSelferC_UTF81819, string(x.Value)) + r.EncodeString(codecSelferC_UTF87612, string(x.Value)) } } else { - z.EncSendContainerState(codecSelfer_containerMapKey1819) - r.EncodeString(codecSelferC_UTF81819, string("value")) - z.EncSendContainerState(codecSelfer_containerMapValue1819) + r.WriteMapElemKey() + r.EncodeString(codecSelferC_UTF87612, string("value")) + r.WriteMapElemValue() yym11 := z.EncBinary() _ = yym11 if false { } else { - r.EncodeString(codecSelferC_UTF81819, string(x.Value)) + r.EncodeString(codecSelferC_UTF87612, string(x.Value)) } } if yyr2 || yy2arr2 { - z.EncSendContainerState(codecSelfer_containerArrayElem1819) + r.WriteArrayElem() if x.Nodes == nil { r.EncodeNil() } else { x.Nodes.CodecEncodeSelf(e) } } else { - z.EncSendContainerState(codecSelfer_containerMapKey1819) - r.EncodeString(codecSelferC_UTF81819, string("nodes")) - z.EncSendContainerState(codecSelfer_containerMapValue1819) + r.WriteMapElemKey() + r.EncodeString(codecSelferC_UTF87612, string("nodes")) + r.WriteMapElemValue() if x.Nodes == nil { r.EncodeNil() } else { @@ -435,7 +2267,7 @@ func (x *Node) CodecEncodeSelf(e *codec1978.Encoder) { } } if yyr2 || yy2arr2 { - z.EncSendContainerState(codecSelfer_containerArrayElem1819) + r.WriteArrayElem() yym16 := z.EncBinary() _ = yym16 if false { @@ -443,9 +2275,9 @@ func (x *Node) CodecEncodeSelf(e *codec1978.Encoder) { r.EncodeUint(uint64(x.CreatedIndex)) } } else { - z.EncSendContainerState(codecSelfer_containerMapKey1819) - r.EncodeString(codecSelferC_UTF81819, string("createdIndex")) - z.EncSendContainerState(codecSelfer_containerMapValue1819) + r.WriteMapElemKey() + r.EncodeString(codecSelferC_UTF87612, string("createdIndex")) + r.WriteMapElemValue() yym17 := z.EncBinary() _ = yym17 if false { @@ -454,7 +2286,7 @@ func (x *Node) CodecEncodeSelf(e *codec1978.Encoder) { } } if yyr2 || yy2arr2 { - z.EncSendContainerState(codecSelfer_containerArrayElem1819) + r.WriteArrayElem() yym19 := z.EncBinary() _ = yym19 if false { @@ -462,9 +2294,9 @@ func (x *Node) CodecEncodeSelf(e *codec1978.Encoder) { r.EncodeUint(uint64(x.ModifiedIndex)) } } else { - z.EncSendContainerState(codecSelfer_containerMapKey1819) - r.EncodeString(codecSelferC_UTF81819, string("modifiedIndex")) - z.EncSendContainerState(codecSelfer_containerMapValue1819) + r.WriteMapElemKey() + r.EncodeString(codecSelferC_UTF87612, string("modifiedIndex")) + r.WriteMapElemValue() yym20 := z.EncBinary() _ = yym20 if false { @@ -472,55 +2304,70 @@ func (x *Node) CodecEncodeSelf(e *codec1978.Encoder) { r.EncodeUint(uint64(x.ModifiedIndex)) } } + var yyn21 bool + if x.Expiration == nil { + yyn21 = true + goto LABEL21 + } + LABEL21: if yyr2 || yy2arr2 { - z.EncSendContainerState(codecSelfer_containerArrayElem1819) - if yyq2[6] { - if x.Expiration == nil { - r.EncodeNil() - } else { - yym22 := z.EncBinary() - _ = yym22 - if false { - } else if yym23 := z.TimeRtidIfBinc(); yym23 != 0 { - r.EncodeBuiltin(yym23, x.Expiration) - } else if z.HasExtensions() && z.EncExt(x.Expiration) { - } else if yym22 { - z.EncBinaryMarshal(x.Expiration) - } else if !yym22 && z.IsJSONHandle() { - z.EncJSONMarshal(x.Expiration) - } else { - z.EncFallback(x.Expiration) - } - } - } else { + if yyn21 { + r.WriteArrayElem() r.EncodeNil() + } else { + r.WriteArrayElem() + if yyq2[6] { + if x.Expiration == nil { + r.EncodeNil() + } else { + yym22 := z.EncBinary() + _ = yym22 + if false { + } else if yym23 := z.TimeRtidIfBinc(); yym23 != 0 { + r.EncodeBuiltin(yym23, x.Expiration) + } else if z.HasExtensions() && z.EncExt(x.Expiration) { + } else if yym22 { + z.EncBinaryMarshal(x.Expiration) + } else if !yym22 && z.IsJSONHandle() { + z.EncJSONMarshal(x.Expiration) + } else { + z.EncFallback(x.Expiration) + } + } + } else { + r.EncodeNil() + } } } else { if yyq2[6] { - z.EncSendContainerState(codecSelfer_containerMapKey1819) - r.EncodeString(codecSelferC_UTF81819, string("expiration")) - z.EncSendContainerState(codecSelfer_containerMapValue1819) - if x.Expiration == nil { + r.WriteMapElemKey() + r.EncodeString(codecSelferC_UTF87612, string("expiration")) + r.WriteMapElemValue() + if yyn21 { r.EncodeNil() } else { - yym24 := z.EncBinary() - _ = yym24 - if false { - } else if yym25 := z.TimeRtidIfBinc(); yym25 != 0 { - r.EncodeBuiltin(yym25, x.Expiration) - } else if z.HasExtensions() && z.EncExt(x.Expiration) { - } else if yym24 { - z.EncBinaryMarshal(x.Expiration) - } else if !yym24 && z.IsJSONHandle() { - z.EncJSONMarshal(x.Expiration) + if x.Expiration == nil { + r.EncodeNil() } else { - z.EncFallback(x.Expiration) + yym24 := z.EncBinary() + _ = yym24 + if false { + } else if yym25 := z.TimeRtidIfBinc(); yym25 != 0 { + r.EncodeBuiltin(yym25, x.Expiration) + } else if z.HasExtensions() && z.EncExt(x.Expiration) { + } else if yym24 { + z.EncBinaryMarshal(x.Expiration) + } else if !yym24 && z.IsJSONHandle() { + z.EncJSONMarshal(x.Expiration) + } else { + z.EncFallback(x.Expiration) + } } } } } if yyr2 || yy2arr2 { - z.EncSendContainerState(codecSelfer_containerArrayElem1819) + r.WriteArrayElem() if yyq2[7] { yym27 := z.EncBinary() _ = yym27 @@ -533,9 +2380,9 @@ func (x *Node) CodecEncodeSelf(e *codec1978.Encoder) { } } else { if yyq2[7] { - z.EncSendContainerState(codecSelfer_containerMapKey1819) - r.EncodeString(codecSelferC_UTF81819, string("ttl")) - z.EncSendContainerState(codecSelfer_containerMapValue1819) + r.WriteMapElemKey() + r.EncodeString(codecSelferC_UTF87612, string("ttl")) + r.WriteMapElemValue() yym28 := z.EncBinary() _ = yym28 if false { @@ -545,16 +2392,16 @@ func (x *Node) CodecEncodeSelf(e *codec1978.Encoder) { } } if yyr2 || yy2arr2 { - z.EncSendContainerState(codecSelfer_containerArrayEnd1819) + r.WriteArrayEnd() } else { - z.EncSendContainerState(codecSelfer_containerMapEnd1819) + r.WriteMapEnd() } } } } func (x *Node) CodecDecodeSelf(d *codec1978.Decoder) { - var h codecSelfer1819 + var h codecSelfer7612 z, r := codec1978.GenHelperDecoder(d) _, _, _ = h, z, r yym1 := z.DecBinary() @@ -563,28 +2410,28 @@ func (x *Node) CodecDecodeSelf(d *codec1978.Decoder) { } else if z.HasExtensions() && z.DecExt(x) { } else { yyct2 := r.ContainerType() - if yyct2 == codecSelferValueTypeMap1819 { + if yyct2 == codecSelferValueTypeMap7612 { yyl2 := r.ReadMapStart() if yyl2 == 0 { - z.DecSendContainerState(codecSelfer_containerMapEnd1819) + r.ReadMapEnd() } else { x.codecDecodeSelfFromMap(yyl2, d) } - } else if yyct2 == codecSelferValueTypeArray1819 { + } else if yyct2 == codecSelferValueTypeArray7612 { yyl2 := r.ReadArrayStart() if yyl2 == 0 { - z.DecSendContainerState(codecSelfer_containerArrayEnd1819) + r.ReadArrayEnd() } else { x.codecDecodeSelfFromArray(yyl2, d) } } else { - panic(codecSelferOnlyMapOrArrayEncodeToStructErr1819) + panic(codecSelferOnlyMapOrArrayEncodeToStructErr7612) } } } func (x *Node) codecDecodeSelfFromMap(l int, d *codec1978.Decoder) { - var h codecSelfer1819 + var h codecSelfer7612 z, r := codec1978.GenHelperDecoder(d) _, _, _ = h, z, r var yys3Slc = z.DecScratchBuffer() // default slice to decode into @@ -600,10 +2447,10 @@ func (x *Node) codecDecodeSelfFromMap(l int, d *codec1978.Decoder) { break } } - z.DecSendContainerState(codecSelfer_containerMapKey1819) - yys3Slc = r.DecodeBytes(yys3Slc, true, true) + r.ReadMapElemKey() + yys3Slc = r.DecodeStringAsBytes() yys3 := string(yys3Slc) - z.DecSendContainerState(codecSelfer_containerMapValue1819) + r.ReadMapElemValue() switch yys3 { case "key": if r.TryDecodeAsNil() { @@ -673,6 +2520,9 @@ func (x *Node) codecDecodeSelfFromMap(l int, d *codec1978.Decoder) { } } case "expiration": + if x.Expiration == nil { + x.Expiration = new(time.Time) + } if r.TryDecodeAsNil() { if x.Expiration != nil { x.Expiration = nil @@ -711,11 +2561,11 @@ func (x *Node) codecDecodeSelfFromMap(l int, d *codec1978.Decoder) { z.DecStructFieldNotFound(-1, yys3) } // end switch yys3 } // end for yyj3 - z.DecSendContainerState(codecSelfer_containerMapEnd1819) + r.ReadMapEnd() } func (x *Node) codecDecodeSelfFromArray(l int, d *codec1978.Decoder) { - var h codecSelfer1819 + var h codecSelfer7612 z, r := codec1978.GenHelperDecoder(d) _, _, _ = h, z, r var yyj20 int @@ -728,10 +2578,10 @@ func (x *Node) codecDecodeSelfFromArray(l int, d *codec1978.Decoder) { yyb20 = r.CheckBreak() } if yyb20 { - z.DecSendContainerState(codecSelfer_containerArrayEnd1819) + r.ReadArrayEnd() return } - z.DecSendContainerState(codecSelfer_containerArrayElem1819) + r.ReadArrayElem() if r.TryDecodeAsNil() { x.Key = "" } else { @@ -750,10 +2600,10 @@ func (x *Node) codecDecodeSelfFromArray(l int, d *codec1978.Decoder) { yyb20 = r.CheckBreak() } if yyb20 { - z.DecSendContainerState(codecSelfer_containerArrayEnd1819) + r.ReadArrayEnd() return } - z.DecSendContainerState(codecSelfer_containerArrayElem1819) + r.ReadArrayElem() if r.TryDecodeAsNil() { x.Dir = false } else { @@ -772,10 +2622,10 @@ func (x *Node) codecDecodeSelfFromArray(l int, d *codec1978.Decoder) { yyb20 = r.CheckBreak() } if yyb20 { - z.DecSendContainerState(codecSelfer_containerArrayEnd1819) + r.ReadArrayEnd() return } - z.DecSendContainerState(codecSelfer_containerArrayElem1819) + r.ReadArrayElem() if r.TryDecodeAsNil() { x.Value = "" } else { @@ -794,10 +2644,10 @@ func (x *Node) codecDecodeSelfFromArray(l int, d *codec1978.Decoder) { yyb20 = r.CheckBreak() } if yyb20 { - z.DecSendContainerState(codecSelfer_containerArrayEnd1819) + r.ReadArrayEnd() return } - z.DecSendContainerState(codecSelfer_containerArrayElem1819) + r.ReadArrayElem() if r.TryDecodeAsNil() { x.Nodes = nil } else { @@ -811,10 +2661,10 @@ func (x *Node) codecDecodeSelfFromArray(l int, d *codec1978.Decoder) { yyb20 = r.CheckBreak() } if yyb20 { - z.DecSendContainerState(codecSelfer_containerArrayEnd1819) + r.ReadArrayEnd() return } - z.DecSendContainerState(codecSelfer_containerArrayElem1819) + r.ReadArrayElem() if r.TryDecodeAsNil() { x.CreatedIndex = 0 } else { @@ -833,10 +2683,10 @@ func (x *Node) codecDecodeSelfFromArray(l int, d *codec1978.Decoder) { yyb20 = r.CheckBreak() } if yyb20 { - z.DecSendContainerState(codecSelfer_containerArrayEnd1819) + r.ReadArrayEnd() return } - z.DecSendContainerState(codecSelfer_containerArrayElem1819) + r.ReadArrayElem() if r.TryDecodeAsNil() { x.ModifiedIndex = 0 } else { @@ -848,6 +2698,9 @@ func (x *Node) codecDecodeSelfFromArray(l int, d *codec1978.Decoder) { *((*uint64)(yyv30)) = uint64(r.DecodeUint(64)) } } + if x.Expiration == nil { + x.Expiration = new(time.Time) + } yyj20++ if yyhl20 { yyb20 = yyj20 > l @@ -855,10 +2708,10 @@ func (x *Node) codecDecodeSelfFromArray(l int, d *codec1978.Decoder) { yyb20 = r.CheckBreak() } if yyb20 { - z.DecSendContainerState(codecSelfer_containerArrayEnd1819) + r.ReadArrayEnd() return } - z.DecSendContainerState(codecSelfer_containerArrayElem1819) + r.ReadArrayElem() if r.TryDecodeAsNil() { if x.Expiration != nil { x.Expiration = nil @@ -888,10 +2741,10 @@ func (x *Node) codecDecodeSelfFromArray(l int, d *codec1978.Decoder) { yyb20 = r.CheckBreak() } if yyb20 { - z.DecSendContainerState(codecSelfer_containerArrayEnd1819) + r.ReadArrayEnd() return } - z.DecSendContainerState(codecSelfer_containerArrayElem1819) + r.ReadArrayElem() if r.TryDecodeAsNil() { x.TTL = 0 } else { @@ -913,14 +2766,14 @@ func (x *Node) codecDecodeSelfFromArray(l int, d *codec1978.Decoder) { if yyb20 { break } - z.DecSendContainerState(codecSelfer_containerArrayElem1819) + r.ReadArrayElem() z.DecStructFieldNotFound(yyj20-1, "") } - z.DecSendContainerState(codecSelfer_containerArrayEnd1819) + r.ReadArrayEnd() } func (x Nodes) CodecEncodeSelf(e *codec1978.Encoder) { - var h codecSelfer1819 + var h codecSelfer7612 z, r := codec1978.GenHelperEncoder(e) _, _, _ = h, z, r if x == nil { @@ -937,7 +2790,7 @@ func (x Nodes) CodecEncodeSelf(e *codec1978.Encoder) { } func (x *Nodes) CodecDecodeSelf(d *codec1978.Decoder) { - var h codecSelfer1819 + var h codecSelfer7612 z, r := codec1978.GenHelperDecoder(d) _, _, _ = h, z, r yym1 := z.DecBinary() @@ -949,24 +2802,2333 @@ func (x *Nodes) CodecDecodeSelf(d *codec1978.Decoder) { } } -func (x codecSelfer1819) encNodes(v Nodes, e *codec1978.Encoder) { - var h codecSelfer1819 +func (x *httpKeysAPI) CodecEncodeSelf(e *codec1978.Encoder) { + var h codecSelfer7612 z, r := codec1978.GenHelperEncoder(e) _, _, _ = h, z, r - r.EncodeArrayStart(len(v)) + if x == nil { + r.EncodeNil() + } else { + yym1 := z.EncBinary() + _ = yym1 + if false { + } else if z.HasExtensions() && z.EncExt(x) { + } else { + yysep2 := !z.EncBinary() + yy2arr2 := z.EncBasicHandle().StructToArray + _, _ = yysep2, yy2arr2 + const yyr2 bool = false + if yyr2 || yy2arr2 { + r.WriteArrayStart(0) + } else { + r.WriteMapStart(0) + } + if yyr2 || yy2arr2 { + r.WriteArrayEnd() + } else { + r.WriteMapEnd() + } + } + } +} + +func (x *httpKeysAPI) CodecDecodeSelf(d *codec1978.Decoder) { + var h codecSelfer7612 + z, r := codec1978.GenHelperDecoder(d) + _, _, _ = h, z, r + yym1 := z.DecBinary() + _ = yym1 + if false { + } else if z.HasExtensions() && z.DecExt(x) { + } else { + yyct2 := r.ContainerType() + if yyct2 == codecSelferValueTypeMap7612 { + yyl2 := r.ReadMapStart() + if yyl2 == 0 { + r.ReadMapEnd() + } else { + x.codecDecodeSelfFromMap(yyl2, d) + } + } else if yyct2 == codecSelferValueTypeArray7612 { + yyl2 := r.ReadArrayStart() + if yyl2 == 0 { + r.ReadArrayEnd() + } else { + x.codecDecodeSelfFromArray(yyl2, d) + } + } else { + panic(codecSelferOnlyMapOrArrayEncodeToStructErr7612) + } + } +} + +func (x *httpKeysAPI) codecDecodeSelfFromMap(l int, d *codec1978.Decoder) { + var h codecSelfer7612 + z, r := codec1978.GenHelperDecoder(d) + _, _, _ = h, z, r + var yys3Slc = z.DecScratchBuffer() // default slice to decode into + _ = yys3Slc + var yyhl3 bool = l >= 0 + for yyj3 := 0; ; yyj3++ { + if yyhl3 { + if yyj3 >= l { + break + } + } else { + if r.CheckBreak() { + break + } + } + r.ReadMapElemKey() + yys3Slc = r.DecodeStringAsBytes() + yys3 := string(yys3Slc) + r.ReadMapElemValue() + switch yys3 { + default: + z.DecStructFieldNotFound(-1, yys3) + } // end switch yys3 + } // end for yyj3 + r.ReadMapEnd() +} + +func (x *httpKeysAPI) codecDecodeSelfFromArray(l int, d *codec1978.Decoder) { + var h codecSelfer7612 + z, r := codec1978.GenHelperDecoder(d) + _, _, _ = h, z, r + var yyj4 int + var yyb4 bool + var yyhl4 bool = l >= 0 + for { + yyj4++ + if yyhl4 { + yyb4 = yyj4 > l + } else { + yyb4 = r.CheckBreak() + } + if yyb4 { + break + } + r.ReadArrayElem() + z.DecStructFieldNotFound(yyj4-1, "") + } + r.ReadArrayEnd() +} + +func (x *httpWatcher) CodecEncodeSelf(e *codec1978.Encoder) { + var h codecSelfer7612 + z, r := codec1978.GenHelperEncoder(e) + _, _, _ = h, z, r + if x == nil { + r.EncodeNil() + } else { + yym1 := z.EncBinary() + _ = yym1 + if false { + } else if z.HasExtensions() && z.EncExt(x) { + } else { + yysep2 := !z.EncBinary() + yy2arr2 := z.EncBasicHandle().StructToArray + _, _ = yysep2, yy2arr2 + const yyr2 bool = false + if yyr2 || yy2arr2 { + r.WriteArrayStart(0) + } else { + r.WriteMapStart(0) + } + if yyr2 || yy2arr2 { + r.WriteArrayEnd() + } else { + r.WriteMapEnd() + } + } + } +} + +func (x *httpWatcher) CodecDecodeSelf(d *codec1978.Decoder) { + var h codecSelfer7612 + z, r := codec1978.GenHelperDecoder(d) + _, _, _ = h, z, r + yym1 := z.DecBinary() + _ = yym1 + if false { + } else if z.HasExtensions() && z.DecExt(x) { + } else { + yyct2 := r.ContainerType() + if yyct2 == codecSelferValueTypeMap7612 { + yyl2 := r.ReadMapStart() + if yyl2 == 0 { + r.ReadMapEnd() + } else { + x.codecDecodeSelfFromMap(yyl2, d) + } + } else if yyct2 == codecSelferValueTypeArray7612 { + yyl2 := r.ReadArrayStart() + if yyl2 == 0 { + r.ReadArrayEnd() + } else { + x.codecDecodeSelfFromArray(yyl2, d) + } + } else { + panic(codecSelferOnlyMapOrArrayEncodeToStructErr7612) + } + } +} + +func (x *httpWatcher) codecDecodeSelfFromMap(l int, d *codec1978.Decoder) { + var h codecSelfer7612 + z, r := codec1978.GenHelperDecoder(d) + _, _, _ = h, z, r + var yys3Slc = z.DecScratchBuffer() // default slice to decode into + _ = yys3Slc + var yyhl3 bool = l >= 0 + for yyj3 := 0; ; yyj3++ { + if yyhl3 { + if yyj3 >= l { + break + } + } else { + if r.CheckBreak() { + break + } + } + r.ReadMapElemKey() + yys3Slc = r.DecodeStringAsBytes() + yys3 := string(yys3Slc) + r.ReadMapElemValue() + switch yys3 { + default: + z.DecStructFieldNotFound(-1, yys3) + } // end switch yys3 + } // end for yyj3 + r.ReadMapEnd() +} + +func (x *httpWatcher) codecDecodeSelfFromArray(l int, d *codec1978.Decoder) { + var h codecSelfer7612 + z, r := codec1978.GenHelperDecoder(d) + _, _, _ = h, z, r + var yyj4 int + var yyb4 bool + var yyhl4 bool = l >= 0 + for { + yyj4++ + if yyhl4 { + yyb4 = yyj4 > l + } else { + yyb4 = r.CheckBreak() + } + if yyb4 { + break + } + r.ReadArrayElem() + z.DecStructFieldNotFound(yyj4-1, "") + } + r.ReadArrayEnd() +} + +func (x *getAction) CodecEncodeSelf(e *codec1978.Encoder) { + var h codecSelfer7612 + z, r := codec1978.GenHelperEncoder(e) + _, _, _ = h, z, r + if x == nil { + r.EncodeNil() + } else { + yym1 := z.EncBinary() + _ = yym1 + if false { + } else if z.HasExtensions() && z.EncExt(x) { + } else { + yysep2 := !z.EncBinary() + yy2arr2 := z.EncBasicHandle().StructToArray + _, _ = yysep2, yy2arr2 + const yyr2 bool = false + if yyr2 || yy2arr2 { + r.WriteArrayStart(5) + } else { + r.WriteMapStart(5) + } + if yyr2 || yy2arr2 { + r.WriteArrayElem() + yym4 := z.EncBinary() + _ = yym4 + if false { + } else { + r.EncodeString(codecSelferC_UTF87612, string(x.Prefix)) + } + } else { + r.WriteMapElemKey() + r.EncodeString(codecSelferC_UTF87612, string("Prefix")) + r.WriteMapElemValue() + yym5 := z.EncBinary() + _ = yym5 + if false { + } else { + r.EncodeString(codecSelferC_UTF87612, string(x.Prefix)) + } + } + if yyr2 || yy2arr2 { + r.WriteArrayElem() + yym7 := z.EncBinary() + _ = yym7 + if false { + } else { + r.EncodeString(codecSelferC_UTF87612, string(x.Key)) + } + } else { + r.WriteMapElemKey() + r.EncodeString(codecSelferC_UTF87612, string("Key")) + r.WriteMapElemValue() + yym8 := z.EncBinary() + _ = yym8 + if false { + } else { + r.EncodeString(codecSelferC_UTF87612, string(x.Key)) + } + } + if yyr2 || yy2arr2 { + r.WriteArrayElem() + yym10 := z.EncBinary() + _ = yym10 + if false { + } else { + r.EncodeBool(bool(x.Recursive)) + } + } else { + r.WriteMapElemKey() + r.EncodeString(codecSelferC_UTF87612, string("Recursive")) + r.WriteMapElemValue() + yym11 := z.EncBinary() + _ = yym11 + if false { + } else { + r.EncodeBool(bool(x.Recursive)) + } + } + if yyr2 || yy2arr2 { + r.WriteArrayElem() + yym13 := z.EncBinary() + _ = yym13 + if false { + } else { + r.EncodeBool(bool(x.Sorted)) + } + } else { + r.WriteMapElemKey() + r.EncodeString(codecSelferC_UTF87612, string("Sorted")) + r.WriteMapElemValue() + yym14 := z.EncBinary() + _ = yym14 + if false { + } else { + r.EncodeBool(bool(x.Sorted)) + } + } + if yyr2 || yy2arr2 { + r.WriteArrayElem() + yym16 := z.EncBinary() + _ = yym16 + if false { + } else { + r.EncodeBool(bool(x.Quorum)) + } + } else { + r.WriteMapElemKey() + r.EncodeString(codecSelferC_UTF87612, string("Quorum")) + r.WriteMapElemValue() + yym17 := z.EncBinary() + _ = yym17 + if false { + } else { + r.EncodeBool(bool(x.Quorum)) + } + } + if yyr2 || yy2arr2 { + r.WriteArrayEnd() + } else { + r.WriteMapEnd() + } + } + } +} + +func (x *getAction) CodecDecodeSelf(d *codec1978.Decoder) { + var h codecSelfer7612 + z, r := codec1978.GenHelperDecoder(d) + _, _, _ = h, z, r + yym1 := z.DecBinary() + _ = yym1 + if false { + } else if z.HasExtensions() && z.DecExt(x) { + } else { + yyct2 := r.ContainerType() + if yyct2 == codecSelferValueTypeMap7612 { + yyl2 := r.ReadMapStart() + if yyl2 == 0 { + r.ReadMapEnd() + } else { + x.codecDecodeSelfFromMap(yyl2, d) + } + } else if yyct2 == codecSelferValueTypeArray7612 { + yyl2 := r.ReadArrayStart() + if yyl2 == 0 { + r.ReadArrayEnd() + } else { + x.codecDecodeSelfFromArray(yyl2, d) + } + } else { + panic(codecSelferOnlyMapOrArrayEncodeToStructErr7612) + } + } +} + +func (x *getAction) codecDecodeSelfFromMap(l int, d *codec1978.Decoder) { + var h codecSelfer7612 + z, r := codec1978.GenHelperDecoder(d) + _, _, _ = h, z, r + var yys3Slc = z.DecScratchBuffer() // default slice to decode into + _ = yys3Slc + var yyhl3 bool = l >= 0 + for yyj3 := 0; ; yyj3++ { + if yyhl3 { + if yyj3 >= l { + break + } + } else { + if r.CheckBreak() { + break + } + } + r.ReadMapElemKey() + yys3Slc = r.DecodeStringAsBytes() + yys3 := string(yys3Slc) + r.ReadMapElemValue() + switch yys3 { + case "Prefix": + if r.TryDecodeAsNil() { + x.Prefix = "" + } else { + yyv4 := &x.Prefix + yym5 := z.DecBinary() + _ = yym5 + if false { + } else { + *((*string)(yyv4)) = r.DecodeString() + } + } + case "Key": + if r.TryDecodeAsNil() { + x.Key = "" + } else { + yyv6 := &x.Key + yym7 := z.DecBinary() + _ = yym7 + if false { + } else { + *((*string)(yyv6)) = r.DecodeString() + } + } + case "Recursive": + if r.TryDecodeAsNil() { + x.Recursive = false + } else { + yyv8 := &x.Recursive + yym9 := z.DecBinary() + _ = yym9 + if false { + } else { + *((*bool)(yyv8)) = r.DecodeBool() + } + } + case "Sorted": + if r.TryDecodeAsNil() { + x.Sorted = false + } else { + yyv10 := &x.Sorted + yym11 := z.DecBinary() + _ = yym11 + if false { + } else { + *((*bool)(yyv10)) = r.DecodeBool() + } + } + case "Quorum": + if r.TryDecodeAsNil() { + x.Quorum = false + } else { + yyv12 := &x.Quorum + yym13 := z.DecBinary() + _ = yym13 + if false { + } else { + *((*bool)(yyv12)) = r.DecodeBool() + } + } + default: + z.DecStructFieldNotFound(-1, yys3) + } // end switch yys3 + } // end for yyj3 + r.ReadMapEnd() +} + +func (x *getAction) codecDecodeSelfFromArray(l int, d *codec1978.Decoder) { + var h codecSelfer7612 + z, r := codec1978.GenHelperDecoder(d) + _, _, _ = h, z, r + var yyj14 int + var yyb14 bool + var yyhl14 bool = l >= 0 + yyj14++ + if yyhl14 { + yyb14 = yyj14 > l + } else { + yyb14 = r.CheckBreak() + } + if yyb14 { + r.ReadArrayEnd() + return + } + r.ReadArrayElem() + if r.TryDecodeAsNil() { + x.Prefix = "" + } else { + yyv15 := &x.Prefix + yym16 := z.DecBinary() + _ = yym16 + if false { + } else { + *((*string)(yyv15)) = r.DecodeString() + } + } + yyj14++ + if yyhl14 { + yyb14 = yyj14 > l + } else { + yyb14 = r.CheckBreak() + } + if yyb14 { + r.ReadArrayEnd() + return + } + r.ReadArrayElem() + if r.TryDecodeAsNil() { + x.Key = "" + } else { + yyv17 := &x.Key + yym18 := z.DecBinary() + _ = yym18 + if false { + } else { + *((*string)(yyv17)) = r.DecodeString() + } + } + yyj14++ + if yyhl14 { + yyb14 = yyj14 > l + } else { + yyb14 = r.CheckBreak() + } + if yyb14 { + r.ReadArrayEnd() + return + } + r.ReadArrayElem() + if r.TryDecodeAsNil() { + x.Recursive = false + } else { + yyv19 := &x.Recursive + yym20 := z.DecBinary() + _ = yym20 + if false { + } else { + *((*bool)(yyv19)) = r.DecodeBool() + } + } + yyj14++ + if yyhl14 { + yyb14 = yyj14 > l + } else { + yyb14 = r.CheckBreak() + } + if yyb14 { + r.ReadArrayEnd() + return + } + r.ReadArrayElem() + if r.TryDecodeAsNil() { + x.Sorted = false + } else { + yyv21 := &x.Sorted + yym22 := z.DecBinary() + _ = yym22 + if false { + } else { + *((*bool)(yyv21)) = r.DecodeBool() + } + } + yyj14++ + if yyhl14 { + yyb14 = yyj14 > l + } else { + yyb14 = r.CheckBreak() + } + if yyb14 { + r.ReadArrayEnd() + return + } + r.ReadArrayElem() + if r.TryDecodeAsNil() { + x.Quorum = false + } else { + yyv23 := &x.Quorum + yym24 := z.DecBinary() + _ = yym24 + if false { + } else { + *((*bool)(yyv23)) = r.DecodeBool() + } + } + for { + yyj14++ + if yyhl14 { + yyb14 = yyj14 > l + } else { + yyb14 = r.CheckBreak() + } + if yyb14 { + break + } + r.ReadArrayElem() + z.DecStructFieldNotFound(yyj14-1, "") + } + r.ReadArrayEnd() +} + +func (x *waitAction) CodecEncodeSelf(e *codec1978.Encoder) { + var h codecSelfer7612 + z, r := codec1978.GenHelperEncoder(e) + _, _, _ = h, z, r + if x == nil { + r.EncodeNil() + } else { + yym1 := z.EncBinary() + _ = yym1 + if false { + } else if z.HasExtensions() && z.EncExt(x) { + } else { + yysep2 := !z.EncBinary() + yy2arr2 := z.EncBasicHandle().StructToArray + _, _ = yysep2, yy2arr2 + const yyr2 bool = false + if yyr2 || yy2arr2 { + r.WriteArrayStart(4) + } else { + r.WriteMapStart(4) + } + if yyr2 || yy2arr2 { + r.WriteArrayElem() + yym4 := z.EncBinary() + _ = yym4 + if false { + } else { + r.EncodeString(codecSelferC_UTF87612, string(x.Prefix)) + } + } else { + r.WriteMapElemKey() + r.EncodeString(codecSelferC_UTF87612, string("Prefix")) + r.WriteMapElemValue() + yym5 := z.EncBinary() + _ = yym5 + if false { + } else { + r.EncodeString(codecSelferC_UTF87612, string(x.Prefix)) + } + } + if yyr2 || yy2arr2 { + r.WriteArrayElem() + yym7 := z.EncBinary() + _ = yym7 + if false { + } else { + r.EncodeString(codecSelferC_UTF87612, string(x.Key)) + } + } else { + r.WriteMapElemKey() + r.EncodeString(codecSelferC_UTF87612, string("Key")) + r.WriteMapElemValue() + yym8 := z.EncBinary() + _ = yym8 + if false { + } else { + r.EncodeString(codecSelferC_UTF87612, string(x.Key)) + } + } + if yyr2 || yy2arr2 { + r.WriteArrayElem() + yym10 := z.EncBinary() + _ = yym10 + if false { + } else { + r.EncodeUint(uint64(x.WaitIndex)) + } + } else { + r.WriteMapElemKey() + r.EncodeString(codecSelferC_UTF87612, string("WaitIndex")) + r.WriteMapElemValue() + yym11 := z.EncBinary() + _ = yym11 + if false { + } else { + r.EncodeUint(uint64(x.WaitIndex)) + } + } + if yyr2 || yy2arr2 { + r.WriteArrayElem() + yym13 := z.EncBinary() + _ = yym13 + if false { + } else { + r.EncodeBool(bool(x.Recursive)) + } + } else { + r.WriteMapElemKey() + r.EncodeString(codecSelferC_UTF87612, string("Recursive")) + r.WriteMapElemValue() + yym14 := z.EncBinary() + _ = yym14 + if false { + } else { + r.EncodeBool(bool(x.Recursive)) + } + } + if yyr2 || yy2arr2 { + r.WriteArrayEnd() + } else { + r.WriteMapEnd() + } + } + } +} + +func (x *waitAction) CodecDecodeSelf(d *codec1978.Decoder) { + var h codecSelfer7612 + z, r := codec1978.GenHelperDecoder(d) + _, _, _ = h, z, r + yym1 := z.DecBinary() + _ = yym1 + if false { + } else if z.HasExtensions() && z.DecExt(x) { + } else { + yyct2 := r.ContainerType() + if yyct2 == codecSelferValueTypeMap7612 { + yyl2 := r.ReadMapStart() + if yyl2 == 0 { + r.ReadMapEnd() + } else { + x.codecDecodeSelfFromMap(yyl2, d) + } + } else if yyct2 == codecSelferValueTypeArray7612 { + yyl2 := r.ReadArrayStart() + if yyl2 == 0 { + r.ReadArrayEnd() + } else { + x.codecDecodeSelfFromArray(yyl2, d) + } + } else { + panic(codecSelferOnlyMapOrArrayEncodeToStructErr7612) + } + } +} + +func (x *waitAction) codecDecodeSelfFromMap(l int, d *codec1978.Decoder) { + var h codecSelfer7612 + z, r := codec1978.GenHelperDecoder(d) + _, _, _ = h, z, r + var yys3Slc = z.DecScratchBuffer() // default slice to decode into + _ = yys3Slc + var yyhl3 bool = l >= 0 + for yyj3 := 0; ; yyj3++ { + if yyhl3 { + if yyj3 >= l { + break + } + } else { + if r.CheckBreak() { + break + } + } + r.ReadMapElemKey() + yys3Slc = r.DecodeStringAsBytes() + yys3 := string(yys3Slc) + r.ReadMapElemValue() + switch yys3 { + case "Prefix": + if r.TryDecodeAsNil() { + x.Prefix = "" + } else { + yyv4 := &x.Prefix + yym5 := z.DecBinary() + _ = yym5 + if false { + } else { + *((*string)(yyv4)) = r.DecodeString() + } + } + case "Key": + if r.TryDecodeAsNil() { + x.Key = "" + } else { + yyv6 := &x.Key + yym7 := z.DecBinary() + _ = yym7 + if false { + } else { + *((*string)(yyv6)) = r.DecodeString() + } + } + case "WaitIndex": + if r.TryDecodeAsNil() { + x.WaitIndex = 0 + } else { + yyv8 := &x.WaitIndex + yym9 := z.DecBinary() + _ = yym9 + if false { + } else { + *((*uint64)(yyv8)) = uint64(r.DecodeUint(64)) + } + } + case "Recursive": + if r.TryDecodeAsNil() { + x.Recursive = false + } else { + yyv10 := &x.Recursive + yym11 := z.DecBinary() + _ = yym11 + if false { + } else { + *((*bool)(yyv10)) = r.DecodeBool() + } + } + default: + z.DecStructFieldNotFound(-1, yys3) + } // end switch yys3 + } // end for yyj3 + r.ReadMapEnd() +} + +func (x *waitAction) codecDecodeSelfFromArray(l int, d *codec1978.Decoder) { + var h codecSelfer7612 + z, r := codec1978.GenHelperDecoder(d) + _, _, _ = h, z, r + var yyj12 int + var yyb12 bool + var yyhl12 bool = l >= 0 + yyj12++ + if yyhl12 { + yyb12 = yyj12 > l + } else { + yyb12 = r.CheckBreak() + } + if yyb12 { + r.ReadArrayEnd() + return + } + r.ReadArrayElem() + if r.TryDecodeAsNil() { + x.Prefix = "" + } else { + yyv13 := &x.Prefix + yym14 := z.DecBinary() + _ = yym14 + if false { + } else { + *((*string)(yyv13)) = r.DecodeString() + } + } + yyj12++ + if yyhl12 { + yyb12 = yyj12 > l + } else { + yyb12 = r.CheckBreak() + } + if yyb12 { + r.ReadArrayEnd() + return + } + r.ReadArrayElem() + if r.TryDecodeAsNil() { + x.Key = "" + } else { + yyv15 := &x.Key + yym16 := z.DecBinary() + _ = yym16 + if false { + } else { + *((*string)(yyv15)) = r.DecodeString() + } + } + yyj12++ + if yyhl12 { + yyb12 = yyj12 > l + } else { + yyb12 = r.CheckBreak() + } + if yyb12 { + r.ReadArrayEnd() + return + } + r.ReadArrayElem() + if r.TryDecodeAsNil() { + x.WaitIndex = 0 + } else { + yyv17 := &x.WaitIndex + yym18 := z.DecBinary() + _ = yym18 + if false { + } else { + *((*uint64)(yyv17)) = uint64(r.DecodeUint(64)) + } + } + yyj12++ + if yyhl12 { + yyb12 = yyj12 > l + } else { + yyb12 = r.CheckBreak() + } + if yyb12 { + r.ReadArrayEnd() + return + } + r.ReadArrayElem() + if r.TryDecodeAsNil() { + x.Recursive = false + } else { + yyv19 := &x.Recursive + yym20 := z.DecBinary() + _ = yym20 + if false { + } else { + *((*bool)(yyv19)) = r.DecodeBool() + } + } + for { + yyj12++ + if yyhl12 { + yyb12 = yyj12 > l + } else { + yyb12 = r.CheckBreak() + } + if yyb12 { + break + } + r.ReadArrayElem() + z.DecStructFieldNotFound(yyj12-1, "") + } + r.ReadArrayEnd() +} + +func (x *setAction) CodecEncodeSelf(e *codec1978.Encoder) { + var h codecSelfer7612 + z, r := codec1978.GenHelperEncoder(e) + _, _, _ = h, z, r + if x == nil { + r.EncodeNil() + } else { + yym1 := z.EncBinary() + _ = yym1 + if false { + } else if z.HasExtensions() && z.EncExt(x) { + } else { + yysep2 := !z.EncBinary() + yy2arr2 := z.EncBasicHandle().StructToArray + _, _ = yysep2, yy2arr2 + const yyr2 bool = false + if yyr2 || yy2arr2 { + r.WriteArrayStart(10) + } else { + r.WriteMapStart(10) + } + if yyr2 || yy2arr2 { + r.WriteArrayElem() + yym4 := z.EncBinary() + _ = yym4 + if false { + } else { + r.EncodeString(codecSelferC_UTF87612, string(x.Prefix)) + } + } else { + r.WriteMapElemKey() + r.EncodeString(codecSelferC_UTF87612, string("Prefix")) + r.WriteMapElemValue() + yym5 := z.EncBinary() + _ = yym5 + if false { + } else { + r.EncodeString(codecSelferC_UTF87612, string(x.Prefix)) + } + } + if yyr2 || yy2arr2 { + r.WriteArrayElem() + yym7 := z.EncBinary() + _ = yym7 + if false { + } else { + r.EncodeString(codecSelferC_UTF87612, string(x.Key)) + } + } else { + r.WriteMapElemKey() + r.EncodeString(codecSelferC_UTF87612, string("Key")) + r.WriteMapElemValue() + yym8 := z.EncBinary() + _ = yym8 + if false { + } else { + r.EncodeString(codecSelferC_UTF87612, string(x.Key)) + } + } + if yyr2 || yy2arr2 { + r.WriteArrayElem() + yym10 := z.EncBinary() + _ = yym10 + if false { + } else { + r.EncodeString(codecSelferC_UTF87612, string(x.Value)) + } + } else { + r.WriteMapElemKey() + r.EncodeString(codecSelferC_UTF87612, string("Value")) + r.WriteMapElemValue() + yym11 := z.EncBinary() + _ = yym11 + if false { + } else { + r.EncodeString(codecSelferC_UTF87612, string(x.Value)) + } + } + if yyr2 || yy2arr2 { + r.WriteArrayElem() + yym13 := z.EncBinary() + _ = yym13 + if false { + } else { + r.EncodeString(codecSelferC_UTF87612, string(x.PrevValue)) + } + } else { + r.WriteMapElemKey() + r.EncodeString(codecSelferC_UTF87612, string("PrevValue")) + r.WriteMapElemValue() + yym14 := z.EncBinary() + _ = yym14 + if false { + } else { + r.EncodeString(codecSelferC_UTF87612, string(x.PrevValue)) + } + } + if yyr2 || yy2arr2 { + r.WriteArrayElem() + yym16 := z.EncBinary() + _ = yym16 + if false { + } else { + r.EncodeUint(uint64(x.PrevIndex)) + } + } else { + r.WriteMapElemKey() + r.EncodeString(codecSelferC_UTF87612, string("PrevIndex")) + r.WriteMapElemValue() + yym17 := z.EncBinary() + _ = yym17 + if false { + } else { + r.EncodeUint(uint64(x.PrevIndex)) + } + } + if yyr2 || yy2arr2 { + r.WriteArrayElem() + x.PrevExist.CodecEncodeSelf(e) + } else { + r.WriteMapElemKey() + r.EncodeString(codecSelferC_UTF87612, string("PrevExist")) + r.WriteMapElemValue() + x.PrevExist.CodecEncodeSelf(e) + } + if yyr2 || yy2arr2 { + r.WriteArrayElem() + yym22 := z.EncBinary() + _ = yym22 + if false { + } else if z.HasExtensions() && z.EncExt(x.TTL) { + } else { + r.EncodeInt(int64(x.TTL)) + } + } else { + r.WriteMapElemKey() + r.EncodeString(codecSelferC_UTF87612, string("TTL")) + r.WriteMapElemValue() + yym23 := z.EncBinary() + _ = yym23 + if false { + } else if z.HasExtensions() && z.EncExt(x.TTL) { + } else { + r.EncodeInt(int64(x.TTL)) + } + } + if yyr2 || yy2arr2 { + r.WriteArrayElem() + yym25 := z.EncBinary() + _ = yym25 + if false { + } else { + r.EncodeBool(bool(x.Refresh)) + } + } else { + r.WriteMapElemKey() + r.EncodeString(codecSelferC_UTF87612, string("Refresh")) + r.WriteMapElemValue() + yym26 := z.EncBinary() + _ = yym26 + if false { + } else { + r.EncodeBool(bool(x.Refresh)) + } + } + if yyr2 || yy2arr2 { + r.WriteArrayElem() + yym28 := z.EncBinary() + _ = yym28 + if false { + } else { + r.EncodeBool(bool(x.Dir)) + } + } else { + r.WriteMapElemKey() + r.EncodeString(codecSelferC_UTF87612, string("Dir")) + r.WriteMapElemValue() + yym29 := z.EncBinary() + _ = yym29 + if false { + } else { + r.EncodeBool(bool(x.Dir)) + } + } + if yyr2 || yy2arr2 { + r.WriteArrayElem() + yym31 := z.EncBinary() + _ = yym31 + if false { + } else { + r.EncodeBool(bool(x.NoValueOnSuccess)) + } + } else { + r.WriteMapElemKey() + r.EncodeString(codecSelferC_UTF87612, string("NoValueOnSuccess")) + r.WriteMapElemValue() + yym32 := z.EncBinary() + _ = yym32 + if false { + } else { + r.EncodeBool(bool(x.NoValueOnSuccess)) + } + } + if yyr2 || yy2arr2 { + r.WriteArrayEnd() + } else { + r.WriteMapEnd() + } + } + } +} + +func (x *setAction) CodecDecodeSelf(d *codec1978.Decoder) { + var h codecSelfer7612 + z, r := codec1978.GenHelperDecoder(d) + _, _, _ = h, z, r + yym1 := z.DecBinary() + _ = yym1 + if false { + } else if z.HasExtensions() && z.DecExt(x) { + } else { + yyct2 := r.ContainerType() + if yyct2 == codecSelferValueTypeMap7612 { + yyl2 := r.ReadMapStart() + if yyl2 == 0 { + r.ReadMapEnd() + } else { + x.codecDecodeSelfFromMap(yyl2, d) + } + } else if yyct2 == codecSelferValueTypeArray7612 { + yyl2 := r.ReadArrayStart() + if yyl2 == 0 { + r.ReadArrayEnd() + } else { + x.codecDecodeSelfFromArray(yyl2, d) + } + } else { + panic(codecSelferOnlyMapOrArrayEncodeToStructErr7612) + } + } +} + +func (x *setAction) codecDecodeSelfFromMap(l int, d *codec1978.Decoder) { + var h codecSelfer7612 + z, r := codec1978.GenHelperDecoder(d) + _, _, _ = h, z, r + var yys3Slc = z.DecScratchBuffer() // default slice to decode into + _ = yys3Slc + var yyhl3 bool = l >= 0 + for yyj3 := 0; ; yyj3++ { + if yyhl3 { + if yyj3 >= l { + break + } + } else { + if r.CheckBreak() { + break + } + } + r.ReadMapElemKey() + yys3Slc = r.DecodeStringAsBytes() + yys3 := string(yys3Slc) + r.ReadMapElemValue() + switch yys3 { + case "Prefix": + if r.TryDecodeAsNil() { + x.Prefix = "" + } else { + yyv4 := &x.Prefix + yym5 := z.DecBinary() + _ = yym5 + if false { + } else { + *((*string)(yyv4)) = r.DecodeString() + } + } + case "Key": + if r.TryDecodeAsNil() { + x.Key = "" + } else { + yyv6 := &x.Key + yym7 := z.DecBinary() + _ = yym7 + if false { + } else { + *((*string)(yyv6)) = r.DecodeString() + } + } + case "Value": + if r.TryDecodeAsNil() { + x.Value = "" + } else { + yyv8 := &x.Value + yym9 := z.DecBinary() + _ = yym9 + if false { + } else { + *((*string)(yyv8)) = r.DecodeString() + } + } + case "PrevValue": + if r.TryDecodeAsNil() { + x.PrevValue = "" + } else { + yyv10 := &x.PrevValue + yym11 := z.DecBinary() + _ = yym11 + if false { + } else { + *((*string)(yyv10)) = r.DecodeString() + } + } + case "PrevIndex": + if r.TryDecodeAsNil() { + x.PrevIndex = 0 + } else { + yyv12 := &x.PrevIndex + yym13 := z.DecBinary() + _ = yym13 + if false { + } else { + *((*uint64)(yyv12)) = uint64(r.DecodeUint(64)) + } + } + case "PrevExist": + if r.TryDecodeAsNil() { + x.PrevExist = "" + } else { + yyv14 := &x.PrevExist + yyv14.CodecDecodeSelf(d) + } + case "TTL": + if r.TryDecodeAsNil() { + x.TTL = 0 + } else { + yyv15 := &x.TTL + yym16 := z.DecBinary() + _ = yym16 + if false { + } else if z.HasExtensions() && z.DecExt(yyv15) { + } else { + *((*int64)(yyv15)) = int64(r.DecodeInt(64)) + } + } + case "Refresh": + if r.TryDecodeAsNil() { + x.Refresh = false + } else { + yyv17 := &x.Refresh + yym18 := z.DecBinary() + _ = yym18 + if false { + } else { + *((*bool)(yyv17)) = r.DecodeBool() + } + } + case "Dir": + if r.TryDecodeAsNil() { + x.Dir = false + } else { + yyv19 := &x.Dir + yym20 := z.DecBinary() + _ = yym20 + if false { + } else { + *((*bool)(yyv19)) = r.DecodeBool() + } + } + case "NoValueOnSuccess": + if r.TryDecodeAsNil() { + x.NoValueOnSuccess = false + } else { + yyv21 := &x.NoValueOnSuccess + yym22 := z.DecBinary() + _ = yym22 + if false { + } else { + *((*bool)(yyv21)) = r.DecodeBool() + } + } + default: + z.DecStructFieldNotFound(-1, yys3) + } // end switch yys3 + } // end for yyj3 + r.ReadMapEnd() +} + +func (x *setAction) codecDecodeSelfFromArray(l int, d *codec1978.Decoder) { + var h codecSelfer7612 + z, r := codec1978.GenHelperDecoder(d) + _, _, _ = h, z, r + var yyj23 int + var yyb23 bool + var yyhl23 bool = l >= 0 + yyj23++ + if yyhl23 { + yyb23 = yyj23 > l + } else { + yyb23 = r.CheckBreak() + } + if yyb23 { + r.ReadArrayEnd() + return + } + r.ReadArrayElem() + if r.TryDecodeAsNil() { + x.Prefix = "" + } else { + yyv24 := &x.Prefix + yym25 := z.DecBinary() + _ = yym25 + if false { + } else { + *((*string)(yyv24)) = r.DecodeString() + } + } + yyj23++ + if yyhl23 { + yyb23 = yyj23 > l + } else { + yyb23 = r.CheckBreak() + } + if yyb23 { + r.ReadArrayEnd() + return + } + r.ReadArrayElem() + if r.TryDecodeAsNil() { + x.Key = "" + } else { + yyv26 := &x.Key + yym27 := z.DecBinary() + _ = yym27 + if false { + } else { + *((*string)(yyv26)) = r.DecodeString() + } + } + yyj23++ + if yyhl23 { + yyb23 = yyj23 > l + } else { + yyb23 = r.CheckBreak() + } + if yyb23 { + r.ReadArrayEnd() + return + } + r.ReadArrayElem() + if r.TryDecodeAsNil() { + x.Value = "" + } else { + yyv28 := &x.Value + yym29 := z.DecBinary() + _ = yym29 + if false { + } else { + *((*string)(yyv28)) = r.DecodeString() + } + } + yyj23++ + if yyhl23 { + yyb23 = yyj23 > l + } else { + yyb23 = r.CheckBreak() + } + if yyb23 { + r.ReadArrayEnd() + return + } + r.ReadArrayElem() + if r.TryDecodeAsNil() { + x.PrevValue = "" + } else { + yyv30 := &x.PrevValue + yym31 := z.DecBinary() + _ = yym31 + if false { + } else { + *((*string)(yyv30)) = r.DecodeString() + } + } + yyj23++ + if yyhl23 { + yyb23 = yyj23 > l + } else { + yyb23 = r.CheckBreak() + } + if yyb23 { + r.ReadArrayEnd() + return + } + r.ReadArrayElem() + if r.TryDecodeAsNil() { + x.PrevIndex = 0 + } else { + yyv32 := &x.PrevIndex + yym33 := z.DecBinary() + _ = yym33 + if false { + } else { + *((*uint64)(yyv32)) = uint64(r.DecodeUint(64)) + } + } + yyj23++ + if yyhl23 { + yyb23 = yyj23 > l + } else { + yyb23 = r.CheckBreak() + } + if yyb23 { + r.ReadArrayEnd() + return + } + r.ReadArrayElem() + if r.TryDecodeAsNil() { + x.PrevExist = "" + } else { + yyv34 := &x.PrevExist + yyv34.CodecDecodeSelf(d) + } + yyj23++ + if yyhl23 { + yyb23 = yyj23 > l + } else { + yyb23 = r.CheckBreak() + } + if yyb23 { + r.ReadArrayEnd() + return + } + r.ReadArrayElem() + if r.TryDecodeAsNil() { + x.TTL = 0 + } else { + yyv35 := &x.TTL + yym36 := z.DecBinary() + _ = yym36 + if false { + } else if z.HasExtensions() && z.DecExt(yyv35) { + } else { + *((*int64)(yyv35)) = int64(r.DecodeInt(64)) + } + } + yyj23++ + if yyhl23 { + yyb23 = yyj23 > l + } else { + yyb23 = r.CheckBreak() + } + if yyb23 { + r.ReadArrayEnd() + return + } + r.ReadArrayElem() + if r.TryDecodeAsNil() { + x.Refresh = false + } else { + yyv37 := &x.Refresh + yym38 := z.DecBinary() + _ = yym38 + if false { + } else { + *((*bool)(yyv37)) = r.DecodeBool() + } + } + yyj23++ + if yyhl23 { + yyb23 = yyj23 > l + } else { + yyb23 = r.CheckBreak() + } + if yyb23 { + r.ReadArrayEnd() + return + } + r.ReadArrayElem() + if r.TryDecodeAsNil() { + x.Dir = false + } else { + yyv39 := &x.Dir + yym40 := z.DecBinary() + _ = yym40 + if false { + } else { + *((*bool)(yyv39)) = r.DecodeBool() + } + } + yyj23++ + if yyhl23 { + yyb23 = yyj23 > l + } else { + yyb23 = r.CheckBreak() + } + if yyb23 { + r.ReadArrayEnd() + return + } + r.ReadArrayElem() + if r.TryDecodeAsNil() { + x.NoValueOnSuccess = false + } else { + yyv41 := &x.NoValueOnSuccess + yym42 := z.DecBinary() + _ = yym42 + if false { + } else { + *((*bool)(yyv41)) = r.DecodeBool() + } + } + for { + yyj23++ + if yyhl23 { + yyb23 = yyj23 > l + } else { + yyb23 = r.CheckBreak() + } + if yyb23 { + break + } + r.ReadArrayElem() + z.DecStructFieldNotFound(yyj23-1, "") + } + r.ReadArrayEnd() +} + +func (x *deleteAction) CodecEncodeSelf(e *codec1978.Encoder) { + var h codecSelfer7612 + z, r := codec1978.GenHelperEncoder(e) + _, _, _ = h, z, r + if x == nil { + r.EncodeNil() + } else { + yym1 := z.EncBinary() + _ = yym1 + if false { + } else if z.HasExtensions() && z.EncExt(x) { + } else { + yysep2 := !z.EncBinary() + yy2arr2 := z.EncBasicHandle().StructToArray + _, _ = yysep2, yy2arr2 + const yyr2 bool = false + if yyr2 || yy2arr2 { + r.WriteArrayStart(6) + } else { + r.WriteMapStart(6) + } + if yyr2 || yy2arr2 { + r.WriteArrayElem() + yym4 := z.EncBinary() + _ = yym4 + if false { + } else { + r.EncodeString(codecSelferC_UTF87612, string(x.Prefix)) + } + } else { + r.WriteMapElemKey() + r.EncodeString(codecSelferC_UTF87612, string("Prefix")) + r.WriteMapElemValue() + yym5 := z.EncBinary() + _ = yym5 + if false { + } else { + r.EncodeString(codecSelferC_UTF87612, string(x.Prefix)) + } + } + if yyr2 || yy2arr2 { + r.WriteArrayElem() + yym7 := z.EncBinary() + _ = yym7 + if false { + } else { + r.EncodeString(codecSelferC_UTF87612, string(x.Key)) + } + } else { + r.WriteMapElemKey() + r.EncodeString(codecSelferC_UTF87612, string("Key")) + r.WriteMapElemValue() + yym8 := z.EncBinary() + _ = yym8 + if false { + } else { + r.EncodeString(codecSelferC_UTF87612, string(x.Key)) + } + } + if yyr2 || yy2arr2 { + r.WriteArrayElem() + yym10 := z.EncBinary() + _ = yym10 + if false { + } else { + r.EncodeString(codecSelferC_UTF87612, string(x.PrevValue)) + } + } else { + r.WriteMapElemKey() + r.EncodeString(codecSelferC_UTF87612, string("PrevValue")) + r.WriteMapElemValue() + yym11 := z.EncBinary() + _ = yym11 + if false { + } else { + r.EncodeString(codecSelferC_UTF87612, string(x.PrevValue)) + } + } + if yyr2 || yy2arr2 { + r.WriteArrayElem() + yym13 := z.EncBinary() + _ = yym13 + if false { + } else { + r.EncodeUint(uint64(x.PrevIndex)) + } + } else { + r.WriteMapElemKey() + r.EncodeString(codecSelferC_UTF87612, string("PrevIndex")) + r.WriteMapElemValue() + yym14 := z.EncBinary() + _ = yym14 + if false { + } else { + r.EncodeUint(uint64(x.PrevIndex)) + } + } + if yyr2 || yy2arr2 { + r.WriteArrayElem() + yym16 := z.EncBinary() + _ = yym16 + if false { + } else { + r.EncodeBool(bool(x.Dir)) + } + } else { + r.WriteMapElemKey() + r.EncodeString(codecSelferC_UTF87612, string("Dir")) + r.WriteMapElemValue() + yym17 := z.EncBinary() + _ = yym17 + if false { + } else { + r.EncodeBool(bool(x.Dir)) + } + } + if yyr2 || yy2arr2 { + r.WriteArrayElem() + yym19 := z.EncBinary() + _ = yym19 + if false { + } else { + r.EncodeBool(bool(x.Recursive)) + } + } else { + r.WriteMapElemKey() + r.EncodeString(codecSelferC_UTF87612, string("Recursive")) + r.WriteMapElemValue() + yym20 := z.EncBinary() + _ = yym20 + if false { + } else { + r.EncodeBool(bool(x.Recursive)) + } + } + if yyr2 || yy2arr2 { + r.WriteArrayEnd() + } else { + r.WriteMapEnd() + } + } + } +} + +func (x *deleteAction) CodecDecodeSelf(d *codec1978.Decoder) { + var h codecSelfer7612 + z, r := codec1978.GenHelperDecoder(d) + _, _, _ = h, z, r + yym1 := z.DecBinary() + _ = yym1 + if false { + } else if z.HasExtensions() && z.DecExt(x) { + } else { + yyct2 := r.ContainerType() + if yyct2 == codecSelferValueTypeMap7612 { + yyl2 := r.ReadMapStart() + if yyl2 == 0 { + r.ReadMapEnd() + } else { + x.codecDecodeSelfFromMap(yyl2, d) + } + } else if yyct2 == codecSelferValueTypeArray7612 { + yyl2 := r.ReadArrayStart() + if yyl2 == 0 { + r.ReadArrayEnd() + } else { + x.codecDecodeSelfFromArray(yyl2, d) + } + } else { + panic(codecSelferOnlyMapOrArrayEncodeToStructErr7612) + } + } +} + +func (x *deleteAction) codecDecodeSelfFromMap(l int, d *codec1978.Decoder) { + var h codecSelfer7612 + z, r := codec1978.GenHelperDecoder(d) + _, _, _ = h, z, r + var yys3Slc = z.DecScratchBuffer() // default slice to decode into + _ = yys3Slc + var yyhl3 bool = l >= 0 + for yyj3 := 0; ; yyj3++ { + if yyhl3 { + if yyj3 >= l { + break + } + } else { + if r.CheckBreak() { + break + } + } + r.ReadMapElemKey() + yys3Slc = r.DecodeStringAsBytes() + yys3 := string(yys3Slc) + r.ReadMapElemValue() + switch yys3 { + case "Prefix": + if r.TryDecodeAsNil() { + x.Prefix = "" + } else { + yyv4 := &x.Prefix + yym5 := z.DecBinary() + _ = yym5 + if false { + } else { + *((*string)(yyv4)) = r.DecodeString() + } + } + case "Key": + if r.TryDecodeAsNil() { + x.Key = "" + } else { + yyv6 := &x.Key + yym7 := z.DecBinary() + _ = yym7 + if false { + } else { + *((*string)(yyv6)) = r.DecodeString() + } + } + case "PrevValue": + if r.TryDecodeAsNil() { + x.PrevValue = "" + } else { + yyv8 := &x.PrevValue + yym9 := z.DecBinary() + _ = yym9 + if false { + } else { + *((*string)(yyv8)) = r.DecodeString() + } + } + case "PrevIndex": + if r.TryDecodeAsNil() { + x.PrevIndex = 0 + } else { + yyv10 := &x.PrevIndex + yym11 := z.DecBinary() + _ = yym11 + if false { + } else { + *((*uint64)(yyv10)) = uint64(r.DecodeUint(64)) + } + } + case "Dir": + if r.TryDecodeAsNil() { + x.Dir = false + } else { + yyv12 := &x.Dir + yym13 := z.DecBinary() + _ = yym13 + if false { + } else { + *((*bool)(yyv12)) = r.DecodeBool() + } + } + case "Recursive": + if r.TryDecodeAsNil() { + x.Recursive = false + } else { + yyv14 := &x.Recursive + yym15 := z.DecBinary() + _ = yym15 + if false { + } else { + *((*bool)(yyv14)) = r.DecodeBool() + } + } + default: + z.DecStructFieldNotFound(-1, yys3) + } // end switch yys3 + } // end for yyj3 + r.ReadMapEnd() +} + +func (x *deleteAction) codecDecodeSelfFromArray(l int, d *codec1978.Decoder) { + var h codecSelfer7612 + z, r := codec1978.GenHelperDecoder(d) + _, _, _ = h, z, r + var yyj16 int + var yyb16 bool + var yyhl16 bool = l >= 0 + yyj16++ + if yyhl16 { + yyb16 = yyj16 > l + } else { + yyb16 = r.CheckBreak() + } + if yyb16 { + r.ReadArrayEnd() + return + } + r.ReadArrayElem() + if r.TryDecodeAsNil() { + x.Prefix = "" + } else { + yyv17 := &x.Prefix + yym18 := z.DecBinary() + _ = yym18 + if false { + } else { + *((*string)(yyv17)) = r.DecodeString() + } + } + yyj16++ + if yyhl16 { + yyb16 = yyj16 > l + } else { + yyb16 = r.CheckBreak() + } + if yyb16 { + r.ReadArrayEnd() + return + } + r.ReadArrayElem() + if r.TryDecodeAsNil() { + x.Key = "" + } else { + yyv19 := &x.Key + yym20 := z.DecBinary() + _ = yym20 + if false { + } else { + *((*string)(yyv19)) = r.DecodeString() + } + } + yyj16++ + if yyhl16 { + yyb16 = yyj16 > l + } else { + yyb16 = r.CheckBreak() + } + if yyb16 { + r.ReadArrayEnd() + return + } + r.ReadArrayElem() + if r.TryDecodeAsNil() { + x.PrevValue = "" + } else { + yyv21 := &x.PrevValue + yym22 := z.DecBinary() + _ = yym22 + if false { + } else { + *((*string)(yyv21)) = r.DecodeString() + } + } + yyj16++ + if yyhl16 { + yyb16 = yyj16 > l + } else { + yyb16 = r.CheckBreak() + } + if yyb16 { + r.ReadArrayEnd() + return + } + r.ReadArrayElem() + if r.TryDecodeAsNil() { + x.PrevIndex = 0 + } else { + yyv23 := &x.PrevIndex + yym24 := z.DecBinary() + _ = yym24 + if false { + } else { + *((*uint64)(yyv23)) = uint64(r.DecodeUint(64)) + } + } + yyj16++ + if yyhl16 { + yyb16 = yyj16 > l + } else { + yyb16 = r.CheckBreak() + } + if yyb16 { + r.ReadArrayEnd() + return + } + r.ReadArrayElem() + if r.TryDecodeAsNil() { + x.Dir = false + } else { + yyv25 := &x.Dir + yym26 := z.DecBinary() + _ = yym26 + if false { + } else { + *((*bool)(yyv25)) = r.DecodeBool() + } + } + yyj16++ + if yyhl16 { + yyb16 = yyj16 > l + } else { + yyb16 = r.CheckBreak() + } + if yyb16 { + r.ReadArrayEnd() + return + } + r.ReadArrayElem() + if r.TryDecodeAsNil() { + x.Recursive = false + } else { + yyv27 := &x.Recursive + yym28 := z.DecBinary() + _ = yym28 + if false { + } else { + *((*bool)(yyv27)) = r.DecodeBool() + } + } + for { + yyj16++ + if yyhl16 { + yyb16 = yyj16 > l + } else { + yyb16 = r.CheckBreak() + } + if yyb16 { + break + } + r.ReadArrayElem() + z.DecStructFieldNotFound(yyj16-1, "") + } + r.ReadArrayEnd() +} + +func (x *createInOrderAction) CodecEncodeSelf(e *codec1978.Encoder) { + var h codecSelfer7612 + z, r := codec1978.GenHelperEncoder(e) + _, _, _ = h, z, r + if x == nil { + r.EncodeNil() + } else { + yym1 := z.EncBinary() + _ = yym1 + if false { + } else if z.HasExtensions() && z.EncExt(x) { + } else { + yysep2 := !z.EncBinary() + yy2arr2 := z.EncBasicHandle().StructToArray + _, _ = yysep2, yy2arr2 + const yyr2 bool = false + if yyr2 || yy2arr2 { + r.WriteArrayStart(4) + } else { + r.WriteMapStart(4) + } + if yyr2 || yy2arr2 { + r.WriteArrayElem() + yym4 := z.EncBinary() + _ = yym4 + if false { + } else { + r.EncodeString(codecSelferC_UTF87612, string(x.Prefix)) + } + } else { + r.WriteMapElemKey() + r.EncodeString(codecSelferC_UTF87612, string("Prefix")) + r.WriteMapElemValue() + yym5 := z.EncBinary() + _ = yym5 + if false { + } else { + r.EncodeString(codecSelferC_UTF87612, string(x.Prefix)) + } + } + if yyr2 || yy2arr2 { + r.WriteArrayElem() + yym7 := z.EncBinary() + _ = yym7 + if false { + } else { + r.EncodeString(codecSelferC_UTF87612, string(x.Dir)) + } + } else { + r.WriteMapElemKey() + r.EncodeString(codecSelferC_UTF87612, string("Dir")) + r.WriteMapElemValue() + yym8 := z.EncBinary() + _ = yym8 + if false { + } else { + r.EncodeString(codecSelferC_UTF87612, string(x.Dir)) + } + } + if yyr2 || yy2arr2 { + r.WriteArrayElem() + yym10 := z.EncBinary() + _ = yym10 + if false { + } else { + r.EncodeString(codecSelferC_UTF87612, string(x.Value)) + } + } else { + r.WriteMapElemKey() + r.EncodeString(codecSelferC_UTF87612, string("Value")) + r.WriteMapElemValue() + yym11 := z.EncBinary() + _ = yym11 + if false { + } else { + r.EncodeString(codecSelferC_UTF87612, string(x.Value)) + } + } + if yyr2 || yy2arr2 { + r.WriteArrayElem() + yym13 := z.EncBinary() + _ = yym13 + if false { + } else if z.HasExtensions() && z.EncExt(x.TTL) { + } else { + r.EncodeInt(int64(x.TTL)) + } + } else { + r.WriteMapElemKey() + r.EncodeString(codecSelferC_UTF87612, string("TTL")) + r.WriteMapElemValue() + yym14 := z.EncBinary() + _ = yym14 + if false { + } else if z.HasExtensions() && z.EncExt(x.TTL) { + } else { + r.EncodeInt(int64(x.TTL)) + } + } + if yyr2 || yy2arr2 { + r.WriteArrayEnd() + } else { + r.WriteMapEnd() + } + } + } +} + +func (x *createInOrderAction) CodecDecodeSelf(d *codec1978.Decoder) { + var h codecSelfer7612 + z, r := codec1978.GenHelperDecoder(d) + _, _, _ = h, z, r + yym1 := z.DecBinary() + _ = yym1 + if false { + } else if z.HasExtensions() && z.DecExt(x) { + } else { + yyct2 := r.ContainerType() + if yyct2 == codecSelferValueTypeMap7612 { + yyl2 := r.ReadMapStart() + if yyl2 == 0 { + r.ReadMapEnd() + } else { + x.codecDecodeSelfFromMap(yyl2, d) + } + } else if yyct2 == codecSelferValueTypeArray7612 { + yyl2 := r.ReadArrayStart() + if yyl2 == 0 { + r.ReadArrayEnd() + } else { + x.codecDecodeSelfFromArray(yyl2, d) + } + } else { + panic(codecSelferOnlyMapOrArrayEncodeToStructErr7612) + } + } +} + +func (x *createInOrderAction) codecDecodeSelfFromMap(l int, d *codec1978.Decoder) { + var h codecSelfer7612 + z, r := codec1978.GenHelperDecoder(d) + _, _, _ = h, z, r + var yys3Slc = z.DecScratchBuffer() // default slice to decode into + _ = yys3Slc + var yyhl3 bool = l >= 0 + for yyj3 := 0; ; yyj3++ { + if yyhl3 { + if yyj3 >= l { + break + } + } else { + if r.CheckBreak() { + break + } + } + r.ReadMapElemKey() + yys3Slc = r.DecodeStringAsBytes() + yys3 := string(yys3Slc) + r.ReadMapElemValue() + switch yys3 { + case "Prefix": + if r.TryDecodeAsNil() { + x.Prefix = "" + } else { + yyv4 := &x.Prefix + yym5 := z.DecBinary() + _ = yym5 + if false { + } else { + *((*string)(yyv4)) = r.DecodeString() + } + } + case "Dir": + if r.TryDecodeAsNil() { + x.Dir = "" + } else { + yyv6 := &x.Dir + yym7 := z.DecBinary() + _ = yym7 + if false { + } else { + *((*string)(yyv6)) = r.DecodeString() + } + } + case "Value": + if r.TryDecodeAsNil() { + x.Value = "" + } else { + yyv8 := &x.Value + yym9 := z.DecBinary() + _ = yym9 + if false { + } else { + *((*string)(yyv8)) = r.DecodeString() + } + } + case "TTL": + if r.TryDecodeAsNil() { + x.TTL = 0 + } else { + yyv10 := &x.TTL + yym11 := z.DecBinary() + _ = yym11 + if false { + } else if z.HasExtensions() && z.DecExt(yyv10) { + } else { + *((*int64)(yyv10)) = int64(r.DecodeInt(64)) + } + } + default: + z.DecStructFieldNotFound(-1, yys3) + } // end switch yys3 + } // end for yyj3 + r.ReadMapEnd() +} + +func (x *createInOrderAction) codecDecodeSelfFromArray(l int, d *codec1978.Decoder) { + var h codecSelfer7612 + z, r := codec1978.GenHelperDecoder(d) + _, _, _ = h, z, r + var yyj12 int + var yyb12 bool + var yyhl12 bool = l >= 0 + yyj12++ + if yyhl12 { + yyb12 = yyj12 > l + } else { + yyb12 = r.CheckBreak() + } + if yyb12 { + r.ReadArrayEnd() + return + } + r.ReadArrayElem() + if r.TryDecodeAsNil() { + x.Prefix = "" + } else { + yyv13 := &x.Prefix + yym14 := z.DecBinary() + _ = yym14 + if false { + } else { + *((*string)(yyv13)) = r.DecodeString() + } + } + yyj12++ + if yyhl12 { + yyb12 = yyj12 > l + } else { + yyb12 = r.CheckBreak() + } + if yyb12 { + r.ReadArrayEnd() + return + } + r.ReadArrayElem() + if r.TryDecodeAsNil() { + x.Dir = "" + } else { + yyv15 := &x.Dir + yym16 := z.DecBinary() + _ = yym16 + if false { + } else { + *((*string)(yyv15)) = r.DecodeString() + } + } + yyj12++ + if yyhl12 { + yyb12 = yyj12 > l + } else { + yyb12 = r.CheckBreak() + } + if yyb12 { + r.ReadArrayEnd() + return + } + r.ReadArrayElem() + if r.TryDecodeAsNil() { + x.Value = "" + } else { + yyv17 := &x.Value + yym18 := z.DecBinary() + _ = yym18 + if false { + } else { + *((*string)(yyv17)) = r.DecodeString() + } + } + yyj12++ + if yyhl12 { + yyb12 = yyj12 > l + } else { + yyb12 = r.CheckBreak() + } + if yyb12 { + r.ReadArrayEnd() + return + } + r.ReadArrayElem() + if r.TryDecodeAsNil() { + x.TTL = 0 + } else { + yyv19 := &x.TTL + yym20 := z.DecBinary() + _ = yym20 + if false { + } else if z.HasExtensions() && z.DecExt(yyv19) { + } else { + *((*int64)(yyv19)) = int64(r.DecodeInt(64)) + } + } + for { + yyj12++ + if yyhl12 { + yyb12 = yyj12 > l + } else { + yyb12 = r.CheckBreak() + } + if yyb12 { + break + } + r.ReadArrayElem() + z.DecStructFieldNotFound(yyj12-1, "") + } + r.ReadArrayEnd() +} + +func (x codecSelfer7612) encNodes(v Nodes, e *codec1978.Encoder) { + var h codecSelfer7612 + z, r := codec1978.GenHelperEncoder(e) + _, _, _ = h, z, r + r.WriteArrayStart(len(v)) for _, yyv1 := range v { - z.EncSendContainerState(codecSelfer_containerArrayElem1819) + r.WriteArrayElem() if yyv1 == nil { r.EncodeNil() } else { yyv1.CodecEncodeSelf(e) } } - z.EncSendContainerState(codecSelfer_containerArrayEnd1819) + r.WriteArrayEnd() } -func (x codecSelfer1819) decNodes(v *Nodes, d *codec1978.Decoder) { - var h codecSelfer1819 +func (x codecSelfer7612) decNodes(v *Nodes, d *codec1978.Decoder) { + var h codecSelfer7612 z, r := codec1978.GenHelperDecoder(d) _, _, _ = h, z, r @@ -982,79 +5144,49 @@ func (x codecSelfer1819) decNodes(v *Nodes, d *codec1978.Decoder) { yyv1 = yyv1[:0] yyc1 = true } - } else if yyl1 > 0 { - var yyrr1, yyrl1 int - var yyrt1 bool - _, _ = yyrl1, yyrt1 - yyrr1 = yyl1 // len(yyv1) - if yyl1 > cap(yyv1) { - - yyrg1 := len(yyv1) > 0 - yyv21 := yyv1 - yyrl1, yyrt1 = z.DecInferLen(yyl1, z.DecBasicHandle().MaxInitLen, 8) - if yyrt1 { + } else { + yyhl1 := yyl1 > 0 + var yyrl1 int + _ = yyrl1 + if yyhl1 { + if yyl1 > cap(yyv1) { + yyrl1 = z.DecInferLen(yyl1, z.DecBasicHandle().MaxInitLen, 8) if yyrl1 <= cap(yyv1) { yyv1 = yyv1[:yyrl1] } else { yyv1 = make([]*Node, yyrl1) } - } else { - yyv1 = make([]*Node, yyrl1) + yyc1 = true + } else if yyl1 != len(yyv1) { + yyv1 = yyv1[:yyl1] + yyc1 = true } - yyc1 = true - yyrr1 = len(yyv1) - if yyrg1 { - copy(yyv1, yyv21) - } - } else if yyl1 != len(yyv1) { - yyv1 = yyv1[:yyl1] - yyc1 = true } - yyj1 := 0 - for ; yyj1 < yyrr1; yyj1++ { - yyh1.ElemContainerState(yyj1) - if r.TryDecodeAsNil() { - if yyv1[yyj1] != nil { - *yyv1[yyj1] = Node{} - } - } else { - if yyv1[yyj1] == nil { - yyv1[yyj1] = new(Node) - } - yyw2 := yyv1[yyj1] - yyw2.CodecDecodeSelf(d) - } - - } - if yyrt1 { - for ; yyj1 < yyl1; yyj1++ { - yyv1 = append(yyv1, nil) - yyh1.ElemContainerState(yyj1) - if r.TryDecodeAsNil() { - if yyv1[yyj1] != nil { - *yyv1[yyj1] = Node{} - } + var yyj1 int + // var yydn1 bool + for ; (yyhl1 && yyj1 < yyl1) || !(yyhl1 || r.CheckBreak()); yyj1++ { + if yyj1 == 0 && len(yyv1) == 0 { + if yyhl1 { + yyrl1 = z.DecInferLen(yyl1, z.DecBasicHandle().MaxInitLen, 8) } else { - if yyv1[yyj1] == nil { - yyv1[yyj1] = new(Node) - } - yyw3 := yyv1[yyj1] - yyw3.CodecDecodeSelf(d) + yyrl1 = 8 } - - } - } - - } else { - yyj1 := 0 - for ; !r.CheckBreak(); yyj1++ { - - if yyj1 >= len(yyv1) { - yyv1 = append(yyv1, nil) // var yyz1 *Node + yyv1 = make([]*Node, yyrl1) yyc1 = true } yyh1.ElemContainerState(yyj1) - if yyj1 < len(yyv1) { + // yydn1 = r.TryDecodeAsNil() + + // if indefinite, etc, then expand the slice if necessary + var yydb1 bool + if yyj1 >= len(yyv1) { + yyv1 = append(yyv1, nil) + yyc1 = true + + } + if yydb1 { + z.DecSwallow() + } else { if r.TryDecodeAsNil() { if yyv1[yyj1] != nil { *yyv1[yyj1] = Node{} @@ -1063,12 +5195,10 @@ func (x codecSelfer1819) decNodes(v *Nodes, d *codec1978.Decoder) { if yyv1[yyj1] == nil { yyv1[yyj1] = new(Node) } - yyw4 := yyv1[yyj1] - yyw4.CodecDecodeSelf(d) + yyw2 := yyv1[yyj1] + yyw2.CodecDecodeSelf(d) } - } else { - z.DecSwallow() } } @@ -1076,7 +5206,7 @@ func (x codecSelfer1819) decNodes(v *Nodes, d *codec1978.Decoder) { yyv1 = yyv1[:yyj1] yyc1 = true } else if yyj1 == 0 && yyv1 == nil { - yyv1 = []*Node{} + yyv1 = make([]*Node, 0) yyc1 = true } } @@ -1084,4 +5214,5 @@ func (x codecSelfer1819) decNodes(v *Nodes, d *codec1978.Decoder) { if yyc1 { *v = yyv1 } + } diff --git a/vendor/github.com/coreos/etcd/client/keys.go b/vendor/github.com/coreos/etcd/client/keys.go index 4a6c41a78..8b9fd3f87 100644 --- a/vendor/github.com/coreos/etcd/client/keys.go +++ b/vendor/github.com/coreos/etcd/client/keys.go @@ -17,6 +17,7 @@ package client //go:generate codecgen -d 1819 -r "Node|Response|Nodes" -o keys.generated.go keys.go import ( + "context" "encoding/json" "errors" "fmt" @@ -28,7 +29,6 @@ import ( "github.com/coreos/etcd/pkg/pathutil" "github.com/ugorji/go/codec" - "golang.org/x/net/context" ) const ( @@ -653,8 +653,7 @@ func unmarshalHTTPResponse(code int, header http.Header, body []byte) (res *Resp default: err = unmarshalFailedKeysResponse(body) } - - return + return res, err } func unmarshalSuccessfulKeysResponse(header http.Header, body []byte) (*Response, error) { diff --git a/vendor/github.com/coreos/etcd/client/members.go b/vendor/github.com/coreos/etcd/client/members.go index 23adf07ad..aafa3d1b8 100644 --- a/vendor/github.com/coreos/etcd/client/members.go +++ b/vendor/github.com/coreos/etcd/client/members.go @@ -16,14 +16,13 @@ package client import ( "bytes" + "context" "encoding/json" "fmt" "net/http" "net/url" "path" - "golang.org/x/net/context" - "github.com/coreos/etcd/pkg/types" ) @@ -44,7 +43,7 @@ type Member struct { PeerURLs []string `json:"peerURLs"` // ClientURLs represents the HTTP(S) endpoints on which this Member - // serves it's client-facing APIs. + // serves its client-facing APIs. ClientURLs []string `json:"clientURLs"` } diff --git a/vendor/github.com/coreos/etcd/clientv3/README.md b/vendor/github.com/coreos/etcd/clientv3/README.md index 643d0e2f0..376bfba76 100644 --- a/vendor/github.com/coreos/etcd/clientv3/README.md +++ b/vendor/github.com/coreos/etcd/clientv3/README.md @@ -1,6 +1,6 @@ # etcd/clientv3 -[![Godoc](http://img.shields.io/badge/go-documentation-blue.svg?style=flat-square)](https://godoc.org/github.com/coreos/etcd/clientv3) +[![Godoc](https://img.shields.io/badge/go-documentation-blue.svg?style=flat-square)](https://godoc.org/github.com/coreos/etcd/clientv3) `etcd/clientv3` is the official Go etcd client for v3. diff --git a/vendor/github.com/coreos/etcd/clientv3/auth.go b/vendor/github.com/coreos/etcd/clientv3/auth.go index 18f1f5b09..7545bb6ca 100644 --- a/vendor/github.com/coreos/etcd/clientv3/auth.go +++ b/vendor/github.com/coreos/etcd/clientv3/auth.go @@ -15,12 +15,13 @@ package clientv3 import ( + "context" "fmt" "strings" "github.com/coreos/etcd/auth/authpb" pb "github.com/coreos/etcd/etcdserver/etcdserverpb" - "golang.org/x/net/context" + "google.golang.org/grpc" ) @@ -100,60 +101,65 @@ type Auth interface { } type auth struct { - remote pb.AuthClient + remote pb.AuthClient + callOpts []grpc.CallOption } func NewAuth(c *Client) Auth { - return &auth{remote: pb.NewAuthClient(c.ActiveConnection())} + api := &auth{remote: RetryAuthClient(c)} + if c != nil { + api.callOpts = c.callOpts + } + return api } func (auth *auth) AuthEnable(ctx context.Context) (*AuthEnableResponse, error) { - resp, err := auth.remote.AuthEnable(ctx, &pb.AuthEnableRequest{}, grpc.FailFast(false)) + resp, err := auth.remote.AuthEnable(ctx, &pb.AuthEnableRequest{}, auth.callOpts...) return (*AuthEnableResponse)(resp), toErr(ctx, err) } func (auth *auth) AuthDisable(ctx context.Context) (*AuthDisableResponse, error) { - resp, err := auth.remote.AuthDisable(ctx, &pb.AuthDisableRequest{}, grpc.FailFast(false)) + resp, err := auth.remote.AuthDisable(ctx, &pb.AuthDisableRequest{}, auth.callOpts...) return (*AuthDisableResponse)(resp), toErr(ctx, err) } func (auth *auth) UserAdd(ctx context.Context, name string, password string) (*AuthUserAddResponse, error) { - resp, err := auth.remote.UserAdd(ctx, &pb.AuthUserAddRequest{Name: name, Password: password}) + resp, err := auth.remote.UserAdd(ctx, &pb.AuthUserAddRequest{Name: name, Password: password}, auth.callOpts...) return (*AuthUserAddResponse)(resp), toErr(ctx, err) } func (auth *auth) UserDelete(ctx context.Context, name string) (*AuthUserDeleteResponse, error) { - resp, err := auth.remote.UserDelete(ctx, &pb.AuthUserDeleteRequest{Name: name}) + resp, err := auth.remote.UserDelete(ctx, &pb.AuthUserDeleteRequest{Name: name}, auth.callOpts...) return (*AuthUserDeleteResponse)(resp), toErr(ctx, err) } func (auth *auth) UserChangePassword(ctx context.Context, name string, password string) (*AuthUserChangePasswordResponse, error) { - resp, err := auth.remote.UserChangePassword(ctx, &pb.AuthUserChangePasswordRequest{Name: name, Password: password}) + resp, err := auth.remote.UserChangePassword(ctx, &pb.AuthUserChangePasswordRequest{Name: name, Password: password}, auth.callOpts...) return (*AuthUserChangePasswordResponse)(resp), toErr(ctx, err) } func (auth *auth) UserGrantRole(ctx context.Context, user string, role string) (*AuthUserGrantRoleResponse, error) { - resp, err := auth.remote.UserGrantRole(ctx, &pb.AuthUserGrantRoleRequest{User: user, Role: role}) + resp, err := auth.remote.UserGrantRole(ctx, &pb.AuthUserGrantRoleRequest{User: user, Role: role}, auth.callOpts...) return (*AuthUserGrantRoleResponse)(resp), toErr(ctx, err) } func (auth *auth) UserGet(ctx context.Context, name string) (*AuthUserGetResponse, error) { - resp, err := auth.remote.UserGet(ctx, &pb.AuthUserGetRequest{Name: name}, grpc.FailFast(false)) + resp, err := auth.remote.UserGet(ctx, &pb.AuthUserGetRequest{Name: name}, auth.callOpts...) return (*AuthUserGetResponse)(resp), toErr(ctx, err) } func (auth *auth) UserList(ctx context.Context) (*AuthUserListResponse, error) { - resp, err := auth.remote.UserList(ctx, &pb.AuthUserListRequest{}, grpc.FailFast(false)) + resp, err := auth.remote.UserList(ctx, &pb.AuthUserListRequest{}, auth.callOpts...) return (*AuthUserListResponse)(resp), toErr(ctx, err) } func (auth *auth) UserRevokeRole(ctx context.Context, name string, role string) (*AuthUserRevokeRoleResponse, error) { - resp, err := auth.remote.UserRevokeRole(ctx, &pb.AuthUserRevokeRoleRequest{Name: name, Role: role}) + resp, err := auth.remote.UserRevokeRole(ctx, &pb.AuthUserRevokeRoleRequest{Name: name, Role: role}, auth.callOpts...) return (*AuthUserRevokeRoleResponse)(resp), toErr(ctx, err) } func (auth *auth) RoleAdd(ctx context.Context, name string) (*AuthRoleAddResponse, error) { - resp, err := auth.remote.RoleAdd(ctx, &pb.AuthRoleAddRequest{Name: name}) + resp, err := auth.remote.RoleAdd(ctx, &pb.AuthRoleAddRequest{Name: name}, auth.callOpts...) return (*AuthRoleAddResponse)(resp), toErr(ctx, err) } @@ -163,27 +169,27 @@ func (auth *auth) RoleGrantPermission(ctx context.Context, name string, key, ran RangeEnd: []byte(rangeEnd), PermType: authpb.Permission_Type(permType), } - resp, err := auth.remote.RoleGrantPermission(ctx, &pb.AuthRoleGrantPermissionRequest{Name: name, Perm: perm}) + resp, err := auth.remote.RoleGrantPermission(ctx, &pb.AuthRoleGrantPermissionRequest{Name: name, Perm: perm}, auth.callOpts...) return (*AuthRoleGrantPermissionResponse)(resp), toErr(ctx, err) } func (auth *auth) RoleGet(ctx context.Context, role string) (*AuthRoleGetResponse, error) { - resp, err := auth.remote.RoleGet(ctx, &pb.AuthRoleGetRequest{Role: role}, grpc.FailFast(false)) + resp, err := auth.remote.RoleGet(ctx, &pb.AuthRoleGetRequest{Role: role}, auth.callOpts...) return (*AuthRoleGetResponse)(resp), toErr(ctx, err) } func (auth *auth) RoleList(ctx context.Context) (*AuthRoleListResponse, error) { - resp, err := auth.remote.RoleList(ctx, &pb.AuthRoleListRequest{}, grpc.FailFast(false)) + resp, err := auth.remote.RoleList(ctx, &pb.AuthRoleListRequest{}, auth.callOpts...) return (*AuthRoleListResponse)(resp), toErr(ctx, err) } func (auth *auth) RoleRevokePermission(ctx context.Context, role string, key, rangeEnd string) (*AuthRoleRevokePermissionResponse, error) { - resp, err := auth.remote.RoleRevokePermission(ctx, &pb.AuthRoleRevokePermissionRequest{Role: role, Key: key, RangeEnd: rangeEnd}) + resp, err := auth.remote.RoleRevokePermission(ctx, &pb.AuthRoleRevokePermissionRequest{Role: role, Key: key, RangeEnd: rangeEnd}, auth.callOpts...) return (*AuthRoleRevokePermissionResponse)(resp), toErr(ctx, err) } func (auth *auth) RoleDelete(ctx context.Context, role string) (*AuthRoleDeleteResponse, error) { - resp, err := auth.remote.RoleDelete(ctx, &pb.AuthRoleDeleteRequest{Role: role}) + resp, err := auth.remote.RoleDelete(ctx, &pb.AuthRoleDeleteRequest{Role: role}, auth.callOpts...) return (*AuthRoleDeleteResponse)(resp), toErr(ctx, err) } @@ -196,12 +202,13 @@ func StrToPermissionType(s string) (PermissionType, error) { } type authenticator struct { - conn *grpc.ClientConn // conn in-use - remote pb.AuthClient + conn *grpc.ClientConn // conn in-use + remote pb.AuthClient + callOpts []grpc.CallOption } func (auth *authenticator) authenticate(ctx context.Context, name string, password string) (*AuthenticateResponse, error) { - resp, err := auth.remote.Authenticate(ctx, &pb.AuthenticateRequest{Name: name, Password: password}, grpc.FailFast(false)) + resp, err := auth.remote.Authenticate(ctx, &pb.AuthenticateRequest{Name: name, Password: password}, auth.callOpts...) return (*AuthenticateResponse)(resp), toErr(ctx, err) } @@ -209,14 +216,18 @@ func (auth *authenticator) close() { auth.conn.Close() } -func newAuthenticator(endpoint string, opts []grpc.DialOption) (*authenticator, error) { +func newAuthenticator(endpoint string, opts []grpc.DialOption, c *Client) (*authenticator, error) { conn, err := grpc.Dial(endpoint, opts...) if err != nil { return nil, err } - return &authenticator{ + api := &authenticator{ conn: conn, remote: pb.NewAuthClient(conn), - }, nil + } + if c != nil { + api.callOpts = c.callOpts + } + return api, nil } diff --git a/vendor/github.com/coreos/etcd/clientv3/balancer.go b/vendor/github.com/coreos/etcd/clientv3/balancer.go deleted file mode 100644 index 6ae047e98..000000000 --- a/vendor/github.com/coreos/etcd/clientv3/balancer.go +++ /dev/null @@ -1,356 +0,0 @@ -// Copyright 2016 The etcd Authors -// -// 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. - -package clientv3 - -import ( - "net/url" - "strings" - "sync" - - "golang.org/x/net/context" - "google.golang.org/grpc" - "google.golang.org/grpc/codes" -) - -// ErrNoAddrAvilable is returned by Get() when the balancer does not have -// any active connection to endpoints at the time. -// This error is returned only when opts.BlockingWait is true. -var ErrNoAddrAvilable = grpc.Errorf(codes.Unavailable, "there is no address available") - -// simpleBalancer does the bare minimum to expose multiple eps -// to the grpc reconnection code path -type simpleBalancer struct { - // addrs are the client's endpoints for grpc - addrs []grpc.Address - // notifyCh notifies grpc of the set of addresses for connecting - notifyCh chan []grpc.Address - - // readyc closes once the first connection is up - readyc chan struct{} - readyOnce sync.Once - - // mu protects upEps, pinAddr, and connectingAddr - mu sync.RWMutex - - // upc closes when upEps transitions from empty to non-zero or the balancer closes. - upc chan struct{} - - // downc closes when grpc calls down() on pinAddr - downc chan struct{} - - // stopc is closed to signal updateNotifyLoop should stop. - stopc chan struct{} - - // donec closes when all goroutines are exited - donec chan struct{} - - // updateAddrsC notifies updateNotifyLoop to update addrs. - updateAddrsC chan struct{} - - // grpc issues TLS cert checks using the string passed into dial so - // that string must be the host. To recover the full scheme://host URL, - // have a map from hosts to the original endpoint. - host2ep map[string]string - - // pinAddr is the currently pinned address; set to the empty string on - // intialization and shutdown. - pinAddr string - - closed bool -} - -func newSimpleBalancer(eps []string) *simpleBalancer { - notifyCh := make(chan []grpc.Address, 1) - addrs := make([]grpc.Address, len(eps)) - for i := range eps { - addrs[i].Addr = getHost(eps[i]) - } - sb := &simpleBalancer{ - addrs: addrs, - notifyCh: notifyCh, - readyc: make(chan struct{}), - upc: make(chan struct{}), - stopc: make(chan struct{}), - downc: make(chan struct{}), - donec: make(chan struct{}), - updateAddrsC: make(chan struct{}, 1), - host2ep: getHost2ep(eps), - } - close(sb.downc) - go sb.updateNotifyLoop() - return sb -} - -func (b *simpleBalancer) Start(target string, config grpc.BalancerConfig) error { return nil } - -func (b *simpleBalancer) ConnectNotify() <-chan struct{} { - b.mu.Lock() - defer b.mu.Unlock() - return b.upc -} - -func (b *simpleBalancer) getEndpoint(host string) string { - b.mu.Lock() - defer b.mu.Unlock() - return b.host2ep[host] -} - -func getHost2ep(eps []string) map[string]string { - hm := make(map[string]string, len(eps)) - for i := range eps { - _, host, _ := parseEndpoint(eps[i]) - hm[host] = eps[i] - } - return hm -} - -func (b *simpleBalancer) updateAddrs(eps []string) { - np := getHost2ep(eps) - - b.mu.Lock() - - match := len(np) == len(b.host2ep) - for k, v := range np { - if b.host2ep[k] != v { - match = false - break - } - } - if match { - // same endpoints, so no need to update address - b.mu.Unlock() - return - } - - b.host2ep = np - - addrs := make([]grpc.Address, 0, len(eps)) - for i := range eps { - addrs = append(addrs, grpc.Address{Addr: getHost(eps[i])}) - } - b.addrs = addrs - - // updating notifyCh can trigger new connections, - // only update addrs if all connections are down - // or addrs does not include pinAddr. - update := !hasAddr(addrs, b.pinAddr) - b.mu.Unlock() - - if update { - select { - case b.updateAddrsC <- struct{}{}: - case <-b.stopc: - } - } -} - -func hasAddr(addrs []grpc.Address, targetAddr string) bool { - for _, addr := range addrs { - if targetAddr == addr.Addr { - return true - } - } - return false -} - -func (b *simpleBalancer) updateNotifyLoop() { - defer close(b.donec) - - for { - b.mu.RLock() - upc, downc, addr := b.upc, b.downc, b.pinAddr - b.mu.RUnlock() - // downc or upc should be closed - select { - case <-downc: - downc = nil - default: - } - select { - case <-upc: - upc = nil - default: - } - switch { - case downc == nil && upc == nil: - // stale - select { - case <-b.stopc: - return - default: - } - case downc == nil: - b.notifyAddrs() - select { - case <-upc: - case <-b.updateAddrsC: - b.notifyAddrs() - case <-b.stopc: - return - } - case upc == nil: - select { - // close connections that are not the pinned address - case b.notifyCh <- []grpc.Address{{Addr: addr}}: - case <-downc: - case <-b.stopc: - return - } - select { - case <-downc: - case <-b.updateAddrsC: - case <-b.stopc: - return - } - b.notifyAddrs() - } - } -} - -func (b *simpleBalancer) notifyAddrs() { - b.mu.RLock() - addrs := b.addrs - b.mu.RUnlock() - select { - case b.notifyCh <- addrs: - case <-b.stopc: - } -} - -func (b *simpleBalancer) Up(addr grpc.Address) func(error) { - b.mu.Lock() - defer b.mu.Unlock() - - // gRPC might call Up after it called Close. We add this check - // to "fix" it up at application layer. Or our simplerBalancer - // might panic since b.upc is closed. - if b.closed { - return func(err error) {} - } - // gRPC might call Up on a stale address. - // Prevent updating pinAddr with a stale address. - if !hasAddr(b.addrs, addr.Addr) { - return func(err error) {} - } - if b.pinAddr != "" { - return func(err error) {} - } - // notify waiting Get()s and pin first connected address - close(b.upc) - b.downc = make(chan struct{}) - b.pinAddr = addr.Addr - // notify client that a connection is up - b.readyOnce.Do(func() { close(b.readyc) }) - return func(err error) { - b.mu.Lock() - b.upc = make(chan struct{}) - close(b.downc) - b.pinAddr = "" - b.mu.Unlock() - } -} - -func (b *simpleBalancer) Get(ctx context.Context, opts grpc.BalancerGetOptions) (grpc.Address, func(), error) { - var ( - addr string - closed bool - ) - - // If opts.BlockingWait is false (for fail-fast RPCs), it should return - // an address it has notified via Notify immediately instead of blocking. - if !opts.BlockingWait { - b.mu.RLock() - closed = b.closed - addr = b.pinAddr - b.mu.RUnlock() - if closed { - return grpc.Address{Addr: ""}, nil, grpc.ErrClientConnClosing - } - if addr == "" { - return grpc.Address{Addr: ""}, nil, ErrNoAddrAvilable - } - return grpc.Address{Addr: addr}, func() {}, nil - } - - for { - b.mu.RLock() - ch := b.upc - b.mu.RUnlock() - select { - case <-ch: - case <-b.donec: - return grpc.Address{Addr: ""}, nil, grpc.ErrClientConnClosing - case <-ctx.Done(): - return grpc.Address{Addr: ""}, nil, ctx.Err() - } - b.mu.RLock() - closed = b.closed - addr = b.pinAddr - b.mu.RUnlock() - // Close() which sets b.closed = true can be called before Get(), Get() must exit if balancer is closed. - if closed { - return grpc.Address{Addr: ""}, nil, grpc.ErrClientConnClosing - } - if addr != "" { - break - } - } - return grpc.Address{Addr: addr}, func() {}, nil -} - -func (b *simpleBalancer) Notify() <-chan []grpc.Address { return b.notifyCh } - -func (b *simpleBalancer) Close() error { - b.mu.Lock() - // In case gRPC calls close twice. TODO: remove the checking - // when we are sure that gRPC wont call close twice. - if b.closed { - b.mu.Unlock() - <-b.donec - return nil - } - b.closed = true - close(b.stopc) - b.pinAddr = "" - - // In the case of following scenario: - // 1. upc is not closed; no pinned address - // 2. client issues an rpc, calling invoke(), which calls Get(), enters for loop, blocks - // 3. clientconn.Close() calls balancer.Close(); closed = true - // 4. for loop in Get() never exits since ctx is the context passed in by the client and may not be canceled - // we must close upc so Get() exits from blocking on upc - select { - case <-b.upc: - default: - // terminate all waiting Get()s - close(b.upc) - } - - b.mu.Unlock() - - // wait for updateNotifyLoop to finish - <-b.donec - close(b.notifyCh) - - return nil -} - -func getHost(ep string) string { - url, uerr := url.Parse(ep) - if uerr != nil || !strings.Contains(ep, "://") { - return ep - } - return url.Host -} diff --git a/vendor/github.com/coreos/etcd/clientv3/client.go b/vendor/github.com/coreos/etcd/clientv3/client.go index f220a895e..713280776 100644 --- a/vendor/github.com/coreos/etcd/clientv3/client.go +++ b/vendor/github.com/coreos/etcd/clientv3/client.go @@ -15,6 +15,7 @@ package clientv3 import ( + "context" "crypto/tls" "errors" "fmt" @@ -27,11 +28,12 @@ import ( "github.com/coreos/etcd/etcdserver/api/v3rpc/rpctypes" - "golang.org/x/net/context" "google.golang.org/grpc" "google.golang.org/grpc/codes" "google.golang.org/grpc/credentials" + "google.golang.org/grpc/keepalive" "google.golang.org/grpc/metadata" + "google.golang.org/grpc/status" ) var ( @@ -51,21 +53,22 @@ type Client struct { conn *grpc.ClientConn dialerrc chan error - cfg Config - creds *credentials.TransportCredentials - balancer *simpleBalancer - retryWrapper retryRpcFunc - retryAuthWrapper retryRpcFunc + cfg Config + creds *credentials.TransportCredentials + balancer *healthBalancer + mu *sync.Mutex ctx context.Context cancel context.CancelFunc - // Username is a username for authentication + // Username is a user name for authentication. Username string - // Password is a password for authentication + // Password is a password for authentication. Password string // tokenCred is an instance of WithPerRPCCredentials()'s argument tokenCred *authTokenCredential + + callOpts []grpc.CallOption } // New creates a new etcdv3 client from a given configuration. @@ -116,8 +119,23 @@ func (c *Client) Endpoints() (eps []string) { // SetEndpoints updates client's endpoints. func (c *Client) SetEndpoints(eps ...string) { + c.mu.Lock() c.cfg.Endpoints = eps - c.balancer.updateAddrs(eps) + c.mu.Unlock() + c.balancer.updateAddrs(eps...) + + // updating notifyCh can trigger new connections, + // need update addrs if all connections are down + // or addrs does not include pinAddr. + c.balancer.mu.RLock() + update := !hasAddr(c.balancer.addrs, c.balancer.pinAddr) + c.balancer.mu.RUnlock() + if update { + select { + case c.balancer.updateAddrsC <- notifyNext: + case <-c.balancer.stopc: + } + } } // Sync synchronizes client's endpoints with the known endpoints from the etcd membership. @@ -144,8 +162,10 @@ func (c *Client) autoSync() { case <-c.ctx.Done(): return case <-time.After(c.cfg.AutoSyncInterval): - ctx, _ := context.WithTimeout(c.ctx, 5*time.Second) - if err := c.Sync(ctx); err != nil && err != c.ctx.Err() { + ctx, cancel := context.WithTimeout(c.ctx, 5*time.Second) + err := c.Sync(ctx) + cancel() + if err != nil && err != c.ctx.Err() { logger.Println("Auto sync endpoints failed:", err) } } @@ -174,7 +194,7 @@ func parseEndpoint(endpoint string) (proto string, host string, scheme string) { host = endpoint url, uerr := url.Parse(endpoint) if uerr != nil || !strings.Contains(endpoint, "://") { - return + return proto, host, scheme } scheme = url.Scheme @@ -188,7 +208,7 @@ func parseEndpoint(endpoint string) (proto string, host string, scheme string) { default: proto, host = "", "" } - return + return proto, host, scheme } func (c *Client) processCreds(scheme string) (creds *credentials.TransportCredentials) { @@ -207,7 +227,7 @@ func (c *Client) processCreds(scheme string) (creds *credentials.TransportCreden default: creds = nil } - return + return creds } // dialSetupOpts gives the dial opts prior to any authentication @@ -215,10 +235,17 @@ func (c *Client) dialSetupOpts(endpoint string, dopts ...grpc.DialOption) (opts if c.cfg.DialTimeout > 0 { opts = []grpc.DialOption{grpc.WithTimeout(c.cfg.DialTimeout)} } + if c.cfg.DialKeepAliveTime > 0 { + params := keepalive.ClientParameters{ + Time: c.cfg.DialKeepAliveTime, + Timeout: c.cfg.DialKeepAliveTimeout, + } + opts = append(opts, grpc.WithKeepaliveParams(params)) + } opts = append(opts, dopts...) f := func(host string, t time.Duration) (net.Conn, error) { - proto, host, _ := parseEndpoint(c.balancer.getEndpoint(host)) + proto, host, _ := parseEndpoint(c.balancer.endpoint(host)) if host == "" && endpoint != "" { // dialing an endpoint not in the balancer; use // endpoint passed into dial @@ -270,7 +297,7 @@ func (c *Client) getToken(ctx context.Context) error { endpoint := c.cfg.Endpoints[i] host := getHost(endpoint) // use dial options without dopts to avoid reusing the client balancer - auth, err = newAuthenticator(host, c.dialSetupOpts(endpoint)) + auth, err = newAuthenticator(host, c.dialSetupOpts(endpoint), c) if err != nil { continue } @@ -311,7 +338,7 @@ func (c *Client) dial(endpoint string, dopts ...grpc.DialOption) (*grpc.ClientCo if err != nil { if toErr(ctx, err) != rpctypes.ErrAuthNotEnabled { if err == ctx.Err() && ctx.Err() != c.ctx.Err() { - err = grpc.ErrClientConnTimeout + err = context.DeadlineExceeded } return nil, err } @@ -333,7 +360,7 @@ func (c *Client) dial(endpoint string, dopts ...grpc.DialOption) (*grpc.ClientCo // when the cluster has a leader. func WithRequireLeader(ctx context.Context) context.Context { md := metadata.Pairs(rpctypes.MetadataRequireLeaderKey, rpctypes.MetadataHasLeader) - return metadata.NewContext(ctx, md) + return metadata.NewOutgoingContext(ctx, md) } func newClient(cfg *Config) (*Client, error) { @@ -360,15 +387,37 @@ func newClient(cfg *Config) (*Client, error) { creds: creds, ctx: ctx, cancel: cancel, + mu: new(sync.Mutex), + callOpts: defaultCallOpts, } if cfg.Username != "" && cfg.Password != "" { client.Username = cfg.Username client.Password = cfg.Password } + if cfg.MaxCallSendMsgSize > 0 || cfg.MaxCallRecvMsgSize > 0 { + if cfg.MaxCallRecvMsgSize > 0 && cfg.MaxCallSendMsgSize > cfg.MaxCallRecvMsgSize { + return nil, fmt.Errorf("gRPC message recv limit (%d bytes) must be greater than send limit (%d bytes)", cfg.MaxCallRecvMsgSize, cfg.MaxCallSendMsgSize) + } + callOpts := []grpc.CallOption{ + defaultFailFast, + defaultMaxCallSendMsgSize, + defaultMaxCallRecvMsgSize, + } + if cfg.MaxCallSendMsgSize > 0 { + callOpts[1] = grpc.MaxCallSendMsgSize(cfg.MaxCallSendMsgSize) + } + if cfg.MaxCallRecvMsgSize > 0 { + callOpts[2] = grpc.MaxCallRecvMsgSize(cfg.MaxCallRecvMsgSize) + } + client.callOpts = callOpts + } + + client.balancer = newHealthBalancer(cfg.Endpoints, cfg.DialTimeout, func(ep string) (bool, error) { + return grpcHealthCheck(client, ep) + }) - client.balancer = newSimpleBalancer(cfg.Endpoints) // use Endpoints[0] so that for https:// without any tls config given, then - // grpc will assume the ServerName is in the endpoint. + // grpc will assume the certificate server name is the endpoint host. conn, err := client.dial(cfg.Endpoints[0], grpc.WithBalancer(client.balancer)) if err != nil { client.cancel() @@ -376,21 +425,19 @@ func newClient(cfg *Config) (*Client, error) { return nil, err } client.conn = conn - client.retryWrapper = client.newRetryWrapper() - client.retryAuthWrapper = client.newAuthRetryWrapper() // wait for a connection if cfg.DialTimeout > 0 { hasConn := false waitc := time.After(cfg.DialTimeout) select { - case <-client.balancer.readyc: + case <-client.balancer.ready(): hasConn = true case <-ctx.Done(): case <-waitc: } if !hasConn { - err := grpc.ErrClientConnTimeout + err := context.DeadlineExceeded select { case err = <-client.dialerrc: default: @@ -425,7 +472,7 @@ func (c *Client) checkVersion() (err error) { errc := make(chan error, len(c.cfg.Endpoints)) ctx, cancel := context.WithCancel(c.ctx) if c.cfg.DialTimeout > 0 { - ctx, _ = context.WithTimeout(ctx, c.cfg.DialTimeout) + ctx, cancel = context.WithTimeout(ctx, c.cfg.DialTimeout) } wg.Add(len(c.cfg.Endpoints)) for _, ep := range c.cfg.Endpoints { @@ -440,7 +487,7 @@ func (c *Client) checkVersion() (err error) { vs := strings.Split(resp.Version, ".") maj, min := 0, 0 if len(vs) >= 2 { - maj, rerr = strconv.Atoi(vs[0]) + maj, _ = strconv.Atoi(vs[0]) min, rerr = strconv.Atoi(vs[1]) } if maj < 3 || (maj == 3 && min < 2) { @@ -472,14 +519,28 @@ func isHaltErr(ctx context.Context, err error) bool { if err == nil { return false } - code := grpc.Code(err) + ev, _ := status.FromError(err) // Unavailable codes mean the system will be right back. // (e.g., can't connect, lost leader) // Treat Internal codes as if something failed, leaving the // system in an inconsistent state, but retrying could make progress. // (e.g., failed in middle of send, corrupted frame) // TODO: are permanent Internal errors possible from grpc? - return code != codes.Unavailable && code != codes.Internal + return ev.Code() != codes.Unavailable && ev.Code() != codes.Internal +} + +// isUnavailableErr returns true if the given error is an unavailable error +func isUnavailableErr(ctx context.Context, err error) bool { + if ctx != nil && ctx.Err() != nil { + return false + } + if err == nil { + return false + } + ev, _ := status.FromError(err) + // Unavailable codes mean the system will be right back. + // (e.g., can't connect, lost leader) + return ev.Code() == codes.Unavailable } func toErr(ctx context.Context, err error) error { @@ -490,7 +551,8 @@ func toErr(ctx context.Context, err error) error { if _, ok := err.(rpctypes.EtcdError); ok { return err } - code := grpc.Code(err) + ev, _ := status.FromError(err) + code := ev.Code() switch code { case codes.DeadlineExceeded: fallthrough @@ -499,7 +561,6 @@ func toErr(ctx context.Context, err error) error { err = ctx.Err() } case codes.Unavailable: - err = ErrNoAvailableEndpoints case codes.FailedPrecondition: err = grpc.ErrClientConnClosing } diff --git a/vendor/github.com/coreos/etcd/clientv3/cluster.go b/vendor/github.com/coreos/etcd/clientv3/cluster.go index 922d900e3..785672be8 100644 --- a/vendor/github.com/coreos/etcd/clientv3/cluster.go +++ b/vendor/github.com/coreos/etcd/clientv3/cluster.go @@ -15,8 +15,11 @@ package clientv3 import ( + "context" + pb "github.com/coreos/etcd/etcdserver/etcdserverpb" - "golang.org/x/net/context" + "github.com/coreos/etcd/pkg/types" + "google.golang.org/grpc" ) @@ -43,20 +46,34 @@ type Cluster interface { } type cluster struct { - remote pb.ClusterClient + remote pb.ClusterClient + callOpts []grpc.CallOption } func NewCluster(c *Client) Cluster { - return &cluster{remote: RetryClusterClient(c)} + api := &cluster{remote: RetryClusterClient(c)} + if c != nil { + api.callOpts = c.callOpts + } + return api } -func NewClusterFromClusterClient(remote pb.ClusterClient) Cluster { - return &cluster{remote: remote} +func NewClusterFromClusterClient(remote pb.ClusterClient, c *Client) Cluster { + api := &cluster{remote: remote} + if c != nil { + api.callOpts = c.callOpts + } + return api } func (c *cluster) MemberAdd(ctx context.Context, peerAddrs []string) (*MemberAddResponse, error) { + // fail-fast before panic in rafthttp + if _, err := types.NewURLs(peerAddrs); err != nil { + return nil, err + } + r := &pb.MemberAddRequest{PeerURLs: peerAddrs} - resp, err := c.remote.MemberAdd(ctx, r) + resp, err := c.remote.MemberAdd(ctx, r, c.callOpts...) if err != nil { return nil, toErr(ctx, err) } @@ -65,7 +82,7 @@ func (c *cluster) MemberAdd(ctx context.Context, peerAddrs []string) (*MemberAdd func (c *cluster) MemberRemove(ctx context.Context, id uint64) (*MemberRemoveResponse, error) { r := &pb.MemberRemoveRequest{ID: id} - resp, err := c.remote.MemberRemove(ctx, r) + resp, err := c.remote.MemberRemove(ctx, r, c.callOpts...) if err != nil { return nil, toErr(ctx, err) } @@ -73,28 +90,25 @@ func (c *cluster) MemberRemove(ctx context.Context, id uint64) (*MemberRemoveRes } func (c *cluster) MemberUpdate(ctx context.Context, id uint64, peerAddrs []string) (*MemberUpdateResponse, error) { - // it is safe to retry on update. - for { - r := &pb.MemberUpdateRequest{ID: id, PeerURLs: peerAddrs} - resp, err := c.remote.MemberUpdate(ctx, r, grpc.FailFast(false)) - if err == nil { - return (*MemberUpdateResponse)(resp), nil - } - if isHaltErr(ctx, err) { - return nil, toErr(ctx, err) - } + // fail-fast before panic in rafthttp + if _, err := types.NewURLs(peerAddrs); err != nil { + return nil, err } + + // it is safe to retry on update. + r := &pb.MemberUpdateRequest{ID: id, PeerURLs: peerAddrs} + resp, err := c.remote.MemberUpdate(ctx, r, c.callOpts...) + if err == nil { + return (*MemberUpdateResponse)(resp), nil + } + return nil, toErr(ctx, err) } func (c *cluster) MemberList(ctx context.Context) (*MemberListResponse, error) { // it is safe to retry on list. - for { - resp, err := c.remote.MemberList(ctx, &pb.MemberListRequest{}, grpc.FailFast(false)) - if err == nil { - return (*MemberListResponse)(resp), nil - } - if isHaltErr(ctx, err) { - return nil, toErr(ctx, err) - } + resp, err := c.remote.MemberList(ctx, &pb.MemberListRequest{}, c.callOpts...) + if err == nil { + return (*MemberListResponse)(resp), nil } + return nil, toErr(ctx, err) } diff --git a/vendor/github.com/coreos/etcd/clientv3/compact_op.go b/vendor/github.com/coreos/etcd/clientv3/compact_op.go index 32d97eb0c..41e80c1da 100644 --- a/vendor/github.com/coreos/etcd/clientv3/compact_op.go +++ b/vendor/github.com/coreos/etcd/clientv3/compact_op.go @@ -44,10 +44,8 @@ func (op CompactOp) toRequest() *pb.CompactionRequest { return &pb.CompactionRequest{Revision: op.revision, Physical: op.physical} } -// WithCompactPhysical makes compact RPC call wait until -// the compaction is physically applied to the local database -// such that compacted entries are totally removed from the -// backend database. +// WithCompactPhysical makes Compact wait until all compacted entries are +// removed from the etcd server's storage. func WithCompactPhysical() CompactOption { return func(op *CompactOp) { op.physical = true } } diff --git a/vendor/github.com/coreos/etcd/clientv3/compare.go b/vendor/github.com/coreos/etcd/clientv3/compare.go index c55228cc0..b5f0a2552 100644 --- a/vendor/github.com/coreos/etcd/clientv3/compare.go +++ b/vendor/github.com/coreos/etcd/clientv3/compare.go @@ -60,6 +60,8 @@ func Compare(cmp Cmp, result string, v interface{}) Cmp { cmp.TargetUnion = &pb.Compare_CreateRevision{CreateRevision: mustInt64(v)} case pb.Compare_MOD: cmp.TargetUnion = &pb.Compare_ModRevision{ModRevision: mustInt64(v)} + case pb.Compare_LEASE: + cmp.TargetUnion = &pb.Compare_Lease{Lease: mustInt64orLeaseID(v)} default: panic("Unknown compare type") } @@ -82,6 +84,12 @@ func ModRevision(key string) Cmp { return Cmp{Key: []byte(key), Target: pb.Compare_MOD} } +// LeaseValue compares a key's LeaseID to a value of your choosing. The empty +// LeaseID is 0, otherwise known as `NoLease`. +func LeaseValue(key string) Cmp { + return Cmp{Key: []byte(key), Target: pb.Compare_LEASE} +} + // KeyBytes returns the byte slice holding with the comparison key. func (cmp *Cmp) KeyBytes() []byte { return cmp.Key } @@ -99,6 +107,19 @@ func (cmp *Cmp) ValueBytes() []byte { // WithValueBytes sets the byte slice for the comparison's value. func (cmp *Cmp) WithValueBytes(v []byte) { cmp.TargetUnion.(*pb.Compare_Value).Value = v } +// WithRange sets the comparison to scan the range [key, end). +func (cmp Cmp) WithRange(end string) Cmp { + cmp.RangeEnd = []byte(end) + return cmp +} + +// WithPrefix sets the comparison to scan all keys prefixed by the key. +func (cmp Cmp) WithPrefix() Cmp { + cmp.RangeEnd = getPrefix(cmp.Key) + return cmp +} + +// mustInt64 panics if val isn't an int or int64. It returns an int64 otherwise. func mustInt64(val interface{}) int64 { if v, ok := val.(int64); ok { return v @@ -108,3 +129,12 @@ func mustInt64(val interface{}) int64 { } panic("bad value") } + +// mustInt64orLeaseID panics if val isn't a LeaseID, int or int64. It returns an +// int64 otherwise. +func mustInt64orLeaseID(val interface{}) int64 { + if v, ok := val.(LeaseID); ok { + return int64(v) + } + return mustInt64(val) +} diff --git a/vendor/github.com/coreos/etcd/clientv3/concurrency/election.go b/vendor/github.com/coreos/etcd/clientv3/concurrency/election.go index 1d75dde3d..e18a0ed4a 100644 --- a/vendor/github.com/coreos/etcd/clientv3/concurrency/election.go +++ b/vendor/github.com/coreos/etcd/clientv3/concurrency/election.go @@ -15,13 +15,13 @@ package concurrency import ( + "context" "errors" "fmt" v3 "github.com/coreos/etcd/clientv3" pb "github.com/coreos/etcd/etcdserver/etcdserverpb" "github.com/coreos/etcd/mvcc/mvccpb" - "golang.org/x/net/context" ) var ( @@ -185,12 +185,12 @@ func (e *Election) observe(ctx context.Context, ch chan<- v3.GetResponse) { cancel() return } - // only accept PUTs; a DELETE will make observe() spin + // only accept puts; a delete will make observe() spin for _, ev := range wr.Events { if ev.Type == mvccpb.PUT { hdr, kv = &wr.Header, ev.Kv // may have multiple revs; hdr.rev = the last rev - // set to kv's rev in case batch has multiple PUTs + // set to kv's rev in case batch has multiple Puts hdr.Revision = kv.ModRevision break } @@ -213,6 +213,7 @@ func (e *Election) observe(ctx context.Context, ch chan<- v3.GetResponse) { for !keyDeleted { wr, ok := <-wch if !ok { + cancel() return } for _, ev := range wr.Events { @@ -225,6 +226,7 @@ func (e *Election) observe(ctx context.Context, ch chan<- v3.GetResponse) { select { case ch <- *resp: case <-cctx.Done(): + cancel() return } } @@ -240,4 +242,4 @@ func (e *Election) Key() string { return e.leaderKey } func (e *Election) Rev() int64 { return e.leaderRev } // Header is the response header from the last successful election proposal. -func (m *Election) Header() *pb.ResponseHeader { return m.hdr } +func (e *Election) Header() *pb.ResponseHeader { return e.hdr } diff --git a/vendor/github.com/coreos/etcd/clientv3/concurrency/key.go b/vendor/github.com/coreos/etcd/clientv3/concurrency/key.go index cf006d70e..4b6e399bd 100644 --- a/vendor/github.com/coreos/etcd/clientv3/concurrency/key.go +++ b/vendor/github.com/coreos/etcd/clientv3/concurrency/key.go @@ -15,12 +15,12 @@ package concurrency import ( + "context" "fmt" v3 "github.com/coreos/etcd/clientv3" pb "github.com/coreos/etcd/etcdserver/etcdserverpb" "github.com/coreos/etcd/mvcc/mvccpb" - "golang.org/x/net/context" ) func waitDelete(ctx context.Context, client *v3.Client, key string, rev int64) error { diff --git a/vendor/github.com/coreos/etcd/clientv3/concurrency/mutex.go b/vendor/github.com/coreos/etcd/clientv3/concurrency/mutex.go index cee15db7b..77b3582cd 100644 --- a/vendor/github.com/coreos/etcd/clientv3/concurrency/mutex.go +++ b/vendor/github.com/coreos/etcd/clientv3/concurrency/mutex.go @@ -15,12 +15,12 @@ package concurrency import ( + "context" "fmt" "sync" v3 "github.com/coreos/etcd/clientv3" pb "github.com/coreos/etcd/etcdserver/etcdserverpb" - "golang.org/x/net/context" ) // Mutex implements the sync Locker interface with etcd @@ -49,7 +49,9 @@ func (m *Mutex) Lock(ctx context.Context) error { put := v3.OpPut(m.myKey, "", v3.WithLease(s.Lease())) // reuse key in case this session already holds the lock get := v3.OpGet(m.myKey) - resp, err := client.Txn(ctx).If(cmp).Then(put).Else(get).Commit() + // fetch current holder to complete uncontended path with only one RPC + getOwner := v3.OpGet(m.pfx, v3.WithFirstCreate()...) + resp, err := client.Txn(ctx).If(cmp).Then(put, getOwner).Else(get, getOwner).Commit() if err != nil { return err } @@ -57,14 +59,19 @@ func (m *Mutex) Lock(ctx context.Context) error { if !resp.Succeeded { m.myRev = resp.Responses[0].GetResponseRange().Kvs[0].CreateRevision } + // if no key on prefix / the minimum rev is key, already hold the lock + ownerKey := resp.Responses[1].GetResponseRange().Kvs + if len(ownerKey) == 0 || ownerKey[0].CreateRevision == m.myRev { + m.hdr = resp.Header + return nil + } // wait for deletion revisions prior to myKey hdr, werr := waitDeletes(ctx, client, m.pfx, m.myRev-1) - // release lock key if cancelled - select { - case <-ctx.Done(): + // release lock key if wait failed + if werr != nil { m.Unlock(client.Ctx()) - default: + } else { m.hdr = hdr } return werr diff --git a/vendor/github.com/coreos/etcd/clientv3/concurrency/session.go b/vendor/github.com/coreos/etcd/clientv3/concurrency/session.go index 0cb5ea7cf..c399d64a6 100644 --- a/vendor/github.com/coreos/etcd/clientv3/concurrency/session.go +++ b/vendor/github.com/coreos/etcd/clientv3/concurrency/session.go @@ -15,10 +15,10 @@ package concurrency import ( + "context" "time" v3 "github.com/coreos/etcd/clientv3" - "golang.org/x/net/context" ) const defaultSessionTTL = 60 @@ -53,6 +53,7 @@ func NewSession(client *v3.Client, opts ...SessionOption) (*Session, error) { ctx, cancel := context.WithCancel(ops.ctx) keepAlive, err := client.KeepAlive(ctx, id) if err != nil || keepAlive == nil { + cancel() return nil, err } diff --git a/vendor/github.com/coreos/etcd/clientv3/concurrency/stm.go b/vendor/github.com/coreos/etcd/clientv3/concurrency/stm.go index 8d0a64bac..d11023ebe 100644 --- a/vendor/github.com/coreos/etcd/clientv3/concurrency/stm.go +++ b/vendor/github.com/coreos/etcd/clientv3/concurrency/stm.go @@ -15,10 +15,10 @@ package concurrency import ( + "context" "math" v3 "github.com/coreos/etcd/clientv3" - "golang.org/x/net/context" ) // STM is an interface for software transactional memory. @@ -46,7 +46,7 @@ const ( // SerializableSnapshot provides serializable isolation and also checks // for write conflicts. SerializableSnapshot Isolation = iota - // Serializable reads within the same transactiona attempt return data + // Serializable reads within the same transaction attempt return data // from the at the revision of the first read. Serializable // RepeatableReads reads within the same transaction attempt always @@ -85,7 +85,7 @@ func WithPrefetch(keys ...string) stmOption { return func(so *stmOptions) { so.prefetch = append(so.prefetch, keys...) } } -// NewSTM initiates a new STM instance, using snapshot isolation by default. +// NewSTM initiates a new STM instance, using serializable snapshot isolation by default. func NewSTM(c *v3.Client, apply func(STM) error, so ...stmOption) (*v3.TxnResponse, error) { opts := &stmOptions{ctx: c.Ctx()} for _, f := range so { diff --git a/vendor/github.com/coreos/etcd/clientv3/config.go b/vendor/github.com/coreos/etcd/clientv3/config.go index dda72a748..79d6e2a98 100644 --- a/vendor/github.com/coreos/etcd/clientv3/config.go +++ b/vendor/github.com/coreos/etcd/clientv3/config.go @@ -15,10 +15,10 @@ package clientv3 import ( + "context" "crypto/tls" "time" - "golang.org/x/net/context" "google.golang.org/grpc" ) @@ -33,10 +33,31 @@ type Config struct { // DialTimeout is the timeout for failing to establish a connection. DialTimeout time.Duration `json:"dial-timeout"` + // DialKeepAliveTime is the time after which client pings the server to see if + // transport is alive. + DialKeepAliveTime time.Duration `json:"dial-keep-alive-time"` + + // DialKeepAliveTimeout is the time that the client waits for a response for the + // keep-alive probe. If the response is not received in this time, the connection is closed. + DialKeepAliveTimeout time.Duration `json:"dial-keep-alive-timeout"` + + // MaxCallSendMsgSize is the client-side request send limit in bytes. + // If 0, it defaults to 2.0 MiB (2 * 1024 * 1024). + // Make sure that "MaxCallSendMsgSize" < server-side default send/recv limit. + // ("--max-request-bytes" flag to etcd or "embed.Config.MaxRequestBytes"). + MaxCallSendMsgSize int + + // MaxCallRecvMsgSize is the client-side response receive limit. + // If 0, it defaults to "math.MaxInt32", because range response can + // easily exceed request send limits. + // Make sure that "MaxCallRecvMsgSize" >= server-side default send/recv limit. + // ("--max-request-bytes" flag to etcd or "embed.Config.MaxRequestBytes"). + MaxCallRecvMsgSize int + // TLS holds the client secure credentials, if any. TLS *tls.Config - // Username is a username for authentication. + // Username is a user name for authentication. Username string `json:"username"` // Password is a password for authentication. diff --git a/vendor/github.com/coreos/etcd/clientv3/doc.go b/vendor/github.com/coreos/etcd/clientv3/doc.go index 470ca4dc4..717fbe435 100644 --- a/vendor/github.com/coreos/etcd/clientv3/doc.go +++ b/vendor/github.com/coreos/etcd/clientv3/doc.go @@ -16,6 +16,22 @@ // // Create client using `clientv3.New`: // +// // expect dial time-out on ipv4 blackhole +// _, err := clientv3.New(clientv3.Config{ +// Endpoints: []string{"http://254.0.0.1:12345"}, +// DialTimeout: 2 * time.Second +// }) +// +// // etcd clientv3 >= v3.2.10, grpc/grpc-go >= v1.7.3 +// if err == context.DeadlineExceeded { +// // handle errors +// } +// +// // etcd clientv3 <= v3.2.9, grpc/grpc-go <= v1.2.1 +// if err == grpc.ErrClientConnTimeout { +// // handle errors +// } +// // cli, err := clientv3.New(clientv3.Config{ // Endpoints: []string{"localhost:2379", "localhost:22379", "localhost:32379"}, // DialTimeout: 5 * time.Second, @@ -28,7 +44,7 @@ // Make sure to close the client after using it. If the client is not closed, the // connection will have leaky goroutines. // -// To specify client request timeout, pass context.WithTimeout to APIs: +// To specify a client request timeout, wrap the context with context.WithTimeout: // // ctx, cancel := context.WithTimeout(context.Background(), timeout) // resp, err := kvc.Put(ctx, "sample_key", "sample_value") @@ -41,10 +57,11 @@ // The Client has internal state (watchers and leases), so Clients should be reused instead of created as needed. // Clients are safe for concurrent use by multiple goroutines. // -// etcd client returns 2 types of errors: +// etcd client returns 3 types of errors: // -// 1. context error: canceled or deadline exceeded. -// 2. gRPC error: see https://github.com/coreos/etcd/blob/master/etcdserver/api/v3rpc/rpctypes/error.go +// 1. context error: canceled or deadline exceeded. +// 2. gRPC status error: e.g. when clock drifts in server-side before client's context deadline exceeded. +// 3. gRPC error: see https://github.com/coreos/etcd/blob/master/etcdserver/api/v3rpc/rpctypes/error.go // // Here is the example code to handle client errors: // @@ -54,6 +71,12 @@ // // ctx is canceled by another routine // } else if err == context.DeadlineExceeded { // // ctx is attached with a deadline and it exceeded +// } else if ev, ok := status.FromError(err); ok { +// code := ev.Code() +// if code == codes.DeadlineExceeded { +// // server-side context might have timed-out first (due to clock skew) +// // while original client-side context is not timed-out yet +// } // } else if verr, ok := err.(*v3rpc.ErrEmptyKey); ok { // // process (verr.Errors) // } else { @@ -61,4 +84,14 @@ // } // } // +// go func() { cli.Close() }() +// _, err := kvc.Get(ctx, "a") +// if err != nil { +// if err == context.Canceled { +// // grpc balancer calls 'Get' with an inflight client.Close +// } else if err == grpc.ErrClientConnClosing { +// // grpc balancer calls 'Get' after client.Close. +// } +// } +// package clientv3 diff --git a/vendor/github.com/coreos/etcd/clientv3/health_balancer.go b/vendor/github.com/coreos/etcd/clientv3/health_balancer.go new file mode 100644 index 000000000..5918cba84 --- /dev/null +++ b/vendor/github.com/coreos/etcd/clientv3/health_balancer.go @@ -0,0 +1,609 @@ +// Copyright 2017 The etcd Authors +// +// 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. + +package clientv3 + +import ( + "context" + "errors" + "net/url" + "strings" + "sync" + "time" + + "google.golang.org/grpc" + "google.golang.org/grpc/codes" + healthpb "google.golang.org/grpc/health/grpc_health_v1" + "google.golang.org/grpc/status" +) + +const ( + minHealthRetryDuration = 3 * time.Second + unknownService = "unknown service grpc.health.v1.Health" +) + +// ErrNoAddrAvilable is returned by Get() when the balancer does not have +// any active connection to endpoints at the time. +// This error is returned only when opts.BlockingWait is true. +var ErrNoAddrAvilable = status.Error(codes.Unavailable, "there is no address available") + +type healthCheckFunc func(ep string) (bool, error) + +type notifyMsg int + +const ( + notifyReset notifyMsg = iota + notifyNext +) + +// healthBalancer does the bare minimum to expose multiple eps +// to the grpc reconnection code path +type healthBalancer struct { + // addrs are the client's endpoint addresses for grpc + addrs []grpc.Address + + // eps holds the raw endpoints from the client + eps []string + + // notifyCh notifies grpc of the set of addresses for connecting + notifyCh chan []grpc.Address + + // readyc closes once the first connection is up + readyc chan struct{} + readyOnce sync.Once + + // healthCheck checks an endpoint's health. + healthCheck healthCheckFunc + healthCheckTimeout time.Duration + + unhealthyMu sync.RWMutex + unhealthyHostPorts map[string]time.Time + + // mu protects all fields below. + mu sync.RWMutex + + // upc closes when pinAddr transitions from empty to non-empty or the balancer closes. + upc chan struct{} + + // downc closes when grpc calls down() on pinAddr + downc chan struct{} + + // stopc is closed to signal updateNotifyLoop should stop. + stopc chan struct{} + stopOnce sync.Once + wg sync.WaitGroup + + // donec closes when all goroutines are exited + donec chan struct{} + + // updateAddrsC notifies updateNotifyLoop to update addrs. + updateAddrsC chan notifyMsg + + // grpc issues TLS cert checks using the string passed into dial so + // that string must be the host. To recover the full scheme://host URL, + // have a map from hosts to the original endpoint. + hostPort2ep map[string]string + + // pinAddr is the currently pinned address; set to the empty string on + // initialization and shutdown. + pinAddr string + + closed bool +} + +func newHealthBalancer(eps []string, timeout time.Duration, hc healthCheckFunc) *healthBalancer { + notifyCh := make(chan []grpc.Address) + addrs := eps2addrs(eps) + hb := &healthBalancer{ + addrs: addrs, + eps: eps, + notifyCh: notifyCh, + readyc: make(chan struct{}), + healthCheck: hc, + unhealthyHostPorts: make(map[string]time.Time), + upc: make(chan struct{}), + stopc: make(chan struct{}), + downc: make(chan struct{}), + donec: make(chan struct{}), + updateAddrsC: make(chan notifyMsg), + hostPort2ep: getHostPort2ep(eps), + } + if timeout < minHealthRetryDuration { + timeout = minHealthRetryDuration + } + hb.healthCheckTimeout = timeout + + close(hb.downc) + go hb.updateNotifyLoop() + hb.wg.Add(1) + go func() { + defer hb.wg.Done() + hb.updateUnhealthy() + }() + return hb +} + +func (b *healthBalancer) Start(target string, config grpc.BalancerConfig) error { return nil } + +func (b *healthBalancer) ConnectNotify() <-chan struct{} { + b.mu.Lock() + defer b.mu.Unlock() + return b.upc +} + +func (b *healthBalancer) ready() <-chan struct{} { return b.readyc } + +func (b *healthBalancer) endpoint(hostPort string) string { + b.mu.RLock() + defer b.mu.RUnlock() + return b.hostPort2ep[hostPort] +} + +func (b *healthBalancer) pinned() string { + b.mu.RLock() + defer b.mu.RUnlock() + return b.pinAddr +} + +func (b *healthBalancer) hostPortError(hostPort string, err error) { + if b.endpoint(hostPort) == "" { + logger.Lvl(4).Infof("clientv3/balancer: %q is stale (skip marking as unhealthy on %q)", hostPort, err.Error()) + return + } + + b.unhealthyMu.Lock() + b.unhealthyHostPorts[hostPort] = time.Now() + b.unhealthyMu.Unlock() + logger.Lvl(4).Infof("clientv3/balancer: %q is marked unhealthy (%q)", hostPort, err.Error()) +} + +func (b *healthBalancer) removeUnhealthy(hostPort, msg string) { + if b.endpoint(hostPort) == "" { + logger.Lvl(4).Infof("clientv3/balancer: %q was not in unhealthy (%q)", hostPort, msg) + return + } + + b.unhealthyMu.Lock() + delete(b.unhealthyHostPorts, hostPort) + b.unhealthyMu.Unlock() + logger.Lvl(4).Infof("clientv3/balancer: %q is removed from unhealthy (%q)", hostPort, msg) +} + +func (b *healthBalancer) countUnhealthy() (count int) { + b.unhealthyMu.RLock() + count = len(b.unhealthyHostPorts) + b.unhealthyMu.RUnlock() + return count +} + +func (b *healthBalancer) isUnhealthy(hostPort string) (unhealthy bool) { + b.unhealthyMu.RLock() + _, unhealthy = b.unhealthyHostPorts[hostPort] + b.unhealthyMu.RUnlock() + return unhealthy +} + +func (b *healthBalancer) cleanupUnhealthy() { + b.unhealthyMu.Lock() + for k, v := range b.unhealthyHostPorts { + if time.Since(v) > b.healthCheckTimeout { + delete(b.unhealthyHostPorts, k) + logger.Lvl(4).Infof("clientv3/balancer: removed %q from unhealthy after %v", k, b.healthCheckTimeout) + } + } + b.unhealthyMu.Unlock() +} + +func (b *healthBalancer) liveAddrs() ([]grpc.Address, map[string]struct{}) { + unhealthyCnt := b.countUnhealthy() + + b.mu.RLock() + defer b.mu.RUnlock() + + hbAddrs := b.addrs + if len(b.addrs) == 1 || unhealthyCnt == 0 || unhealthyCnt == len(b.addrs) { + liveHostPorts := make(map[string]struct{}, len(b.hostPort2ep)) + for k := range b.hostPort2ep { + liveHostPorts[k] = struct{}{} + } + return hbAddrs, liveHostPorts + } + + addrs := make([]grpc.Address, 0, len(b.addrs)-unhealthyCnt) + liveHostPorts := make(map[string]struct{}, len(addrs)) + for _, addr := range b.addrs { + if !b.isUnhealthy(addr.Addr) { + addrs = append(addrs, addr) + liveHostPorts[addr.Addr] = struct{}{} + } + } + return addrs, liveHostPorts +} + +func (b *healthBalancer) updateUnhealthy() { + for { + select { + case <-time.After(b.healthCheckTimeout): + b.cleanupUnhealthy() + pinned := b.pinned() + if pinned == "" || b.isUnhealthy(pinned) { + select { + case b.updateAddrsC <- notifyNext: + case <-b.stopc: + return + } + } + case <-b.stopc: + return + } + } +} + +func (b *healthBalancer) updateAddrs(eps ...string) { + np := getHostPort2ep(eps) + + b.mu.Lock() + defer b.mu.Unlock() + + match := len(np) == len(b.hostPort2ep) + if match { + for k, v := range np { + if b.hostPort2ep[k] != v { + match = false + break + } + } + } + if match { + // same endpoints, so no need to update address + return + } + + b.hostPort2ep = np + b.addrs, b.eps = eps2addrs(eps), eps + + b.unhealthyMu.Lock() + b.unhealthyHostPorts = make(map[string]time.Time) + b.unhealthyMu.Unlock() +} + +func (b *healthBalancer) next() { + b.mu.RLock() + downc := b.downc + b.mu.RUnlock() + select { + case b.updateAddrsC <- notifyNext: + case <-b.stopc: + } + // wait until disconnect so new RPCs are not issued on old connection + select { + case <-downc: + case <-b.stopc: + } +} + +func (b *healthBalancer) updateNotifyLoop() { + defer close(b.donec) + + for { + b.mu.RLock() + upc, downc, addr := b.upc, b.downc, b.pinAddr + b.mu.RUnlock() + // downc or upc should be closed + select { + case <-downc: + downc = nil + default: + } + select { + case <-upc: + upc = nil + default: + } + switch { + case downc == nil && upc == nil: + // stale + select { + case <-b.stopc: + return + default: + } + case downc == nil: + b.notifyAddrs(notifyReset) + select { + case <-upc: + case msg := <-b.updateAddrsC: + b.notifyAddrs(msg) + case <-b.stopc: + return + } + case upc == nil: + select { + // close connections that are not the pinned address + case b.notifyCh <- []grpc.Address{{Addr: addr}}: + case <-downc: + case <-b.stopc: + return + } + select { + case <-downc: + b.notifyAddrs(notifyReset) + case msg := <-b.updateAddrsC: + b.notifyAddrs(msg) + case <-b.stopc: + return + } + } + } +} + +func (b *healthBalancer) notifyAddrs(msg notifyMsg) { + if msg == notifyNext { + select { + case b.notifyCh <- []grpc.Address{}: + case <-b.stopc: + return + } + } + b.mu.RLock() + pinAddr := b.pinAddr + downc := b.downc + b.mu.RUnlock() + addrs, hostPorts := b.liveAddrs() + + var waitDown bool + if pinAddr != "" { + _, ok := hostPorts[pinAddr] + waitDown = !ok + } + + select { + case b.notifyCh <- addrs: + if waitDown { + select { + case <-downc: + case <-b.stopc: + } + } + case <-b.stopc: + } +} + +func (b *healthBalancer) Up(addr grpc.Address) func(error) { + if !b.mayPin(addr) { + return func(err error) {} + } + + b.mu.Lock() + defer b.mu.Unlock() + + // gRPC might call Up after it called Close. We add this check + // to "fix" it up at application layer. Otherwise, will panic + // if b.upc is already closed. + if b.closed { + return func(err error) {} + } + + // gRPC might call Up on a stale address. + // Prevent updating pinAddr with a stale address. + if !hasAddr(b.addrs, addr.Addr) { + return func(err error) {} + } + + if b.pinAddr != "" { + logger.Lvl(4).Infof("clientv3/balancer: %q is up but not pinned (already pinned %q)", addr.Addr, b.pinAddr) + return func(err error) {} + } + + // notify waiting Get()s and pin first connected address + close(b.upc) + b.downc = make(chan struct{}) + b.pinAddr = addr.Addr + logger.Lvl(4).Infof("clientv3/balancer: pin %q", addr.Addr) + + // notify client that a connection is up + b.readyOnce.Do(func() { close(b.readyc) }) + + return func(err error) { + // If connected to a black hole endpoint or a killed server, the gRPC ping + // timeout will induce a network I/O error, and retrying until success; + // finding healthy endpoint on retry could take several timeouts and redials. + // To avoid wasting retries, gray-list unhealthy endpoints. + b.hostPortError(addr.Addr, err) + + b.mu.Lock() + b.upc = make(chan struct{}) + close(b.downc) + b.pinAddr = "" + b.mu.Unlock() + logger.Lvl(4).Infof("clientv3/balancer: unpin %q (%q)", addr.Addr, err.Error()) + } +} + +func (b *healthBalancer) mayPin(addr grpc.Address) bool { + if b.endpoint(addr.Addr) == "" { // stale host:port + return false + } + + b.unhealthyMu.RLock() + unhealthyCnt := len(b.unhealthyHostPorts) + failedTime, bad := b.unhealthyHostPorts[addr.Addr] + b.unhealthyMu.RUnlock() + + b.mu.RLock() + skip := len(b.addrs) == 1 || unhealthyCnt == 0 || len(b.addrs) == unhealthyCnt + b.mu.RUnlock() + if skip || !bad { + return true + } + + // prevent isolated member's endpoint from being infinitely retried, as follows: + // 1. keepalive pings detects GoAway with http2.ErrCodeEnhanceYourCalm + // 2. balancer 'Up' unpins with grpc: failed with network I/O error + // 3. grpc-healthcheck still SERVING, thus retry to pin + // instead, return before grpc-healthcheck if failed within healthcheck timeout + if elapsed := time.Since(failedTime); elapsed < b.healthCheckTimeout { + logger.Lvl(4).Infof("clientv3/balancer: %q is up but not pinned (failed %v ago, require minimum %v after failure)", addr.Addr, elapsed, b.healthCheckTimeout) + return false + } + + if ok, _ := b.healthCheck(addr.Addr); ok { + b.removeUnhealthy(addr.Addr, "health check success") + return true + } + + b.hostPortError(addr.Addr, errors.New("health check failed")) + return false +} + +func (b *healthBalancer) Get(ctx context.Context, opts grpc.BalancerGetOptions) (grpc.Address, func(), error) { + var ( + addr string + closed bool + ) + + // If opts.BlockingWait is false (for fail-fast RPCs), it should return + // an address it has notified via Notify immediately instead of blocking. + if !opts.BlockingWait { + b.mu.RLock() + closed = b.closed + addr = b.pinAddr + b.mu.RUnlock() + if closed { + return grpc.Address{Addr: ""}, nil, grpc.ErrClientConnClosing + } + if addr == "" { + return grpc.Address{Addr: ""}, nil, ErrNoAddrAvilable + } + return grpc.Address{Addr: addr}, func() {}, nil + } + + for { + b.mu.RLock() + ch := b.upc + b.mu.RUnlock() + select { + case <-ch: + case <-b.donec: + return grpc.Address{Addr: ""}, nil, grpc.ErrClientConnClosing + case <-ctx.Done(): + return grpc.Address{Addr: ""}, nil, ctx.Err() + } + b.mu.RLock() + closed = b.closed + addr = b.pinAddr + b.mu.RUnlock() + // Close() which sets b.closed = true can be called before Get(), Get() must exit if balancer is closed. + if closed { + return grpc.Address{Addr: ""}, nil, grpc.ErrClientConnClosing + } + if addr != "" { + break + } + } + return grpc.Address{Addr: addr}, func() {}, nil +} + +func (b *healthBalancer) Notify() <-chan []grpc.Address { return b.notifyCh } + +func (b *healthBalancer) Close() error { + b.mu.Lock() + // In case gRPC calls close twice. TODO: remove the checking + // when we are sure that gRPC wont call close twice. + if b.closed { + b.mu.Unlock() + <-b.donec + return nil + } + b.closed = true + b.stopOnce.Do(func() { close(b.stopc) }) + b.pinAddr = "" + + // In the case of following scenario: + // 1. upc is not closed; no pinned address + // 2. client issues an RPC, calling invoke(), which calls Get(), enters for loop, blocks + // 3. client.conn.Close() calls balancer.Close(); closed = true + // 4. for loop in Get() never exits since ctx is the context passed in by the client and may not be canceled + // we must close upc so Get() exits from blocking on upc + select { + case <-b.upc: + default: + // terminate all waiting Get()s + close(b.upc) + } + + b.mu.Unlock() + b.wg.Wait() + + // wait for updateNotifyLoop to finish + <-b.donec + close(b.notifyCh) + + return nil +} + +func grpcHealthCheck(client *Client, ep string) (bool, error) { + conn, err := client.dial(ep) + if err != nil { + return false, err + } + defer conn.Close() + cli := healthpb.NewHealthClient(conn) + ctx, cancel := context.WithTimeout(context.Background(), time.Second) + resp, err := cli.Check(ctx, &healthpb.HealthCheckRequest{}) + cancel() + if err != nil { + if s, ok := status.FromError(err); ok && s.Code() == codes.Unavailable { + if s.Message() == unknownService { // etcd < v3.3.0 + return true, nil + } + } + return false, err + } + return resp.Status == healthpb.HealthCheckResponse_SERVING, nil +} + +func hasAddr(addrs []grpc.Address, targetAddr string) bool { + for _, addr := range addrs { + if targetAddr == addr.Addr { + return true + } + } + return false +} + +func getHost(ep string) string { + url, uerr := url.Parse(ep) + if uerr != nil || !strings.Contains(ep, "://") { + return ep + } + return url.Host +} + +func eps2addrs(eps []string) []grpc.Address { + addrs := make([]grpc.Address, len(eps)) + for i := range eps { + addrs[i].Addr = getHost(eps[i]) + } + return addrs +} + +func getHostPort2ep(eps []string) map[string]string { + hm := make(map[string]string, len(eps)) + for i := range eps { + _, host, _ := parseEndpoint(eps[i]) + hm[host] = eps[i] + } + return hm +} diff --git a/vendor/github.com/coreos/etcd/clientv3/kv.go b/vendor/github.com/coreos/etcd/clientv3/kv.go index dc45fa4ad..5a7469bd4 100644 --- a/vendor/github.com/coreos/etcd/clientv3/kv.go +++ b/vendor/github.com/coreos/etcd/clientv3/kv.go @@ -15,8 +15,10 @@ package clientv3 import ( + "context" + pb "github.com/coreos/etcd/etcdserver/etcdserverpb" - "golang.org/x/net/context" + "google.golang.org/grpc" ) @@ -66,22 +68,46 @@ type OpResponse struct { put *PutResponse get *GetResponse del *DeleteResponse + txn *TxnResponse } func (op OpResponse) Put() *PutResponse { return op.put } func (op OpResponse) Get() *GetResponse { return op.get } func (op OpResponse) Del() *DeleteResponse { return op.del } +func (op OpResponse) Txn() *TxnResponse { return op.txn } + +func (resp *PutResponse) OpResponse() OpResponse { + return OpResponse{put: resp} +} +func (resp *GetResponse) OpResponse() OpResponse { + return OpResponse{get: resp} +} +func (resp *DeleteResponse) OpResponse() OpResponse { + return OpResponse{del: resp} +} +func (resp *TxnResponse) OpResponse() OpResponse { + return OpResponse{txn: resp} +} type kv struct { - remote pb.KVClient + remote pb.KVClient + callOpts []grpc.CallOption } func NewKV(c *Client) KV { - return &kv{remote: RetryKVClient(c)} + api := &kv{remote: RetryKVClient(c)} + if c != nil { + api.callOpts = c.callOpts + } + return api } -func NewKVFromKVClient(remote pb.KVClient) KV { - return &kv{remote: remote} +func NewKVFromKVClient(remote pb.KVClient, c *Client) KV { + api := &kv{remote: remote} + if c != nil { + api.callOpts = c.callOpts + } + return api } func (kv *kv) Put(ctx context.Context, key, val string, opts ...OpOption) (*PutResponse, error) { @@ -100,7 +126,7 @@ func (kv *kv) Delete(ctx context.Context, key string, opts ...OpOption) (*Delete } func (kv *kv) Compact(ctx context.Context, rev int64, opts ...CompactOption) (*CompactResponse, error) { - resp, err := kv.remote.Compact(ctx, OpCompact(rev, opts...).toRequest()) + resp, err := kv.remote.Compact(ctx, OpCompact(rev, opts...).toRequest(), kv.callOpts...) if err != nil { return nil, toErr(ctx, err) } @@ -109,54 +135,43 @@ func (kv *kv) Compact(ctx context.Context, rev int64, opts ...CompactOption) (*C func (kv *kv) Txn(ctx context.Context) Txn { return &txn{ - kv: kv, - ctx: ctx, + kv: kv, + ctx: ctx, + callOpts: kv.callOpts, } } func (kv *kv) Do(ctx context.Context, op Op) (OpResponse, error) { - for { - resp, err := kv.do(ctx, op) - if err == nil { - return resp, nil - } - - if isHaltErr(ctx, err) { - return resp, toErr(ctx, err) - } - // do not retry on modifications - if op.isWrite() { - return resp, toErr(ctx, err) - } - } -} - -func (kv *kv) do(ctx context.Context, op Op) (OpResponse, error) { var err error switch op.t { - // TODO: handle other ops case tRange: var resp *pb.RangeResponse - resp, err = kv.remote.Range(ctx, op.toRangeRequest(), grpc.FailFast(false)) + resp, err = kv.remote.Range(ctx, op.toRangeRequest(), kv.callOpts...) if err == nil { return OpResponse{get: (*GetResponse)(resp)}, nil } case tPut: var resp *pb.PutResponse r := &pb.PutRequest{Key: op.key, Value: op.val, Lease: int64(op.leaseID), PrevKv: op.prevKV, IgnoreValue: op.ignoreValue, IgnoreLease: op.ignoreLease} - resp, err = kv.remote.Put(ctx, r) + resp, err = kv.remote.Put(ctx, r, kv.callOpts...) if err == nil { return OpResponse{put: (*PutResponse)(resp)}, nil } case tDeleteRange: var resp *pb.DeleteRangeResponse r := &pb.DeleteRangeRequest{Key: op.key, RangeEnd: op.end, PrevKv: op.prevKV} - resp, err = kv.remote.DeleteRange(ctx, r) + resp, err = kv.remote.DeleteRange(ctx, r, kv.callOpts...) if err == nil { return OpResponse{del: (*DeleteResponse)(resp)}, nil } + case tTxn: + var resp *pb.TxnResponse + resp, err = kv.remote.Txn(ctx, op.toTxnRequest(), kv.callOpts...) + if err == nil { + return OpResponse{txn: (*TxnResponse)(resp)}, nil + } default: panic("Unknown op") } - return OpResponse{}, err + return OpResponse{}, toErr(ctx, err) } diff --git a/vendor/github.com/coreos/etcd/clientv3/lease.go b/vendor/github.com/coreos/etcd/clientv3/lease.go index 6e7ea1f82..3729cf37b 100644 --- a/vendor/github.com/coreos/etcd/clientv3/lease.go +++ b/vendor/github.com/coreos/etcd/clientv3/lease.go @@ -15,12 +15,13 @@ package clientv3 import ( + "context" "sync" "time" "github.com/coreos/etcd/etcdserver/api/v3rpc/rpctypes" pb "github.com/coreos/etcd/etcdserver/etcdserverpb" - "golang.org/x/net/context" + "google.golang.org/grpc" "google.golang.org/grpc/metadata" ) @@ -30,7 +31,7 @@ type ( LeaseID int64 ) -// LeaseGrantResponse is used to convert the protobuf grant response. +// LeaseGrantResponse wraps the protobuf message LeaseGrantResponse. type LeaseGrantResponse struct { *pb.ResponseHeader ID LeaseID @@ -38,19 +39,19 @@ type LeaseGrantResponse struct { Error string } -// LeaseKeepAliveResponse is used to convert the protobuf keepalive response. +// LeaseKeepAliveResponse wraps the protobuf message LeaseKeepAliveResponse. type LeaseKeepAliveResponse struct { *pb.ResponseHeader ID LeaseID TTL int64 } -// LeaseTimeToLiveResponse is used to convert the protobuf lease timetolive response. +// LeaseTimeToLiveResponse wraps the protobuf message LeaseTimeToLiveResponse. type LeaseTimeToLiveResponse struct { *pb.ResponseHeader ID LeaseID `json:"id"` - // TTL is the remaining TTL in seconds for the lease; the lease will expire in under TTL+1 seconds. + // TTL is the remaining TTL in seconds for the lease; the lease will expire in under TTL+1 seconds. Expired lease will return -1. TTL int64 `json:"ttl"` // GrantedTTL is the initial granted time in seconds upon lease creation/renewal. @@ -60,12 +61,22 @@ type LeaseTimeToLiveResponse struct { Keys [][]byte `json:"keys"` } +// LeaseStatus represents a lease status. +type LeaseStatus struct { + ID LeaseID `json:"id"` + // TODO: TTL int64 +} + +// LeaseLeasesResponse wraps the protobuf message LeaseLeasesResponse. +type LeaseLeasesResponse struct { + *pb.ResponseHeader + Leases []LeaseStatus `json:"leases"` +} + const ( // defaultTTL is the assumed lease TTL used for the first keepalive // deadline before the actual TTL is known to the client. defaultTTL = 5 * time.Second - // a small buffer to store unsent lease responses. - leaseResponseChSize = 16 // NoLease is a lease ID for the absence of a lease. NoLease LeaseID = 0 @@ -73,6 +84,11 @@ const ( retryConnWait = 500 * time.Millisecond ) +// LeaseResponseChSize is the size of buffer to store unsent lease responses. +// WARNING: DO NOT UPDATE. +// Only for testing purposes. +var LeaseResponseChSize = 16 + // ErrKeepAliveHalted is returned if client keep alive loop halts with an unexpected error. // // This usually means that automatic lease renewal via KeepAlive is broken, but KeepAliveOnce will still work as expected. @@ -98,11 +114,32 @@ type Lease interface { // TimeToLive retrieves the lease information of the given lease ID. TimeToLive(ctx context.Context, id LeaseID, opts ...LeaseOption) (*LeaseTimeToLiveResponse, error) - // KeepAlive keeps the given lease alive forever. + // Leases retrieves all leases. + Leases(ctx context.Context) (*LeaseLeasesResponse, error) + + // KeepAlive keeps the given lease alive forever. If the keepalive response + // posted to the channel is not consumed immediately, the lease client will + // continue sending keep alive requests to the etcd server at least every + // second until latest response is consumed. + // + // The returned "LeaseKeepAliveResponse" channel closes if underlying keep + // alive stream is interrupted in some way the client cannot handle itself; + // given context "ctx" is canceled or timed out. "LeaseKeepAliveResponse" + // from this closed channel is nil. + // + // If client keep alive loop halts with an unexpected error (e.g. "etcdserver: + // no leader") or canceled by the caller (e.g. context.Canceled), the error + // is returned. Otherwise, it retries. + // + // TODO(v4.0): post errors to last keep alive message before closing + // (see https://github.com/coreos/etcd/pull/7866) KeepAlive(ctx context.Context, id LeaseID) (<-chan *LeaseKeepAliveResponse, error) - // KeepAliveOnce renews the lease once. In most of the cases, Keepalive - // should be used instead of KeepAliveOnce. + // KeepAliveOnce renews the lease once. The response corresponds to the + // first message from calling KeepAlive. If the response has a recoverable + // error, KeepAliveOnce will retry the RPC with a new keep alive message. + // + // In most of the cases, Keepalive should be used instead of KeepAliveOnce. KeepAliveOnce(ctx context.Context, id LeaseID) (*LeaseKeepAliveResponse, error) // Close releases all resources Lease keeps for efficient communication @@ -133,6 +170,8 @@ type lessor struct { // firstKeepAliveOnce ensures stream starts after first KeepAlive call. firstKeepAliveOnce sync.Once + + callOpts []grpc.CallOption } // keepAlive multiplexes a keepalive for a lease over multiple channels @@ -148,10 +187,10 @@ type keepAlive struct { } func NewLease(c *Client) Lease { - return NewLeaseFromLeaseClient(RetryLeaseClient(c), c.cfg.DialTimeout+time.Second) + return NewLeaseFromLeaseClient(RetryLeaseClient(c), c, c.cfg.DialTimeout+time.Second) } -func NewLeaseFromLeaseClient(remote pb.LeaseClient, keepAliveTimeout time.Duration) Lease { +func NewLeaseFromLeaseClient(remote pb.LeaseClient, c *Client, keepAliveTimeout time.Duration) Lease { l := &lessor{ donec: make(chan struct{}), keepAlives: make(map[LeaseID]*keepAlive), @@ -161,66 +200,68 @@ func NewLeaseFromLeaseClient(remote pb.LeaseClient, keepAliveTimeout time.Durati if l.firstKeepAliveTimeout == time.Second { l.firstKeepAliveTimeout = defaultTTL } + if c != nil { + l.callOpts = c.callOpts + } reqLeaderCtx := WithRequireLeader(context.Background()) l.stopCtx, l.stopCancel = context.WithCancel(reqLeaderCtx) return l } func (l *lessor) Grant(ctx context.Context, ttl int64) (*LeaseGrantResponse, error) { - for { - r := &pb.LeaseGrantRequest{TTL: ttl} - resp, err := l.remote.LeaseGrant(ctx, r) - if err == nil { - gresp := &LeaseGrantResponse{ - ResponseHeader: resp.GetHeader(), - ID: LeaseID(resp.ID), - TTL: resp.TTL, - Error: resp.Error, - } - return gresp, nil - } - if isHaltErr(ctx, err) { - return nil, toErr(ctx, err) + r := &pb.LeaseGrantRequest{TTL: ttl} + resp, err := l.remote.LeaseGrant(ctx, r, l.callOpts...) + if err == nil { + gresp := &LeaseGrantResponse{ + ResponseHeader: resp.GetHeader(), + ID: LeaseID(resp.ID), + TTL: resp.TTL, + Error: resp.Error, } + return gresp, nil } + return nil, toErr(ctx, err) } func (l *lessor) Revoke(ctx context.Context, id LeaseID) (*LeaseRevokeResponse, error) { - for { - r := &pb.LeaseRevokeRequest{ID: int64(id)} - resp, err := l.remote.LeaseRevoke(ctx, r) - - if err == nil { - return (*LeaseRevokeResponse)(resp), nil - } - if isHaltErr(ctx, err) { - return nil, toErr(ctx, err) - } + r := &pb.LeaseRevokeRequest{ID: int64(id)} + resp, err := l.remote.LeaseRevoke(ctx, r, l.callOpts...) + if err == nil { + return (*LeaseRevokeResponse)(resp), nil } + return nil, toErr(ctx, err) } func (l *lessor) TimeToLive(ctx context.Context, id LeaseID, opts ...LeaseOption) (*LeaseTimeToLiveResponse, error) { - for { - r := toLeaseTimeToLiveRequest(id, opts...) - resp, err := l.remote.LeaseTimeToLive(ctx, r, grpc.FailFast(false)) - if err == nil { - gresp := &LeaseTimeToLiveResponse{ - ResponseHeader: resp.GetHeader(), - ID: LeaseID(resp.ID), - TTL: resp.TTL, - GrantedTTL: resp.GrantedTTL, - Keys: resp.Keys, - } - return gresp, nil - } - if isHaltErr(ctx, err) { - return nil, toErr(ctx, err) + r := toLeaseTimeToLiveRequest(id, opts...) + resp, err := l.remote.LeaseTimeToLive(ctx, r, l.callOpts...) + if err == nil { + gresp := &LeaseTimeToLiveResponse{ + ResponseHeader: resp.GetHeader(), + ID: LeaseID(resp.ID), + TTL: resp.TTL, + GrantedTTL: resp.GrantedTTL, + Keys: resp.Keys, } + return gresp, nil } + return nil, toErr(ctx, err) +} + +func (l *lessor) Leases(ctx context.Context) (*LeaseLeasesResponse, error) { + resp, err := l.remote.LeaseLeases(ctx, &pb.LeaseLeasesRequest{}, l.callOpts...) + if err == nil { + leases := make([]LeaseStatus, len(resp.Leases)) + for i := range resp.Leases { + leases[i] = LeaseStatus{ID: LeaseID(resp.Leases[i].ID)} + } + return &LeaseLeasesResponse{ResponseHeader: resp.GetHeader(), Leases: leases}, nil + } + return nil, toErr(ctx, err) } func (l *lessor) KeepAlive(ctx context.Context, id LeaseID) (<-chan *LeaseKeepAliveResponse, error) { - ch := make(chan *LeaseKeepAliveResponse, leaseResponseChSize) + ch := make(chan *LeaseKeepAliveResponse, LeaseResponseChSize) l.mu.Lock() // ensure that recvKeepAliveLoop is still running @@ -314,7 +355,7 @@ func (l *lessor) keepAliveCtxCloser(id LeaseID, ctx context.Context, donec <-cha } } -// closeRequireLeader scans all keep alives for ctxs that have require leader +// closeRequireLeader scans keepAlives for ctxs that have require leader // and closes the associated channels. func (l *lessor) closeRequireLeader() { l.mu.Lock() @@ -323,7 +364,7 @@ func (l *lessor) closeRequireLeader() { reqIdxs := 0 // find all required leader channels, close, mark as nil for i, ctx := range ka.ctxs { - md, ok := metadata.FromContext(ctx) + md, ok := metadata.FromOutgoingContext(ctx) if !ok { continue } @@ -357,7 +398,7 @@ func (l *lessor) keepAliveOnce(ctx context.Context, id LeaseID) (*LeaseKeepAlive cctx, cancel := context.WithCancel(ctx) defer cancel() - stream, err := l.remote.LeaseKeepAlive(cctx, grpc.FailFast(false)) + stream, err := l.remote.LeaseKeepAlive(cctx, l.callOpts...) if err != nil { return nil, toErr(ctx, err) } @@ -386,7 +427,7 @@ func (l *lessor) recvKeepAliveLoop() (gerr error) { close(l.donec) l.loopErr = gerr for _, ka := range l.keepAlives { - ka.Close() + ka.close() } l.keepAlives = make(map[LeaseID]*keepAlive) l.mu.Unlock() @@ -401,7 +442,6 @@ func (l *lessor) recvKeepAliveLoop() (gerr error) { } else { for { resp, err := stream.Recv() - if err != nil { if canceledByCaller(l.stopCtx, err) { return err @@ -426,10 +466,10 @@ func (l *lessor) recvKeepAliveLoop() (gerr error) { } } -// resetRecv opens a new lease stream and starts sending LeaseKeepAliveRequests +// resetRecv opens a new lease stream and starts sending keep alive requests. func (l *lessor) resetRecv() (pb.Lease_LeaseKeepAliveClient, error) { sctx, cancel := context.WithCancel(l.stopCtx) - stream, err := l.remote.LeaseKeepAlive(sctx, grpc.FailFast(false)) + stream, err := l.remote.LeaseKeepAlive(sctx, l.callOpts...) if err != nil { cancel() return nil, err @@ -467,7 +507,7 @@ func (l *lessor) recvKeepAlive(resp *pb.LeaseKeepAliveResponse) { if karesp.TTL <= 0 { // lease expired; close all keep alive channels delete(l.keepAlives, karesp.ID) - ka.Close() + ka.close() return } @@ -477,9 +517,10 @@ func (l *lessor) recvKeepAlive(resp *pb.LeaseKeepAliveResponse) { for _, ch := range ka.chs { select { case ch <- karesp: - ka.nextKeepAlive = nextKeepAlive default: } + // still advance in order to rate-limit keep-alive sends + ka.nextKeepAlive = nextKeepAlive } } @@ -497,7 +538,7 @@ func (l *lessor) deadlineLoop() { for id, ka := range l.keepAlives { if ka.deadline.Before(now) { // waited too long for response; lease may be expired - ka.Close() + ka.close() delete(l.keepAlives, id) } } @@ -505,7 +546,7 @@ func (l *lessor) deadlineLoop() { } } -// sendKeepAliveLoop sends LeaseKeepAliveRequests for the lifetime of a lease stream +// sendKeepAliveLoop sends keep alive requests for the lifetime of the given stream. func (l *lessor) sendKeepAliveLoop(stream pb.Lease_LeaseKeepAliveClient) { for { var tosend []LeaseID @@ -539,7 +580,7 @@ func (l *lessor) sendKeepAliveLoop(stream pb.Lease_LeaseKeepAliveClient) { } } -func (ka *keepAlive) Close() { +func (ka *keepAlive) close() { close(ka.donec) for _, ch := range ka.chs { close(ch) diff --git a/vendor/github.com/coreos/etcd/clientv3/logger.go b/vendor/github.com/coreos/etcd/clientv3/logger.go index 519db45d8..782e31313 100644 --- a/vendor/github.com/coreos/etcd/clientv3/logger.go +++ b/vendor/github.com/coreos/etcd/clientv3/logger.go @@ -16,67 +16,120 @@ package clientv3 import ( "io/ioutil" - "log" "sync" "google.golang.org/grpc/grpclog" ) // Logger is the logger used by client library. -// It implements grpclog.Logger interface. -type Logger grpclog.Logger +// It implements grpclog.LoggerV2 interface. +type Logger interface { + grpclog.LoggerV2 + + // Lvl returns logger if logger's verbosity level >= "lvl". + // Otherwise, logger that discards all logs. + Lvl(lvl int) Logger + + // to satisfy capnslog + + Print(args ...interface{}) + Printf(format string, args ...interface{}) + Println(args ...interface{}) +} var ( - logger settableLogger + loggerMu sync.RWMutex + logger Logger ) type settableLogger struct { - l grpclog.Logger + l grpclog.LoggerV2 mu sync.RWMutex } func init() { // disable client side logs by default - logger.mu.Lock() - logger.l = log.New(ioutil.Discard, "", 0) - - // logger has to override the grpclog at initialization so that - // any changes to the grpclog go through logger with locking - // instead of through SetLogger - // - // now updates only happen through settableLogger.set - grpclog.SetLogger(&logger) - logger.mu.Unlock() + logger = &settableLogger{} + SetLogger(grpclog.NewLoggerV2(ioutil.Discard, ioutil.Discard, ioutil.Discard)) } -// SetLogger sets client-side Logger. By default, logs are disabled. -func SetLogger(l Logger) { - logger.set(l) +// SetLogger sets client-side Logger. +func SetLogger(l grpclog.LoggerV2) { + loggerMu.Lock() + logger = NewLogger(l) + // override grpclog so that any changes happen with locking + grpclog.SetLoggerV2(logger) + loggerMu.Unlock() } // GetLogger returns the current logger. func GetLogger() Logger { - return logger.get() + loggerMu.RLock() + l := logger + loggerMu.RUnlock() + return l } -func (s *settableLogger) set(l Logger) { - s.mu.Lock() - logger.l = l - s.mu.Unlock() +// NewLogger returns a new Logger with grpclog.LoggerV2. +func NewLogger(gl grpclog.LoggerV2) Logger { + return &settableLogger{l: gl} } -func (s *settableLogger) get() Logger { +func (s *settableLogger) get() grpclog.LoggerV2 { s.mu.RLock() - l := logger.l + l := s.l s.mu.RUnlock() return l } -// implement the grpclog.Logger interface +// implement the grpclog.LoggerV2 interface +func (s *settableLogger) Info(args ...interface{}) { s.get().Info(args...) } +func (s *settableLogger) Infof(format string, args ...interface{}) { s.get().Infof(format, args...) } +func (s *settableLogger) Infoln(args ...interface{}) { s.get().Infoln(args...) } +func (s *settableLogger) Warning(args ...interface{}) { s.get().Warning(args...) } +func (s *settableLogger) Warningf(format string, args ...interface{}) { + s.get().Warningf(format, args...) +} +func (s *settableLogger) Warningln(args ...interface{}) { s.get().Warningln(args...) } +func (s *settableLogger) Error(args ...interface{}) { s.get().Error(args...) } +func (s *settableLogger) Errorf(format string, args ...interface{}) { + s.get().Errorf(format, args...) +} +func (s *settableLogger) Errorln(args ...interface{}) { s.get().Errorln(args...) } func (s *settableLogger) Fatal(args ...interface{}) { s.get().Fatal(args...) } func (s *settableLogger) Fatalf(format string, args ...interface{}) { s.get().Fatalf(format, args...) } func (s *settableLogger) Fatalln(args ...interface{}) { s.get().Fatalln(args...) } -func (s *settableLogger) Print(args ...interface{}) { s.get().Print(args...) } -func (s *settableLogger) Printf(format string, args ...interface{}) { s.get().Printf(format, args...) } -func (s *settableLogger) Println(args ...interface{}) { s.get().Println(args...) } +func (s *settableLogger) Print(args ...interface{}) { s.get().Info(args...) } +func (s *settableLogger) Printf(format string, args ...interface{}) { s.get().Infof(format, args...) } +func (s *settableLogger) Println(args ...interface{}) { s.get().Infoln(args...) } +func (s *settableLogger) V(l int) bool { return s.get().V(l) } +func (s *settableLogger) Lvl(lvl int) Logger { + s.mu.RLock() + l := s.l + s.mu.RUnlock() + if l.V(lvl) { + return s + } + return &noLogger{} +} + +type noLogger struct{} + +func (*noLogger) Info(args ...interface{}) {} +func (*noLogger) Infof(format string, args ...interface{}) {} +func (*noLogger) Infoln(args ...interface{}) {} +func (*noLogger) Warning(args ...interface{}) {} +func (*noLogger) Warningf(format string, args ...interface{}) {} +func (*noLogger) Warningln(args ...interface{}) {} +func (*noLogger) Error(args ...interface{}) {} +func (*noLogger) Errorf(format string, args ...interface{}) {} +func (*noLogger) Errorln(args ...interface{}) {} +func (*noLogger) Fatal(args ...interface{}) {} +func (*noLogger) Fatalf(format string, args ...interface{}) {} +func (*noLogger) Fatalln(args ...interface{}) {} +func (*noLogger) Print(args ...interface{}) {} +func (*noLogger) Printf(format string, args ...interface{}) {} +func (*noLogger) Println(args ...interface{}) {} +func (*noLogger) V(l int) bool { return false } +func (ng *noLogger) Lvl(lvl int) Logger { return ng } diff --git a/vendor/github.com/coreos/etcd/clientv3/maintenance.go b/vendor/github.com/coreos/etcd/clientv3/maintenance.go index 2a75b7e9c..f60cfbe47 100644 --- a/vendor/github.com/coreos/etcd/clientv3/maintenance.go +++ b/vendor/github.com/coreos/etcd/clientv3/maintenance.go @@ -15,11 +15,11 @@ package clientv3 import ( + "context" "io" pb "github.com/coreos/etcd/etcdserver/etcdserverpb" - "golang.org/x/net/context" "google.golang.org/grpc" ) @@ -28,6 +28,8 @@ type ( AlarmResponse pb.AlarmResponse AlarmMember pb.AlarmMember StatusResponse pb.StatusResponse + HashKVResponse pb.HashKVResponse + MoveLeaderResponse pb.MoveLeaderResponse ) type Maintenance interface { @@ -37,7 +39,7 @@ type Maintenance interface { // AlarmDisarm disarms a given alarm. AlarmDisarm(ctx context.Context, m *AlarmMember) (*AlarmResponse, error) - // Defragment defragments storage backend of the etcd member with given endpoint. + // Defragment releases wasted space from internal fragmentation on a given etcd member. // Defragment is only needed when deleting a large number of keys and want to reclaim // the resources. // Defragment is an expensive operation. User should avoid defragmenting multiple members @@ -49,36 +51,54 @@ type Maintenance interface { // Status gets the status of the endpoint. Status(ctx context.Context, endpoint string) (*StatusResponse, error) - // Snapshot provides a reader for a snapshot of a backend. + // HashKV returns a hash of the KV state at the time of the RPC. + // If revision is zero, the hash is computed on all keys. If the revision + // is non-zero, the hash is computed on all keys at or below the given revision. + HashKV(ctx context.Context, endpoint string, rev int64) (*HashKVResponse, error) + + // Snapshot provides a reader for a point-in-time snapshot of etcd. Snapshot(ctx context.Context) (io.ReadCloser, error) + + // MoveLeader requests current leader to transfer its leadership to the transferee. + // Request must be made to the leader. + MoveLeader(ctx context.Context, transfereeID uint64) (*MoveLeaderResponse, error) } type maintenance struct { - dial func(endpoint string) (pb.MaintenanceClient, func(), error) - remote pb.MaintenanceClient + dial func(endpoint string) (pb.MaintenanceClient, func(), error) + remote pb.MaintenanceClient + callOpts []grpc.CallOption } func NewMaintenance(c *Client) Maintenance { - return &maintenance{ + api := &maintenance{ dial: func(endpoint string) (pb.MaintenanceClient, func(), error) { conn, err := c.dial(endpoint) if err != nil { return nil, nil, err } cancel := func() { conn.Close() } - return pb.NewMaintenanceClient(conn), cancel, nil + return RetryMaintenanceClient(c, conn), cancel, nil }, - remote: pb.NewMaintenanceClient(c.conn), + remote: RetryMaintenanceClient(c, c.conn), } + if c != nil { + api.callOpts = c.callOpts + } + return api } -func NewMaintenanceFromMaintenanceClient(remote pb.MaintenanceClient) Maintenance { - return &maintenance{ +func NewMaintenanceFromMaintenanceClient(remote pb.MaintenanceClient, c *Client) Maintenance { + api := &maintenance{ dial: func(string) (pb.MaintenanceClient, func(), error) { return remote, func() {}, nil }, remote: remote, } + if c != nil { + api.callOpts = c.callOpts + } + return api } func (m *maintenance) AlarmList(ctx context.Context) (*AlarmResponse, error) { @@ -87,15 +107,11 @@ func (m *maintenance) AlarmList(ctx context.Context) (*AlarmResponse, error) { MemberID: 0, // all Alarm: pb.AlarmType_NONE, // all } - for { - resp, err := m.remote.Alarm(ctx, req, grpc.FailFast(false)) - if err == nil { - return (*AlarmResponse)(resp), nil - } - if isHaltErr(ctx, err) { - return nil, toErr(ctx, err) - } + resp, err := m.remote.Alarm(ctx, req, m.callOpts...) + if err == nil { + return (*AlarmResponse)(resp), nil } + return nil, toErr(ctx, err) } func (m *maintenance) AlarmDisarm(ctx context.Context, am *AlarmMember) (*AlarmResponse, error) { @@ -121,7 +137,7 @@ func (m *maintenance) AlarmDisarm(ctx context.Context, am *AlarmMember) (*AlarmR return &ret, nil } - resp, err := m.remote.Alarm(ctx, req, grpc.FailFast(false)) + resp, err := m.remote.Alarm(ctx, req, m.callOpts...) if err == nil { return (*AlarmResponse)(resp), nil } @@ -134,7 +150,7 @@ func (m *maintenance) Defragment(ctx context.Context, endpoint string) (*Defragm return nil, toErr(ctx, err) } defer cancel() - resp, err := remote.Defragment(ctx, &pb.DefragmentRequest{}, grpc.FailFast(false)) + resp, err := remote.Defragment(ctx, &pb.DefragmentRequest{}, m.callOpts...) if err != nil { return nil, toErr(ctx, err) } @@ -147,15 +163,28 @@ func (m *maintenance) Status(ctx context.Context, endpoint string) (*StatusRespo return nil, toErr(ctx, err) } defer cancel() - resp, err := remote.Status(ctx, &pb.StatusRequest{}, grpc.FailFast(false)) + resp, err := remote.Status(ctx, &pb.StatusRequest{}, m.callOpts...) if err != nil { return nil, toErr(ctx, err) } return (*StatusResponse)(resp), nil } +func (m *maintenance) HashKV(ctx context.Context, endpoint string, rev int64) (*HashKVResponse, error) { + remote, cancel, err := m.dial(endpoint) + if err != nil { + return nil, toErr(ctx, err) + } + defer cancel() + resp, err := remote.HashKV(ctx, &pb.HashKVRequest{Revision: rev}, m.callOpts...) + if err != nil { + return nil, toErr(ctx, err) + } + return (*HashKVResponse)(resp), nil +} + func (m *maintenance) Snapshot(ctx context.Context) (io.ReadCloser, error) { - ss, err := m.remote.Snapshot(ctx, &pb.SnapshotRequest{}, grpc.FailFast(false)) + ss, err := m.remote.Snapshot(ctx, &pb.SnapshotRequest{}, m.callOpts...) if err != nil { return nil, toErr(ctx, err) } @@ -178,5 +207,20 @@ func (m *maintenance) Snapshot(ctx context.Context) (io.ReadCloser, error) { } pw.Close() }() - return pr, nil + return &snapshotReadCloser{ctx: ctx, ReadCloser: pr}, nil +} + +type snapshotReadCloser struct { + ctx context.Context + io.ReadCloser +} + +func (rc *snapshotReadCloser) Read(p []byte) (n int, err error) { + n, err = rc.ReadCloser.Read(p) + return n, toErr(rc.ctx, err) +} + +func (m *maintenance) MoveLeader(ctx context.Context, transfereeID uint64) (*MoveLeaderResponse, error) { + resp, err := m.remote.MoveLeader(ctx, &pb.MoveLeaderRequest{TargetID: transfereeID}, m.callOpts...) + return (*MoveLeaderResponse)(resp), toErr(ctx, err) } diff --git a/vendor/github.com/coreos/etcd/clientv3/op.go b/vendor/github.com/coreos/etcd/clientv3/op.go index 63b99501e..c6ec5bf52 100644 --- a/vendor/github.com/coreos/etcd/clientv3/op.go +++ b/vendor/github.com/coreos/etcd/clientv3/op.go @@ -23,6 +23,7 @@ const ( tRange opType = iota + 1 tPut tDeleteRange + tTxn ) var ( @@ -67,9 +68,17 @@ type Op struct { // for put val []byte leaseID LeaseID + + // txn + cmps []Cmp + thenOps []Op + elseOps []Op } -// accesors / mutators +// accessors / mutators + +func (op Op) IsTxn() bool { return op.t == tTxn } +func (op Op) Txn() ([]Cmp, []Op, []Op) { return op.cmps, op.thenOps, op.elseOps } // KeyBytes returns the byte slice holding the Op's key. func (op Op) KeyBytes() []byte { return op.key } @@ -80,6 +89,39 @@ func (op *Op) WithKeyBytes(key []byte) { op.key = key } // RangeBytes returns the byte slice holding with the Op's range end, if any. func (op Op) RangeBytes() []byte { return op.end } +// Rev returns the requested revision, if any. +func (op Op) Rev() int64 { return op.rev } + +// IsPut returns true iff the operation is a Put. +func (op Op) IsPut() bool { return op.t == tPut } + +// IsGet returns true iff the operation is a Get. +func (op Op) IsGet() bool { return op.t == tRange } + +// IsDelete returns true iff the operation is a Delete. +func (op Op) IsDelete() bool { return op.t == tDeleteRange } + +// IsSerializable returns true if the serializable field is true. +func (op Op) IsSerializable() bool { return op.serializable == true } + +// IsKeysOnly returns whether keysOnly is set. +func (op Op) IsKeysOnly() bool { return op.keysOnly == true } + +// IsCountOnly returns whether countOnly is set. +func (op Op) IsCountOnly() bool { return op.countOnly == true } + +// MinModRev returns the operation's minimum modify revision. +func (op Op) MinModRev() int64 { return op.minModRev } + +// MaxModRev returns the operation's maximum modify revision. +func (op Op) MaxModRev() int64 { return op.maxModRev } + +// MinCreateRev returns the operation's minimum create revision. +func (op Op) MinCreateRev() int64 { return op.minCreateRev } + +// MaxCreateRev returns the operation's maximum create revision. +func (op Op) MaxCreateRev() int64 { return op.maxCreateRev } + // WithRangeBytes sets the byte slice for the Op's range end. func (op *Op) WithRangeBytes(end []byte) { op.end = end } @@ -113,6 +155,22 @@ func (op Op) toRangeRequest() *pb.RangeRequest { return r } +func (op Op) toTxnRequest() *pb.TxnRequest { + thenOps := make([]*pb.RequestOp, len(op.thenOps)) + for i, tOp := range op.thenOps { + thenOps[i] = tOp.toRequestOp() + } + elseOps := make([]*pb.RequestOp, len(op.elseOps)) + for i, eOp := range op.elseOps { + elseOps[i] = eOp.toRequestOp() + } + cmps := make([]*pb.Compare, len(op.cmps)) + for i := range op.cmps { + cmps[i] = (*pb.Compare)(&op.cmps[i]) + } + return &pb.TxnRequest{Compare: cmps, Success: thenOps, Failure: elseOps} +} + func (op Op) toRequestOp() *pb.RequestOp { switch op.t { case tRange: @@ -123,12 +181,27 @@ func (op Op) toRequestOp() *pb.RequestOp { case tDeleteRange: r := &pb.DeleteRangeRequest{Key: op.key, RangeEnd: op.end, PrevKv: op.prevKV} return &pb.RequestOp{Request: &pb.RequestOp_RequestDeleteRange{RequestDeleteRange: r}} + case tTxn: + return &pb.RequestOp{Request: &pb.RequestOp_RequestTxn{RequestTxn: op.toTxnRequest()}} default: panic("Unknown Op") } } func (op Op) isWrite() bool { + if op.t == tTxn { + for _, tOp := range op.thenOps { + if tOp.isWrite() { + return true + } + } + for _, tOp := range op.elseOps { + if tOp.isWrite() { + return true + } + } + return false + } return op.t != tRange } @@ -194,6 +267,10 @@ func OpPut(key, val string, opts ...OpOption) Op { return ret } +func OpTxn(cmps []Cmp, thenOps []Op, elseOps []Op) Op { + return Op{t: tTxn, cmps: cmps, thenOps: thenOps, elseOps: elseOps} +} + func opWatch(key string, opts ...OpOption) Op { ret := Op{t: tRange, key: []byte(key)} ret.applyOpts(opts) @@ -247,9 +324,9 @@ func WithSort(target SortTarget, order SortOrder) OpOption { if target == SortByKey && order == SortAscend { // If order != SortNone, server fetches the entire key-space, // and then applies the sort and limit, if provided. - // Since current mvcc.Range implementation returns results - // sorted by keys in lexicographically ascending order, - // client should ignore SortOrder if the target is SortByKey. + // Since by default the server returns results sorted by keys + // in lexicographically ascending order, the client should ignore + // SortOrder if the target is SortByKey. order = SortNone } op.sort = &SortOption{target, order} @@ -390,7 +467,7 @@ func WithPrevKV() OpOption { } // WithIgnoreValue updates the key using its current value. -// Empty value should be passed when ignore_value is set. +// This option can not be combined with non-empty values. // Returns an error if the key does not exist. func WithIgnoreValue() OpOption { return func(op *Op) { @@ -399,7 +476,7 @@ func WithIgnoreValue() OpOption { } // WithIgnoreLease updates the key using its current lease. -// Empty lease should be passed when ignore_lease is set. +// This option can not be combined with WithLease. // Returns an error if the key does not exist. func WithIgnoreLease() OpOption { return func(op *Op) { @@ -424,8 +501,7 @@ func (op *LeaseOp) applyOpts(opts []LeaseOption) { } } -// WithAttachedKeys requests lease timetolive API to return -// attached keys of given lease ID. +// WithAttachedKeys makes TimeToLive list the keys attached to the given lease ID. func WithAttachedKeys() LeaseOption { return func(op *LeaseOp) { op.attachedKeys = true } } diff --git a/vendor/github.com/coreos/etcd/clientv3/options.go b/vendor/github.com/coreos/etcd/clientv3/options.go new file mode 100644 index 000000000..fa25811f3 --- /dev/null +++ b/vendor/github.com/coreos/etcd/clientv3/options.go @@ -0,0 +1,49 @@ +// Copyright 2017 The etcd Authors +// +// 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. + +package clientv3 + +import ( + "math" + + "google.golang.org/grpc" +) + +var ( + // Disable gRPC internal retrial logic + // TODO: enable when gRPC retry is stable (FailFast=false) + // Reference: + // - https://github.com/grpc/grpc-go/issues/1532 + // - https://github.com/grpc/proposal/blob/master/A6-client-retries.md + defaultFailFast = grpc.FailFast(true) + + // client-side request send limit, gRPC default is math.MaxInt32 + // Make sure that "client-side send limit < server-side default send/recv limit" + // Same value as "embed.DefaultMaxRequestBytes" plus gRPC overhead bytes + defaultMaxCallSendMsgSize = grpc.MaxCallSendMsgSize(2 * 1024 * 1024) + + // client-side response receive limit, gRPC default is 4MB + // Make sure that "client-side receive limit >= server-side default send/recv limit" + // because range response can easily exceed request send limits + // Default to math.MaxInt32; writes exceeding server-side send limit fails anyway + defaultMaxCallRecvMsgSize = grpc.MaxCallRecvMsgSize(math.MaxInt32) +) + +// defaultCallOpts defines a list of default "gRPC.CallOption". +// Some options are exposed to "clientv3.Config". +// Defaults will be overridden by the settings in "clientv3.Config". +var defaultCallOpts = []grpc.CallOption{defaultFailFast, defaultMaxCallSendMsgSize, defaultMaxCallRecvMsgSize} + +// MaxLeaseTTL is the maximum lease TTL value +const MaxLeaseTTL = 9000000000 diff --git a/vendor/github.com/coreos/etcd/clientv3/ready_wait.go b/vendor/github.com/coreos/etcd/clientv3/ready_wait.go new file mode 100644 index 000000000..c6ef585b5 --- /dev/null +++ b/vendor/github.com/coreos/etcd/clientv3/ready_wait.go @@ -0,0 +1,30 @@ +// Copyright 2017 The etcd Authors +// +// 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. + +package clientv3 + +import "context" + +// TODO: remove this when "FailFast=false" is fixed. +// See https://github.com/grpc/grpc-go/issues/1532. +func readyWait(rpcCtx, clientCtx context.Context, ready <-chan struct{}) error { + select { + case <-ready: + return nil + case <-rpcCtx.Done(): + return rpcCtx.Err() + case <-clientCtx.Done(): + return clientCtx.Err() + } +} diff --git a/vendor/github.com/coreos/etcd/clientv3/retry.go b/vendor/github.com/coreos/etcd/clientv3/retry.go index 78f31a8c4..7f89ba641 100644 --- a/vendor/github.com/coreos/etcd/clientv3/retry.go +++ b/vendor/github.com/coreos/etcd/clientv3/retry.go @@ -15,279 +15,482 @@ package clientv3 import ( + "context" + "github.com/coreos/etcd/etcdserver/api/v3rpc/rpctypes" pb "github.com/coreos/etcd/etcdserver/etcdserverpb" - "golang.org/x/net/context" + "google.golang.org/grpc" "google.golang.org/grpc/codes" + "google.golang.org/grpc/status" +) + +type retryPolicy uint8 + +const ( + repeatable retryPolicy = iota + nonRepeatable ) type rpcFunc func(ctx context.Context) error -type retryRpcFunc func(context.Context, rpcFunc) error +type retryRPCFunc func(context.Context, rpcFunc, retryPolicy) error +type retryStopErrFunc func(error) bool -func (c *Client) newRetryWrapper() retryRpcFunc { - return func(rpcCtx context.Context, f rpcFunc) error { +// immutable requests (e.g. Get) should be retried unless it's +// an obvious server-side error (e.g. rpctypes.ErrRequestTooLarge). +// +// "isRepeatableStopError" returns "true" when an immutable request +// is interrupted by server-side or gRPC-side error and its status +// code is not transient (!= codes.Unavailable). +// +// Returning "true" means retry should stop, since client cannot +// handle itself even with retries. +func isRepeatableStopError(err error) bool { + eErr := rpctypes.Error(err) + // always stop retry on etcd errors + if serverErr, ok := eErr.(rpctypes.EtcdError); ok && serverErr.Code() != codes.Unavailable { + return true + } + // only retry if unavailable + ev, _ := status.FromError(err) + return ev.Code() != codes.Unavailable +} + +// mutable requests (e.g. Put, Delete, Txn) should only be retried +// when the status code is codes.Unavailable when initial connection +// has not been established (no pinned endpoint). +// +// "isNonRepeatableStopError" returns "true" when a mutable request +// is interrupted by non-transient error that client cannot handle itself, +// or transient error while the connection has already been established +// (pinned endpoint exists). +// +// Returning "true" means retry should stop, otherwise it violates +// write-at-most-once semantics. +func isNonRepeatableStopError(err error) bool { + ev, _ := status.FromError(err) + if ev.Code() != codes.Unavailable { + return true + } + desc := rpctypes.ErrorDesc(err) + return desc != "there is no address available" && desc != "there is no connection available" +} + +func (c *Client) newRetryWrapper() retryRPCFunc { + return func(rpcCtx context.Context, f rpcFunc, rp retryPolicy) error { + var isStop retryStopErrFunc + switch rp { + case repeatable: + isStop = isRepeatableStopError + case nonRepeatable: + isStop = isNonRepeatableStopError + } for { + if err := readyWait(rpcCtx, c.ctx, c.balancer.ConnectNotify()); err != nil { + return err + } + pinned := c.balancer.pinned() err := f(rpcCtx) if err == nil { return nil } + logger.Lvl(4).Infof("clientv3/retry: error %q on pinned endpoint %q", err.Error(), pinned) - eErr := rpctypes.Error(err) - // always stop retry on etcd errors - if _, ok := eErr.(rpctypes.EtcdError); ok { - return err + if s, ok := status.FromError(err); ok && (s.Code() == codes.Unavailable || s.Code() == codes.DeadlineExceeded || s.Code() == codes.Internal) { + // mark this before endpoint switch is triggered + c.balancer.hostPortError(pinned, err) + c.balancer.next() + logger.Lvl(4).Infof("clientv3/retry: switching from %q due to error %q", pinned, err.Error()) } - // only retry if unavailable - if grpc.Code(err) != codes.Unavailable { + if isStop(err) { return err } - - select { - case <-c.balancer.ConnectNotify(): - case <-rpcCtx.Done(): - return rpcCtx.Err() - case <-c.ctx.Done(): - return c.ctx.Err() - } } } } -func (c *Client) newAuthRetryWrapper() retryRpcFunc { - return func(rpcCtx context.Context, f rpcFunc) error { +func (c *Client) newAuthRetryWrapper(retryf retryRPCFunc) retryRPCFunc { + return func(rpcCtx context.Context, f rpcFunc, rp retryPolicy) error { for { - err := f(rpcCtx) + pinned := c.balancer.pinned() + err := retryf(rpcCtx, f, rp) if err == nil { return nil } - + logger.Lvl(4).Infof("clientv3/auth-retry: error %q on pinned endpoint %q", err.Error(), pinned) // always stop retry on etcd errors other than invalid auth token if rpctypes.Error(err) == rpctypes.ErrInvalidAuthToken { gterr := c.getToken(rpcCtx) if gterr != nil { + logger.Lvl(4).Infof("clientv3/auth-retry: cannot retry due to error %q(%q) on pinned endpoint %q", err.Error(), gterr.Error(), pinned) return err // return the original error for simplicity } continue } - return err } } } -// RetryKVClient implements a KVClient that uses the client's FailFast retry policy. -func RetryKVClient(c *Client) pb.KVClient { - retryWrite := &retryWriteKVClient{pb.NewKVClient(c.conn), c.retryWrapper} - return &retryKVClient{&retryWriteKVClient{retryWrite, c.retryAuthWrapper}} -} - type retryKVClient struct { - *retryWriteKVClient + kc pb.KVClient + retryf retryRPCFunc } +// RetryKVClient implements a KVClient. +func RetryKVClient(c *Client) pb.KVClient { + return &retryKVClient{ + kc: pb.NewKVClient(c.conn), + retryf: c.newAuthRetryWrapper(c.newRetryWrapper()), + } +} func (rkv *retryKVClient) Range(ctx context.Context, in *pb.RangeRequest, opts ...grpc.CallOption) (resp *pb.RangeResponse, err error) { err = rkv.retryf(ctx, func(rctx context.Context) error { - resp, err = rkv.retryWriteKVClient.Range(rctx, in, opts...) + resp, err = rkv.kc.Range(rctx, in, opts...) return err - }) + }, repeatable) return resp, err } -type retryWriteKVClient struct { - pb.KVClient - retryf retryRpcFunc -} - -func (rkv *retryWriteKVClient) Put(ctx context.Context, in *pb.PutRequest, opts ...grpc.CallOption) (resp *pb.PutResponse, err error) { +func (rkv *retryKVClient) Put(ctx context.Context, in *pb.PutRequest, opts ...grpc.CallOption) (resp *pb.PutResponse, err error) { err = rkv.retryf(ctx, func(rctx context.Context) error { - resp, err = rkv.KVClient.Put(rctx, in, opts...) + resp, err = rkv.kc.Put(rctx, in, opts...) return err - }) + }, nonRepeatable) return resp, err } -func (rkv *retryWriteKVClient) DeleteRange(ctx context.Context, in *pb.DeleteRangeRequest, opts ...grpc.CallOption) (resp *pb.DeleteRangeResponse, err error) { +func (rkv *retryKVClient) DeleteRange(ctx context.Context, in *pb.DeleteRangeRequest, opts ...grpc.CallOption) (resp *pb.DeleteRangeResponse, err error) { err = rkv.retryf(ctx, func(rctx context.Context) error { - resp, err = rkv.KVClient.DeleteRange(rctx, in, opts...) + resp, err = rkv.kc.DeleteRange(rctx, in, opts...) return err - }) + }, nonRepeatable) return resp, err } -func (rkv *retryWriteKVClient) Txn(ctx context.Context, in *pb.TxnRequest, opts ...grpc.CallOption) (resp *pb.TxnResponse, err error) { +func (rkv *retryKVClient) Txn(ctx context.Context, in *pb.TxnRequest, opts ...grpc.CallOption) (resp *pb.TxnResponse, err error) { + // TODO: "repeatable" for read-only txn err = rkv.retryf(ctx, func(rctx context.Context) error { - resp, err = rkv.KVClient.Txn(rctx, in, opts...) + resp, err = rkv.kc.Txn(rctx, in, opts...) return err - }) + }, nonRepeatable) return resp, err } -func (rkv *retryWriteKVClient) Compact(ctx context.Context, in *pb.CompactionRequest, opts ...grpc.CallOption) (resp *pb.CompactionResponse, err error) { +func (rkv *retryKVClient) Compact(ctx context.Context, in *pb.CompactionRequest, opts ...grpc.CallOption) (resp *pb.CompactionResponse, err error) { err = rkv.retryf(ctx, func(rctx context.Context) error { - resp, err = rkv.KVClient.Compact(rctx, in, opts...) + resp, err = rkv.kc.Compact(rctx, in, opts...) return err - }) + }, nonRepeatable) return resp, err } type retryLeaseClient struct { - pb.LeaseClient - retryf retryRpcFunc + lc pb.LeaseClient + retryf retryRPCFunc } -// RetryLeaseClient implements a LeaseClient that uses the client's FailFast retry policy. +// RetryLeaseClient implements a LeaseClient. func RetryLeaseClient(c *Client) pb.LeaseClient { - retry := &retryLeaseClient{pb.NewLeaseClient(c.conn), c.retryWrapper} - return &retryLeaseClient{retry, c.retryAuthWrapper} + return &retryLeaseClient{ + lc: pb.NewLeaseClient(c.conn), + retryf: c.newAuthRetryWrapper(c.newRetryWrapper()), + } +} + +func (rlc *retryLeaseClient) LeaseTimeToLive(ctx context.Context, in *pb.LeaseTimeToLiveRequest, opts ...grpc.CallOption) (resp *pb.LeaseTimeToLiveResponse, err error) { + err = rlc.retryf(ctx, func(rctx context.Context) error { + resp, err = rlc.lc.LeaseTimeToLive(rctx, in, opts...) + return err + }, repeatable) + return resp, err +} + +func (rlc *retryLeaseClient) LeaseLeases(ctx context.Context, in *pb.LeaseLeasesRequest, opts ...grpc.CallOption) (resp *pb.LeaseLeasesResponse, err error) { + err = rlc.retryf(ctx, func(rctx context.Context) error { + resp, err = rlc.lc.LeaseLeases(rctx, in, opts...) + return err + }, repeatable) + return resp, err } func (rlc *retryLeaseClient) LeaseGrant(ctx context.Context, in *pb.LeaseGrantRequest, opts ...grpc.CallOption) (resp *pb.LeaseGrantResponse, err error) { err = rlc.retryf(ctx, func(rctx context.Context) error { - resp, err = rlc.LeaseClient.LeaseGrant(rctx, in, opts...) + resp, err = rlc.lc.LeaseGrant(rctx, in, opts...) return err - }) + }, repeatable) return resp, err } func (rlc *retryLeaseClient) LeaseRevoke(ctx context.Context, in *pb.LeaseRevokeRequest, opts ...grpc.CallOption) (resp *pb.LeaseRevokeResponse, err error) { err = rlc.retryf(ctx, func(rctx context.Context) error { - resp, err = rlc.LeaseClient.LeaseRevoke(rctx, in, opts...) + resp, err = rlc.lc.LeaseRevoke(rctx, in, opts...) return err - }) + }, repeatable) return resp, err } -type retryClusterClient struct { - pb.ClusterClient - retryf retryRpcFunc +func (rlc *retryLeaseClient) LeaseKeepAlive(ctx context.Context, opts ...grpc.CallOption) (stream pb.Lease_LeaseKeepAliveClient, err error) { + err = rlc.retryf(ctx, func(rctx context.Context) error { + stream, err = rlc.lc.LeaseKeepAlive(rctx, opts...) + return err + }, repeatable) + return stream, err } -// RetryClusterClient implements a ClusterClient that uses the client's FailFast retry policy. +type retryClusterClient struct { + cc pb.ClusterClient + retryf retryRPCFunc +} + +// RetryClusterClient implements a ClusterClient. func RetryClusterClient(c *Client) pb.ClusterClient { - return &retryClusterClient{pb.NewClusterClient(c.conn), c.retryWrapper} + return &retryClusterClient{ + cc: pb.NewClusterClient(c.conn), + retryf: c.newRetryWrapper(), + } +} + +func (rcc *retryClusterClient) MemberList(ctx context.Context, in *pb.MemberListRequest, opts ...grpc.CallOption) (resp *pb.MemberListResponse, err error) { + err = rcc.retryf(ctx, func(rctx context.Context) error { + resp, err = rcc.cc.MemberList(rctx, in, opts...) + return err + }, repeatable) + return resp, err } func (rcc *retryClusterClient) MemberAdd(ctx context.Context, in *pb.MemberAddRequest, opts ...grpc.CallOption) (resp *pb.MemberAddResponse, err error) { err = rcc.retryf(ctx, func(rctx context.Context) error { - resp, err = rcc.ClusterClient.MemberAdd(rctx, in, opts...) + resp, err = rcc.cc.MemberAdd(rctx, in, opts...) return err - }) + }, nonRepeatable) return resp, err } func (rcc *retryClusterClient) MemberRemove(ctx context.Context, in *pb.MemberRemoveRequest, opts ...grpc.CallOption) (resp *pb.MemberRemoveResponse, err error) { err = rcc.retryf(ctx, func(rctx context.Context) error { - resp, err = rcc.ClusterClient.MemberRemove(rctx, in, opts...) + resp, err = rcc.cc.MemberRemove(rctx, in, opts...) return err - }) + }, nonRepeatable) return resp, err } func (rcc *retryClusterClient) MemberUpdate(ctx context.Context, in *pb.MemberUpdateRequest, opts ...grpc.CallOption) (resp *pb.MemberUpdateResponse, err error) { err = rcc.retryf(ctx, func(rctx context.Context) error { - resp, err = rcc.ClusterClient.MemberUpdate(rctx, in, opts...) + resp, err = rcc.cc.MemberUpdate(rctx, in, opts...) return err - }) + }, nonRepeatable) + return resp, err +} + +type retryMaintenanceClient struct { + mc pb.MaintenanceClient + retryf retryRPCFunc +} + +// RetryMaintenanceClient implements a Maintenance. +func RetryMaintenanceClient(c *Client, conn *grpc.ClientConn) pb.MaintenanceClient { + return &retryMaintenanceClient{ + mc: pb.NewMaintenanceClient(conn), + retryf: c.newRetryWrapper(), + } +} + +func (rmc *retryMaintenanceClient) Alarm(ctx context.Context, in *pb.AlarmRequest, opts ...grpc.CallOption) (resp *pb.AlarmResponse, err error) { + err = rmc.retryf(ctx, func(rctx context.Context) error { + resp, err = rmc.mc.Alarm(rctx, in, opts...) + return err + }, repeatable) + return resp, err +} + +func (rmc *retryMaintenanceClient) Status(ctx context.Context, in *pb.StatusRequest, opts ...grpc.CallOption) (resp *pb.StatusResponse, err error) { + err = rmc.retryf(ctx, func(rctx context.Context) error { + resp, err = rmc.mc.Status(rctx, in, opts...) + return err + }, repeatable) + return resp, err +} + +func (rmc *retryMaintenanceClient) Hash(ctx context.Context, in *pb.HashRequest, opts ...grpc.CallOption) (resp *pb.HashResponse, err error) { + err = rmc.retryf(ctx, func(rctx context.Context) error { + resp, err = rmc.mc.Hash(rctx, in, opts...) + return err + }, repeatable) + return resp, err +} + +func (rmc *retryMaintenanceClient) HashKV(ctx context.Context, in *pb.HashKVRequest, opts ...grpc.CallOption) (resp *pb.HashKVResponse, err error) { + err = rmc.retryf(ctx, func(rctx context.Context) error { + resp, err = rmc.mc.HashKV(rctx, in, opts...) + return err + }, repeatable) + return resp, err +} + +func (rmc *retryMaintenanceClient) Snapshot(ctx context.Context, in *pb.SnapshotRequest, opts ...grpc.CallOption) (stream pb.Maintenance_SnapshotClient, err error) { + err = rmc.retryf(ctx, func(rctx context.Context) error { + stream, err = rmc.mc.Snapshot(rctx, in, opts...) + return err + }, repeatable) + return stream, err +} + +func (rmc *retryMaintenanceClient) MoveLeader(ctx context.Context, in *pb.MoveLeaderRequest, opts ...grpc.CallOption) (resp *pb.MoveLeaderResponse, err error) { + err = rmc.retryf(ctx, func(rctx context.Context) error { + resp, err = rmc.mc.MoveLeader(rctx, in, opts...) + return err + }, repeatable) + return resp, err +} + +func (rmc *retryMaintenanceClient) Defragment(ctx context.Context, in *pb.DefragmentRequest, opts ...grpc.CallOption) (resp *pb.DefragmentResponse, err error) { + err = rmc.retryf(ctx, func(rctx context.Context) error { + resp, err = rmc.mc.Defragment(rctx, in, opts...) + return err + }, nonRepeatable) return resp, err } type retryAuthClient struct { - pb.AuthClient - retryf retryRpcFunc + ac pb.AuthClient + retryf retryRPCFunc } -// RetryAuthClient implements a AuthClient that uses the client's FailFast retry policy. +// RetryAuthClient implements a AuthClient. func RetryAuthClient(c *Client) pb.AuthClient { - return &retryAuthClient{pb.NewAuthClient(c.conn), c.retryWrapper} + return &retryAuthClient{ + ac: pb.NewAuthClient(c.conn), + retryf: c.newRetryWrapper(), + } +} + +func (rac *retryAuthClient) UserList(ctx context.Context, in *pb.AuthUserListRequest, opts ...grpc.CallOption) (resp *pb.AuthUserListResponse, err error) { + err = rac.retryf(ctx, func(rctx context.Context) error { + resp, err = rac.ac.UserList(rctx, in, opts...) + return err + }, repeatable) + return resp, err +} + +func (rac *retryAuthClient) UserGet(ctx context.Context, in *pb.AuthUserGetRequest, opts ...grpc.CallOption) (resp *pb.AuthUserGetResponse, err error) { + err = rac.retryf(ctx, func(rctx context.Context) error { + resp, err = rac.ac.UserGet(rctx, in, opts...) + return err + }, repeatable) + return resp, err +} + +func (rac *retryAuthClient) RoleGet(ctx context.Context, in *pb.AuthRoleGetRequest, opts ...grpc.CallOption) (resp *pb.AuthRoleGetResponse, err error) { + err = rac.retryf(ctx, func(rctx context.Context) error { + resp, err = rac.ac.RoleGet(rctx, in, opts...) + return err + }, repeatable) + return resp, err +} + +func (rac *retryAuthClient) RoleList(ctx context.Context, in *pb.AuthRoleListRequest, opts ...grpc.CallOption) (resp *pb.AuthRoleListResponse, err error) { + err = rac.retryf(ctx, func(rctx context.Context) error { + resp, err = rac.ac.RoleList(rctx, in, opts...) + return err + }, repeatable) + return resp, err } func (rac *retryAuthClient) AuthEnable(ctx context.Context, in *pb.AuthEnableRequest, opts ...grpc.CallOption) (resp *pb.AuthEnableResponse, err error) { err = rac.retryf(ctx, func(rctx context.Context) error { - resp, err = rac.AuthClient.AuthEnable(rctx, in, opts...) + resp, err = rac.ac.AuthEnable(rctx, in, opts...) return err - }) + }, nonRepeatable) return resp, err } func (rac *retryAuthClient) AuthDisable(ctx context.Context, in *pb.AuthDisableRequest, opts ...grpc.CallOption) (resp *pb.AuthDisableResponse, err error) { err = rac.retryf(ctx, func(rctx context.Context) error { - resp, err = rac.AuthClient.AuthDisable(rctx, in, opts...) + resp, err = rac.ac.AuthDisable(rctx, in, opts...) return err - }) + }, nonRepeatable) return resp, err } func (rac *retryAuthClient) UserAdd(ctx context.Context, in *pb.AuthUserAddRequest, opts ...grpc.CallOption) (resp *pb.AuthUserAddResponse, err error) { err = rac.retryf(ctx, func(rctx context.Context) error { - resp, err = rac.AuthClient.UserAdd(rctx, in, opts...) + resp, err = rac.ac.UserAdd(rctx, in, opts...) return err - }) + }, nonRepeatable) return resp, err } func (rac *retryAuthClient) UserDelete(ctx context.Context, in *pb.AuthUserDeleteRequest, opts ...grpc.CallOption) (resp *pb.AuthUserDeleteResponse, err error) { err = rac.retryf(ctx, func(rctx context.Context) error { - resp, err = rac.AuthClient.UserDelete(rctx, in, opts...) + resp, err = rac.ac.UserDelete(rctx, in, opts...) return err - }) + }, nonRepeatable) return resp, err } func (rac *retryAuthClient) UserChangePassword(ctx context.Context, in *pb.AuthUserChangePasswordRequest, opts ...grpc.CallOption) (resp *pb.AuthUserChangePasswordResponse, err error) { err = rac.retryf(ctx, func(rctx context.Context) error { - resp, err = rac.AuthClient.UserChangePassword(rctx, in, opts...) + resp, err = rac.ac.UserChangePassword(rctx, in, opts...) return err - }) + }, nonRepeatable) return resp, err } func (rac *retryAuthClient) UserGrantRole(ctx context.Context, in *pb.AuthUserGrantRoleRequest, opts ...grpc.CallOption) (resp *pb.AuthUserGrantRoleResponse, err error) { err = rac.retryf(ctx, func(rctx context.Context) error { - resp, err = rac.AuthClient.UserGrantRole(rctx, in, opts...) + resp, err = rac.ac.UserGrantRole(rctx, in, opts...) return err - }) + }, nonRepeatable) return resp, err } func (rac *retryAuthClient) UserRevokeRole(ctx context.Context, in *pb.AuthUserRevokeRoleRequest, opts ...grpc.CallOption) (resp *pb.AuthUserRevokeRoleResponse, err error) { err = rac.retryf(ctx, func(rctx context.Context) error { - resp, err = rac.AuthClient.UserRevokeRole(rctx, in, opts...) + resp, err = rac.ac.UserRevokeRole(rctx, in, opts...) return err - }) + }, nonRepeatable) return resp, err } func (rac *retryAuthClient) RoleAdd(ctx context.Context, in *pb.AuthRoleAddRequest, opts ...grpc.CallOption) (resp *pb.AuthRoleAddResponse, err error) { err = rac.retryf(ctx, func(rctx context.Context) error { - resp, err = rac.AuthClient.RoleAdd(rctx, in, opts...) + resp, err = rac.ac.RoleAdd(rctx, in, opts...) return err - }) + }, nonRepeatable) return resp, err } func (rac *retryAuthClient) RoleDelete(ctx context.Context, in *pb.AuthRoleDeleteRequest, opts ...grpc.CallOption) (resp *pb.AuthRoleDeleteResponse, err error) { err = rac.retryf(ctx, func(rctx context.Context) error { - resp, err = rac.AuthClient.RoleDelete(rctx, in, opts...) + resp, err = rac.ac.RoleDelete(rctx, in, opts...) return err - }) + }, nonRepeatable) return resp, err } func (rac *retryAuthClient) RoleGrantPermission(ctx context.Context, in *pb.AuthRoleGrantPermissionRequest, opts ...grpc.CallOption) (resp *pb.AuthRoleGrantPermissionResponse, err error) { err = rac.retryf(ctx, func(rctx context.Context) error { - resp, err = rac.AuthClient.RoleGrantPermission(rctx, in, opts...) + resp, err = rac.ac.RoleGrantPermission(rctx, in, opts...) return err - }) + }, nonRepeatable) return resp, err } func (rac *retryAuthClient) RoleRevokePermission(ctx context.Context, in *pb.AuthRoleRevokePermissionRequest, opts ...grpc.CallOption) (resp *pb.AuthRoleRevokePermissionResponse, err error) { err = rac.retryf(ctx, func(rctx context.Context) error { - resp, err = rac.AuthClient.RoleRevokePermission(rctx, in, opts...) + resp, err = rac.ac.RoleRevokePermission(rctx, in, opts...) return err - }) + }, nonRepeatable) + return resp, err +} + +func (rac *retryAuthClient) Authenticate(ctx context.Context, in *pb.AuthenticateRequest, opts ...grpc.CallOption) (resp *pb.AuthenticateResponse, err error) { + err = rac.retryf(ctx, func(rctx context.Context) error { + resp, err = rac.ac.Authenticate(rctx, in, opts...) + return err + }, nonRepeatable) return resp, err } diff --git a/vendor/github.com/coreos/etcd/clientv3/txn.go b/vendor/github.com/coreos/etcd/clientv3/txn.go index 7bde6fd72..c3c2d2485 100644 --- a/vendor/github.com/coreos/etcd/clientv3/txn.go +++ b/vendor/github.com/coreos/etcd/clientv3/txn.go @@ -15,16 +15,17 @@ package clientv3 import ( + "context" "sync" pb "github.com/coreos/etcd/etcdserver/etcdserverpb" - "golang.org/x/net/context" + "google.golang.org/grpc" ) // Txn is the interface that wraps mini-transactions. // -// Tx.If( +// Txn(context.TODO()).If( // Compare(Value(k1), ">", v1), // Compare(Version(k1), "=", 2) // ).Then( @@ -66,6 +67,8 @@ type txn struct { sus []*pb.RequestOp fas []*pb.RequestOp + + callOpts []grpc.CallOption } func (txn *txn) If(cs ...Cmp) Txn { @@ -135,30 +138,14 @@ func (txn *txn) Else(ops ...Op) Txn { func (txn *txn) Commit() (*TxnResponse, error) { txn.mu.Lock() defer txn.mu.Unlock() - for { - resp, err := txn.commit() - if err == nil { - return resp, err - } - if isHaltErr(txn.ctx, err) { - return nil, toErr(txn.ctx, err) - } - if txn.isWrite { - return nil, toErr(txn.ctx, err) - } - } -} -func (txn *txn) commit() (*TxnResponse, error) { r := &pb.TxnRequest{Compare: txn.cmps, Success: txn.sus, Failure: txn.fas} - var opts []grpc.CallOption - if !txn.isWrite { - opts = []grpc.CallOption{grpc.FailFast(false)} - } - resp, err := txn.kv.remote.Txn(txn.ctx, r, opts...) + var resp *pb.TxnResponse + var err error + resp, err = txn.kv.remote.Txn(txn.ctx, r, txn.callOpts...) if err != nil { - return nil, err + return nil, toErr(txn.ctx, err) } return (*TxnResponse)(resp), nil } diff --git a/vendor/github.com/coreos/etcd/clientv3/watch.go b/vendor/github.com/coreos/etcd/clientv3/watch.go index a707f7449..d7633850e 100644 --- a/vendor/github.com/coreos/etcd/clientv3/watch.go +++ b/vendor/github.com/coreos/etcd/clientv3/watch.go @@ -15,6 +15,7 @@ package clientv3 import ( + "context" "fmt" "sync" "time" @@ -22,9 +23,11 @@ import ( v3rpc "github.com/coreos/etcd/etcdserver/api/v3rpc/rpctypes" pb "github.com/coreos/etcd/etcdserver/etcdserverpb" mvccpb "github.com/coreos/etcd/mvcc/mvccpb" - "golang.org/x/net/context" + "google.golang.org/grpc" "google.golang.org/grpc/codes" + "google.golang.org/grpc/metadata" + "google.golang.org/grpc/status" ) const ( @@ -40,10 +43,9 @@ type WatchChan <-chan WatchResponse type Watcher interface { // Watch watches on a key or prefix. The watched events will be returned - // through the returned channel. - // If the watch is slow or the required rev is compacted, the watch request - // might be canceled from the server-side and the chan will be closed. - // 'opts' can be: 'WithRev' and/or 'WithPrefix'. + // through the returned channel. If revisions waiting to be sent over the + // watch are compacted, then the watch will be canceled by the server, the + // client will post a compacted error watch response, and the channel will close. Watch(ctx context.Context, key string, opts ...OpOption) WatchChan // Close closes the watcher and cancels all watch requests. @@ -90,7 +92,7 @@ func (wr *WatchResponse) Err() error { return v3rpc.ErrCompacted case wr.Canceled: if len(wr.cancelReason) != 0 { - return v3rpc.Error(grpc.Errorf(codes.FailedPrecondition, "%s", wr.cancelReason)) + return v3rpc.Error(status.Error(codes.FailedPrecondition, wr.cancelReason)) } return v3rpc.ErrFutureRev } @@ -104,7 +106,8 @@ func (wr *WatchResponse) IsProgressNotify() bool { // watcher implements the Watcher interface type watcher struct { - remote pb.WatchClient + remote pb.WatchClient + callOpts []grpc.CallOption // mu protects the grpc streams map mu sync.RWMutex @@ -115,8 +118,9 @@ type watcher struct { // watchGrpcStream tracks all watch resources attached to a single grpc stream. type watchGrpcStream struct { - owner *watcher - remote pb.WatchClient + owner *watcher + remote pb.WatchClient + callOpts []grpc.CallOption // ctx controls internal remote.Watch requests ctx context.Context @@ -135,7 +139,7 @@ type watchGrpcStream struct { respc chan *pb.WatchResponse // donec closes to broadcast shutdown donec chan struct{} - // errc transmits errors from grpc Recv to the watch stream reconn logic + // errc transmits errors from grpc Recv to the watch stream reconnect logic errc chan error // closingc gets the watcherStream of closing watchers closingc chan *watcherStream @@ -187,14 +191,18 @@ type watcherStream struct { } func NewWatcher(c *Client) Watcher { - return NewWatchFromWatchClient(pb.NewWatchClient(c.conn)) + return NewWatchFromWatchClient(pb.NewWatchClient(c.conn), c) } -func NewWatchFromWatchClient(wc pb.WatchClient) Watcher { - return &watcher{ +func NewWatchFromWatchClient(wc pb.WatchClient, c *Client) Watcher { + w := &watcher{ remote: wc, streams: make(map[string]*watchGrpcStream), } + if c != nil { + w.callOpts = c.callOpts + } + return w } // never closes @@ -213,17 +221,17 @@ func (w *watcher) newWatcherGrpcStream(inctx context.Context) *watchGrpcStream { wgs := &watchGrpcStream{ owner: w, remote: w.remote, + callOpts: w.callOpts, ctx: ctx, - ctxKey: fmt.Sprintf("%v", inctx), + ctxKey: streamKeyFromCtx(inctx), cancel: cancel, substreams: make(map[int64]*watcherStream), - - respc: make(chan *pb.WatchResponse), - reqc: make(chan *watchRequest), - donec: make(chan struct{}), - errc: make(chan error, 1), - closingc: make(chan *watcherStream), - resumec: make(chan struct{}), + respc: make(chan *pb.WatchResponse), + reqc: make(chan *watchRequest), + donec: make(chan struct{}), + errc: make(chan error, 1), + closingc: make(chan *watcherStream), + resumec: make(chan struct{}), } go wgs.run() return wgs @@ -254,7 +262,7 @@ func (w *watcher) Watch(ctx context.Context, key string, opts ...OpOption) Watch } ok := false - ctxKey := fmt.Sprintf("%v", ctx) + ctxKey := streamKeyFromCtx(ctx) // find or allocate appropriate grpc watch stream w.mu.Lock() @@ -317,14 +325,14 @@ func (w *watcher) Close() (err error) { w.streams = nil w.mu.Unlock() for _, wgs := range streams { - if werr := wgs.Close(); werr != nil { + if werr := wgs.close(); werr != nil { err = werr } } return err } -func (w *watchGrpcStream) Close() (err error) { +func (w *watchGrpcStream) close() (err error) { w.cancel() <-w.donec select { @@ -435,7 +443,7 @@ func (w *watchGrpcStream) run() { initReq: *wreq, id: -1, outc: outc, - // unbufffered so resumes won't cause repeat events + // unbuffered so resumes won't cause repeat events recvc: make(chan *WatchResponse), } @@ -462,7 +470,7 @@ func (w *watchGrpcStream) run() { if ws := w.nextResume(); ws != nil { wc.Send(ws.initReq.toPB()) } - case pbresp.Canceled: + case pbresp.Canceled && pbresp.CompactRevision == 0: delete(cancelSet, pbresp.WatchId) if ws, ok := w.substreams[pbresp.WatchId]; ok { // signal to stream goroutine to update closingc @@ -487,7 +495,7 @@ func (w *watchGrpcStream) run() { req := &pb.WatchRequest{RequestUnion: cr} wc.Send(req) } - // watch client failed to recv; spawn another if possible + // watch client failed on Recv; spawn another if possible case err := <-w.errc: if isHaltErr(w.ctx, err) || toErr(w.ctx, err) == v3rpc.ErrNoLeader { closeErr = err @@ -749,7 +757,7 @@ func (w *watchGrpcStream) waitCancelSubstreams(stopc <-chan struct{}) <-chan str return donec } -// joinSubstream waits for all substream goroutines to complete +// joinSubstreams waits for all substream goroutines to complete. func (w *watchGrpcStream) joinSubstreams() { for _, ws := range w.substreams { <-ws.donec @@ -761,8 +769,13 @@ func (w *watchGrpcStream) joinSubstreams() { } } -// openWatchClient retries opening a watchclient until retryConnection fails +var maxBackoff = 100 * time.Millisecond + +// openWatchClient retries opening a watch client until success or halt. +// manually retry in case "ws==nil && err==nil" +// TODO: remove FailFast=false func (w *watchGrpcStream) openWatchClient() (ws pb.Watch_WatchClient, err error) { + backoff := time.Millisecond for { select { case <-w.ctx.Done(): @@ -772,17 +785,28 @@ func (w *watchGrpcStream) openWatchClient() (ws pb.Watch_WatchClient, err error) return nil, err default: } - if ws, err = w.remote.Watch(w.ctx, grpc.FailFast(false)); ws != nil && err == nil { + if ws, err = w.remote.Watch(w.ctx, w.callOpts...); ws != nil && err == nil { break } if isHaltErr(w.ctx, err) { return nil, v3rpc.Error(err) } + if isUnavailableErr(w.ctx, err) { + // retry, but backoff + if backoff < maxBackoff { + // 25% backoff factor + backoff = backoff + backoff/4 + if backoff > maxBackoff { + backoff = maxBackoff + } + } + time.Sleep(backoff) + } } return ws, nil } -// toPB converts an internal watch request structure to its protobuf messagefunc (wr *watchRequest) +// toPB converts an internal watch request structure to its protobuf WatchRequest structure. func (wr *watchRequest) toPB() *pb.WatchRequest { req := &pb.WatchCreateRequest{ StartRevision: wr.rev, @@ -795,3 +819,10 @@ func (wr *watchRequest) toPB() *pb.WatchRequest { cr := &pb.WatchRequest_CreateRequest{CreateRequest: req} return &pb.WatchRequest{RequestUnion: cr} } + +func streamKeyFromCtx(ctx context.Context) string { + if md, ok := metadata.FromOutgoingContext(ctx); ok { + return fmt.Sprintf("%+v", md) + } + return "" +} diff --git a/vendor/github.com/coreos/etcd/etcdserver/api/v3rpc/rpctypes/error.go b/vendor/github.com/coreos/etcd/etcdserver/api/v3rpc/rpctypes/error.go index 0907e902c..55eab38ef 100644 --- a/vendor/github.com/coreos/etcd/etcdserver/api/v3rpc/rpctypes/error.go +++ b/vendor/github.com/coreos/etcd/etcdserver/api/v3rpc/rpctypes/error.go @@ -15,106 +15,114 @@ package rpctypes import ( - "google.golang.org/grpc" "google.golang.org/grpc/codes" + "google.golang.org/grpc/status" ) +// server-side error var ( - // server-side error - ErrGRPCEmptyKey = grpc.Errorf(codes.InvalidArgument, "etcdserver: key is not provided") - ErrGRPCKeyNotFound = grpc.Errorf(codes.InvalidArgument, "etcdserver: key not found") - ErrGRPCValueProvided = grpc.Errorf(codes.InvalidArgument, "etcdserver: value is provided") - ErrGRPCLeaseProvided = grpc.Errorf(codes.InvalidArgument, "etcdserver: lease is provided") - ErrGRPCTooManyOps = grpc.Errorf(codes.InvalidArgument, "etcdserver: too many operations in txn request") - ErrGRPCDuplicateKey = grpc.Errorf(codes.InvalidArgument, "etcdserver: duplicate key given in txn request") - ErrGRPCCompacted = grpc.Errorf(codes.OutOfRange, "etcdserver: mvcc: required revision has been compacted") - ErrGRPCFutureRev = grpc.Errorf(codes.OutOfRange, "etcdserver: mvcc: required revision is a future revision") - ErrGRPCNoSpace = grpc.Errorf(codes.ResourceExhausted, "etcdserver: mvcc: database space exceeded") + ErrGRPCEmptyKey = status.New(codes.InvalidArgument, "etcdserver: key is not provided").Err() + ErrGRPCKeyNotFound = status.New(codes.InvalidArgument, "etcdserver: key not found").Err() + ErrGRPCValueProvided = status.New(codes.InvalidArgument, "etcdserver: value is provided").Err() + ErrGRPCLeaseProvided = status.New(codes.InvalidArgument, "etcdserver: lease is provided").Err() + ErrGRPCTooManyOps = status.New(codes.InvalidArgument, "etcdserver: too many operations in txn request").Err() + ErrGRPCDuplicateKey = status.New(codes.InvalidArgument, "etcdserver: duplicate key given in txn request").Err() + ErrGRPCCompacted = status.New(codes.OutOfRange, "etcdserver: mvcc: required revision has been compacted").Err() + ErrGRPCFutureRev = status.New(codes.OutOfRange, "etcdserver: mvcc: required revision is a future revision").Err() + ErrGRPCNoSpace = status.New(codes.ResourceExhausted, "etcdserver: mvcc: database space exceeded").Err() - ErrGRPCLeaseNotFound = grpc.Errorf(codes.NotFound, "etcdserver: requested lease not found") - ErrGRPCLeaseExist = grpc.Errorf(codes.FailedPrecondition, "etcdserver: lease already exists") + ErrGRPCLeaseNotFound = status.New(codes.NotFound, "etcdserver: requested lease not found").Err() + ErrGRPCLeaseExist = status.New(codes.FailedPrecondition, "etcdserver: lease already exists").Err() + ErrGRPCLeaseTTLTooLarge = status.New(codes.OutOfRange, "etcdserver: too large lease TTL").Err() - ErrGRPCMemberExist = grpc.Errorf(codes.FailedPrecondition, "etcdserver: member ID already exist") - ErrGRPCPeerURLExist = grpc.Errorf(codes.FailedPrecondition, "etcdserver: Peer URLs already exists") - ErrGRPCMemberNotEnoughStarted = grpc.Errorf(codes.FailedPrecondition, "etcdserver: re-configuration failed due to not enough started members") - ErrGRPCMemberBadURLs = grpc.Errorf(codes.InvalidArgument, "etcdserver: given member URLs are invalid") - ErrGRPCMemberNotFound = grpc.Errorf(codes.NotFound, "etcdserver: member not found") + ErrGRPCMemberExist = status.New(codes.FailedPrecondition, "etcdserver: member ID already exist").Err() + ErrGRPCPeerURLExist = status.New(codes.FailedPrecondition, "etcdserver: Peer URLs already exists").Err() + ErrGRPCMemberNotEnoughStarted = status.New(codes.FailedPrecondition, "etcdserver: re-configuration failed due to not enough started members").Err() + ErrGRPCMemberBadURLs = status.New(codes.InvalidArgument, "etcdserver: given member URLs are invalid").Err() + ErrGRPCMemberNotFound = status.New(codes.NotFound, "etcdserver: member not found").Err() - ErrGRPCRequestTooLarge = grpc.Errorf(codes.InvalidArgument, "etcdserver: request is too large") - ErrGRPCRequestTooManyRequests = grpc.Errorf(codes.ResourceExhausted, "etcdserver: too many requests") + ErrGRPCRequestTooLarge = status.New(codes.InvalidArgument, "etcdserver: request is too large").Err() + ErrGRPCRequestTooManyRequests = status.New(codes.ResourceExhausted, "etcdserver: too many requests").Err() - ErrGRPCRootUserNotExist = grpc.Errorf(codes.FailedPrecondition, "etcdserver: root user does not exist") - ErrGRPCRootRoleNotExist = grpc.Errorf(codes.FailedPrecondition, "etcdserver: root user does not have root role") - ErrGRPCUserAlreadyExist = grpc.Errorf(codes.FailedPrecondition, "etcdserver: user name already exists") - ErrGRPCUserEmpty = grpc.Errorf(codes.InvalidArgument, "etcdserver: user name is empty") - ErrGRPCUserNotFound = grpc.Errorf(codes.FailedPrecondition, "etcdserver: user name not found") - ErrGRPCRoleAlreadyExist = grpc.Errorf(codes.FailedPrecondition, "etcdserver: role name already exists") - ErrGRPCRoleNotFound = grpc.Errorf(codes.FailedPrecondition, "etcdserver: role name not found") - ErrGRPCAuthFailed = grpc.Errorf(codes.InvalidArgument, "etcdserver: authentication failed, invalid user ID or password") - ErrGRPCPermissionDenied = grpc.Errorf(codes.PermissionDenied, "etcdserver: permission denied") - ErrGRPCRoleNotGranted = grpc.Errorf(codes.FailedPrecondition, "etcdserver: role is not granted to the user") - ErrGRPCPermissionNotGranted = grpc.Errorf(codes.FailedPrecondition, "etcdserver: permission is not granted to the role") - ErrGRPCAuthNotEnabled = grpc.Errorf(codes.FailedPrecondition, "etcdserver: authentication is not enabled") - ErrGRPCInvalidAuthToken = grpc.Errorf(codes.Unauthenticated, "etcdserver: invalid auth token") - ErrGRPCInvalidAuthMgmt = grpc.Errorf(codes.InvalidArgument, "etcdserver: invalid auth management") + ErrGRPCRootUserNotExist = status.New(codes.FailedPrecondition, "etcdserver: root user does not exist").Err() + ErrGRPCRootRoleNotExist = status.New(codes.FailedPrecondition, "etcdserver: root user does not have root role").Err() + ErrGRPCUserAlreadyExist = status.New(codes.FailedPrecondition, "etcdserver: user name already exists").Err() + ErrGRPCUserEmpty = status.New(codes.InvalidArgument, "etcdserver: user name is empty").Err() + ErrGRPCUserNotFound = status.New(codes.FailedPrecondition, "etcdserver: user name not found").Err() + ErrGRPCRoleAlreadyExist = status.New(codes.FailedPrecondition, "etcdserver: role name already exists").Err() + ErrGRPCRoleNotFound = status.New(codes.FailedPrecondition, "etcdserver: role name not found").Err() + ErrGRPCAuthFailed = status.New(codes.InvalidArgument, "etcdserver: authentication failed, invalid user ID or password").Err() + ErrGRPCPermissionDenied = status.New(codes.PermissionDenied, "etcdserver: permission denied").Err() + ErrGRPCRoleNotGranted = status.New(codes.FailedPrecondition, "etcdserver: role is not granted to the user").Err() + ErrGRPCPermissionNotGranted = status.New(codes.FailedPrecondition, "etcdserver: permission is not granted to the role").Err() + ErrGRPCAuthNotEnabled = status.New(codes.FailedPrecondition, "etcdserver: authentication is not enabled").Err() + ErrGRPCInvalidAuthToken = status.New(codes.Unauthenticated, "etcdserver: invalid auth token").Err() + ErrGRPCInvalidAuthMgmt = status.New(codes.InvalidArgument, "etcdserver: invalid auth management").Err() - ErrGRPCNoLeader = grpc.Errorf(codes.Unavailable, "etcdserver: no leader") - ErrGRPCNotCapable = grpc.Errorf(codes.Unavailable, "etcdserver: not capable") - ErrGRPCStopped = grpc.Errorf(codes.Unavailable, "etcdserver: server stopped") - ErrGRPCTimeout = grpc.Errorf(codes.Unavailable, "etcdserver: request timed out") - ErrGRPCTimeoutDueToLeaderFail = grpc.Errorf(codes.Unavailable, "etcdserver: request timed out, possibly due to previous leader failure") - ErrGRPCTimeoutDueToConnectionLost = grpc.Errorf(codes.Unavailable, "etcdserver: request timed out, possibly due to connection lost") - ErrGRPCUnhealthy = grpc.Errorf(codes.Unavailable, "etcdserver: unhealthy cluster") + ErrGRPCNoLeader = status.New(codes.Unavailable, "etcdserver: no leader").Err() + ErrGRPCNotLeader = status.New(codes.FailedPrecondition, "etcdserver: not leader").Err() + ErrGRPCNotCapable = status.New(codes.Unavailable, "etcdserver: not capable").Err() + ErrGRPCStopped = status.New(codes.Unavailable, "etcdserver: server stopped").Err() + ErrGRPCTimeout = status.New(codes.Unavailable, "etcdserver: request timed out").Err() + ErrGRPCTimeoutDueToLeaderFail = status.New(codes.Unavailable, "etcdserver: request timed out, possibly due to previous leader failure").Err() + ErrGRPCTimeoutDueToConnectionLost = status.New(codes.Unavailable, "etcdserver: request timed out, possibly due to connection lost").Err() + ErrGRPCUnhealthy = status.New(codes.Unavailable, "etcdserver: unhealthy cluster").Err() + ErrGRPCCorrupt = status.New(codes.DataLoss, "etcdserver: corrupt cluster").Err() errStringToError = map[string]error{ - grpc.ErrorDesc(ErrGRPCEmptyKey): ErrGRPCEmptyKey, - grpc.ErrorDesc(ErrGRPCKeyNotFound): ErrGRPCKeyNotFound, - grpc.ErrorDesc(ErrGRPCValueProvided): ErrGRPCValueProvided, - grpc.ErrorDesc(ErrGRPCLeaseProvided): ErrGRPCLeaseProvided, + ErrorDesc(ErrGRPCEmptyKey): ErrGRPCEmptyKey, + ErrorDesc(ErrGRPCKeyNotFound): ErrGRPCKeyNotFound, + ErrorDesc(ErrGRPCValueProvided): ErrGRPCValueProvided, + ErrorDesc(ErrGRPCLeaseProvided): ErrGRPCLeaseProvided, - grpc.ErrorDesc(ErrGRPCTooManyOps): ErrGRPCTooManyOps, - grpc.ErrorDesc(ErrGRPCDuplicateKey): ErrGRPCDuplicateKey, - grpc.ErrorDesc(ErrGRPCCompacted): ErrGRPCCompacted, - grpc.ErrorDesc(ErrGRPCFutureRev): ErrGRPCFutureRev, - grpc.ErrorDesc(ErrGRPCNoSpace): ErrGRPCNoSpace, + ErrorDesc(ErrGRPCTooManyOps): ErrGRPCTooManyOps, + ErrorDesc(ErrGRPCDuplicateKey): ErrGRPCDuplicateKey, + ErrorDesc(ErrGRPCCompacted): ErrGRPCCompacted, + ErrorDesc(ErrGRPCFutureRev): ErrGRPCFutureRev, + ErrorDesc(ErrGRPCNoSpace): ErrGRPCNoSpace, - grpc.ErrorDesc(ErrGRPCLeaseNotFound): ErrGRPCLeaseNotFound, - grpc.ErrorDesc(ErrGRPCLeaseExist): ErrGRPCLeaseExist, + ErrorDesc(ErrGRPCLeaseNotFound): ErrGRPCLeaseNotFound, + ErrorDesc(ErrGRPCLeaseExist): ErrGRPCLeaseExist, + ErrorDesc(ErrGRPCLeaseTTLTooLarge): ErrGRPCLeaseTTLTooLarge, - grpc.ErrorDesc(ErrGRPCMemberExist): ErrGRPCMemberExist, - grpc.ErrorDesc(ErrGRPCPeerURLExist): ErrGRPCPeerURLExist, - grpc.ErrorDesc(ErrGRPCMemberNotEnoughStarted): ErrGRPCMemberNotEnoughStarted, - grpc.ErrorDesc(ErrGRPCMemberBadURLs): ErrGRPCMemberBadURLs, - grpc.ErrorDesc(ErrGRPCMemberNotFound): ErrGRPCMemberNotFound, + ErrorDesc(ErrGRPCMemberExist): ErrGRPCMemberExist, + ErrorDesc(ErrGRPCPeerURLExist): ErrGRPCPeerURLExist, + ErrorDesc(ErrGRPCMemberNotEnoughStarted): ErrGRPCMemberNotEnoughStarted, + ErrorDesc(ErrGRPCMemberBadURLs): ErrGRPCMemberBadURLs, + ErrorDesc(ErrGRPCMemberNotFound): ErrGRPCMemberNotFound, - grpc.ErrorDesc(ErrGRPCRequestTooLarge): ErrGRPCRequestTooLarge, - grpc.ErrorDesc(ErrGRPCRequestTooManyRequests): ErrGRPCRequestTooManyRequests, + ErrorDesc(ErrGRPCRequestTooLarge): ErrGRPCRequestTooLarge, + ErrorDesc(ErrGRPCRequestTooManyRequests): ErrGRPCRequestTooManyRequests, - grpc.ErrorDesc(ErrGRPCRootUserNotExist): ErrGRPCRootUserNotExist, - grpc.ErrorDesc(ErrGRPCRootRoleNotExist): ErrGRPCRootRoleNotExist, - grpc.ErrorDesc(ErrGRPCUserAlreadyExist): ErrGRPCUserAlreadyExist, - grpc.ErrorDesc(ErrGRPCUserEmpty): ErrGRPCUserEmpty, - grpc.ErrorDesc(ErrGRPCUserNotFound): ErrGRPCUserNotFound, - grpc.ErrorDesc(ErrGRPCRoleAlreadyExist): ErrGRPCRoleAlreadyExist, - grpc.ErrorDesc(ErrGRPCRoleNotFound): ErrGRPCRoleNotFound, - grpc.ErrorDesc(ErrGRPCAuthFailed): ErrGRPCAuthFailed, - grpc.ErrorDesc(ErrGRPCPermissionDenied): ErrGRPCPermissionDenied, - grpc.ErrorDesc(ErrGRPCRoleNotGranted): ErrGRPCRoleNotGranted, - grpc.ErrorDesc(ErrGRPCPermissionNotGranted): ErrGRPCPermissionNotGranted, - grpc.ErrorDesc(ErrGRPCAuthNotEnabled): ErrGRPCAuthNotEnabled, - grpc.ErrorDesc(ErrGRPCInvalidAuthToken): ErrGRPCInvalidAuthToken, - grpc.ErrorDesc(ErrGRPCInvalidAuthMgmt): ErrGRPCInvalidAuthMgmt, + ErrorDesc(ErrGRPCRootUserNotExist): ErrGRPCRootUserNotExist, + ErrorDesc(ErrGRPCRootRoleNotExist): ErrGRPCRootRoleNotExist, + ErrorDesc(ErrGRPCUserAlreadyExist): ErrGRPCUserAlreadyExist, + ErrorDesc(ErrGRPCUserEmpty): ErrGRPCUserEmpty, + ErrorDesc(ErrGRPCUserNotFound): ErrGRPCUserNotFound, + ErrorDesc(ErrGRPCRoleAlreadyExist): ErrGRPCRoleAlreadyExist, + ErrorDesc(ErrGRPCRoleNotFound): ErrGRPCRoleNotFound, + ErrorDesc(ErrGRPCAuthFailed): ErrGRPCAuthFailed, + ErrorDesc(ErrGRPCPermissionDenied): ErrGRPCPermissionDenied, + ErrorDesc(ErrGRPCRoleNotGranted): ErrGRPCRoleNotGranted, + ErrorDesc(ErrGRPCPermissionNotGranted): ErrGRPCPermissionNotGranted, + ErrorDesc(ErrGRPCAuthNotEnabled): ErrGRPCAuthNotEnabled, + ErrorDesc(ErrGRPCInvalidAuthToken): ErrGRPCInvalidAuthToken, + ErrorDesc(ErrGRPCInvalidAuthMgmt): ErrGRPCInvalidAuthMgmt, - grpc.ErrorDesc(ErrGRPCNoLeader): ErrGRPCNoLeader, - grpc.ErrorDesc(ErrGRPCNotCapable): ErrGRPCNotCapable, - grpc.ErrorDesc(ErrGRPCStopped): ErrGRPCStopped, - grpc.ErrorDesc(ErrGRPCTimeout): ErrGRPCTimeout, - grpc.ErrorDesc(ErrGRPCTimeoutDueToLeaderFail): ErrGRPCTimeoutDueToLeaderFail, - grpc.ErrorDesc(ErrGRPCTimeoutDueToConnectionLost): ErrGRPCTimeoutDueToConnectionLost, - grpc.ErrorDesc(ErrGRPCUnhealthy): ErrGRPCUnhealthy, + ErrorDesc(ErrGRPCNoLeader): ErrGRPCNoLeader, + ErrorDesc(ErrGRPCNotLeader): ErrGRPCNotLeader, + ErrorDesc(ErrGRPCNotCapable): ErrGRPCNotCapable, + ErrorDesc(ErrGRPCStopped): ErrGRPCStopped, + ErrorDesc(ErrGRPCTimeout): ErrGRPCTimeout, + ErrorDesc(ErrGRPCTimeoutDueToLeaderFail): ErrGRPCTimeoutDueToLeaderFail, + ErrorDesc(ErrGRPCTimeoutDueToConnectionLost): ErrGRPCTimeoutDueToConnectionLost, + ErrorDesc(ErrGRPCUnhealthy): ErrGRPCUnhealthy, + ErrorDesc(ErrGRPCCorrupt): ErrGRPCCorrupt, } +) - // client-side error +// client-side error +var ( ErrEmptyKey = Error(ErrGRPCEmptyKey) ErrKeyNotFound = Error(ErrGRPCKeyNotFound) ErrValueProvided = Error(ErrGRPCValueProvided) @@ -125,8 +133,9 @@ var ( ErrFutureRev = Error(ErrGRPCFutureRev) ErrNoSpace = Error(ErrGRPCNoSpace) - ErrLeaseNotFound = Error(ErrGRPCLeaseNotFound) - ErrLeaseExist = Error(ErrGRPCLeaseExist) + ErrLeaseNotFound = Error(ErrGRPCLeaseNotFound) + ErrLeaseExist = Error(ErrGRPCLeaseExist) + ErrLeaseTTLTooLarge = Error(ErrGRPCLeaseTTLTooLarge) ErrMemberExist = Error(ErrGRPCMemberExist) ErrPeerURLExist = Error(ErrGRPCPeerURLExist) @@ -153,12 +162,14 @@ var ( ErrInvalidAuthMgmt = Error(ErrGRPCInvalidAuthMgmt) ErrNoLeader = Error(ErrGRPCNoLeader) + ErrNotLeader = Error(ErrGRPCNotLeader) ErrNotCapable = Error(ErrGRPCNotCapable) ErrStopped = Error(ErrGRPCStopped) ErrTimeout = Error(ErrGRPCTimeout) ErrTimeoutDueToLeaderFail = Error(ErrGRPCTimeoutDueToLeaderFail) ErrTimeoutDueToConnectionLost = Error(ErrGRPCTimeoutDueToConnectionLost) ErrUnhealthy = Error(ErrGRPCUnhealthy) + ErrCorrupt = Error(ErrGRPCCorrupt) ) // EtcdError defines gRPC server errors. @@ -182,9 +193,23 @@ func Error(err error) error { if err == nil { return nil } - verr, ok := errStringToError[grpc.ErrorDesc(err)] + verr, ok := errStringToError[ErrorDesc(err)] if !ok { // not gRPC error return err } - return EtcdError{code: grpc.Code(verr), desc: grpc.ErrorDesc(verr)} + ev, ok := status.FromError(verr) + var desc string + if ok { + desc = ev.Message() + } else { + desc = verr.Error() + } + return EtcdError{code: ev.Code(), desc: desc} +} + +func ErrorDesc(err error) string { + if s, ok := status.FromError(err); ok { + return s.Message() + } + return err.Error() } diff --git a/vendor/github.com/coreos/etcd/etcdserver/etcdserverpb/etcdserver.pb.go b/vendor/github.com/coreos/etcd/etcdserver/etcdserverpb/etcdserver.pb.go index aabf90061..90045a5c9 100644 --- a/vendor/github.com/coreos/etcd/etcdserver/etcdserverpb/etcdserver.pb.go +++ b/vendor/github.com/coreos/etcd/etcdserver/etcdserverpb/etcdserver.pb.go @@ -1,6 +1,5 @@ -// Code generated by protoc-gen-gogo. +// Code generated by protoc-gen-gogo. DO NOT EDIT. // source: etcdserver.proto -// DO NOT EDIT! /* Package etcdserverpb is a generated protocol buffer package. @@ -32,6 +31,8 @@ CompactionRequest CompactionResponse HashRequest + HashKVRequest + HashKVResponse HashResponse SnapshotRequest SnapshotResponse @@ -47,6 +48,9 @@ LeaseKeepAliveResponse LeaseTimeToLiveRequest LeaseTimeToLiveResponse + LeaseLeasesRequest + LeaseStatus + LeaseLeasesResponse Member MemberAddRequest MemberAddResponse @@ -58,6 +62,8 @@ MemberListResponse DefragmentRequest DefragmentResponse + MoveLeaderRequest + MoveLeaderResponse AlarmRequest AlarmMember AlarmResponse @@ -105,6 +111,8 @@ import ( math "math" + _ "github.com/gogo/protobuf/gogoproto" + io "io" ) @@ -311,24 +319,6 @@ func (m *Metadata) MarshalTo(dAtA []byte) (int, error) { return i, nil } -func encodeFixed64Etcdserver(dAtA []byte, offset int, v uint64) int { - dAtA[offset] = uint8(v) - dAtA[offset+1] = uint8(v >> 8) - dAtA[offset+2] = uint8(v >> 16) - dAtA[offset+3] = uint8(v >> 24) - dAtA[offset+4] = uint8(v >> 32) - dAtA[offset+5] = uint8(v >> 40) - dAtA[offset+6] = uint8(v >> 48) - dAtA[offset+7] = uint8(v >> 56) - return offset + 8 -} -func encodeFixed32Etcdserver(dAtA []byte, offset int, v uint32) int { - dAtA[offset] = uint8(v) - dAtA[offset+1] = uint8(v >> 8) - dAtA[offset+2] = uint8(v >> 16) - dAtA[offset+3] = uint8(v >> 24) - return offset + 4 -} func encodeVarintEtcdserver(dAtA []byte, offset int, v uint64) int { for v >= 1<<7 { dAtA[offset] = uint8(v&0x7f | 0x80) diff --git a/vendor/github.com/coreos/etcd/etcdserver/etcdserverpb/raft_internal.pb.go b/vendor/github.com/coreos/etcd/etcdserver/etcdserverpb/raft_internal.pb.go index 44a3b6f69..3084c6cbf 100644 --- a/vendor/github.com/coreos/etcd/etcdserver/etcdserverpb/raft_internal.pb.go +++ b/vendor/github.com/coreos/etcd/etcdserver/etcdserverpb/raft_internal.pb.go @@ -1,6 +1,5 @@ -// Code generated by protoc-gen-gogo. +// Code generated by protoc-gen-gogo. DO NOT EDIT. // source: raft_internal.proto -// DO NOT EDIT! package etcdserverpb @@ -11,6 +10,8 @@ import ( math "math" + _ "github.com/gogo/protobuf/gogoproto" + io "io" ) @@ -505,24 +506,6 @@ func (m *InternalAuthenticateRequest) MarshalTo(dAtA []byte) (int, error) { return i, nil } -func encodeFixed64RaftInternal(dAtA []byte, offset int, v uint64) int { - dAtA[offset] = uint8(v) - dAtA[offset+1] = uint8(v >> 8) - dAtA[offset+2] = uint8(v >> 16) - dAtA[offset+3] = uint8(v >> 24) - dAtA[offset+4] = uint8(v >> 32) - dAtA[offset+5] = uint8(v >> 40) - dAtA[offset+6] = uint8(v >> 48) - dAtA[offset+7] = uint8(v >> 56) - return offset + 8 -} -func encodeFixed32RaftInternal(dAtA []byte, offset int, v uint32) int { - dAtA[offset] = uint8(v) - dAtA[offset+1] = uint8(v >> 8) - dAtA[offset+2] = uint8(v >> 16) - dAtA[offset+3] = uint8(v >> 24) - return offset + 4 -} func encodeVarintRaftInternal(dAtA []byte, offset int, v uint64) int { for v >= 1<<7 { dAtA[offset] = uint8(v&0x7f | 0x80) diff --git a/vendor/github.com/coreos/etcd/etcdserver/etcdserverpb/raft_internal_stringer.go b/vendor/github.com/coreos/etcd/etcdserver/etcdserverpb/raft_internal_stringer.go new file mode 100644 index 000000000..3d3536a32 --- /dev/null +++ b/vendor/github.com/coreos/etcd/etcdserver/etcdserverpb/raft_internal_stringer.go @@ -0,0 +1,183 @@ +// Copyright 2018 The etcd Authors +// +// 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. + +package etcdserverpb + +import ( + "fmt" + "strings" + + proto "github.com/golang/protobuf/proto" +) + +// InternalRaftStringer implements custom proto Stringer: +// redact password, replace value fields with value_size fields. +type InternalRaftStringer struct { + Request *InternalRaftRequest +} + +func (as *InternalRaftStringer) String() string { + switch { + case as.Request.LeaseGrant != nil: + return fmt.Sprintf("header:<%s> lease_grant:", + as.Request.Header.String(), + as.Request.LeaseGrant.TTL, + as.Request.LeaseGrant.ID, + ) + case as.Request.LeaseRevoke != nil: + return fmt.Sprintf("header:<%s> lease_revoke:", + as.Request.Header.String(), + as.Request.LeaseRevoke.ID, + ) + case as.Request.Authenticate != nil: + return fmt.Sprintf("header:<%s> authenticate:", + as.Request.Header.String(), + as.Request.Authenticate.Name, + as.Request.Authenticate.SimpleToken, + ) + case as.Request.AuthUserAdd != nil: + return fmt.Sprintf("header:<%s> auth_user_add:", + as.Request.Header.String(), + as.Request.AuthUserAdd.Name, + ) + case as.Request.AuthUserChangePassword != nil: + return fmt.Sprintf("header:<%s> auth_user_change_password:", + as.Request.Header.String(), + as.Request.AuthUserChangePassword.Name, + ) + case as.Request.Put != nil: + return fmt.Sprintf("header:<%s> put:<%s>", + as.Request.Header.String(), + NewLoggablePutRequest(as.Request.Put).String(), + ) + case as.Request.Txn != nil: + return fmt.Sprintf("header:<%s> txn:<%s>", + as.Request.Header.String(), + NewLoggableTxnRequest(as.Request.Txn).String(), + ) + default: + // nothing to redact + } + return as.Request.String() +} + +// txnRequestStringer implements a custom proto String to replace value bytes fields with value size +// fields in any nested txn and put operations. +type txnRequestStringer struct { + Request *TxnRequest +} + +func NewLoggableTxnRequest(request *TxnRequest) *txnRequestStringer { + return &txnRequestStringer{request} +} + +func (as *txnRequestStringer) String() string { + var compare []string + for _, c := range as.Request.Compare { + switch cv := c.TargetUnion.(type) { + case *Compare_Value: + compare = append(compare, newLoggableValueCompare(c, cv).String()) + default: + // nothing to redact + compare = append(compare, c.String()) + } + } + var success []string + for _, s := range as.Request.Success { + success = append(success, newLoggableRequestOp(s).String()) + } + var failure []string + for _, f := range as.Request.Failure { + failure = append(failure, newLoggableRequestOp(f).String()) + } + return fmt.Sprintf("compare:<%s> success:<%s> failure:<%s>", + strings.Join(compare, " "), + strings.Join(success, " "), + strings.Join(failure, " "), + ) +} + +// requestOpStringer implements a custom proto String to replace value bytes fields with value +// size fields in any nested txn and put operations. +type requestOpStringer struct { + Op *RequestOp +} + +func newLoggableRequestOp(op *RequestOp) *requestOpStringer { + return &requestOpStringer{op} +} + +func (as *requestOpStringer) String() string { + switch op := as.Op.Request.(type) { + case *RequestOp_RequestPut: + return fmt.Sprintf("request_put:<%s>", NewLoggablePutRequest(op.RequestPut).String()) + case *RequestOp_RequestTxn: + return fmt.Sprintf("request_txn:<%s>", NewLoggableTxnRequest(op.RequestTxn).String()) + default: + // nothing to redact + } + return as.Op.String() +} + +// loggableValueCompare implements a custom proto String for Compare.Value union member types to +// replace the value bytes field with a value size field. +// To preserve proto encoding of the key and range_end bytes, a faked out proto type is used here. +type loggableValueCompare struct { + Result Compare_CompareResult `protobuf:"varint,1,opt,name=result,proto3,enum=etcdserverpb.Compare_CompareResult"` + Target Compare_CompareTarget `protobuf:"varint,2,opt,name=target,proto3,enum=etcdserverpb.Compare_CompareTarget"` + Key []byte `protobuf:"bytes,3,opt,name=key,proto3"` + ValueSize int `protobuf:"bytes,7,opt,name=value_size,proto3"` + RangeEnd []byte `protobuf:"bytes,64,opt,name=range_end,proto3"` +} + +func newLoggableValueCompare(c *Compare, cv *Compare_Value) *loggableValueCompare { + return &loggableValueCompare{ + c.Result, + c.Target, + c.Key, + len(cv.Value), + c.RangeEnd, + } +} + +func (m *loggableValueCompare) Reset() { *m = loggableValueCompare{} } +func (m *loggableValueCompare) String() string { return proto.CompactTextString(m) } +func (*loggableValueCompare) ProtoMessage() {} + +// loggablePutRequest implements a custom proto String to replace value bytes field with a value +// size field. +// To preserve proto encoding of the key bytes, a faked out proto type is used here. +type loggablePutRequest struct { + Key []byte `protobuf:"bytes,1,opt,name=key,proto3"` + ValueSize int `protobuf:"varint,2,opt,name=value_size,proto3"` + Lease int64 `protobuf:"varint,3,opt,name=lease,proto3"` + PrevKv bool `protobuf:"varint,4,opt,name=prev_kv,proto3"` + IgnoreValue bool `protobuf:"varint,5,opt,name=ignore_value,proto3"` + IgnoreLease bool `protobuf:"varint,6,opt,name=ignore_lease,proto3"` +} + +func NewLoggablePutRequest(request *PutRequest) *loggablePutRequest { + return &loggablePutRequest{ + request.Key, + len(request.Value), + request.Lease, + request.PrevKv, + request.IgnoreValue, + request.IgnoreLease, + } +} + +func (m *loggablePutRequest) Reset() { *m = loggablePutRequest{} } +func (m *loggablePutRequest) String() string { return proto.CompactTextString(m) } +func (*loggablePutRequest) ProtoMessage() {} diff --git a/vendor/github.com/coreos/etcd/etcdserver/etcdserverpb/rpc.pb.go b/vendor/github.com/coreos/etcd/etcdserver/etcdserverpb/rpc.pb.go index 018a3652b..40147f935 100644 --- a/vendor/github.com/coreos/etcd/etcdserver/etcdserverpb/rpc.pb.go +++ b/vendor/github.com/coreos/etcd/etcdserver/etcdserverpb/rpc.pb.go @@ -1,6 +1,5 @@ -// Code generated by protoc-gen-gogo. +// Code generated by protoc-gen-gogo. DO NOT EDIT. // source: rpc.proto -// DO NOT EDIT! package etcdserverpb @@ -11,6 +10,8 @@ import ( math "math" + _ "github.com/gogo/protobuf/gogoproto" + mvccpb "github.com/coreos/etcd/mvcc/mvccpb" authpb "github.com/coreos/etcd/auth/authpb" @@ -32,15 +33,18 @@ type AlarmType int32 const ( AlarmType_NONE AlarmType = 0 AlarmType_NOSPACE AlarmType = 1 + AlarmType_CORRUPT AlarmType = 2 ) var AlarmType_name = map[int32]string{ 0: "NONE", 1: "NOSPACE", + 2: "CORRUPT", } var AlarmType_value = map[string]int32{ "NONE": 0, "NOSPACE": 1, + "CORRUPT": 2, } func (x AlarmType) String() string { @@ -136,6 +140,7 @@ const ( Compare_CREATE Compare_CompareTarget = 1 Compare_MOD Compare_CompareTarget = 2 Compare_VALUE Compare_CompareTarget = 3 + Compare_LEASE Compare_CompareTarget = 4 ) var Compare_CompareTarget_name = map[int32]string{ @@ -143,12 +148,14 @@ var Compare_CompareTarget_name = map[int32]string{ 1: "CREATE", 2: "MOD", 3: "VALUE", + 4: "LEASE", } var Compare_CompareTarget_value = map[string]int32{ "VERSION": 0, "CREATE": 1, "MOD": 2, "VALUE": 3, + "LEASE": 4, } func (x Compare_CompareTarget) String() string { @@ -178,7 +185,7 @@ func (x WatchCreateRequest_FilterType) String() string { return proto.EnumName(WatchCreateRequest_FilterType_name, int32(x)) } func (WatchCreateRequest_FilterType) EnumDescriptor() ([]byte, []int) { - return fileDescriptorRpc, []int{19, 0} + return fileDescriptorRpc, []int{21, 0} } type AlarmRequest_AlarmAction int32 @@ -204,7 +211,7 @@ func (x AlarmRequest_AlarmAction) String() string { return proto.EnumName(AlarmRequest_AlarmAction_name, int32(x)) } func (AlarmRequest_AlarmAction) EnumDescriptor() ([]byte, []int) { - return fileDescriptorRpc, []int{41, 0} + return fileDescriptorRpc, []int{48, 0} } type ResponseHeader struct { @@ -223,6 +230,34 @@ func (m *ResponseHeader) String() string { return proto.CompactTextSt func (*ResponseHeader) ProtoMessage() {} func (*ResponseHeader) Descriptor() ([]byte, []int) { return fileDescriptorRpc, []int{0} } +func (m *ResponseHeader) GetClusterId() uint64 { + if m != nil { + return m.ClusterId + } + return 0 +} + +func (m *ResponseHeader) GetMemberId() uint64 { + if m != nil { + return m.MemberId + } + return 0 +} + +func (m *ResponseHeader) GetRevision() int64 { + if m != nil { + return m.Revision + } + return 0 +} + +func (m *ResponseHeader) GetRaftTerm() uint64 { + if m != nil { + return m.RaftTerm + } + return 0 +} + type RangeRequest struct { // key is the first key for the range. If range_end is not given, the request only looks up key. Key []byte `protobuf:"bytes,1,opt,name=key,proto3" json:"key,omitempty"` @@ -273,6 +308,97 @@ func (m *RangeRequest) String() string { return proto.CompactTextStri func (*RangeRequest) ProtoMessage() {} func (*RangeRequest) Descriptor() ([]byte, []int) { return fileDescriptorRpc, []int{1} } +func (m *RangeRequest) GetKey() []byte { + if m != nil { + return m.Key + } + return nil +} + +func (m *RangeRequest) GetRangeEnd() []byte { + if m != nil { + return m.RangeEnd + } + return nil +} + +func (m *RangeRequest) GetLimit() int64 { + if m != nil { + return m.Limit + } + return 0 +} + +func (m *RangeRequest) GetRevision() int64 { + if m != nil { + return m.Revision + } + return 0 +} + +func (m *RangeRequest) GetSortOrder() RangeRequest_SortOrder { + if m != nil { + return m.SortOrder + } + return RangeRequest_NONE +} + +func (m *RangeRequest) GetSortTarget() RangeRequest_SortTarget { + if m != nil { + return m.SortTarget + } + return RangeRequest_KEY +} + +func (m *RangeRequest) GetSerializable() bool { + if m != nil { + return m.Serializable + } + return false +} + +func (m *RangeRequest) GetKeysOnly() bool { + if m != nil { + return m.KeysOnly + } + return false +} + +func (m *RangeRequest) GetCountOnly() bool { + if m != nil { + return m.CountOnly + } + return false +} + +func (m *RangeRequest) GetMinModRevision() int64 { + if m != nil { + return m.MinModRevision + } + return 0 +} + +func (m *RangeRequest) GetMaxModRevision() int64 { + if m != nil { + return m.MaxModRevision + } + return 0 +} + +func (m *RangeRequest) GetMinCreateRevision() int64 { + if m != nil { + return m.MinCreateRevision + } + return 0 +} + +func (m *RangeRequest) GetMaxCreateRevision() int64 { + if m != nil { + return m.MaxCreateRevision + } + return 0 +} + type RangeResponse struct { Header *ResponseHeader `protobuf:"bytes,1,opt,name=header" json:"header,omitempty"` // kvs is the list of key-value pairs matched by the range request. @@ -303,6 +429,20 @@ func (m *RangeResponse) GetKvs() []*mvccpb.KeyValue { return nil } +func (m *RangeResponse) GetMore() bool { + if m != nil { + return m.More + } + return false +} + +func (m *RangeResponse) GetCount() int64 { + if m != nil { + return m.Count + } + return 0 +} + type PutRequest struct { // key is the key, in bytes, to put into the key-value store. Key []byte `protobuf:"bytes,1,opt,name=key,proto3" json:"key,omitempty"` @@ -327,6 +467,48 @@ func (m *PutRequest) String() string { return proto.CompactTextString func (*PutRequest) ProtoMessage() {} func (*PutRequest) Descriptor() ([]byte, []int) { return fileDescriptorRpc, []int{3} } +func (m *PutRequest) GetKey() []byte { + if m != nil { + return m.Key + } + return nil +} + +func (m *PutRequest) GetValue() []byte { + if m != nil { + return m.Value + } + return nil +} + +func (m *PutRequest) GetLease() int64 { + if m != nil { + return m.Lease + } + return 0 +} + +func (m *PutRequest) GetPrevKv() bool { + if m != nil { + return m.PrevKv + } + return false +} + +func (m *PutRequest) GetIgnoreValue() bool { + if m != nil { + return m.IgnoreValue + } + return false +} + +func (m *PutRequest) GetIgnoreLease() bool { + if m != nil { + return m.IgnoreLease + } + return false +} + type PutResponse struct { Header *ResponseHeader `protobuf:"bytes,1,opt,name=header" json:"header,omitempty"` // if prev_kv is set in the request, the previous key-value pair will be returned. @@ -371,6 +553,27 @@ func (m *DeleteRangeRequest) String() string { return proto.CompactTe func (*DeleteRangeRequest) ProtoMessage() {} func (*DeleteRangeRequest) Descriptor() ([]byte, []int) { return fileDescriptorRpc, []int{5} } +func (m *DeleteRangeRequest) GetKey() []byte { + if m != nil { + return m.Key + } + return nil +} + +func (m *DeleteRangeRequest) GetRangeEnd() []byte { + if m != nil { + return m.RangeEnd + } + return nil +} + +func (m *DeleteRangeRequest) GetPrevKv() bool { + if m != nil { + return m.PrevKv + } + return false +} + type DeleteRangeResponse struct { Header *ResponseHeader `protobuf:"bytes,1,opt,name=header" json:"header,omitempty"` // deleted is the number of keys deleted by the delete range request. @@ -391,6 +594,13 @@ func (m *DeleteRangeResponse) GetHeader() *ResponseHeader { return nil } +func (m *DeleteRangeResponse) GetDeleted() int64 { + if m != nil { + return m.Deleted + } + return 0 +} + func (m *DeleteRangeResponse) GetPrevKvs() []*mvccpb.KeyValue { if m != nil { return m.PrevKvs @@ -405,6 +615,7 @@ type RequestOp struct { // *RequestOp_RequestRange // *RequestOp_RequestPut // *RequestOp_RequestDeleteRange + // *RequestOp_RequestTxn Request isRequestOp_Request `protobuf_oneof:"request"` } @@ -428,10 +639,14 @@ type RequestOp_RequestPut struct { type RequestOp_RequestDeleteRange struct { RequestDeleteRange *DeleteRangeRequest `protobuf:"bytes,3,opt,name=request_delete_range,json=requestDeleteRange,oneof"` } +type RequestOp_RequestTxn struct { + RequestTxn *TxnRequest `protobuf:"bytes,4,opt,name=request_txn,json=requestTxn,oneof"` +} func (*RequestOp_RequestRange) isRequestOp_Request() {} func (*RequestOp_RequestPut) isRequestOp_Request() {} func (*RequestOp_RequestDeleteRange) isRequestOp_Request() {} +func (*RequestOp_RequestTxn) isRequestOp_Request() {} func (m *RequestOp) GetRequest() isRequestOp_Request { if m != nil { @@ -461,12 +676,20 @@ func (m *RequestOp) GetRequestDeleteRange() *DeleteRangeRequest { return nil } +func (m *RequestOp) GetRequestTxn() *TxnRequest { + if x, ok := m.GetRequest().(*RequestOp_RequestTxn); ok { + return x.RequestTxn + } + return nil +} + // XXX_OneofFuncs is for the internal use of the proto package. func (*RequestOp) XXX_OneofFuncs() (func(msg proto.Message, b *proto.Buffer) error, func(msg proto.Message, tag, wire int, b *proto.Buffer) (bool, error), func(msg proto.Message) (n int), []interface{}) { return _RequestOp_OneofMarshaler, _RequestOp_OneofUnmarshaler, _RequestOp_OneofSizer, []interface{}{ (*RequestOp_RequestRange)(nil), (*RequestOp_RequestPut)(nil), (*RequestOp_RequestDeleteRange)(nil), + (*RequestOp_RequestTxn)(nil), } } @@ -489,6 +712,11 @@ func _RequestOp_OneofMarshaler(msg proto.Message, b *proto.Buffer) error { if err := b.EncodeMessage(x.RequestDeleteRange); err != nil { return err } + case *RequestOp_RequestTxn: + _ = b.EncodeVarint(4<<3 | proto.WireBytes) + if err := b.EncodeMessage(x.RequestTxn); err != nil { + return err + } case nil: default: return fmt.Errorf("RequestOp.Request has unexpected type %T", x) @@ -523,6 +751,14 @@ func _RequestOp_OneofUnmarshaler(msg proto.Message, tag, wire int, b *proto.Buff err := b.DecodeMessage(msg) m.Request = &RequestOp_RequestDeleteRange{msg} return true, err + case 4: // request.request_txn + if wire != proto.WireBytes { + return true, proto.ErrInternalBadWireType + } + msg := new(TxnRequest) + err := b.DecodeMessage(msg) + m.Request = &RequestOp_RequestTxn{msg} + return true, err default: return false, nil } @@ -547,6 +783,11 @@ func _RequestOp_OneofSizer(msg proto.Message) (n int) { n += proto.SizeVarint(3<<3 | proto.WireBytes) n += proto.SizeVarint(uint64(s)) n += s + case *RequestOp_RequestTxn: + s := proto.Size(x.RequestTxn) + n += proto.SizeVarint(4<<3 | proto.WireBytes) + n += proto.SizeVarint(uint64(s)) + n += s case nil: default: panic(fmt.Sprintf("proto: unexpected type %T in oneof", x)) @@ -561,6 +802,7 @@ type ResponseOp struct { // *ResponseOp_ResponseRange // *ResponseOp_ResponsePut // *ResponseOp_ResponseDeleteRange + // *ResponseOp_ResponseTxn Response isResponseOp_Response `protobuf_oneof:"response"` } @@ -584,10 +826,14 @@ type ResponseOp_ResponsePut struct { type ResponseOp_ResponseDeleteRange struct { ResponseDeleteRange *DeleteRangeResponse `protobuf:"bytes,3,opt,name=response_delete_range,json=responseDeleteRange,oneof"` } +type ResponseOp_ResponseTxn struct { + ResponseTxn *TxnResponse `protobuf:"bytes,4,opt,name=response_txn,json=responseTxn,oneof"` +} func (*ResponseOp_ResponseRange) isResponseOp_Response() {} func (*ResponseOp_ResponsePut) isResponseOp_Response() {} func (*ResponseOp_ResponseDeleteRange) isResponseOp_Response() {} +func (*ResponseOp_ResponseTxn) isResponseOp_Response() {} func (m *ResponseOp) GetResponse() isResponseOp_Response { if m != nil { @@ -617,12 +863,20 @@ func (m *ResponseOp) GetResponseDeleteRange() *DeleteRangeResponse { return nil } +func (m *ResponseOp) GetResponseTxn() *TxnResponse { + if x, ok := m.GetResponse().(*ResponseOp_ResponseTxn); ok { + return x.ResponseTxn + } + return nil +} + // XXX_OneofFuncs is for the internal use of the proto package. func (*ResponseOp) XXX_OneofFuncs() (func(msg proto.Message, b *proto.Buffer) error, func(msg proto.Message, tag, wire int, b *proto.Buffer) (bool, error), func(msg proto.Message) (n int), []interface{}) { return _ResponseOp_OneofMarshaler, _ResponseOp_OneofUnmarshaler, _ResponseOp_OneofSizer, []interface{}{ (*ResponseOp_ResponseRange)(nil), (*ResponseOp_ResponsePut)(nil), (*ResponseOp_ResponseDeleteRange)(nil), + (*ResponseOp_ResponseTxn)(nil), } } @@ -645,6 +899,11 @@ func _ResponseOp_OneofMarshaler(msg proto.Message, b *proto.Buffer) error { if err := b.EncodeMessage(x.ResponseDeleteRange); err != nil { return err } + case *ResponseOp_ResponseTxn: + _ = b.EncodeVarint(4<<3 | proto.WireBytes) + if err := b.EncodeMessage(x.ResponseTxn); err != nil { + return err + } case nil: default: return fmt.Errorf("ResponseOp.Response has unexpected type %T", x) @@ -679,6 +938,14 @@ func _ResponseOp_OneofUnmarshaler(msg proto.Message, tag, wire int, b *proto.Buf err := b.DecodeMessage(msg) m.Response = &ResponseOp_ResponseDeleteRange{msg} return true, err + case 4: // response.response_txn + if wire != proto.WireBytes { + return true, proto.ErrInternalBadWireType + } + msg := new(TxnResponse) + err := b.DecodeMessage(msg) + m.Response = &ResponseOp_ResponseTxn{msg} + return true, err default: return false, nil } @@ -703,6 +970,11 @@ func _ResponseOp_OneofSizer(msg proto.Message) (n int) { n += proto.SizeVarint(3<<3 | proto.WireBytes) n += proto.SizeVarint(uint64(s)) n += s + case *ResponseOp_ResponseTxn: + s := proto.Size(x.ResponseTxn) + n += proto.SizeVarint(4<<3 | proto.WireBytes) + n += proto.SizeVarint(uint64(s)) + n += s case nil: default: panic(fmt.Sprintf("proto: unexpected type %T in oneof", x)) @@ -722,7 +994,11 @@ type Compare struct { // *Compare_CreateRevision // *Compare_ModRevision // *Compare_Value + // *Compare_Lease TargetUnion isCompare_TargetUnion `protobuf_oneof:"target_union"` + // range_end compares the given target to all keys in the range [key, range_end). + // See RangeRequest for more details on key ranges. + RangeEnd []byte `protobuf:"bytes,64,opt,name=range_end,json=rangeEnd,proto3" json:"range_end,omitempty"` } func (m *Compare) Reset() { *m = Compare{} } @@ -748,11 +1024,15 @@ type Compare_ModRevision struct { type Compare_Value struct { Value []byte `protobuf:"bytes,7,opt,name=value,proto3,oneof"` } +type Compare_Lease struct { + Lease int64 `protobuf:"varint,8,opt,name=lease,proto3,oneof"` +} func (*Compare_Version) isCompare_TargetUnion() {} func (*Compare_CreateRevision) isCompare_TargetUnion() {} func (*Compare_ModRevision) isCompare_TargetUnion() {} func (*Compare_Value) isCompare_TargetUnion() {} +func (*Compare_Lease) isCompare_TargetUnion() {} func (m *Compare) GetTargetUnion() isCompare_TargetUnion { if m != nil { @@ -761,6 +1041,27 @@ func (m *Compare) GetTargetUnion() isCompare_TargetUnion { return nil } +func (m *Compare) GetResult() Compare_CompareResult { + if m != nil { + return m.Result + } + return Compare_EQUAL +} + +func (m *Compare) GetTarget() Compare_CompareTarget { + if m != nil { + return m.Target + } + return Compare_VERSION +} + +func (m *Compare) GetKey() []byte { + if m != nil { + return m.Key + } + return nil +} + func (m *Compare) GetVersion() int64 { if x, ok := m.GetTargetUnion().(*Compare_Version); ok { return x.Version @@ -789,6 +1090,20 @@ func (m *Compare) GetValue() []byte { return nil } +func (m *Compare) GetLease() int64 { + if x, ok := m.GetTargetUnion().(*Compare_Lease); ok { + return x.Lease + } + return 0 +} + +func (m *Compare) GetRangeEnd() []byte { + if m != nil { + return m.RangeEnd + } + return nil +} + // XXX_OneofFuncs is for the internal use of the proto package. func (*Compare) XXX_OneofFuncs() (func(msg proto.Message, b *proto.Buffer) error, func(msg proto.Message, tag, wire int, b *proto.Buffer) (bool, error), func(msg proto.Message) (n int), []interface{}) { return _Compare_OneofMarshaler, _Compare_OneofUnmarshaler, _Compare_OneofSizer, []interface{}{ @@ -796,6 +1111,7 @@ func (*Compare) XXX_OneofFuncs() (func(msg proto.Message, b *proto.Buffer) error (*Compare_CreateRevision)(nil), (*Compare_ModRevision)(nil), (*Compare_Value)(nil), + (*Compare_Lease)(nil), } } @@ -815,6 +1131,9 @@ func _Compare_OneofMarshaler(msg proto.Message, b *proto.Buffer) error { case *Compare_Value: _ = b.EncodeVarint(7<<3 | proto.WireBytes) _ = b.EncodeRawBytes(x.Value) + case *Compare_Lease: + _ = b.EncodeVarint(8<<3 | proto.WireVarint) + _ = b.EncodeVarint(uint64(x.Lease)) case nil: default: return fmt.Errorf("Compare.TargetUnion has unexpected type %T", x) @@ -853,6 +1172,13 @@ func _Compare_OneofUnmarshaler(msg proto.Message, tag, wire int, b *proto.Buffer x, err := b.DecodeRawBytes(true) m.TargetUnion = &Compare_Value{x} return true, err + case 8: // target_union.lease + if wire != proto.WireVarint { + return true, proto.ErrInternalBadWireType + } + x, err := b.DecodeVarint() + m.TargetUnion = &Compare_Lease{int64(x)} + return true, err default: return false, nil } @@ -875,6 +1201,9 @@ func _Compare_OneofSizer(msg proto.Message) (n int) { n += proto.SizeVarint(7<<3 | proto.WireBytes) n += proto.SizeVarint(uint64(len(x.Value))) n += len(x.Value) + case *Compare_Lease: + n += proto.SizeVarint(8<<3 | proto.WireVarint) + n += proto.SizeVarint(uint64(x.Lease)) case nil: default: panic(fmt.Sprintf("proto: unexpected type %T in oneof", x)) @@ -957,6 +1286,13 @@ func (m *TxnResponse) GetHeader() *ResponseHeader { return nil } +func (m *TxnResponse) GetSucceeded() bool { + if m != nil { + return m.Succeeded + } + return false +} + func (m *TxnResponse) GetResponses() []*ResponseOp { if m != nil { return m.Responses @@ -980,6 +1316,20 @@ func (m *CompactionRequest) String() string { return proto.CompactTex func (*CompactionRequest) ProtoMessage() {} func (*CompactionRequest) Descriptor() ([]byte, []int) { return fileDescriptorRpc, []int{12} } +func (m *CompactionRequest) GetRevision() int64 { + if m != nil { + return m.Revision + } + return 0 +} + +func (m *CompactionRequest) GetPhysical() bool { + if m != nil { + return m.Physical + } + return false +} + type CompactionResponse struct { Header *ResponseHeader `protobuf:"bytes,1,opt,name=header" json:"header,omitempty"` } @@ -1004,16 +1354,67 @@ func (m *HashRequest) String() string { return proto.CompactTextStrin func (*HashRequest) ProtoMessage() {} func (*HashRequest) Descriptor() ([]byte, []int) { return fileDescriptorRpc, []int{14} } +type HashKVRequest struct { + // revision is the key-value store revision for the hash operation. + Revision int64 `protobuf:"varint,1,opt,name=revision,proto3" json:"revision,omitempty"` +} + +func (m *HashKVRequest) Reset() { *m = HashKVRequest{} } +func (m *HashKVRequest) String() string { return proto.CompactTextString(m) } +func (*HashKVRequest) ProtoMessage() {} +func (*HashKVRequest) Descriptor() ([]byte, []int) { return fileDescriptorRpc, []int{15} } + +func (m *HashKVRequest) GetRevision() int64 { + if m != nil { + return m.Revision + } + return 0 +} + +type HashKVResponse struct { + Header *ResponseHeader `protobuf:"bytes,1,opt,name=header" json:"header,omitempty"` + // hash is the hash value computed from the responding member's MVCC keys up to a given revision. + Hash uint32 `protobuf:"varint,2,opt,name=hash,proto3" json:"hash,omitempty"` + // compact_revision is the compacted revision of key-value store when hash begins. + CompactRevision int64 `protobuf:"varint,3,opt,name=compact_revision,json=compactRevision,proto3" json:"compact_revision,omitempty"` +} + +func (m *HashKVResponse) Reset() { *m = HashKVResponse{} } +func (m *HashKVResponse) String() string { return proto.CompactTextString(m) } +func (*HashKVResponse) ProtoMessage() {} +func (*HashKVResponse) Descriptor() ([]byte, []int) { return fileDescriptorRpc, []int{16} } + +func (m *HashKVResponse) GetHeader() *ResponseHeader { + if m != nil { + return m.Header + } + return nil +} + +func (m *HashKVResponse) GetHash() uint32 { + if m != nil { + return m.Hash + } + return 0 +} + +func (m *HashKVResponse) GetCompactRevision() int64 { + if m != nil { + return m.CompactRevision + } + return 0 +} + type HashResponse struct { Header *ResponseHeader `protobuf:"bytes,1,opt,name=header" json:"header,omitempty"` - // hash is the hash value computed from the responding member's key-value store. + // hash is the hash value computed from the responding member's KV's backend. Hash uint32 `protobuf:"varint,2,opt,name=hash,proto3" json:"hash,omitempty"` } func (m *HashResponse) Reset() { *m = HashResponse{} } func (m *HashResponse) String() string { return proto.CompactTextString(m) } func (*HashResponse) ProtoMessage() {} -func (*HashResponse) Descriptor() ([]byte, []int) { return fileDescriptorRpc, []int{15} } +func (*HashResponse) Descriptor() ([]byte, []int) { return fileDescriptorRpc, []int{17} } func (m *HashResponse) GetHeader() *ResponseHeader { if m != nil { @@ -1022,13 +1423,20 @@ func (m *HashResponse) GetHeader() *ResponseHeader { return nil } +func (m *HashResponse) GetHash() uint32 { + if m != nil { + return m.Hash + } + return 0 +} + type SnapshotRequest struct { } func (m *SnapshotRequest) Reset() { *m = SnapshotRequest{} } func (m *SnapshotRequest) String() string { return proto.CompactTextString(m) } func (*SnapshotRequest) ProtoMessage() {} -func (*SnapshotRequest) Descriptor() ([]byte, []int) { return fileDescriptorRpc, []int{16} } +func (*SnapshotRequest) Descriptor() ([]byte, []int) { return fileDescriptorRpc, []int{18} } type SnapshotResponse struct { // header has the current key-value store information. The first header in the snapshot @@ -1043,7 +1451,7 @@ type SnapshotResponse struct { func (m *SnapshotResponse) Reset() { *m = SnapshotResponse{} } func (m *SnapshotResponse) String() string { return proto.CompactTextString(m) } func (*SnapshotResponse) ProtoMessage() {} -func (*SnapshotResponse) Descriptor() ([]byte, []int) { return fileDescriptorRpc, []int{17} } +func (*SnapshotResponse) Descriptor() ([]byte, []int) { return fileDescriptorRpc, []int{19} } func (m *SnapshotResponse) GetHeader() *ResponseHeader { if m != nil { @@ -1052,6 +1460,20 @@ func (m *SnapshotResponse) GetHeader() *ResponseHeader { return nil } +func (m *SnapshotResponse) GetRemainingBytes() uint64 { + if m != nil { + return m.RemainingBytes + } + return 0 +} + +func (m *SnapshotResponse) GetBlob() []byte { + if m != nil { + return m.Blob + } + return nil +} + type WatchRequest struct { // request_union is a request to either create a new watcher or cancel an existing watcher. // @@ -1064,7 +1486,7 @@ type WatchRequest struct { func (m *WatchRequest) Reset() { *m = WatchRequest{} } func (m *WatchRequest) String() string { return proto.CompactTextString(m) } func (*WatchRequest) ProtoMessage() {} -func (*WatchRequest) Descriptor() ([]byte, []int) { return fileDescriptorRpc, []int{18} } +func (*WatchRequest) Descriptor() ([]byte, []int) { return fileDescriptorRpc, []int{20} } type isWatchRequest_RequestUnion interface { isWatchRequest_RequestUnion() @@ -1203,7 +1625,49 @@ type WatchCreateRequest struct { func (m *WatchCreateRequest) Reset() { *m = WatchCreateRequest{} } func (m *WatchCreateRequest) String() string { return proto.CompactTextString(m) } func (*WatchCreateRequest) ProtoMessage() {} -func (*WatchCreateRequest) Descriptor() ([]byte, []int) { return fileDescriptorRpc, []int{19} } +func (*WatchCreateRequest) Descriptor() ([]byte, []int) { return fileDescriptorRpc, []int{21} } + +func (m *WatchCreateRequest) GetKey() []byte { + if m != nil { + return m.Key + } + return nil +} + +func (m *WatchCreateRequest) GetRangeEnd() []byte { + if m != nil { + return m.RangeEnd + } + return nil +} + +func (m *WatchCreateRequest) GetStartRevision() int64 { + if m != nil { + return m.StartRevision + } + return 0 +} + +func (m *WatchCreateRequest) GetProgressNotify() bool { + if m != nil { + return m.ProgressNotify + } + return false +} + +func (m *WatchCreateRequest) GetFilters() []WatchCreateRequest_FilterType { + if m != nil { + return m.Filters + } + return nil +} + +func (m *WatchCreateRequest) GetPrevKv() bool { + if m != nil { + return m.PrevKv + } + return false +} type WatchCancelRequest struct { // watch_id is the watcher id to cancel so that no more events are transmitted. @@ -1213,7 +1677,14 @@ type WatchCancelRequest struct { func (m *WatchCancelRequest) Reset() { *m = WatchCancelRequest{} } func (m *WatchCancelRequest) String() string { return proto.CompactTextString(m) } func (*WatchCancelRequest) ProtoMessage() {} -func (*WatchCancelRequest) Descriptor() ([]byte, []int) { return fileDescriptorRpc, []int{20} } +func (*WatchCancelRequest) Descriptor() ([]byte, []int) { return fileDescriptorRpc, []int{22} } + +func (m *WatchCancelRequest) GetWatchId() int64 { + if m != nil { + return m.WatchId + } + return 0 +} type WatchResponse struct { Header *ResponseHeader `protobuf:"bytes,1,opt,name=header" json:"header,omitempty"` @@ -1244,7 +1715,7 @@ type WatchResponse struct { func (m *WatchResponse) Reset() { *m = WatchResponse{} } func (m *WatchResponse) String() string { return proto.CompactTextString(m) } func (*WatchResponse) ProtoMessage() {} -func (*WatchResponse) Descriptor() ([]byte, []int) { return fileDescriptorRpc, []int{21} } +func (*WatchResponse) Descriptor() ([]byte, []int) { return fileDescriptorRpc, []int{23} } func (m *WatchResponse) GetHeader() *ResponseHeader { if m != nil { @@ -1253,6 +1724,41 @@ func (m *WatchResponse) GetHeader() *ResponseHeader { return nil } +func (m *WatchResponse) GetWatchId() int64 { + if m != nil { + return m.WatchId + } + return 0 +} + +func (m *WatchResponse) GetCreated() bool { + if m != nil { + return m.Created + } + return false +} + +func (m *WatchResponse) GetCanceled() bool { + if m != nil { + return m.Canceled + } + return false +} + +func (m *WatchResponse) GetCompactRevision() int64 { + if m != nil { + return m.CompactRevision + } + return 0 +} + +func (m *WatchResponse) GetCancelReason() string { + if m != nil { + return m.CancelReason + } + return "" +} + func (m *WatchResponse) GetEvents() []*mvccpb.Event { if m != nil { return m.Events @@ -1261,7 +1767,7 @@ func (m *WatchResponse) GetEvents() []*mvccpb.Event { } type LeaseGrantRequest struct { - // TTL is the advisory time-to-live in seconds. + // TTL is the advisory time-to-live in seconds. Expired lease will return -1. TTL int64 `protobuf:"varint,1,opt,name=TTL,proto3" json:"TTL,omitempty"` // ID is the requested ID for the lease. If ID is set to 0, the lessor chooses an ID. ID int64 `protobuf:"varint,2,opt,name=ID,proto3" json:"ID,omitempty"` @@ -1270,7 +1776,21 @@ type LeaseGrantRequest struct { func (m *LeaseGrantRequest) Reset() { *m = LeaseGrantRequest{} } func (m *LeaseGrantRequest) String() string { return proto.CompactTextString(m) } func (*LeaseGrantRequest) ProtoMessage() {} -func (*LeaseGrantRequest) Descriptor() ([]byte, []int) { return fileDescriptorRpc, []int{22} } +func (*LeaseGrantRequest) Descriptor() ([]byte, []int) { return fileDescriptorRpc, []int{24} } + +func (m *LeaseGrantRequest) GetTTL() int64 { + if m != nil { + return m.TTL + } + return 0 +} + +func (m *LeaseGrantRequest) GetID() int64 { + if m != nil { + return m.ID + } + return 0 +} type LeaseGrantResponse struct { Header *ResponseHeader `protobuf:"bytes,1,opt,name=header" json:"header,omitempty"` @@ -1284,7 +1804,7 @@ type LeaseGrantResponse struct { func (m *LeaseGrantResponse) Reset() { *m = LeaseGrantResponse{} } func (m *LeaseGrantResponse) String() string { return proto.CompactTextString(m) } func (*LeaseGrantResponse) ProtoMessage() {} -func (*LeaseGrantResponse) Descriptor() ([]byte, []int) { return fileDescriptorRpc, []int{23} } +func (*LeaseGrantResponse) Descriptor() ([]byte, []int) { return fileDescriptorRpc, []int{25} } func (m *LeaseGrantResponse) GetHeader() *ResponseHeader { if m != nil { @@ -1293,6 +1813,27 @@ func (m *LeaseGrantResponse) GetHeader() *ResponseHeader { return nil } +func (m *LeaseGrantResponse) GetID() int64 { + if m != nil { + return m.ID + } + return 0 +} + +func (m *LeaseGrantResponse) GetTTL() int64 { + if m != nil { + return m.TTL + } + return 0 +} + +func (m *LeaseGrantResponse) GetError() string { + if m != nil { + return m.Error + } + return "" +} + type LeaseRevokeRequest struct { // ID is the lease ID to revoke. When the ID is revoked, all associated keys will be deleted. ID int64 `protobuf:"varint,1,opt,name=ID,proto3" json:"ID,omitempty"` @@ -1301,7 +1842,14 @@ type LeaseRevokeRequest struct { func (m *LeaseRevokeRequest) Reset() { *m = LeaseRevokeRequest{} } func (m *LeaseRevokeRequest) String() string { return proto.CompactTextString(m) } func (*LeaseRevokeRequest) ProtoMessage() {} -func (*LeaseRevokeRequest) Descriptor() ([]byte, []int) { return fileDescriptorRpc, []int{24} } +func (*LeaseRevokeRequest) Descriptor() ([]byte, []int) { return fileDescriptorRpc, []int{26} } + +func (m *LeaseRevokeRequest) GetID() int64 { + if m != nil { + return m.ID + } + return 0 +} type LeaseRevokeResponse struct { Header *ResponseHeader `protobuf:"bytes,1,opt,name=header" json:"header,omitempty"` @@ -1310,7 +1858,7 @@ type LeaseRevokeResponse struct { func (m *LeaseRevokeResponse) Reset() { *m = LeaseRevokeResponse{} } func (m *LeaseRevokeResponse) String() string { return proto.CompactTextString(m) } func (*LeaseRevokeResponse) ProtoMessage() {} -func (*LeaseRevokeResponse) Descriptor() ([]byte, []int) { return fileDescriptorRpc, []int{25} } +func (*LeaseRevokeResponse) Descriptor() ([]byte, []int) { return fileDescriptorRpc, []int{27} } func (m *LeaseRevokeResponse) GetHeader() *ResponseHeader { if m != nil { @@ -1327,7 +1875,14 @@ type LeaseKeepAliveRequest struct { func (m *LeaseKeepAliveRequest) Reset() { *m = LeaseKeepAliveRequest{} } func (m *LeaseKeepAliveRequest) String() string { return proto.CompactTextString(m) } func (*LeaseKeepAliveRequest) ProtoMessage() {} -func (*LeaseKeepAliveRequest) Descriptor() ([]byte, []int) { return fileDescriptorRpc, []int{26} } +func (*LeaseKeepAliveRequest) Descriptor() ([]byte, []int) { return fileDescriptorRpc, []int{28} } + +func (m *LeaseKeepAliveRequest) GetID() int64 { + if m != nil { + return m.ID + } + return 0 +} type LeaseKeepAliveResponse struct { Header *ResponseHeader `protobuf:"bytes,1,opt,name=header" json:"header,omitempty"` @@ -1340,7 +1895,7 @@ type LeaseKeepAliveResponse struct { func (m *LeaseKeepAliveResponse) Reset() { *m = LeaseKeepAliveResponse{} } func (m *LeaseKeepAliveResponse) String() string { return proto.CompactTextString(m) } func (*LeaseKeepAliveResponse) ProtoMessage() {} -func (*LeaseKeepAliveResponse) Descriptor() ([]byte, []int) { return fileDescriptorRpc, []int{27} } +func (*LeaseKeepAliveResponse) Descriptor() ([]byte, []int) { return fileDescriptorRpc, []int{29} } func (m *LeaseKeepAliveResponse) GetHeader() *ResponseHeader { if m != nil { @@ -1349,6 +1904,20 @@ func (m *LeaseKeepAliveResponse) GetHeader() *ResponseHeader { return nil } +func (m *LeaseKeepAliveResponse) GetID() int64 { + if m != nil { + return m.ID + } + return 0 +} + +func (m *LeaseKeepAliveResponse) GetTTL() int64 { + if m != nil { + return m.TTL + } + return 0 +} + type LeaseTimeToLiveRequest struct { // ID is the lease ID for the lease. ID int64 `protobuf:"varint,1,opt,name=ID,proto3" json:"ID,omitempty"` @@ -1359,7 +1928,21 @@ type LeaseTimeToLiveRequest struct { func (m *LeaseTimeToLiveRequest) Reset() { *m = LeaseTimeToLiveRequest{} } func (m *LeaseTimeToLiveRequest) String() string { return proto.CompactTextString(m) } func (*LeaseTimeToLiveRequest) ProtoMessage() {} -func (*LeaseTimeToLiveRequest) Descriptor() ([]byte, []int) { return fileDescriptorRpc, []int{28} } +func (*LeaseTimeToLiveRequest) Descriptor() ([]byte, []int) { return fileDescriptorRpc, []int{30} } + +func (m *LeaseTimeToLiveRequest) GetID() int64 { + if m != nil { + return m.ID + } + return 0 +} + +func (m *LeaseTimeToLiveRequest) GetKeys() bool { + if m != nil { + return m.Keys + } + return false +} type LeaseTimeToLiveResponse struct { Header *ResponseHeader `protobuf:"bytes,1,opt,name=header" json:"header,omitempty"` @@ -1376,7 +1959,7 @@ type LeaseTimeToLiveResponse struct { func (m *LeaseTimeToLiveResponse) Reset() { *m = LeaseTimeToLiveResponse{} } func (m *LeaseTimeToLiveResponse) String() string { return proto.CompactTextString(m) } func (*LeaseTimeToLiveResponse) ProtoMessage() {} -func (*LeaseTimeToLiveResponse) Descriptor() ([]byte, []int) { return fileDescriptorRpc, []int{29} } +func (*LeaseTimeToLiveResponse) Descriptor() ([]byte, []int) { return fileDescriptorRpc, []int{31} } func (m *LeaseTimeToLiveResponse) GetHeader() *ResponseHeader { if m != nil { @@ -1385,6 +1968,82 @@ func (m *LeaseTimeToLiveResponse) GetHeader() *ResponseHeader { return nil } +func (m *LeaseTimeToLiveResponse) GetID() int64 { + if m != nil { + return m.ID + } + return 0 +} + +func (m *LeaseTimeToLiveResponse) GetTTL() int64 { + if m != nil { + return m.TTL + } + return 0 +} + +func (m *LeaseTimeToLiveResponse) GetGrantedTTL() int64 { + if m != nil { + return m.GrantedTTL + } + return 0 +} + +func (m *LeaseTimeToLiveResponse) GetKeys() [][]byte { + if m != nil { + return m.Keys + } + return nil +} + +type LeaseLeasesRequest struct { +} + +func (m *LeaseLeasesRequest) Reset() { *m = LeaseLeasesRequest{} } +func (m *LeaseLeasesRequest) String() string { return proto.CompactTextString(m) } +func (*LeaseLeasesRequest) ProtoMessage() {} +func (*LeaseLeasesRequest) Descriptor() ([]byte, []int) { return fileDescriptorRpc, []int{32} } + +type LeaseStatus struct { + ID int64 `protobuf:"varint,1,opt,name=ID,proto3" json:"ID,omitempty"` +} + +func (m *LeaseStatus) Reset() { *m = LeaseStatus{} } +func (m *LeaseStatus) String() string { return proto.CompactTextString(m) } +func (*LeaseStatus) ProtoMessage() {} +func (*LeaseStatus) Descriptor() ([]byte, []int) { return fileDescriptorRpc, []int{33} } + +func (m *LeaseStatus) GetID() int64 { + if m != nil { + return m.ID + } + return 0 +} + +type LeaseLeasesResponse struct { + Header *ResponseHeader `protobuf:"bytes,1,opt,name=header" json:"header,omitempty"` + Leases []*LeaseStatus `protobuf:"bytes,2,rep,name=leases" json:"leases,omitempty"` +} + +func (m *LeaseLeasesResponse) Reset() { *m = LeaseLeasesResponse{} } +func (m *LeaseLeasesResponse) String() string { return proto.CompactTextString(m) } +func (*LeaseLeasesResponse) ProtoMessage() {} +func (*LeaseLeasesResponse) Descriptor() ([]byte, []int) { return fileDescriptorRpc, []int{34} } + +func (m *LeaseLeasesResponse) GetHeader() *ResponseHeader { + if m != nil { + return m.Header + } + return nil +} + +func (m *LeaseLeasesResponse) GetLeases() []*LeaseStatus { + if m != nil { + return m.Leases + } + return nil +} + type Member struct { // ID is the member ID for this member. ID uint64 `protobuf:"varint,1,opt,name=ID,proto3" json:"ID,omitempty"` @@ -1399,7 +2058,35 @@ type Member struct { func (m *Member) Reset() { *m = Member{} } func (m *Member) String() string { return proto.CompactTextString(m) } func (*Member) ProtoMessage() {} -func (*Member) Descriptor() ([]byte, []int) { return fileDescriptorRpc, []int{30} } +func (*Member) Descriptor() ([]byte, []int) { return fileDescriptorRpc, []int{35} } + +func (m *Member) GetID() uint64 { + if m != nil { + return m.ID + } + return 0 +} + +func (m *Member) GetName() string { + if m != nil { + return m.Name + } + return "" +} + +func (m *Member) GetPeerURLs() []string { + if m != nil { + return m.PeerURLs + } + return nil +} + +func (m *Member) GetClientURLs() []string { + if m != nil { + return m.ClientURLs + } + return nil +} type MemberAddRequest struct { // peerURLs is the list of URLs the added member will use to communicate with the cluster. @@ -1409,7 +2096,14 @@ type MemberAddRequest struct { func (m *MemberAddRequest) Reset() { *m = MemberAddRequest{} } func (m *MemberAddRequest) String() string { return proto.CompactTextString(m) } func (*MemberAddRequest) ProtoMessage() {} -func (*MemberAddRequest) Descriptor() ([]byte, []int) { return fileDescriptorRpc, []int{31} } +func (*MemberAddRequest) Descriptor() ([]byte, []int) { return fileDescriptorRpc, []int{36} } + +func (m *MemberAddRequest) GetPeerURLs() []string { + if m != nil { + return m.PeerURLs + } + return nil +} type MemberAddResponse struct { Header *ResponseHeader `protobuf:"bytes,1,opt,name=header" json:"header,omitempty"` @@ -1422,7 +2116,7 @@ type MemberAddResponse struct { func (m *MemberAddResponse) Reset() { *m = MemberAddResponse{} } func (m *MemberAddResponse) String() string { return proto.CompactTextString(m) } func (*MemberAddResponse) ProtoMessage() {} -func (*MemberAddResponse) Descriptor() ([]byte, []int) { return fileDescriptorRpc, []int{32} } +func (*MemberAddResponse) Descriptor() ([]byte, []int) { return fileDescriptorRpc, []int{37} } func (m *MemberAddResponse) GetHeader() *ResponseHeader { if m != nil { @@ -1453,7 +2147,14 @@ type MemberRemoveRequest struct { func (m *MemberRemoveRequest) Reset() { *m = MemberRemoveRequest{} } func (m *MemberRemoveRequest) String() string { return proto.CompactTextString(m) } func (*MemberRemoveRequest) ProtoMessage() {} -func (*MemberRemoveRequest) Descriptor() ([]byte, []int) { return fileDescriptorRpc, []int{33} } +func (*MemberRemoveRequest) Descriptor() ([]byte, []int) { return fileDescriptorRpc, []int{38} } + +func (m *MemberRemoveRequest) GetID() uint64 { + if m != nil { + return m.ID + } + return 0 +} type MemberRemoveResponse struct { Header *ResponseHeader `protobuf:"bytes,1,opt,name=header" json:"header,omitempty"` @@ -1464,7 +2165,7 @@ type MemberRemoveResponse struct { func (m *MemberRemoveResponse) Reset() { *m = MemberRemoveResponse{} } func (m *MemberRemoveResponse) String() string { return proto.CompactTextString(m) } func (*MemberRemoveResponse) ProtoMessage() {} -func (*MemberRemoveResponse) Descriptor() ([]byte, []int) { return fileDescriptorRpc, []int{34} } +func (*MemberRemoveResponse) Descriptor() ([]byte, []int) { return fileDescriptorRpc, []int{39} } func (m *MemberRemoveResponse) GetHeader() *ResponseHeader { if m != nil { @@ -1490,7 +2191,21 @@ type MemberUpdateRequest struct { func (m *MemberUpdateRequest) Reset() { *m = MemberUpdateRequest{} } func (m *MemberUpdateRequest) String() string { return proto.CompactTextString(m) } func (*MemberUpdateRequest) ProtoMessage() {} -func (*MemberUpdateRequest) Descriptor() ([]byte, []int) { return fileDescriptorRpc, []int{35} } +func (*MemberUpdateRequest) Descriptor() ([]byte, []int) { return fileDescriptorRpc, []int{40} } + +func (m *MemberUpdateRequest) GetID() uint64 { + if m != nil { + return m.ID + } + return 0 +} + +func (m *MemberUpdateRequest) GetPeerURLs() []string { + if m != nil { + return m.PeerURLs + } + return nil +} type MemberUpdateResponse struct { Header *ResponseHeader `protobuf:"bytes,1,opt,name=header" json:"header,omitempty"` @@ -1501,7 +2216,7 @@ type MemberUpdateResponse struct { func (m *MemberUpdateResponse) Reset() { *m = MemberUpdateResponse{} } func (m *MemberUpdateResponse) String() string { return proto.CompactTextString(m) } func (*MemberUpdateResponse) ProtoMessage() {} -func (*MemberUpdateResponse) Descriptor() ([]byte, []int) { return fileDescriptorRpc, []int{36} } +func (*MemberUpdateResponse) Descriptor() ([]byte, []int) { return fileDescriptorRpc, []int{41} } func (m *MemberUpdateResponse) GetHeader() *ResponseHeader { if m != nil { @@ -1523,7 +2238,7 @@ type MemberListRequest struct { func (m *MemberListRequest) Reset() { *m = MemberListRequest{} } func (m *MemberListRequest) String() string { return proto.CompactTextString(m) } func (*MemberListRequest) ProtoMessage() {} -func (*MemberListRequest) Descriptor() ([]byte, []int) { return fileDescriptorRpc, []int{37} } +func (*MemberListRequest) Descriptor() ([]byte, []int) { return fileDescriptorRpc, []int{42} } type MemberListResponse struct { Header *ResponseHeader `protobuf:"bytes,1,opt,name=header" json:"header,omitempty"` @@ -1534,7 +2249,7 @@ type MemberListResponse struct { func (m *MemberListResponse) Reset() { *m = MemberListResponse{} } func (m *MemberListResponse) String() string { return proto.CompactTextString(m) } func (*MemberListResponse) ProtoMessage() {} -func (*MemberListResponse) Descriptor() ([]byte, []int) { return fileDescriptorRpc, []int{38} } +func (*MemberListResponse) Descriptor() ([]byte, []int) { return fileDescriptorRpc, []int{43} } func (m *MemberListResponse) GetHeader() *ResponseHeader { if m != nil { @@ -1556,7 +2271,7 @@ type DefragmentRequest struct { func (m *DefragmentRequest) Reset() { *m = DefragmentRequest{} } func (m *DefragmentRequest) String() string { return proto.CompactTextString(m) } func (*DefragmentRequest) ProtoMessage() {} -func (*DefragmentRequest) Descriptor() ([]byte, []int) { return fileDescriptorRpc, []int{39} } +func (*DefragmentRequest) Descriptor() ([]byte, []int) { return fileDescriptorRpc, []int{44} } type DefragmentResponse struct { Header *ResponseHeader `protobuf:"bytes,1,opt,name=header" json:"header,omitempty"` @@ -1565,7 +2280,7 @@ type DefragmentResponse struct { func (m *DefragmentResponse) Reset() { *m = DefragmentResponse{} } func (m *DefragmentResponse) String() string { return proto.CompactTextString(m) } func (*DefragmentResponse) ProtoMessage() {} -func (*DefragmentResponse) Descriptor() ([]byte, []int) { return fileDescriptorRpc, []int{40} } +func (*DefragmentResponse) Descriptor() ([]byte, []int) { return fileDescriptorRpc, []int{45} } func (m *DefragmentResponse) GetHeader() *ResponseHeader { if m != nil { @@ -1574,6 +2289,39 @@ func (m *DefragmentResponse) GetHeader() *ResponseHeader { return nil } +type MoveLeaderRequest struct { + // targetID is the node ID for the new leader. + TargetID uint64 `protobuf:"varint,1,opt,name=targetID,proto3" json:"targetID,omitempty"` +} + +func (m *MoveLeaderRequest) Reset() { *m = MoveLeaderRequest{} } +func (m *MoveLeaderRequest) String() string { return proto.CompactTextString(m) } +func (*MoveLeaderRequest) ProtoMessage() {} +func (*MoveLeaderRequest) Descriptor() ([]byte, []int) { return fileDescriptorRpc, []int{46} } + +func (m *MoveLeaderRequest) GetTargetID() uint64 { + if m != nil { + return m.TargetID + } + return 0 +} + +type MoveLeaderResponse struct { + Header *ResponseHeader `protobuf:"bytes,1,opt,name=header" json:"header,omitempty"` +} + +func (m *MoveLeaderResponse) Reset() { *m = MoveLeaderResponse{} } +func (m *MoveLeaderResponse) String() string { return proto.CompactTextString(m) } +func (*MoveLeaderResponse) ProtoMessage() {} +func (*MoveLeaderResponse) Descriptor() ([]byte, []int) { return fileDescriptorRpc, []int{47} } + +func (m *MoveLeaderResponse) GetHeader() *ResponseHeader { + if m != nil { + return m.Header + } + return nil +} + type AlarmRequest struct { // action is the kind of alarm request to issue. The action // may GET alarm statuses, ACTIVATE an alarm, or DEACTIVATE a @@ -1589,7 +2337,28 @@ type AlarmRequest struct { func (m *AlarmRequest) Reset() { *m = AlarmRequest{} } func (m *AlarmRequest) String() string { return proto.CompactTextString(m) } func (*AlarmRequest) ProtoMessage() {} -func (*AlarmRequest) Descriptor() ([]byte, []int) { return fileDescriptorRpc, []int{41} } +func (*AlarmRequest) Descriptor() ([]byte, []int) { return fileDescriptorRpc, []int{48} } + +func (m *AlarmRequest) GetAction() AlarmRequest_AlarmAction { + if m != nil { + return m.Action + } + return AlarmRequest_GET +} + +func (m *AlarmRequest) GetMemberID() uint64 { + if m != nil { + return m.MemberID + } + return 0 +} + +func (m *AlarmRequest) GetAlarm() AlarmType { + if m != nil { + return m.Alarm + } + return AlarmType_NONE +} type AlarmMember struct { // memberID is the ID of the member associated with the raised alarm. @@ -1601,7 +2370,21 @@ type AlarmMember struct { func (m *AlarmMember) Reset() { *m = AlarmMember{} } func (m *AlarmMember) String() string { return proto.CompactTextString(m) } func (*AlarmMember) ProtoMessage() {} -func (*AlarmMember) Descriptor() ([]byte, []int) { return fileDescriptorRpc, []int{42} } +func (*AlarmMember) Descriptor() ([]byte, []int) { return fileDescriptorRpc, []int{49} } + +func (m *AlarmMember) GetMemberID() uint64 { + if m != nil { + return m.MemberID + } + return 0 +} + +func (m *AlarmMember) GetAlarm() AlarmType { + if m != nil { + return m.Alarm + } + return AlarmType_NONE +} type AlarmResponse struct { Header *ResponseHeader `protobuf:"bytes,1,opt,name=header" json:"header,omitempty"` @@ -1612,7 +2395,7 @@ type AlarmResponse struct { func (m *AlarmResponse) Reset() { *m = AlarmResponse{} } func (m *AlarmResponse) String() string { return proto.CompactTextString(m) } func (*AlarmResponse) ProtoMessage() {} -func (*AlarmResponse) Descriptor() ([]byte, []int) { return fileDescriptorRpc, []int{43} } +func (*AlarmResponse) Descriptor() ([]byte, []int) { return fileDescriptorRpc, []int{50} } func (m *AlarmResponse) GetHeader() *ResponseHeader { if m != nil { @@ -1634,7 +2417,7 @@ type StatusRequest struct { func (m *StatusRequest) Reset() { *m = StatusRequest{} } func (m *StatusRequest) String() string { return proto.CompactTextString(m) } func (*StatusRequest) ProtoMessage() {} -func (*StatusRequest) Descriptor() ([]byte, []int) { return fileDescriptorRpc, []int{44} } +func (*StatusRequest) Descriptor() ([]byte, []int) { return fileDescriptorRpc, []int{51} } type StatusResponse struct { Header *ResponseHeader `protobuf:"bytes,1,opt,name=header" json:"header,omitempty"` @@ -1653,7 +2436,7 @@ type StatusResponse struct { func (m *StatusResponse) Reset() { *m = StatusResponse{} } func (m *StatusResponse) String() string { return proto.CompactTextString(m) } func (*StatusResponse) ProtoMessage() {} -func (*StatusResponse) Descriptor() ([]byte, []int) { return fileDescriptorRpc, []int{45} } +func (*StatusResponse) Descriptor() ([]byte, []int) { return fileDescriptorRpc, []int{52} } func (m *StatusResponse) GetHeader() *ResponseHeader { if m != nil { @@ -1662,13 +2445,48 @@ func (m *StatusResponse) GetHeader() *ResponseHeader { return nil } +func (m *StatusResponse) GetVersion() string { + if m != nil { + return m.Version + } + return "" +} + +func (m *StatusResponse) GetDbSize() int64 { + if m != nil { + return m.DbSize + } + return 0 +} + +func (m *StatusResponse) GetLeader() uint64 { + if m != nil { + return m.Leader + } + return 0 +} + +func (m *StatusResponse) GetRaftIndex() uint64 { + if m != nil { + return m.RaftIndex + } + return 0 +} + +func (m *StatusResponse) GetRaftTerm() uint64 { + if m != nil { + return m.RaftTerm + } + return 0 +} + type AuthEnableRequest struct { } func (m *AuthEnableRequest) Reset() { *m = AuthEnableRequest{} } func (m *AuthEnableRequest) String() string { return proto.CompactTextString(m) } func (*AuthEnableRequest) ProtoMessage() {} -func (*AuthEnableRequest) Descriptor() ([]byte, []int) { return fileDescriptorRpc, []int{46} } +func (*AuthEnableRequest) Descriptor() ([]byte, []int) { return fileDescriptorRpc, []int{53} } type AuthDisableRequest struct { } @@ -1676,7 +2494,7 @@ type AuthDisableRequest struct { func (m *AuthDisableRequest) Reset() { *m = AuthDisableRequest{} } func (m *AuthDisableRequest) String() string { return proto.CompactTextString(m) } func (*AuthDisableRequest) ProtoMessage() {} -func (*AuthDisableRequest) Descriptor() ([]byte, []int) { return fileDescriptorRpc, []int{47} } +func (*AuthDisableRequest) Descriptor() ([]byte, []int) { return fileDescriptorRpc, []int{54} } type AuthenticateRequest struct { Name string `protobuf:"bytes,1,opt,name=name,proto3" json:"name,omitempty"` @@ -1686,7 +2504,21 @@ type AuthenticateRequest struct { func (m *AuthenticateRequest) Reset() { *m = AuthenticateRequest{} } func (m *AuthenticateRequest) String() string { return proto.CompactTextString(m) } func (*AuthenticateRequest) ProtoMessage() {} -func (*AuthenticateRequest) Descriptor() ([]byte, []int) { return fileDescriptorRpc, []int{48} } +func (*AuthenticateRequest) Descriptor() ([]byte, []int) { return fileDescriptorRpc, []int{55} } + +func (m *AuthenticateRequest) GetName() string { + if m != nil { + return m.Name + } + return "" +} + +func (m *AuthenticateRequest) GetPassword() string { + if m != nil { + return m.Password + } + return "" +} type AuthUserAddRequest struct { Name string `protobuf:"bytes,1,opt,name=name,proto3" json:"name,omitempty"` @@ -1696,7 +2528,21 @@ type AuthUserAddRequest struct { func (m *AuthUserAddRequest) Reset() { *m = AuthUserAddRequest{} } func (m *AuthUserAddRequest) String() string { return proto.CompactTextString(m) } func (*AuthUserAddRequest) ProtoMessage() {} -func (*AuthUserAddRequest) Descriptor() ([]byte, []int) { return fileDescriptorRpc, []int{49} } +func (*AuthUserAddRequest) Descriptor() ([]byte, []int) { return fileDescriptorRpc, []int{56} } + +func (m *AuthUserAddRequest) GetName() string { + if m != nil { + return m.Name + } + return "" +} + +func (m *AuthUserAddRequest) GetPassword() string { + if m != nil { + return m.Password + } + return "" +} type AuthUserGetRequest struct { Name string `protobuf:"bytes,1,opt,name=name,proto3" json:"name,omitempty"` @@ -1705,7 +2551,14 @@ type AuthUserGetRequest struct { func (m *AuthUserGetRequest) Reset() { *m = AuthUserGetRequest{} } func (m *AuthUserGetRequest) String() string { return proto.CompactTextString(m) } func (*AuthUserGetRequest) ProtoMessage() {} -func (*AuthUserGetRequest) Descriptor() ([]byte, []int) { return fileDescriptorRpc, []int{50} } +func (*AuthUserGetRequest) Descriptor() ([]byte, []int) { return fileDescriptorRpc, []int{57} } + +func (m *AuthUserGetRequest) GetName() string { + if m != nil { + return m.Name + } + return "" +} type AuthUserDeleteRequest struct { // name is the name of the user to delete. @@ -1715,7 +2568,14 @@ type AuthUserDeleteRequest struct { func (m *AuthUserDeleteRequest) Reset() { *m = AuthUserDeleteRequest{} } func (m *AuthUserDeleteRequest) String() string { return proto.CompactTextString(m) } func (*AuthUserDeleteRequest) ProtoMessage() {} -func (*AuthUserDeleteRequest) Descriptor() ([]byte, []int) { return fileDescriptorRpc, []int{51} } +func (*AuthUserDeleteRequest) Descriptor() ([]byte, []int) { return fileDescriptorRpc, []int{58} } + +func (m *AuthUserDeleteRequest) GetName() string { + if m != nil { + return m.Name + } + return "" +} type AuthUserChangePasswordRequest struct { // name is the name of the user whose password is being changed. @@ -1728,7 +2588,21 @@ func (m *AuthUserChangePasswordRequest) Reset() { *m = AuthUserChangePas func (m *AuthUserChangePasswordRequest) String() string { return proto.CompactTextString(m) } func (*AuthUserChangePasswordRequest) ProtoMessage() {} func (*AuthUserChangePasswordRequest) Descriptor() ([]byte, []int) { - return fileDescriptorRpc, []int{52} + return fileDescriptorRpc, []int{59} +} + +func (m *AuthUserChangePasswordRequest) GetName() string { + if m != nil { + return m.Name + } + return "" +} + +func (m *AuthUserChangePasswordRequest) GetPassword() string { + if m != nil { + return m.Password + } + return "" } type AuthUserGrantRoleRequest struct { @@ -1741,7 +2615,21 @@ type AuthUserGrantRoleRequest struct { func (m *AuthUserGrantRoleRequest) Reset() { *m = AuthUserGrantRoleRequest{} } func (m *AuthUserGrantRoleRequest) String() string { return proto.CompactTextString(m) } func (*AuthUserGrantRoleRequest) ProtoMessage() {} -func (*AuthUserGrantRoleRequest) Descriptor() ([]byte, []int) { return fileDescriptorRpc, []int{53} } +func (*AuthUserGrantRoleRequest) Descriptor() ([]byte, []int) { return fileDescriptorRpc, []int{60} } + +func (m *AuthUserGrantRoleRequest) GetUser() string { + if m != nil { + return m.User + } + return "" +} + +func (m *AuthUserGrantRoleRequest) GetRole() string { + if m != nil { + return m.Role + } + return "" +} type AuthUserRevokeRoleRequest struct { Name string `protobuf:"bytes,1,opt,name=name,proto3" json:"name,omitempty"` @@ -1751,7 +2639,21 @@ type AuthUserRevokeRoleRequest struct { func (m *AuthUserRevokeRoleRequest) Reset() { *m = AuthUserRevokeRoleRequest{} } func (m *AuthUserRevokeRoleRequest) String() string { return proto.CompactTextString(m) } func (*AuthUserRevokeRoleRequest) ProtoMessage() {} -func (*AuthUserRevokeRoleRequest) Descriptor() ([]byte, []int) { return fileDescriptorRpc, []int{54} } +func (*AuthUserRevokeRoleRequest) Descriptor() ([]byte, []int) { return fileDescriptorRpc, []int{61} } + +func (m *AuthUserRevokeRoleRequest) GetName() string { + if m != nil { + return m.Name + } + return "" +} + +func (m *AuthUserRevokeRoleRequest) GetRole() string { + if m != nil { + return m.Role + } + return "" +} type AuthRoleAddRequest struct { // name is the name of the role to add to the authentication system. @@ -1761,7 +2663,14 @@ type AuthRoleAddRequest struct { func (m *AuthRoleAddRequest) Reset() { *m = AuthRoleAddRequest{} } func (m *AuthRoleAddRequest) String() string { return proto.CompactTextString(m) } func (*AuthRoleAddRequest) ProtoMessage() {} -func (*AuthRoleAddRequest) Descriptor() ([]byte, []int) { return fileDescriptorRpc, []int{55} } +func (*AuthRoleAddRequest) Descriptor() ([]byte, []int) { return fileDescriptorRpc, []int{62} } + +func (m *AuthRoleAddRequest) GetName() string { + if m != nil { + return m.Name + } + return "" +} type AuthRoleGetRequest struct { Role string `protobuf:"bytes,1,opt,name=role,proto3" json:"role,omitempty"` @@ -1770,7 +2679,14 @@ type AuthRoleGetRequest struct { func (m *AuthRoleGetRequest) Reset() { *m = AuthRoleGetRequest{} } func (m *AuthRoleGetRequest) String() string { return proto.CompactTextString(m) } func (*AuthRoleGetRequest) ProtoMessage() {} -func (*AuthRoleGetRequest) Descriptor() ([]byte, []int) { return fileDescriptorRpc, []int{56} } +func (*AuthRoleGetRequest) Descriptor() ([]byte, []int) { return fileDescriptorRpc, []int{63} } + +func (m *AuthRoleGetRequest) GetRole() string { + if m != nil { + return m.Role + } + return "" +} type AuthUserListRequest struct { } @@ -1778,7 +2694,7 @@ type AuthUserListRequest struct { func (m *AuthUserListRequest) Reset() { *m = AuthUserListRequest{} } func (m *AuthUserListRequest) String() string { return proto.CompactTextString(m) } func (*AuthUserListRequest) ProtoMessage() {} -func (*AuthUserListRequest) Descriptor() ([]byte, []int) { return fileDescriptorRpc, []int{57} } +func (*AuthUserListRequest) Descriptor() ([]byte, []int) { return fileDescriptorRpc, []int{64} } type AuthRoleListRequest struct { } @@ -1786,7 +2702,7 @@ type AuthRoleListRequest struct { func (m *AuthRoleListRequest) Reset() { *m = AuthRoleListRequest{} } func (m *AuthRoleListRequest) String() string { return proto.CompactTextString(m) } func (*AuthRoleListRequest) ProtoMessage() {} -func (*AuthRoleListRequest) Descriptor() ([]byte, []int) { return fileDescriptorRpc, []int{58} } +func (*AuthRoleListRequest) Descriptor() ([]byte, []int) { return fileDescriptorRpc, []int{65} } type AuthRoleDeleteRequest struct { Role string `protobuf:"bytes,1,opt,name=role,proto3" json:"role,omitempty"` @@ -1795,7 +2711,14 @@ type AuthRoleDeleteRequest struct { func (m *AuthRoleDeleteRequest) Reset() { *m = AuthRoleDeleteRequest{} } func (m *AuthRoleDeleteRequest) String() string { return proto.CompactTextString(m) } func (*AuthRoleDeleteRequest) ProtoMessage() {} -func (*AuthRoleDeleteRequest) Descriptor() ([]byte, []int) { return fileDescriptorRpc, []int{59} } +func (*AuthRoleDeleteRequest) Descriptor() ([]byte, []int) { return fileDescriptorRpc, []int{66} } + +func (m *AuthRoleDeleteRequest) GetRole() string { + if m != nil { + return m.Role + } + return "" +} type AuthRoleGrantPermissionRequest struct { // name is the name of the role which will be granted the permission. @@ -1808,7 +2731,14 @@ func (m *AuthRoleGrantPermissionRequest) Reset() { *m = AuthRoleGrantPer func (m *AuthRoleGrantPermissionRequest) String() string { return proto.CompactTextString(m) } func (*AuthRoleGrantPermissionRequest) ProtoMessage() {} func (*AuthRoleGrantPermissionRequest) Descriptor() ([]byte, []int) { - return fileDescriptorRpc, []int{60} + return fileDescriptorRpc, []int{67} +} + +func (m *AuthRoleGrantPermissionRequest) GetName() string { + if m != nil { + return m.Name + } + return "" } func (m *AuthRoleGrantPermissionRequest) GetPerm() *authpb.Permission { @@ -1828,7 +2758,28 @@ func (m *AuthRoleRevokePermissionRequest) Reset() { *m = AuthRoleRevokeP func (m *AuthRoleRevokePermissionRequest) String() string { return proto.CompactTextString(m) } func (*AuthRoleRevokePermissionRequest) ProtoMessage() {} func (*AuthRoleRevokePermissionRequest) Descriptor() ([]byte, []int) { - return fileDescriptorRpc, []int{61} + return fileDescriptorRpc, []int{68} +} + +func (m *AuthRoleRevokePermissionRequest) GetRole() string { + if m != nil { + return m.Role + } + return "" +} + +func (m *AuthRoleRevokePermissionRequest) GetKey() string { + if m != nil { + return m.Key + } + return "" +} + +func (m *AuthRoleRevokePermissionRequest) GetRangeEnd() string { + if m != nil { + return m.RangeEnd + } + return "" } type AuthEnableResponse struct { @@ -1838,7 +2789,7 @@ type AuthEnableResponse struct { func (m *AuthEnableResponse) Reset() { *m = AuthEnableResponse{} } func (m *AuthEnableResponse) String() string { return proto.CompactTextString(m) } func (*AuthEnableResponse) ProtoMessage() {} -func (*AuthEnableResponse) Descriptor() ([]byte, []int) { return fileDescriptorRpc, []int{62} } +func (*AuthEnableResponse) Descriptor() ([]byte, []int) { return fileDescriptorRpc, []int{69} } func (m *AuthEnableResponse) GetHeader() *ResponseHeader { if m != nil { @@ -1854,7 +2805,7 @@ type AuthDisableResponse struct { func (m *AuthDisableResponse) Reset() { *m = AuthDisableResponse{} } func (m *AuthDisableResponse) String() string { return proto.CompactTextString(m) } func (*AuthDisableResponse) ProtoMessage() {} -func (*AuthDisableResponse) Descriptor() ([]byte, []int) { return fileDescriptorRpc, []int{63} } +func (*AuthDisableResponse) Descriptor() ([]byte, []int) { return fileDescriptorRpc, []int{70} } func (m *AuthDisableResponse) GetHeader() *ResponseHeader { if m != nil { @@ -1872,7 +2823,7 @@ type AuthenticateResponse struct { func (m *AuthenticateResponse) Reset() { *m = AuthenticateResponse{} } func (m *AuthenticateResponse) String() string { return proto.CompactTextString(m) } func (*AuthenticateResponse) ProtoMessage() {} -func (*AuthenticateResponse) Descriptor() ([]byte, []int) { return fileDescriptorRpc, []int{64} } +func (*AuthenticateResponse) Descriptor() ([]byte, []int) { return fileDescriptorRpc, []int{71} } func (m *AuthenticateResponse) GetHeader() *ResponseHeader { if m != nil { @@ -1881,6 +2832,13 @@ func (m *AuthenticateResponse) GetHeader() *ResponseHeader { return nil } +func (m *AuthenticateResponse) GetToken() string { + if m != nil { + return m.Token + } + return "" +} + type AuthUserAddResponse struct { Header *ResponseHeader `protobuf:"bytes,1,opt,name=header" json:"header,omitempty"` } @@ -1888,7 +2846,7 @@ type AuthUserAddResponse struct { func (m *AuthUserAddResponse) Reset() { *m = AuthUserAddResponse{} } func (m *AuthUserAddResponse) String() string { return proto.CompactTextString(m) } func (*AuthUserAddResponse) ProtoMessage() {} -func (*AuthUserAddResponse) Descriptor() ([]byte, []int) { return fileDescriptorRpc, []int{65} } +func (*AuthUserAddResponse) Descriptor() ([]byte, []int) { return fileDescriptorRpc, []int{72} } func (m *AuthUserAddResponse) GetHeader() *ResponseHeader { if m != nil { @@ -1905,7 +2863,7 @@ type AuthUserGetResponse struct { func (m *AuthUserGetResponse) Reset() { *m = AuthUserGetResponse{} } func (m *AuthUserGetResponse) String() string { return proto.CompactTextString(m) } func (*AuthUserGetResponse) ProtoMessage() {} -func (*AuthUserGetResponse) Descriptor() ([]byte, []int) { return fileDescriptorRpc, []int{66} } +func (*AuthUserGetResponse) Descriptor() ([]byte, []int) { return fileDescriptorRpc, []int{73} } func (m *AuthUserGetResponse) GetHeader() *ResponseHeader { if m != nil { @@ -1914,6 +2872,13 @@ func (m *AuthUserGetResponse) GetHeader() *ResponseHeader { return nil } +func (m *AuthUserGetResponse) GetRoles() []string { + if m != nil { + return m.Roles + } + return nil +} + type AuthUserDeleteResponse struct { Header *ResponseHeader `protobuf:"bytes,1,opt,name=header" json:"header,omitempty"` } @@ -1921,7 +2886,7 @@ type AuthUserDeleteResponse struct { func (m *AuthUserDeleteResponse) Reset() { *m = AuthUserDeleteResponse{} } func (m *AuthUserDeleteResponse) String() string { return proto.CompactTextString(m) } func (*AuthUserDeleteResponse) ProtoMessage() {} -func (*AuthUserDeleteResponse) Descriptor() ([]byte, []int) { return fileDescriptorRpc, []int{67} } +func (*AuthUserDeleteResponse) Descriptor() ([]byte, []int) { return fileDescriptorRpc, []int{74} } func (m *AuthUserDeleteResponse) GetHeader() *ResponseHeader { if m != nil { @@ -1938,7 +2903,7 @@ func (m *AuthUserChangePasswordResponse) Reset() { *m = AuthUserChangePa func (m *AuthUserChangePasswordResponse) String() string { return proto.CompactTextString(m) } func (*AuthUserChangePasswordResponse) ProtoMessage() {} func (*AuthUserChangePasswordResponse) Descriptor() ([]byte, []int) { - return fileDescriptorRpc, []int{68} + return fileDescriptorRpc, []int{75} } func (m *AuthUserChangePasswordResponse) GetHeader() *ResponseHeader { @@ -1955,7 +2920,7 @@ type AuthUserGrantRoleResponse struct { func (m *AuthUserGrantRoleResponse) Reset() { *m = AuthUserGrantRoleResponse{} } func (m *AuthUserGrantRoleResponse) String() string { return proto.CompactTextString(m) } func (*AuthUserGrantRoleResponse) ProtoMessage() {} -func (*AuthUserGrantRoleResponse) Descriptor() ([]byte, []int) { return fileDescriptorRpc, []int{69} } +func (*AuthUserGrantRoleResponse) Descriptor() ([]byte, []int) { return fileDescriptorRpc, []int{76} } func (m *AuthUserGrantRoleResponse) GetHeader() *ResponseHeader { if m != nil { @@ -1971,7 +2936,7 @@ type AuthUserRevokeRoleResponse struct { func (m *AuthUserRevokeRoleResponse) Reset() { *m = AuthUserRevokeRoleResponse{} } func (m *AuthUserRevokeRoleResponse) String() string { return proto.CompactTextString(m) } func (*AuthUserRevokeRoleResponse) ProtoMessage() {} -func (*AuthUserRevokeRoleResponse) Descriptor() ([]byte, []int) { return fileDescriptorRpc, []int{70} } +func (*AuthUserRevokeRoleResponse) Descriptor() ([]byte, []int) { return fileDescriptorRpc, []int{77} } func (m *AuthUserRevokeRoleResponse) GetHeader() *ResponseHeader { if m != nil { @@ -1987,7 +2952,7 @@ type AuthRoleAddResponse struct { func (m *AuthRoleAddResponse) Reset() { *m = AuthRoleAddResponse{} } func (m *AuthRoleAddResponse) String() string { return proto.CompactTextString(m) } func (*AuthRoleAddResponse) ProtoMessage() {} -func (*AuthRoleAddResponse) Descriptor() ([]byte, []int) { return fileDescriptorRpc, []int{71} } +func (*AuthRoleAddResponse) Descriptor() ([]byte, []int) { return fileDescriptorRpc, []int{78} } func (m *AuthRoleAddResponse) GetHeader() *ResponseHeader { if m != nil { @@ -2004,7 +2969,7 @@ type AuthRoleGetResponse struct { func (m *AuthRoleGetResponse) Reset() { *m = AuthRoleGetResponse{} } func (m *AuthRoleGetResponse) String() string { return proto.CompactTextString(m) } func (*AuthRoleGetResponse) ProtoMessage() {} -func (*AuthRoleGetResponse) Descriptor() ([]byte, []int) { return fileDescriptorRpc, []int{72} } +func (*AuthRoleGetResponse) Descriptor() ([]byte, []int) { return fileDescriptorRpc, []int{79} } func (m *AuthRoleGetResponse) GetHeader() *ResponseHeader { if m != nil { @@ -2028,7 +2993,7 @@ type AuthRoleListResponse struct { func (m *AuthRoleListResponse) Reset() { *m = AuthRoleListResponse{} } func (m *AuthRoleListResponse) String() string { return proto.CompactTextString(m) } func (*AuthRoleListResponse) ProtoMessage() {} -func (*AuthRoleListResponse) Descriptor() ([]byte, []int) { return fileDescriptorRpc, []int{73} } +func (*AuthRoleListResponse) Descriptor() ([]byte, []int) { return fileDescriptorRpc, []int{80} } func (m *AuthRoleListResponse) GetHeader() *ResponseHeader { if m != nil { @@ -2037,6 +3002,13 @@ func (m *AuthRoleListResponse) GetHeader() *ResponseHeader { return nil } +func (m *AuthRoleListResponse) GetRoles() []string { + if m != nil { + return m.Roles + } + return nil +} + type AuthUserListResponse struct { Header *ResponseHeader `protobuf:"bytes,1,opt,name=header" json:"header,omitempty"` Users []string `protobuf:"bytes,2,rep,name=users" json:"users,omitempty"` @@ -2045,7 +3017,7 @@ type AuthUserListResponse struct { func (m *AuthUserListResponse) Reset() { *m = AuthUserListResponse{} } func (m *AuthUserListResponse) String() string { return proto.CompactTextString(m) } func (*AuthUserListResponse) ProtoMessage() {} -func (*AuthUserListResponse) Descriptor() ([]byte, []int) { return fileDescriptorRpc, []int{74} } +func (*AuthUserListResponse) Descriptor() ([]byte, []int) { return fileDescriptorRpc, []int{81} } func (m *AuthUserListResponse) GetHeader() *ResponseHeader { if m != nil { @@ -2054,6 +3026,13 @@ func (m *AuthUserListResponse) GetHeader() *ResponseHeader { return nil } +func (m *AuthUserListResponse) GetUsers() []string { + if m != nil { + return m.Users + } + return nil +} + type AuthRoleDeleteResponse struct { Header *ResponseHeader `protobuf:"bytes,1,opt,name=header" json:"header,omitempty"` } @@ -2061,7 +3040,7 @@ type AuthRoleDeleteResponse struct { func (m *AuthRoleDeleteResponse) Reset() { *m = AuthRoleDeleteResponse{} } func (m *AuthRoleDeleteResponse) String() string { return proto.CompactTextString(m) } func (*AuthRoleDeleteResponse) ProtoMessage() {} -func (*AuthRoleDeleteResponse) Descriptor() ([]byte, []int) { return fileDescriptorRpc, []int{75} } +func (*AuthRoleDeleteResponse) Descriptor() ([]byte, []int) { return fileDescriptorRpc, []int{82} } func (m *AuthRoleDeleteResponse) GetHeader() *ResponseHeader { if m != nil { @@ -2078,7 +3057,7 @@ func (m *AuthRoleGrantPermissionResponse) Reset() { *m = AuthRoleGrantPe func (m *AuthRoleGrantPermissionResponse) String() string { return proto.CompactTextString(m) } func (*AuthRoleGrantPermissionResponse) ProtoMessage() {} func (*AuthRoleGrantPermissionResponse) Descriptor() ([]byte, []int) { - return fileDescriptorRpc, []int{76} + return fileDescriptorRpc, []int{83} } func (m *AuthRoleGrantPermissionResponse) GetHeader() *ResponseHeader { @@ -2096,7 +3075,7 @@ func (m *AuthRoleRevokePermissionResponse) Reset() { *m = AuthRoleRevoke func (m *AuthRoleRevokePermissionResponse) String() string { return proto.CompactTextString(m) } func (*AuthRoleRevokePermissionResponse) ProtoMessage() {} func (*AuthRoleRevokePermissionResponse) Descriptor() ([]byte, []int) { - return fileDescriptorRpc, []int{77} + return fileDescriptorRpc, []int{84} } func (m *AuthRoleRevokePermissionResponse) GetHeader() *ResponseHeader { @@ -2122,6 +3101,8 @@ func init() { proto.RegisterType((*CompactionRequest)(nil), "etcdserverpb.CompactionRequest") proto.RegisterType((*CompactionResponse)(nil), "etcdserverpb.CompactionResponse") proto.RegisterType((*HashRequest)(nil), "etcdserverpb.HashRequest") + proto.RegisterType((*HashKVRequest)(nil), "etcdserverpb.HashKVRequest") + proto.RegisterType((*HashKVResponse)(nil), "etcdserverpb.HashKVResponse") proto.RegisterType((*HashResponse)(nil), "etcdserverpb.HashResponse") proto.RegisterType((*SnapshotRequest)(nil), "etcdserverpb.SnapshotRequest") proto.RegisterType((*SnapshotResponse)(nil), "etcdserverpb.SnapshotResponse") @@ -2137,6 +3118,9 @@ func init() { proto.RegisterType((*LeaseKeepAliveResponse)(nil), "etcdserverpb.LeaseKeepAliveResponse") proto.RegisterType((*LeaseTimeToLiveRequest)(nil), "etcdserverpb.LeaseTimeToLiveRequest") proto.RegisterType((*LeaseTimeToLiveResponse)(nil), "etcdserverpb.LeaseTimeToLiveResponse") + proto.RegisterType((*LeaseLeasesRequest)(nil), "etcdserverpb.LeaseLeasesRequest") + proto.RegisterType((*LeaseStatus)(nil), "etcdserverpb.LeaseStatus") + proto.RegisterType((*LeaseLeasesResponse)(nil), "etcdserverpb.LeaseLeasesResponse") proto.RegisterType((*Member)(nil), "etcdserverpb.Member") proto.RegisterType((*MemberAddRequest)(nil), "etcdserverpb.MemberAddRequest") proto.RegisterType((*MemberAddResponse)(nil), "etcdserverpb.MemberAddResponse") @@ -2148,6 +3132,8 @@ func init() { proto.RegisterType((*MemberListResponse)(nil), "etcdserverpb.MemberListResponse") proto.RegisterType((*DefragmentRequest)(nil), "etcdserverpb.DefragmentRequest") proto.RegisterType((*DefragmentResponse)(nil), "etcdserverpb.DefragmentResponse") + proto.RegisterType((*MoveLeaderRequest)(nil), "etcdserverpb.MoveLeaderRequest") + proto.RegisterType((*MoveLeaderResponse)(nil), "etcdserverpb.MoveLeaderResponse") proto.RegisterType((*AlarmRequest)(nil), "etcdserverpb.AlarmRequest") proto.RegisterType((*AlarmMember)(nil), "etcdserverpb.AlarmMember") proto.RegisterType((*AlarmResponse)(nil), "etcdserverpb.AlarmResponse") @@ -2546,6 +3532,8 @@ type LeaseClient interface { LeaseKeepAlive(ctx context.Context, opts ...grpc.CallOption) (Lease_LeaseKeepAliveClient, error) // LeaseTimeToLive retrieves lease information. LeaseTimeToLive(ctx context.Context, in *LeaseTimeToLiveRequest, opts ...grpc.CallOption) (*LeaseTimeToLiveResponse, error) + // LeaseLeases lists all existing leases. + LeaseLeases(ctx context.Context, in *LeaseLeasesRequest, opts ...grpc.CallOption) (*LeaseLeasesResponse, error) } type leaseClient struct { @@ -2614,6 +3602,15 @@ func (c *leaseClient) LeaseTimeToLive(ctx context.Context, in *LeaseTimeToLiveRe return out, nil } +func (c *leaseClient) LeaseLeases(ctx context.Context, in *LeaseLeasesRequest, opts ...grpc.CallOption) (*LeaseLeasesResponse, error) { + out := new(LeaseLeasesResponse) + err := grpc.Invoke(ctx, "/etcdserverpb.Lease/LeaseLeases", in, out, c.cc, opts...) + if err != nil { + return nil, err + } + return out, nil +} + // Server API for Lease service type LeaseServer interface { @@ -2628,6 +3625,8 @@ type LeaseServer interface { LeaseKeepAlive(Lease_LeaseKeepAliveServer) error // LeaseTimeToLive retrieves lease information. LeaseTimeToLive(context.Context, *LeaseTimeToLiveRequest) (*LeaseTimeToLiveResponse, error) + // LeaseLeases lists all existing leases. + LeaseLeases(context.Context, *LeaseLeasesRequest) (*LeaseLeasesResponse, error) } func RegisterLeaseServer(s *grpc.Server, srv LeaseServer) { @@ -2714,6 +3713,24 @@ func _Lease_LeaseTimeToLive_Handler(srv interface{}, ctx context.Context, dec fu return interceptor(ctx, in, info, handler) } +func _Lease_LeaseLeases_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { + in := new(LeaseLeasesRequest) + if err := dec(in); err != nil { + return nil, err + } + if interceptor == nil { + return srv.(LeaseServer).LeaseLeases(ctx, in) + } + info := &grpc.UnaryServerInfo{ + Server: srv, + FullMethod: "/etcdserverpb.Lease/LeaseLeases", + } + handler := func(ctx context.Context, req interface{}) (interface{}, error) { + return srv.(LeaseServer).LeaseLeases(ctx, req.(*LeaseLeasesRequest)) + } + return interceptor(ctx, in, info, handler) +} + var _Lease_serviceDesc = grpc.ServiceDesc{ ServiceName: "etcdserverpb.Lease", HandlerType: (*LeaseServer)(nil), @@ -2730,6 +3747,10 @@ var _Lease_serviceDesc = grpc.ServiceDesc{ MethodName: "LeaseTimeToLive", Handler: _Lease_LeaseTimeToLive_Handler, }, + { + MethodName: "LeaseLeases", + Handler: _Lease_LeaseLeases_Handler, + }, }, Streams: []grpc.StreamDesc{ { @@ -2922,12 +3943,16 @@ type MaintenanceClient interface { Status(ctx context.Context, in *StatusRequest, opts ...grpc.CallOption) (*StatusResponse, error) // Defragment defragments a member's backend database to recover storage space. Defragment(ctx context.Context, in *DefragmentRequest, opts ...grpc.CallOption) (*DefragmentResponse, error) - // Hash returns the hash of the local KV state for consistency checking purpose. + // Hash computes the hash of the KV's backend. // This is designed for testing; do not use this in production when there // are ongoing transactions. Hash(ctx context.Context, in *HashRequest, opts ...grpc.CallOption) (*HashResponse, error) + // HashKV computes the hash of all MVCC keys up to a given revision. + HashKV(ctx context.Context, in *HashKVRequest, opts ...grpc.CallOption) (*HashKVResponse, error) // Snapshot sends a snapshot of the entire backend from a member over a stream to a client. Snapshot(ctx context.Context, in *SnapshotRequest, opts ...grpc.CallOption) (Maintenance_SnapshotClient, error) + // MoveLeader requests current leader node to transfer its leadership to transferee. + MoveLeader(ctx context.Context, in *MoveLeaderRequest, opts ...grpc.CallOption) (*MoveLeaderResponse, error) } type maintenanceClient struct { @@ -2974,6 +3999,15 @@ func (c *maintenanceClient) Hash(ctx context.Context, in *HashRequest, opts ...g return out, nil } +func (c *maintenanceClient) HashKV(ctx context.Context, in *HashKVRequest, opts ...grpc.CallOption) (*HashKVResponse, error) { + out := new(HashKVResponse) + err := grpc.Invoke(ctx, "/etcdserverpb.Maintenance/HashKV", in, out, c.cc, opts...) + if err != nil { + return nil, err + } + return out, nil +} + func (c *maintenanceClient) Snapshot(ctx context.Context, in *SnapshotRequest, opts ...grpc.CallOption) (Maintenance_SnapshotClient, error) { stream, err := grpc.NewClientStream(ctx, &_Maintenance_serviceDesc.Streams[0], c.cc, "/etcdserverpb.Maintenance/Snapshot", opts...) if err != nil { @@ -3006,6 +4040,15 @@ func (x *maintenanceSnapshotClient) Recv() (*SnapshotResponse, error) { return m, nil } +func (c *maintenanceClient) MoveLeader(ctx context.Context, in *MoveLeaderRequest, opts ...grpc.CallOption) (*MoveLeaderResponse, error) { + out := new(MoveLeaderResponse) + err := grpc.Invoke(ctx, "/etcdserverpb.Maintenance/MoveLeader", in, out, c.cc, opts...) + if err != nil { + return nil, err + } + return out, nil +} + // Server API for Maintenance service type MaintenanceServer interface { @@ -3015,12 +4058,16 @@ type MaintenanceServer interface { Status(context.Context, *StatusRequest) (*StatusResponse, error) // Defragment defragments a member's backend database to recover storage space. Defragment(context.Context, *DefragmentRequest) (*DefragmentResponse, error) - // Hash returns the hash of the local KV state for consistency checking purpose. + // Hash computes the hash of the KV's backend. // This is designed for testing; do not use this in production when there // are ongoing transactions. Hash(context.Context, *HashRequest) (*HashResponse, error) + // HashKV computes the hash of all MVCC keys up to a given revision. + HashKV(context.Context, *HashKVRequest) (*HashKVResponse, error) // Snapshot sends a snapshot of the entire backend from a member over a stream to a client. Snapshot(*SnapshotRequest, Maintenance_SnapshotServer) error + // MoveLeader requests current leader node to transfer its leadership to transferee. + MoveLeader(context.Context, *MoveLeaderRequest) (*MoveLeaderResponse, error) } func RegisterMaintenanceServer(s *grpc.Server, srv MaintenanceServer) { @@ -3099,6 +4146,24 @@ func _Maintenance_Hash_Handler(srv interface{}, ctx context.Context, dec func(in return interceptor(ctx, in, info, handler) } +func _Maintenance_HashKV_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { + in := new(HashKVRequest) + if err := dec(in); err != nil { + return nil, err + } + if interceptor == nil { + return srv.(MaintenanceServer).HashKV(ctx, in) + } + info := &grpc.UnaryServerInfo{ + Server: srv, + FullMethod: "/etcdserverpb.Maintenance/HashKV", + } + handler := func(ctx context.Context, req interface{}) (interface{}, error) { + return srv.(MaintenanceServer).HashKV(ctx, req.(*HashKVRequest)) + } + return interceptor(ctx, in, info, handler) +} + func _Maintenance_Snapshot_Handler(srv interface{}, stream grpc.ServerStream) error { m := new(SnapshotRequest) if err := stream.RecvMsg(m); err != nil { @@ -3120,6 +4185,24 @@ func (x *maintenanceSnapshotServer) Send(m *SnapshotResponse) error { return x.ServerStream.SendMsg(m) } +func _Maintenance_MoveLeader_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { + in := new(MoveLeaderRequest) + if err := dec(in); err != nil { + return nil, err + } + if interceptor == nil { + return srv.(MaintenanceServer).MoveLeader(ctx, in) + } + info := &grpc.UnaryServerInfo{ + Server: srv, + FullMethod: "/etcdserverpb.Maintenance/MoveLeader", + } + handler := func(ctx context.Context, req interface{}) (interface{}, error) { + return srv.(MaintenanceServer).MoveLeader(ctx, req.(*MoveLeaderRequest)) + } + return interceptor(ctx, in, info, handler) +} + var _Maintenance_serviceDesc = grpc.ServiceDesc{ ServiceName: "etcdserverpb.Maintenance", HandlerType: (*MaintenanceServer)(nil), @@ -3140,6 +4223,14 @@ var _Maintenance_serviceDesc = grpc.ServiceDesc{ MethodName: "Hash", Handler: _Maintenance_Hash_Handler, }, + { + MethodName: "HashKV", + Handler: _Maintenance_HashKV_Handler, + }, + { + MethodName: "MoveLeader", + Handler: _Maintenance_MoveLeader_Handler, + }, }, Streams: []grpc.StreamDesc{ { @@ -4190,6 +5281,20 @@ func (m *RequestOp_RequestDeleteRange) MarshalTo(dAtA []byte) (int, error) { } return i, nil } +func (m *RequestOp_RequestTxn) MarshalTo(dAtA []byte) (int, error) { + i := 0 + if m.RequestTxn != nil { + dAtA[i] = 0x22 + i++ + i = encodeVarintRpc(dAtA, i, uint64(m.RequestTxn.Size())) + n9, err := m.RequestTxn.MarshalTo(dAtA[i:]) + if err != nil { + return 0, err + } + i += n9 + } + return i, nil +} func (m *ResponseOp) Marshal() (dAtA []byte, err error) { size := m.Size() dAtA = make([]byte, size) @@ -4206,11 +5311,11 @@ func (m *ResponseOp) MarshalTo(dAtA []byte) (int, error) { var l int _ = l if m.Response != nil { - nn9, err := m.Response.MarshalTo(dAtA[i:]) + nn10, err := m.Response.MarshalTo(dAtA[i:]) if err != nil { return 0, err } - i += nn9 + i += nn10 } return i, nil } @@ -4221,11 +5326,11 @@ func (m *ResponseOp_ResponseRange) MarshalTo(dAtA []byte) (int, error) { dAtA[i] = 0xa i++ i = encodeVarintRpc(dAtA, i, uint64(m.ResponseRange.Size())) - n10, err := m.ResponseRange.MarshalTo(dAtA[i:]) + n11, err := m.ResponseRange.MarshalTo(dAtA[i:]) if err != nil { return 0, err } - i += n10 + i += n11 } return i, nil } @@ -4235,11 +5340,11 @@ func (m *ResponseOp_ResponsePut) MarshalTo(dAtA []byte) (int, error) { dAtA[i] = 0x12 i++ i = encodeVarintRpc(dAtA, i, uint64(m.ResponsePut.Size())) - n11, err := m.ResponsePut.MarshalTo(dAtA[i:]) + n12, err := m.ResponsePut.MarshalTo(dAtA[i:]) if err != nil { return 0, err } - i += n11 + i += n12 } return i, nil } @@ -4249,11 +5354,25 @@ func (m *ResponseOp_ResponseDeleteRange) MarshalTo(dAtA []byte) (int, error) { dAtA[i] = 0x1a i++ i = encodeVarintRpc(dAtA, i, uint64(m.ResponseDeleteRange.Size())) - n12, err := m.ResponseDeleteRange.MarshalTo(dAtA[i:]) + n13, err := m.ResponseDeleteRange.MarshalTo(dAtA[i:]) if err != nil { return 0, err } - i += n12 + i += n13 + } + return i, nil +} +func (m *ResponseOp_ResponseTxn) MarshalTo(dAtA []byte) (int, error) { + i := 0 + if m.ResponseTxn != nil { + dAtA[i] = 0x22 + i++ + i = encodeVarintRpc(dAtA, i, uint64(m.ResponseTxn.Size())) + n14, err := m.ResponseTxn.MarshalTo(dAtA[i:]) + if err != nil { + return 0, err + } + i += n14 } return i, nil } @@ -4289,11 +5408,19 @@ func (m *Compare) MarshalTo(dAtA []byte) (int, error) { i += copy(dAtA[i:], m.Key) } if m.TargetUnion != nil { - nn13, err := m.TargetUnion.MarshalTo(dAtA[i:]) + nn15, err := m.TargetUnion.MarshalTo(dAtA[i:]) if err != nil { return 0, err } - i += nn13 + i += nn15 + } + if len(m.RangeEnd) > 0 { + dAtA[i] = 0x82 + i++ + dAtA[i] = 0x4 + i++ + i = encodeVarintRpc(dAtA, i, uint64(len(m.RangeEnd))) + i += copy(dAtA[i:], m.RangeEnd) } return i, nil } @@ -4329,6 +5456,13 @@ func (m *Compare_Value) MarshalTo(dAtA []byte) (int, error) { } return i, nil } +func (m *Compare_Lease) MarshalTo(dAtA []byte) (int, error) { + i := 0 + dAtA[i] = 0x40 + i++ + i = encodeVarintRpc(dAtA, i, uint64(m.Lease)) + return i, nil +} func (m *TxnRequest) Marshal() (dAtA []byte, err error) { size := m.Size() dAtA = make([]byte, size) @@ -4402,11 +5536,11 @@ func (m *TxnResponse) MarshalTo(dAtA []byte) (int, error) { dAtA[i] = 0xa i++ i = encodeVarintRpc(dAtA, i, uint64(m.Header.Size())) - n14, err := m.Header.MarshalTo(dAtA[i:]) + n16, err := m.Header.MarshalTo(dAtA[i:]) if err != nil { return 0, err } - i += n14 + i += n16 } if m.Succeeded { dAtA[i] = 0x10 @@ -4485,11 +5619,11 @@ func (m *CompactionResponse) MarshalTo(dAtA []byte) (int, error) { dAtA[i] = 0xa i++ i = encodeVarintRpc(dAtA, i, uint64(m.Header.Size())) - n15, err := m.Header.MarshalTo(dAtA[i:]) + n17, err := m.Header.MarshalTo(dAtA[i:]) if err != nil { return 0, err } - i += n15 + i += n17 } return i, nil } @@ -4512,6 +5646,67 @@ func (m *HashRequest) MarshalTo(dAtA []byte) (int, error) { return i, nil } +func (m *HashKVRequest) Marshal() (dAtA []byte, err error) { + size := m.Size() + dAtA = make([]byte, size) + n, err := m.MarshalTo(dAtA) + if err != nil { + return nil, err + } + return dAtA[:n], nil +} + +func (m *HashKVRequest) MarshalTo(dAtA []byte) (int, error) { + var i int + _ = i + var l int + _ = l + if m.Revision != 0 { + dAtA[i] = 0x8 + i++ + i = encodeVarintRpc(dAtA, i, uint64(m.Revision)) + } + return i, nil +} + +func (m *HashKVResponse) Marshal() (dAtA []byte, err error) { + size := m.Size() + dAtA = make([]byte, size) + n, err := m.MarshalTo(dAtA) + if err != nil { + return nil, err + } + return dAtA[:n], nil +} + +func (m *HashKVResponse) MarshalTo(dAtA []byte) (int, error) { + var i int + _ = i + var l int + _ = l + if m.Header != nil { + dAtA[i] = 0xa + i++ + i = encodeVarintRpc(dAtA, i, uint64(m.Header.Size())) + n18, err := m.Header.MarshalTo(dAtA[i:]) + if err != nil { + return 0, err + } + i += n18 + } + if m.Hash != 0 { + dAtA[i] = 0x10 + i++ + i = encodeVarintRpc(dAtA, i, uint64(m.Hash)) + } + if m.CompactRevision != 0 { + dAtA[i] = 0x18 + i++ + i = encodeVarintRpc(dAtA, i, uint64(m.CompactRevision)) + } + return i, nil +} + func (m *HashResponse) Marshal() (dAtA []byte, err error) { size := m.Size() dAtA = make([]byte, size) @@ -4531,11 +5726,11 @@ func (m *HashResponse) MarshalTo(dAtA []byte) (int, error) { dAtA[i] = 0xa i++ i = encodeVarintRpc(dAtA, i, uint64(m.Header.Size())) - n16, err := m.Header.MarshalTo(dAtA[i:]) + n19, err := m.Header.MarshalTo(dAtA[i:]) if err != nil { return 0, err } - i += n16 + i += n19 } if m.Hash != 0 { dAtA[i] = 0x10 @@ -4582,11 +5777,11 @@ func (m *SnapshotResponse) MarshalTo(dAtA []byte) (int, error) { dAtA[i] = 0xa i++ i = encodeVarintRpc(dAtA, i, uint64(m.Header.Size())) - n17, err := m.Header.MarshalTo(dAtA[i:]) + n20, err := m.Header.MarshalTo(dAtA[i:]) if err != nil { return 0, err } - i += n17 + i += n20 } if m.RemainingBytes != 0 { dAtA[i] = 0x10 @@ -4618,11 +5813,11 @@ func (m *WatchRequest) MarshalTo(dAtA []byte) (int, error) { var l int _ = l if m.RequestUnion != nil { - nn18, err := m.RequestUnion.MarshalTo(dAtA[i:]) + nn21, err := m.RequestUnion.MarshalTo(dAtA[i:]) if err != nil { return 0, err } - i += nn18 + i += nn21 } return i, nil } @@ -4633,11 +5828,11 @@ func (m *WatchRequest_CreateRequest) MarshalTo(dAtA []byte) (int, error) { dAtA[i] = 0xa i++ i = encodeVarintRpc(dAtA, i, uint64(m.CreateRequest.Size())) - n19, err := m.CreateRequest.MarshalTo(dAtA[i:]) + n22, err := m.CreateRequest.MarshalTo(dAtA[i:]) if err != nil { return 0, err } - i += n19 + i += n22 } return i, nil } @@ -4647,11 +5842,11 @@ func (m *WatchRequest_CancelRequest) MarshalTo(dAtA []byte) (int, error) { dAtA[i] = 0x12 i++ i = encodeVarintRpc(dAtA, i, uint64(m.CancelRequest.Size())) - n20, err := m.CancelRequest.MarshalTo(dAtA[i:]) + n23, err := m.CancelRequest.MarshalTo(dAtA[i:]) if err != nil { return 0, err } - i += n20 + i += n23 } return i, nil } @@ -4698,21 +5893,21 @@ func (m *WatchCreateRequest) MarshalTo(dAtA []byte) (int, error) { i++ } if len(m.Filters) > 0 { - dAtA22 := make([]byte, len(m.Filters)*10) - var j21 int + dAtA25 := make([]byte, len(m.Filters)*10) + var j24 int for _, num := range m.Filters { for num >= 1<<7 { - dAtA22[j21] = uint8(uint64(num)&0x7f | 0x80) + dAtA25[j24] = uint8(uint64(num)&0x7f | 0x80) num >>= 7 - j21++ + j24++ } - dAtA22[j21] = uint8(num) - j21++ + dAtA25[j24] = uint8(num) + j24++ } dAtA[i] = 0x2a i++ - i = encodeVarintRpc(dAtA, i, uint64(j21)) - i += copy(dAtA[i:], dAtA22[:j21]) + i = encodeVarintRpc(dAtA, i, uint64(j24)) + i += copy(dAtA[i:], dAtA25[:j24]) } if m.PrevKv { dAtA[i] = 0x30 @@ -4769,11 +5964,11 @@ func (m *WatchResponse) MarshalTo(dAtA []byte) (int, error) { dAtA[i] = 0xa i++ i = encodeVarintRpc(dAtA, i, uint64(m.Header.Size())) - n23, err := m.Header.MarshalTo(dAtA[i:]) + n26, err := m.Header.MarshalTo(dAtA[i:]) if err != nil { return 0, err } - i += n23 + i += n26 } if m.WatchId != 0 { dAtA[i] = 0x10 @@ -4873,11 +6068,11 @@ func (m *LeaseGrantResponse) MarshalTo(dAtA []byte) (int, error) { dAtA[i] = 0xa i++ i = encodeVarintRpc(dAtA, i, uint64(m.Header.Size())) - n24, err := m.Header.MarshalTo(dAtA[i:]) + n27, err := m.Header.MarshalTo(dAtA[i:]) if err != nil { return 0, err } - i += n24 + i += n27 } if m.ID != 0 { dAtA[i] = 0x10 @@ -4940,11 +6135,11 @@ func (m *LeaseRevokeResponse) MarshalTo(dAtA []byte) (int, error) { dAtA[i] = 0xa i++ i = encodeVarintRpc(dAtA, i, uint64(m.Header.Size())) - n25, err := m.Header.MarshalTo(dAtA[i:]) + n28, err := m.Header.MarshalTo(dAtA[i:]) if err != nil { return 0, err } - i += n25 + i += n28 } return i, nil } @@ -4991,11 +6186,11 @@ func (m *LeaseKeepAliveResponse) MarshalTo(dAtA []byte) (int, error) { dAtA[i] = 0xa i++ i = encodeVarintRpc(dAtA, i, uint64(m.Header.Size())) - n26, err := m.Header.MarshalTo(dAtA[i:]) + n29, err := m.Header.MarshalTo(dAtA[i:]) if err != nil { return 0, err } - i += n26 + i += n29 } if m.ID != 0 { dAtA[i] = 0x10 @@ -5062,11 +6257,11 @@ func (m *LeaseTimeToLiveResponse) MarshalTo(dAtA []byte) (int, error) { dAtA[i] = 0xa i++ i = encodeVarintRpc(dAtA, i, uint64(m.Header.Size())) - n27, err := m.Header.MarshalTo(dAtA[i:]) + n30, err := m.Header.MarshalTo(dAtA[i:]) if err != nil { return 0, err } - i += n27 + i += n30 } if m.ID != 0 { dAtA[i] = 0x10 @@ -5094,6 +6289,87 @@ func (m *LeaseTimeToLiveResponse) MarshalTo(dAtA []byte) (int, error) { return i, nil } +func (m *LeaseLeasesRequest) Marshal() (dAtA []byte, err error) { + size := m.Size() + dAtA = make([]byte, size) + n, err := m.MarshalTo(dAtA) + if err != nil { + return nil, err + } + return dAtA[:n], nil +} + +func (m *LeaseLeasesRequest) MarshalTo(dAtA []byte) (int, error) { + var i int + _ = i + var l int + _ = l + return i, nil +} + +func (m *LeaseStatus) Marshal() (dAtA []byte, err error) { + size := m.Size() + dAtA = make([]byte, size) + n, err := m.MarshalTo(dAtA) + if err != nil { + return nil, err + } + return dAtA[:n], nil +} + +func (m *LeaseStatus) MarshalTo(dAtA []byte) (int, error) { + var i int + _ = i + var l int + _ = l + if m.ID != 0 { + dAtA[i] = 0x8 + i++ + i = encodeVarintRpc(dAtA, i, uint64(m.ID)) + } + return i, nil +} + +func (m *LeaseLeasesResponse) Marshal() (dAtA []byte, err error) { + size := m.Size() + dAtA = make([]byte, size) + n, err := m.MarshalTo(dAtA) + if err != nil { + return nil, err + } + return dAtA[:n], nil +} + +func (m *LeaseLeasesResponse) MarshalTo(dAtA []byte) (int, error) { + var i int + _ = i + var l int + _ = l + if m.Header != nil { + dAtA[i] = 0xa + i++ + i = encodeVarintRpc(dAtA, i, uint64(m.Header.Size())) + n31, err := m.Header.MarshalTo(dAtA[i:]) + if err != nil { + return 0, err + } + i += n31 + } + if len(m.Leases) > 0 { + for _, msg := range m.Leases { + dAtA[i] = 0x12 + i++ + i = encodeVarintRpc(dAtA, i, uint64(msg.Size())) + n, err := msg.MarshalTo(dAtA[i:]) + if err != nil { + return 0, err + } + i += n + } + } + return i, nil +} + func (m *Member) Marshal() (dAtA []byte, err error) { size := m.Size() dAtA = make([]byte, size) @@ -5205,21 +6481,21 @@ func (m *MemberAddResponse) MarshalTo(dAtA []byte) (int, error) { dAtA[i] = 0xa i++ i = encodeVarintRpc(dAtA, i, uint64(m.Header.Size())) - n28, err := m.Header.MarshalTo(dAtA[i:]) + n32, err := m.Header.MarshalTo(dAtA[i:]) if err != nil { return 0, err } - i += n28 + i += n32 } if m.Member != nil { dAtA[i] = 0x12 i++ i = encodeVarintRpc(dAtA, i, uint64(m.Member.Size())) - n29, err := m.Member.MarshalTo(dAtA[i:]) + n33, err := m.Member.MarshalTo(dAtA[i:]) if err != nil { return 0, err } - i += n29 + i += n33 } if len(m.Members) > 0 { for _, msg := range m.Members { @@ -5278,11 +6554,11 @@ func (m *MemberRemoveResponse) MarshalTo(dAtA []byte) (int, error) { dAtA[i] = 0xa i++ i = encodeVarintRpc(dAtA, i, uint64(m.Header.Size())) - n30, err := m.Header.MarshalTo(dAtA[i:]) + n34, err := m.Header.MarshalTo(dAtA[i:]) if err != nil { return 0, err } - i += n30 + i += n34 } if len(m.Members) > 0 { for _, msg := range m.Members { @@ -5356,11 +6632,11 @@ func (m *MemberUpdateResponse) MarshalTo(dAtA []byte) (int, error) { dAtA[i] = 0xa i++ i = encodeVarintRpc(dAtA, i, uint64(m.Header.Size())) - n31, err := m.Header.MarshalTo(dAtA[i:]) + n35, err := m.Header.MarshalTo(dAtA[i:]) if err != nil { return 0, err } - i += n31 + i += n35 } if len(m.Members) > 0 { for _, msg := range m.Members { @@ -5414,11 +6690,11 @@ func (m *MemberListResponse) MarshalTo(dAtA []byte) (int, error) { dAtA[i] = 0xa i++ i = encodeVarintRpc(dAtA, i, uint64(m.Header.Size())) - n32, err := m.Header.MarshalTo(dAtA[i:]) + n36, err := m.Header.MarshalTo(dAtA[i:]) if err != nil { return 0, err } - i += n32 + i += n36 } if len(m.Members) > 0 { for _, msg := range m.Members { @@ -5472,11 +6748,62 @@ func (m *DefragmentResponse) MarshalTo(dAtA []byte) (int, error) { dAtA[i] = 0xa i++ i = encodeVarintRpc(dAtA, i, uint64(m.Header.Size())) - n33, err := m.Header.MarshalTo(dAtA[i:]) + n37, err := m.Header.MarshalTo(dAtA[i:]) if err != nil { return 0, err } - i += n33 + i += n37 + } + return i, nil +} + +func (m *MoveLeaderRequest) Marshal() (dAtA []byte, err error) { + size := m.Size() + dAtA = make([]byte, size) + n, err := m.MarshalTo(dAtA) + if err != nil { + return nil, err + } + return dAtA[:n], nil +} + +func (m *MoveLeaderRequest) MarshalTo(dAtA []byte) (int, error) { + var i int + _ = i + var l int + _ = l + if m.TargetID != 0 { + dAtA[i] = 0x8 + i++ + i = encodeVarintRpc(dAtA, i, uint64(m.TargetID)) + } + return i, nil +} + +func (m *MoveLeaderResponse) Marshal() (dAtA []byte, err error) { + size := m.Size() + dAtA = make([]byte, size) + n, err := m.MarshalTo(dAtA) + if err != nil { + return nil, err + } + return dAtA[:n], nil +} + +func (m *MoveLeaderResponse) MarshalTo(dAtA []byte) (int, error) { + var i int + _ = i + var l int + _ = l + if m.Header != nil { + dAtA[i] = 0xa + i++ + i = encodeVarintRpc(dAtA, i, uint64(m.Header.Size())) + n38, err := m.Header.MarshalTo(dAtA[i:]) + if err != nil { + return 0, err + } + i += n38 } return i, nil } @@ -5561,11 +6888,11 @@ func (m *AlarmResponse) MarshalTo(dAtA []byte) (int, error) { dAtA[i] = 0xa i++ i = encodeVarintRpc(dAtA, i, uint64(m.Header.Size())) - n34, err := m.Header.MarshalTo(dAtA[i:]) + n39, err := m.Header.MarshalTo(dAtA[i:]) if err != nil { return 0, err } - i += n34 + i += n39 } if len(m.Alarms) > 0 { for _, msg := range m.Alarms { @@ -5619,11 +6946,11 @@ func (m *StatusResponse) MarshalTo(dAtA []byte) (int, error) { dAtA[i] = 0xa i++ i = encodeVarintRpc(dAtA, i, uint64(m.Header.Size())) - n35, err := m.Header.MarshalTo(dAtA[i:]) + n40, err := m.Header.MarshalTo(dAtA[i:]) if err != nil { return 0, err } - i += n35 + i += n40 } if len(m.Version) > 0 { dAtA[i] = 0x12 @@ -6021,11 +7348,11 @@ func (m *AuthRoleGrantPermissionRequest) MarshalTo(dAtA []byte) (int, error) { dAtA[i] = 0x12 i++ i = encodeVarintRpc(dAtA, i, uint64(m.Perm.Size())) - n36, err := m.Perm.MarshalTo(dAtA[i:]) + n41, err := m.Perm.MarshalTo(dAtA[i:]) if err != nil { return 0, err } - i += n36 + i += n41 } return i, nil } @@ -6085,11 +7412,11 @@ func (m *AuthEnableResponse) MarshalTo(dAtA []byte) (int, error) { dAtA[i] = 0xa i++ i = encodeVarintRpc(dAtA, i, uint64(m.Header.Size())) - n37, err := m.Header.MarshalTo(dAtA[i:]) + n42, err := m.Header.MarshalTo(dAtA[i:]) if err != nil { return 0, err } - i += n37 + i += n42 } return i, nil } @@ -6113,11 +7440,11 @@ func (m *AuthDisableResponse) MarshalTo(dAtA []byte) (int, error) { dAtA[i] = 0xa i++ i = encodeVarintRpc(dAtA, i, uint64(m.Header.Size())) - n38, err := m.Header.MarshalTo(dAtA[i:]) + n43, err := m.Header.MarshalTo(dAtA[i:]) if err != nil { return 0, err } - i += n38 + i += n43 } return i, nil } @@ -6141,11 +7468,11 @@ func (m *AuthenticateResponse) MarshalTo(dAtA []byte) (int, error) { dAtA[i] = 0xa i++ i = encodeVarintRpc(dAtA, i, uint64(m.Header.Size())) - n39, err := m.Header.MarshalTo(dAtA[i:]) + n44, err := m.Header.MarshalTo(dAtA[i:]) if err != nil { return 0, err } - i += n39 + i += n44 } if len(m.Token) > 0 { dAtA[i] = 0x12 @@ -6175,11 +7502,11 @@ func (m *AuthUserAddResponse) MarshalTo(dAtA []byte) (int, error) { dAtA[i] = 0xa i++ i = encodeVarintRpc(dAtA, i, uint64(m.Header.Size())) - n40, err := m.Header.MarshalTo(dAtA[i:]) + n45, err := m.Header.MarshalTo(dAtA[i:]) if err != nil { return 0, err } - i += n40 + i += n45 } return i, nil } @@ -6203,11 +7530,11 @@ func (m *AuthUserGetResponse) MarshalTo(dAtA []byte) (int, error) { dAtA[i] = 0xa i++ i = encodeVarintRpc(dAtA, i, uint64(m.Header.Size())) - n41, err := m.Header.MarshalTo(dAtA[i:]) + n46, err := m.Header.MarshalTo(dAtA[i:]) if err != nil { return 0, err } - i += n41 + i += n46 } if len(m.Roles) > 0 { for _, s := range m.Roles { @@ -6246,11 +7573,11 @@ func (m *AuthUserDeleteResponse) MarshalTo(dAtA []byte) (int, error) { dAtA[i] = 0xa i++ i = encodeVarintRpc(dAtA, i, uint64(m.Header.Size())) - n42, err := m.Header.MarshalTo(dAtA[i:]) + n47, err := m.Header.MarshalTo(dAtA[i:]) if err != nil { return 0, err } - i += n42 + i += n47 } return i, nil } @@ -6274,11 +7601,11 @@ func (m *AuthUserChangePasswordResponse) MarshalTo(dAtA []byte) (int, error) { dAtA[i] = 0xa i++ i = encodeVarintRpc(dAtA, i, uint64(m.Header.Size())) - n43, err := m.Header.MarshalTo(dAtA[i:]) + n48, err := m.Header.MarshalTo(dAtA[i:]) if err != nil { return 0, err } - i += n43 + i += n48 } return i, nil } @@ -6302,11 +7629,11 @@ func (m *AuthUserGrantRoleResponse) MarshalTo(dAtA []byte) (int, error) { dAtA[i] = 0xa i++ i = encodeVarintRpc(dAtA, i, uint64(m.Header.Size())) - n44, err := m.Header.MarshalTo(dAtA[i:]) + n49, err := m.Header.MarshalTo(dAtA[i:]) if err != nil { return 0, err } - i += n44 + i += n49 } return i, nil } @@ -6330,11 +7657,11 @@ func (m *AuthUserRevokeRoleResponse) MarshalTo(dAtA []byte) (int, error) { dAtA[i] = 0xa i++ i = encodeVarintRpc(dAtA, i, uint64(m.Header.Size())) - n45, err := m.Header.MarshalTo(dAtA[i:]) + n50, err := m.Header.MarshalTo(dAtA[i:]) if err != nil { return 0, err } - i += n45 + i += n50 } return i, nil } @@ -6358,11 +7685,11 @@ func (m *AuthRoleAddResponse) MarshalTo(dAtA []byte) (int, error) { dAtA[i] = 0xa i++ i = encodeVarintRpc(dAtA, i, uint64(m.Header.Size())) - n46, err := m.Header.MarshalTo(dAtA[i:]) + n51, err := m.Header.MarshalTo(dAtA[i:]) if err != nil { return 0, err } - i += n46 + i += n51 } return i, nil } @@ -6386,11 +7713,11 @@ func (m *AuthRoleGetResponse) MarshalTo(dAtA []byte) (int, error) { dAtA[i] = 0xa i++ i = encodeVarintRpc(dAtA, i, uint64(m.Header.Size())) - n47, err := m.Header.MarshalTo(dAtA[i:]) + n52, err := m.Header.MarshalTo(dAtA[i:]) if err != nil { return 0, err } - i += n47 + i += n52 } if len(m.Perm) > 0 { for _, msg := range m.Perm { @@ -6426,11 +7753,11 @@ func (m *AuthRoleListResponse) MarshalTo(dAtA []byte) (int, error) { dAtA[i] = 0xa i++ i = encodeVarintRpc(dAtA, i, uint64(m.Header.Size())) - n48, err := m.Header.MarshalTo(dAtA[i:]) + n53, err := m.Header.MarshalTo(dAtA[i:]) if err != nil { return 0, err } - i += n48 + i += n53 } if len(m.Roles) > 0 { for _, s := range m.Roles { @@ -6469,11 +7796,11 @@ func (m *AuthUserListResponse) MarshalTo(dAtA []byte) (int, error) { dAtA[i] = 0xa i++ i = encodeVarintRpc(dAtA, i, uint64(m.Header.Size())) - n49, err := m.Header.MarshalTo(dAtA[i:]) + n54, err := m.Header.MarshalTo(dAtA[i:]) if err != nil { return 0, err } - i += n49 + i += n54 } if len(m.Users) > 0 { for _, s := range m.Users { @@ -6512,11 +7839,11 @@ func (m *AuthRoleDeleteResponse) MarshalTo(dAtA []byte) (int, error) { dAtA[i] = 0xa i++ i = encodeVarintRpc(dAtA, i, uint64(m.Header.Size())) - n50, err := m.Header.MarshalTo(dAtA[i:]) + n55, err := m.Header.MarshalTo(dAtA[i:]) if err != nil { return 0, err } - i += n50 + i += n55 } return i, nil } @@ -6540,11 +7867,11 @@ func (m *AuthRoleGrantPermissionResponse) MarshalTo(dAtA []byte) (int, error) { dAtA[i] = 0xa i++ i = encodeVarintRpc(dAtA, i, uint64(m.Header.Size())) - n51, err := m.Header.MarshalTo(dAtA[i:]) + n56, err := m.Header.MarshalTo(dAtA[i:]) if err != nil { return 0, err } - i += n51 + i += n56 } return i, nil } @@ -6568,33 +7895,15 @@ func (m *AuthRoleRevokePermissionResponse) MarshalTo(dAtA []byte) (int, error) { dAtA[i] = 0xa i++ i = encodeVarintRpc(dAtA, i, uint64(m.Header.Size())) - n52, err := m.Header.MarshalTo(dAtA[i:]) + n57, err := m.Header.MarshalTo(dAtA[i:]) if err != nil { return 0, err } - i += n52 + i += n57 } return i, nil } -func encodeFixed64Rpc(dAtA []byte, offset int, v uint64) int { - dAtA[offset] = uint8(v) - dAtA[offset+1] = uint8(v >> 8) - dAtA[offset+2] = uint8(v >> 16) - dAtA[offset+3] = uint8(v >> 24) - dAtA[offset+4] = uint8(v >> 32) - dAtA[offset+5] = uint8(v >> 40) - dAtA[offset+6] = uint8(v >> 48) - dAtA[offset+7] = uint8(v >> 56) - return offset + 8 -} -func encodeFixed32Rpc(dAtA []byte, offset int, v uint32) int { - dAtA[offset] = uint8(v) - dAtA[offset+1] = uint8(v >> 8) - dAtA[offset+2] = uint8(v >> 16) - dAtA[offset+3] = uint8(v >> 24) - return offset + 4 -} func encodeVarintRpc(dAtA []byte, offset int, v uint64) int { for v >= 1<<7 { dAtA[offset] = uint8(v&0x7f | 0x80) @@ -6803,6 +8112,15 @@ func (m *RequestOp_RequestDeleteRange) Size() (n int) { } return n } +func (m *RequestOp_RequestTxn) Size() (n int) { + var l int + _ = l + if m.RequestTxn != nil { + l = m.RequestTxn.Size() + n += 1 + l + sovRpc(uint64(l)) + } + return n +} func (m *ResponseOp) Size() (n int) { var l int _ = l @@ -6839,6 +8157,15 @@ func (m *ResponseOp_ResponseDeleteRange) Size() (n int) { } return n } +func (m *ResponseOp_ResponseTxn) Size() (n int) { + var l int + _ = l + if m.ResponseTxn != nil { + l = m.ResponseTxn.Size() + n += 1 + l + sovRpc(uint64(l)) + } + return n +} func (m *Compare) Size() (n int) { var l int _ = l @@ -6855,6 +8182,10 @@ func (m *Compare) Size() (n int) { if m.TargetUnion != nil { n += m.TargetUnion.Size() } + l = len(m.RangeEnd) + if l > 0 { + n += 2 + l + sovRpc(uint64(l)) + } return n } @@ -6885,6 +8216,12 @@ func (m *Compare_Value) Size() (n int) { } return n } +func (m *Compare_Lease) Size() (n int) { + var l int + _ = l + n += 1 + sovRpc(uint64(m.Lease)) + return n +} func (m *TxnRequest) Size() (n int) { var l int _ = l @@ -6956,6 +8293,31 @@ func (m *HashRequest) Size() (n int) { return n } +func (m *HashKVRequest) Size() (n int) { + var l int + _ = l + if m.Revision != 0 { + n += 1 + sovRpc(uint64(m.Revision)) + } + return n +} + +func (m *HashKVResponse) Size() (n int) { + var l int + _ = l + if m.Header != nil { + l = m.Header.Size() + n += 1 + l + sovRpc(uint64(l)) + } + if m.Hash != 0 { + n += 1 + sovRpc(uint64(m.Hash)) + } + if m.CompactRevision != 0 { + n += 1 + sovRpc(uint64(m.CompactRevision)) + } + return n +} + func (m *HashResponse) Size() (n int) { var l int _ = l @@ -7203,6 +8565,37 @@ func (m *LeaseTimeToLiveResponse) Size() (n int) { return n } +func (m *LeaseLeasesRequest) Size() (n int) { + var l int + _ = l + return n +} + +func (m *LeaseStatus) Size() (n int) { + var l int + _ = l + if m.ID != 0 { + n += 1 + sovRpc(uint64(m.ID)) + } + return n +} + +func (m *LeaseLeasesResponse) Size() (n int) { + var l int + _ = l + if m.Header != nil { + l = m.Header.Size() + n += 1 + l + sovRpc(uint64(l)) + } + if len(m.Leases) > 0 { + for _, e := range m.Leases { + l = e.Size() + n += 1 + l + sovRpc(uint64(l)) + } + } + return n +} + func (m *Member) Size() (n int) { var l int _ = l @@ -7354,6 +8747,25 @@ func (m *DefragmentResponse) Size() (n int) { return n } +func (m *MoveLeaderRequest) Size() (n int) { + var l int + _ = l + if m.TargetID != 0 { + n += 1 + sovRpc(uint64(m.TargetID)) + } + return n +} + +func (m *MoveLeaderResponse) Size() (n int) { + var l int + _ = l + if m.Header != nil { + l = m.Header.Size() + n += 1 + l + sovRpc(uint64(l)) + } + return n +} + func (m *AlarmRequest) Size() (n int) { var l int _ = l @@ -9106,6 +10518,38 @@ func (m *RequestOp) Unmarshal(dAtA []byte) error { } m.Request = &RequestOp_RequestDeleteRange{v} iNdEx = postIndex + case 4: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field RequestTxn", wireType) + } + var msglen int + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowRpc + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + msglen |= (int(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + if msglen < 0 { + return ErrInvalidLengthRpc + } + postIndex := iNdEx + msglen + if postIndex > l { + return io.ErrUnexpectedEOF + } + v := &TxnRequest{} + if err := v.Unmarshal(dAtA[iNdEx:postIndex]); err != nil { + return err + } + m.Request = &RequestOp_RequestTxn{v} + iNdEx = postIndex default: iNdEx = preIndex skippy, err := skipRpc(dAtA[iNdEx:]) @@ -9252,6 +10696,38 @@ func (m *ResponseOp) Unmarshal(dAtA []byte) error { } m.Response = &ResponseOp_ResponseDeleteRange{v} iNdEx = postIndex + case 4: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field ResponseTxn", wireType) + } + var msglen int + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowRpc + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + msglen |= (int(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + if msglen < 0 { + return ErrInvalidLengthRpc + } + postIndex := iNdEx + msglen + if postIndex > l { + return io.ErrUnexpectedEOF + } + v := &TxnResponse{} + if err := v.Unmarshal(dAtA[iNdEx:postIndex]); err != nil { + return err + } + m.Response = &ResponseOp_ResponseTxn{v} + iNdEx = postIndex default: iNdEx = preIndex skippy, err := skipRpc(dAtA[iNdEx:]) @@ -9461,6 +10937,57 @@ func (m *Compare) Unmarshal(dAtA []byte) error { copy(v, dAtA[iNdEx:postIndex]) m.TargetUnion = &Compare_Value{v} iNdEx = postIndex + case 8: + if wireType != 0 { + return fmt.Errorf("proto: wrong wireType = %d for field Lease", wireType) + } + var v int64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowRpc + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + v |= (int64(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + m.TargetUnion = &Compare_Lease{v} + case 64: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field RangeEnd", wireType) + } + var byteLen int + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowRpc + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + byteLen |= (int(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + if byteLen < 0 { + return ErrInvalidLengthRpc + } + postIndex := iNdEx + byteLen + if postIndex > l { + return io.ErrUnexpectedEOF + } + m.RangeEnd = append(m.RangeEnd[:0], dAtA[iNdEx:postIndex]...) + if m.RangeEnd == nil { + m.RangeEnd = []byte{} + } + iNdEx = postIndex default: iNdEx = preIndex skippy, err := skipRpc(dAtA[iNdEx:]) @@ -9981,6 +11508,196 @@ func (m *HashRequest) Unmarshal(dAtA []byte) error { } return nil } +func (m *HashKVRequest) Unmarshal(dAtA []byte) error { + l := len(dAtA) + iNdEx := 0 + for iNdEx < l { + preIndex := iNdEx + var wire uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowRpc + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + wire |= (uint64(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + fieldNum := int32(wire >> 3) + wireType := int(wire & 0x7) + if wireType == 4 { + return fmt.Errorf("proto: HashKVRequest: wiretype end group for non-group") + } + if fieldNum <= 0 { + return fmt.Errorf("proto: HashKVRequest: illegal tag %d (wire type %d)", fieldNum, wire) + } + switch fieldNum { + case 1: + if wireType != 0 { + return fmt.Errorf("proto: wrong wireType = %d for field Revision", wireType) + } + m.Revision = 0 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowRpc + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + m.Revision |= (int64(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + default: + iNdEx = preIndex + skippy, err := skipRpc(dAtA[iNdEx:]) + if err != nil { + return err + } + if skippy < 0 { + return ErrInvalidLengthRpc + } + if (iNdEx + skippy) > l { + return io.ErrUnexpectedEOF + } + iNdEx += skippy + } + } + + if iNdEx > l { + return io.ErrUnexpectedEOF + } + return nil +} +func (m *HashKVResponse) Unmarshal(dAtA []byte) error { + l := len(dAtA) + iNdEx := 0 + for iNdEx < l { + preIndex := iNdEx + var wire uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowRpc + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + wire |= (uint64(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + fieldNum := int32(wire >> 3) + wireType := int(wire & 0x7) + if wireType == 4 { + return fmt.Errorf("proto: HashKVResponse: wiretype end group for non-group") + } + if fieldNum <= 0 { + return fmt.Errorf("proto: HashKVResponse: illegal tag %d (wire type %d)", fieldNum, wire) + } + switch fieldNum { + case 1: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field Header", wireType) + } + var msglen int + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowRpc + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + msglen |= (int(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + if msglen < 0 { + return ErrInvalidLengthRpc + } + postIndex := iNdEx + msglen + if postIndex > l { + return io.ErrUnexpectedEOF + } + if m.Header == nil { + m.Header = &ResponseHeader{} + } + if err := m.Header.Unmarshal(dAtA[iNdEx:postIndex]); err != nil { + return err + } + iNdEx = postIndex + case 2: + if wireType != 0 { + return fmt.Errorf("proto: wrong wireType = %d for field Hash", wireType) + } + m.Hash = 0 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowRpc + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + m.Hash |= (uint32(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + case 3: + if wireType != 0 { + return fmt.Errorf("proto: wrong wireType = %d for field CompactRevision", wireType) + } + m.CompactRevision = 0 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowRpc + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + m.CompactRevision |= (int64(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + default: + iNdEx = preIndex + skippy, err := skipRpc(dAtA[iNdEx:]) + if err != nil { + return err + } + if skippy < 0 { + return ErrInvalidLengthRpc + } + if (iNdEx + skippy) > l { + return io.ErrUnexpectedEOF + } + iNdEx += skippy + } + } + + if iNdEx > l { + return io.ErrUnexpectedEOF + } + return nil +} func (m *HashResponse) Unmarshal(dAtA []byte) error { l := len(dAtA) iNdEx := 0 @@ -10511,7 +12228,24 @@ func (m *WatchCreateRequest) Unmarshal(dAtA []byte) error { } m.ProgressNotify = bool(v != 0) case 5: - if wireType == 2 { + if wireType == 0 { + var v WatchCreateRequest_FilterType + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowRpc + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + v |= (WatchCreateRequest_FilterType(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + m.Filters = append(m.Filters, v) + } else if wireType == 2 { var packedLen int for shift := uint(0); ; shift += 7 { if shift >= 64 { @@ -10552,23 +12286,6 @@ func (m *WatchCreateRequest) Unmarshal(dAtA []byte) error { } m.Filters = append(m.Filters, v) } - } else if wireType == 0 { - var v WatchCreateRequest_FilterType - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowRpc - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - v |= (WatchCreateRequest_FilterType(b) & 0x7F) << shift - if b < 0x80 { - break - } - } - m.Filters = append(m.Filters, v) } else { return fmt.Errorf("proto: wrong wireType = %d for field Filters", wireType) } @@ -11741,6 +13458,239 @@ func (m *LeaseTimeToLiveResponse) Unmarshal(dAtA []byte) error { } return nil } +func (m *LeaseLeasesRequest) Unmarshal(dAtA []byte) error { + l := len(dAtA) + iNdEx := 0 + for iNdEx < l { + preIndex := iNdEx + var wire uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowRpc + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + wire |= (uint64(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + fieldNum := int32(wire >> 3) + wireType := int(wire & 0x7) + if wireType == 4 { + return fmt.Errorf("proto: LeaseLeasesRequest: wiretype end group for non-group") + } + if fieldNum <= 0 { + return fmt.Errorf("proto: LeaseLeasesRequest: illegal tag %d (wire type %d)", fieldNum, wire) + } + switch fieldNum { + default: + iNdEx = preIndex + skippy, err := skipRpc(dAtA[iNdEx:]) + if err != nil { + return err + } + if skippy < 0 { + return ErrInvalidLengthRpc + } + if (iNdEx + skippy) > l { + return io.ErrUnexpectedEOF + } + iNdEx += skippy + } + } + + if iNdEx > l { + return io.ErrUnexpectedEOF + } + return nil +} +func (m *LeaseStatus) Unmarshal(dAtA []byte) error { + l := len(dAtA) + iNdEx := 0 + for iNdEx < l { + preIndex := iNdEx + var wire uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowRpc + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + wire |= (uint64(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + fieldNum := int32(wire >> 3) + wireType := int(wire & 0x7) + if wireType == 4 { + return fmt.Errorf("proto: LeaseStatus: wiretype end group for non-group") + } + if fieldNum <= 0 { + return fmt.Errorf("proto: LeaseStatus: illegal tag %d (wire type %d)", fieldNum, wire) + } + switch fieldNum { + case 1: + if wireType != 0 { + return fmt.Errorf("proto: wrong wireType = %d for field ID", wireType) + } + m.ID = 0 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowRpc + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + m.ID |= (int64(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + default: + iNdEx = preIndex + skippy, err := skipRpc(dAtA[iNdEx:]) + if err != nil { + return err + } + if skippy < 0 { + return ErrInvalidLengthRpc + } + if (iNdEx + skippy) > l { + return io.ErrUnexpectedEOF + } + iNdEx += skippy + } + } + + if iNdEx > l { + return io.ErrUnexpectedEOF + } + return nil +} +func (m *LeaseLeasesResponse) Unmarshal(dAtA []byte) error { + l := len(dAtA) + iNdEx := 0 + for iNdEx < l { + preIndex := iNdEx + var wire uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowRpc + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + wire |= (uint64(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + fieldNum := int32(wire >> 3) + wireType := int(wire & 0x7) + if wireType == 4 { + return fmt.Errorf("proto: LeaseLeasesResponse: wiretype end group for non-group") + } + if fieldNum <= 0 { + return fmt.Errorf("proto: LeaseLeasesResponse: illegal tag %d (wire type %d)", fieldNum, wire) + } + switch fieldNum { + case 1: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field Header", wireType) + } + var msglen int + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowRpc + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + msglen |= (int(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + if msglen < 0 { + return ErrInvalidLengthRpc + } + postIndex := iNdEx + msglen + if postIndex > l { + return io.ErrUnexpectedEOF + } + if m.Header == nil { + m.Header = &ResponseHeader{} + } + if err := m.Header.Unmarshal(dAtA[iNdEx:postIndex]); err != nil { + return err + } + iNdEx = postIndex + case 2: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field Leases", wireType) + } + var msglen int + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowRpc + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + msglen |= (int(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + if msglen < 0 { + return ErrInvalidLengthRpc + } + postIndex := iNdEx + msglen + if postIndex > l { + return io.ErrUnexpectedEOF + } + m.Leases = append(m.Leases, &LeaseStatus{}) + if err := m.Leases[len(m.Leases)-1].Unmarshal(dAtA[iNdEx:postIndex]); err != nil { + return err + } + iNdEx = postIndex + default: + iNdEx = preIndex + skippy, err := skipRpc(dAtA[iNdEx:]) + if err != nil { + return err + } + if skippy < 0 { + return ErrInvalidLengthRpc + } + if (iNdEx + skippy) > l { + return io.ErrUnexpectedEOF + } + iNdEx += skippy + } + } + + if iNdEx > l { + return io.ErrUnexpectedEOF + } + return nil +} func (m *Member) Unmarshal(dAtA []byte) error { l := len(dAtA) iNdEx := 0 @@ -12815,6 +14765,158 @@ func (m *DefragmentResponse) Unmarshal(dAtA []byte) error { } return nil } +func (m *MoveLeaderRequest) Unmarshal(dAtA []byte) error { + l := len(dAtA) + iNdEx := 0 + for iNdEx < l { + preIndex := iNdEx + var wire uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowRpc + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + wire |= (uint64(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + fieldNum := int32(wire >> 3) + wireType := int(wire & 0x7) + if wireType == 4 { + return fmt.Errorf("proto: MoveLeaderRequest: wiretype end group for non-group") + } + if fieldNum <= 0 { + return fmt.Errorf("proto: MoveLeaderRequest: illegal tag %d (wire type %d)", fieldNum, wire) + } + switch fieldNum { + case 1: + if wireType != 0 { + return fmt.Errorf("proto: wrong wireType = %d for field TargetID", wireType) + } + m.TargetID = 0 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowRpc + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + m.TargetID |= (uint64(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + default: + iNdEx = preIndex + skippy, err := skipRpc(dAtA[iNdEx:]) + if err != nil { + return err + } + if skippy < 0 { + return ErrInvalidLengthRpc + } + if (iNdEx + skippy) > l { + return io.ErrUnexpectedEOF + } + iNdEx += skippy + } + } + + if iNdEx > l { + return io.ErrUnexpectedEOF + } + return nil +} +func (m *MoveLeaderResponse) Unmarshal(dAtA []byte) error { + l := len(dAtA) + iNdEx := 0 + for iNdEx < l { + preIndex := iNdEx + var wire uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowRpc + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + wire |= (uint64(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + fieldNum := int32(wire >> 3) + wireType := int(wire & 0x7) + if wireType == 4 { + return fmt.Errorf("proto: MoveLeaderResponse: wiretype end group for non-group") + } + if fieldNum <= 0 { + return fmt.Errorf("proto: MoveLeaderResponse: illegal tag %d (wire type %d)", fieldNum, wire) + } + switch fieldNum { + case 1: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field Header", wireType) + } + var msglen int + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowRpc + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + msglen |= (int(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + if msglen < 0 { + return ErrInvalidLengthRpc + } + postIndex := iNdEx + msglen + if postIndex > l { + return io.ErrUnexpectedEOF + } + if m.Header == nil { + m.Header = &ResponseHeader{} + } + if err := m.Header.Unmarshal(dAtA[iNdEx:postIndex]); err != nil { + return err + } + iNdEx = postIndex + default: + iNdEx = preIndex + skippy, err := skipRpc(dAtA[iNdEx:]) + if err != nil { + return err + } + if skippy < 0 { + return ErrInvalidLengthRpc + } + if (iNdEx + skippy) > l { + return io.ErrUnexpectedEOF + } + iNdEx += skippy + } + } + + if iNdEx > l { + return io.ErrUnexpectedEOF + } + return nil +} func (m *AlarmRequest) Unmarshal(dAtA []byte) error { l := len(dAtA) iNdEx := 0 @@ -16329,221 +18431,235 @@ var ( func init() { proto.RegisterFile("rpc.proto", fileDescriptorRpc) } var fileDescriptorRpc = []byte{ - // 3450 bytes of a gzipped FileDescriptorProto - 0x1f, 0x8b, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0xff, 0xbc, 0x3b, 0x5b, 0x6f, 0x1b, 0xc7, - 0xb9, 0x5a, 0x5e, 0xc5, 0x8f, 0x17, 0xd1, 0x23, 0xd9, 0xa6, 0x68, 0x5b, 0x96, 0xc7, 0x37, 0xd9, - 0x4e, 0xa4, 0x44, 0xc9, 0x39, 0x0f, 0x3e, 0x41, 0x70, 0x64, 0x89, 0xb1, 0x74, 0x24, 0x4b, 0xce, - 0x4a, 0x76, 0x72, 0x80, 0xa0, 0xc4, 0x8a, 0x1c, 0x53, 0x0b, 0x91, 0xbb, 0xcc, 0xee, 0x92, 0x96, - 0xd2, 0x14, 0x28, 0xd2, 0x04, 0x45, 0x0b, 0xf4, 0xa5, 0x79, 0xe8, 0xed, 0xb1, 0x28, 0x8a, 0xfc, - 0x80, 0xbe, 0xf5, 0x07, 0x14, 0x7d, 0x69, 0x81, 0xfe, 0x81, 0x22, 0xed, 0x63, 0xdf, 0xfb, 0x54, - 0xb4, 0x98, 0xdb, 0xee, 0xec, 0x72, 0x97, 0x52, 0xca, 0x26, 0x2f, 0xd6, 0xce, 0x37, 0xdf, 0x7c, - 0xb7, 0x99, 0xef, 0x32, 0xdf, 0xd0, 0x50, 0x70, 0xfa, 0xad, 0xe5, 0xbe, 0x63, 0x7b, 0x36, 0x2a, - 0x11, 0xaf, 0xd5, 0x76, 0x89, 0x33, 0x24, 0x4e, 0xff, 0xb0, 0x3e, 0xd7, 0xb1, 0x3b, 0x36, 0x9b, - 0x58, 0xa1, 0x5f, 0x1c, 0xa7, 0x3e, 0x4f, 0x71, 0x56, 0x7a, 0xc3, 0x56, 0x8b, 0xfd, 0xd3, 0x3f, - 0x5c, 0x39, 0x1e, 0x8a, 0xa9, 0x2b, 0x6c, 0xca, 0x18, 0x78, 0x47, 0xec, 0x9f, 0xfe, 0x21, 0xfb, - 0x23, 0x26, 0xaf, 0x76, 0x6c, 0xbb, 0xd3, 0x25, 0x2b, 0x46, 0xdf, 0x5c, 0x31, 0x2c, 0xcb, 0xf6, - 0x0c, 0xcf, 0xb4, 0x2d, 0x97, 0xcf, 0xe2, 0xcf, 0x34, 0xa8, 0xe8, 0xc4, 0xed, 0xdb, 0x96, 0x4b, - 0x36, 0x89, 0xd1, 0x26, 0x0e, 0xba, 0x06, 0xd0, 0xea, 0x0e, 0x5c, 0x8f, 0x38, 0x4d, 0xb3, 0x5d, - 0xd3, 0x16, 0xb5, 0xa5, 0x8c, 0x5e, 0x10, 0x90, 0xad, 0x36, 0xba, 0x02, 0x85, 0x1e, 0xe9, 0x1d, - 0xf2, 0xd9, 0x14, 0x9b, 0x9d, 0xe6, 0x80, 0xad, 0x36, 0xaa, 0xc3, 0xb4, 0x43, 0x86, 0xa6, 0x6b, - 0xda, 0x56, 0x2d, 0xbd, 0xa8, 0x2d, 0xa5, 0x75, 0x7f, 0x4c, 0x17, 0x3a, 0xc6, 0x0b, 0xaf, 0xe9, - 0x11, 0xa7, 0x57, 0xcb, 0xf0, 0x85, 0x14, 0x70, 0x40, 0x9c, 0x1e, 0xfe, 0x34, 0x0b, 0x25, 0xdd, - 0xb0, 0x3a, 0x44, 0x27, 0x1f, 0x0e, 0x88, 0xeb, 0xa1, 0x2a, 0xa4, 0x8f, 0xc9, 0x29, 0x63, 0x5f, - 0xd2, 0xe9, 0x27, 0x5f, 0x6f, 0x75, 0x48, 0x93, 0x58, 0x9c, 0x71, 0x89, 0xae, 0xb7, 0x3a, 0xa4, - 0x61, 0xb5, 0xd1, 0x1c, 0x64, 0xbb, 0x66, 0xcf, 0xf4, 0x04, 0x57, 0x3e, 0x08, 0x89, 0x93, 0x89, - 0x88, 0xb3, 0x0e, 0xe0, 0xda, 0x8e, 0xd7, 0xb4, 0x9d, 0x36, 0x71, 0x6a, 0xd9, 0x45, 0x6d, 0xa9, - 0xb2, 0x7a, 0x6b, 0x59, 0xdd, 0x88, 0x65, 0x55, 0xa0, 0xe5, 0x7d, 0xdb, 0xf1, 0xf6, 0x28, 0xae, - 0x5e, 0x70, 0xe5, 0x27, 0x7a, 0x07, 0x8a, 0x8c, 0x88, 0x67, 0x38, 0x1d, 0xe2, 0xd5, 0x72, 0x8c, - 0xca, 0xed, 0x33, 0xa8, 0x1c, 0x30, 0x64, 0x9d, 0xb1, 0xe7, 0xdf, 0x08, 0x43, 0xc9, 0x25, 0x8e, - 0x69, 0x74, 0xcd, 0x8f, 0x8c, 0xc3, 0x2e, 0xa9, 0xe5, 0x17, 0xb5, 0xa5, 0x69, 0x3d, 0x04, 0xa3, - 0xfa, 0x1f, 0x93, 0x53, 0xb7, 0x69, 0x5b, 0xdd, 0xd3, 0xda, 0x34, 0x43, 0x98, 0xa6, 0x80, 0x3d, - 0xab, 0x7b, 0xca, 0x36, 0xcd, 0x1e, 0x58, 0x1e, 0x9f, 0x2d, 0xb0, 0xd9, 0x02, 0x83, 0xb0, 0xe9, - 0x25, 0xa8, 0xf6, 0x4c, 0xab, 0xd9, 0xb3, 0xdb, 0x4d, 0xdf, 0x20, 0xc0, 0x0c, 0x52, 0xe9, 0x99, - 0xd6, 0x13, 0xbb, 0xad, 0x4b, 0xb3, 0x50, 0x4c, 0xe3, 0x24, 0x8c, 0x59, 0x14, 0x98, 0xc6, 0x89, - 0x8a, 0xb9, 0x0c, 0xb3, 0x94, 0x66, 0xcb, 0x21, 0x86, 0x47, 0x02, 0xe4, 0x12, 0x43, 0xbe, 0xd0, - 0x33, 0xad, 0x75, 0x36, 0x13, 0xc2, 0x37, 0x4e, 0x46, 0xf0, 0xcb, 0x02, 0xdf, 0x38, 0x09, 0xe3, - 0xe3, 0x65, 0x28, 0xf8, 0x36, 0x47, 0xd3, 0x90, 0xd9, 0xdd, 0xdb, 0x6d, 0x54, 0xa7, 0x10, 0x40, - 0x6e, 0x6d, 0x7f, 0xbd, 0xb1, 0xbb, 0x51, 0xd5, 0x50, 0x11, 0xf2, 0x1b, 0x0d, 0x3e, 0x48, 0xe1, - 0x47, 0x00, 0x81, 0x75, 0x51, 0x1e, 0xd2, 0xdb, 0x8d, 0xff, 0xaf, 0x4e, 0x51, 0x9c, 0xe7, 0x0d, - 0x7d, 0x7f, 0x6b, 0x6f, 0xb7, 0xaa, 0xd1, 0xc5, 0xeb, 0x7a, 0x63, 0xed, 0xa0, 0x51, 0x4d, 0x51, - 0x8c, 0x27, 0x7b, 0x1b, 0xd5, 0x34, 0x2a, 0x40, 0xf6, 0xf9, 0xda, 0xce, 0xb3, 0x46, 0x35, 0x83, - 0x3f, 0xd7, 0xa0, 0x2c, 0xf6, 0x8b, 0xfb, 0x04, 0x7a, 0x13, 0x72, 0x47, 0xcc, 0x2f, 0xd8, 0x51, - 0x2c, 0xae, 0x5e, 0x8d, 0x6c, 0x6e, 0xc8, 0x77, 0x74, 0x81, 0x8b, 0x30, 0xa4, 0x8f, 0x87, 0x6e, - 0x2d, 0xb5, 0x98, 0x5e, 0x2a, 0xae, 0x56, 0x97, 0xb9, 0xc3, 0x2e, 0x6f, 0x93, 0xd3, 0xe7, 0x46, - 0x77, 0x40, 0x74, 0x3a, 0x89, 0x10, 0x64, 0x7a, 0xb6, 0x43, 0xd8, 0x89, 0x9d, 0xd6, 0xd9, 0x37, - 0x3d, 0xc6, 0x6c, 0xd3, 0xc4, 0x69, 0xe5, 0x03, 0xfc, 0x85, 0x06, 0xf0, 0x74, 0xe0, 0x25, 0xbb, - 0xc6, 0x1c, 0x64, 0x87, 0x94, 0xb0, 0x70, 0x0b, 0x3e, 0x60, 0x3e, 0x41, 0x0c, 0x97, 0xf8, 0x3e, - 0x41, 0x07, 0xe8, 0x32, 0xe4, 0xfb, 0x0e, 0x19, 0x36, 0x8f, 0x87, 0x8c, 0xc9, 0xb4, 0x9e, 0xa3, - 0xc3, 0xed, 0x21, 0xba, 0x01, 0x25, 0xb3, 0x63, 0xd9, 0x0e, 0x69, 0x72, 0x5a, 0x59, 0x36, 0x5b, - 0xe4, 0x30, 0x26, 0xb7, 0x82, 0xc2, 0x09, 0xe7, 0x54, 0x94, 0x1d, 0x0a, 0xc2, 0x16, 0x14, 0x99, - 0xa8, 0x13, 0x99, 0xef, 0x5e, 0x20, 0x63, 0x8a, 0x2d, 0x1b, 0x35, 0xa1, 0x90, 0x1a, 0x7f, 0x00, - 0x68, 0x83, 0x74, 0x89, 0x47, 0x26, 0x89, 0x1e, 0x8a, 0x4d, 0xd2, 0xaa, 0x4d, 0xf0, 0x8f, 0x35, - 0x98, 0x0d, 0x91, 0x9f, 0x48, 0xad, 0x1a, 0xe4, 0xdb, 0x8c, 0x18, 0x97, 0x20, 0xad, 0xcb, 0x21, - 0x7a, 0x00, 0xd3, 0x42, 0x00, 0xb7, 0x96, 0x4e, 0x38, 0x34, 0x79, 0x2e, 0x93, 0x8b, 0xff, 0xa6, - 0x41, 0x41, 0x28, 0xba, 0xd7, 0x47, 0x6b, 0x50, 0x76, 0xf8, 0xa0, 0xc9, 0xf4, 0x11, 0x12, 0xd5, - 0x93, 0x83, 0xd0, 0xe6, 0x94, 0x5e, 0x12, 0x4b, 0x18, 0x18, 0xfd, 0x0f, 0x14, 0x25, 0x89, 0xfe, - 0xc0, 0x13, 0x26, 0xaf, 0x85, 0x09, 0x04, 0xe7, 0x6f, 0x73, 0x4a, 0x07, 0x81, 0xfe, 0x74, 0xe0, - 0xa1, 0x03, 0x98, 0x93, 0x8b, 0xb9, 0x36, 0x42, 0x8c, 0x34, 0xa3, 0xb2, 0x18, 0xa6, 0x32, 0xba, - 0x55, 0x9b, 0x53, 0x3a, 0x12, 0xeb, 0x95, 0xc9, 0x47, 0x05, 0xc8, 0x0b, 0x28, 0xfe, 0xbb, 0x06, - 0x20, 0x0d, 0xba, 0xd7, 0x47, 0x1b, 0x50, 0x71, 0xc4, 0x28, 0xa4, 0xf0, 0x95, 0x58, 0x85, 0xc5, - 0x3e, 0x4c, 0xe9, 0x65, 0xb9, 0x88, 0xab, 0xfc, 0x36, 0x94, 0x7c, 0x2a, 0x81, 0xce, 0xf3, 0x31, - 0x3a, 0xfb, 0x14, 0x8a, 0x72, 0x01, 0xd5, 0xfa, 0x3d, 0xb8, 0xe8, 0xaf, 0x8f, 0x51, 0xfb, 0xc6, - 0x18, 0xb5, 0x7d, 0x82, 0xb3, 0x92, 0x82, 0xaa, 0x38, 0xd0, 0x94, 0xc5, 0xc1, 0xf8, 0x8b, 0x34, - 0xe4, 0xd7, 0xed, 0x5e, 0xdf, 0x70, 0xe8, 0x1e, 0xe5, 0x1c, 0xe2, 0x0e, 0xba, 0x1e, 0x53, 0xb7, - 0xb2, 0x7a, 0x33, 0xcc, 0x41, 0xa0, 0xc9, 0xbf, 0x3a, 0x43, 0xd5, 0xc5, 0x12, 0xba, 0x58, 0x64, - 0xa8, 0xd4, 0x39, 0x16, 0x8b, 0xfc, 0x24, 0x96, 0x48, 0x5f, 0x4a, 0x07, 0xbe, 0x54, 0x87, 0xfc, - 0x90, 0x38, 0x41, 0x56, 0xdd, 0x9c, 0xd2, 0x25, 0x00, 0xdd, 0x83, 0x99, 0x68, 0x84, 0xcf, 0x0a, - 0x9c, 0x4a, 0x2b, 0x9c, 0x10, 0x6e, 0x42, 0x29, 0x94, 0x66, 0x72, 0x02, 0xaf, 0xd8, 0x53, 0xb2, - 0xcc, 0x25, 0x19, 0xda, 0x68, 0x4a, 0x2c, 0x6d, 0x4e, 0x89, 0xe0, 0x86, 0xff, 0x17, 0xca, 0x21, - 0x5d, 0x69, 0x14, 0x6f, 0xbc, 0xfb, 0x6c, 0x6d, 0x87, 0x87, 0xfc, 0xc7, 0x2c, 0xca, 0xeb, 0x55, - 0x8d, 0x66, 0x8e, 0x9d, 0xc6, 0xfe, 0x7e, 0x35, 0x85, 0xca, 0x50, 0xd8, 0xdd, 0x3b, 0x68, 0x72, - 0xac, 0x34, 0x7e, 0xcb, 0xa7, 0x20, 0x52, 0x86, 0x92, 0x29, 0xa6, 0x94, 0x4c, 0xa1, 0xc9, 0x4c, - 0x91, 0x0a, 0x32, 0x45, 0xfa, 0x51, 0x05, 0x4a, 0xdc, 0x3e, 0xcd, 0x81, 0x45, 0xb3, 0xd5, 0x2f, - 0x35, 0x80, 0x83, 0x13, 0x4b, 0x06, 0xa0, 0x15, 0xc8, 0xb7, 0x38, 0xf1, 0x9a, 0xc6, 0xfc, 0xf9, - 0x62, 0xac, 0xc9, 0x75, 0x89, 0x85, 0x5e, 0x87, 0xbc, 0x3b, 0x68, 0xb5, 0x88, 0x2b, 0xb3, 0xc6, - 0xe5, 0x68, 0x48, 0x11, 0x0e, 0xaf, 0x4b, 0x3c, 0xba, 0xe4, 0x85, 0x61, 0x76, 0x07, 0x2c, 0x87, - 0x8c, 0x5f, 0x22, 0xf0, 0xf0, 0xcf, 0x34, 0x28, 0x32, 0x29, 0x27, 0x8a, 0x63, 0x57, 0xa1, 0xc0, - 0x64, 0x20, 0x6d, 0x11, 0xc9, 0xa6, 0xf5, 0x00, 0x80, 0xfe, 0x1b, 0x0a, 0xf2, 0x04, 0xcb, 0x60, - 0x56, 0x8b, 0x27, 0xbb, 0xd7, 0xd7, 0x03, 0x54, 0xbc, 0x0d, 0x17, 0x98, 0x55, 0x5a, 0xb4, 0x3e, - 0x95, 0x76, 0x54, 0x2b, 0x38, 0x2d, 0x52, 0xc1, 0xd5, 0x61, 0xba, 0x7f, 0x74, 0xea, 0x9a, 0x2d, - 0xa3, 0x2b, 0xa4, 0xf0, 0xc7, 0xf8, 0xff, 0x00, 0xa9, 0xc4, 0x26, 0x51, 0x17, 0x97, 0xa1, 0xb8, - 0x69, 0xb8, 0x47, 0x42, 0x24, 0xfc, 0x3e, 0x94, 0xf8, 0x70, 0x22, 0x1b, 0x22, 0xc8, 0x1c, 0x19, - 0xee, 0x11, 0x13, 0xbc, 0xac, 0xb3, 0x6f, 0x7c, 0x01, 0x66, 0xf6, 0x2d, 0xa3, 0xef, 0x1e, 0xd9, - 0x32, 0xd6, 0xd2, 0xfa, 0xbc, 0x1a, 0xc0, 0x26, 0xe2, 0x78, 0x17, 0x66, 0x1c, 0xd2, 0x33, 0x4c, - 0xcb, 0xb4, 0x3a, 0xcd, 0xc3, 0x53, 0x8f, 0xb8, 0xa2, 0x7c, 0xaf, 0xf8, 0xe0, 0x47, 0x14, 0x4a, - 0x45, 0x3b, 0xec, 0xda, 0x87, 0xc2, 0xe3, 0xd9, 0x37, 0xfe, 0x8d, 0x06, 0xa5, 0xf7, 0x0c, 0xaf, - 0x25, 0xad, 0x80, 0xb6, 0xa0, 0xe2, 0xfb, 0x39, 0x83, 0x08, 0x59, 0x22, 0x01, 0x9f, 0xad, 0x91, - 0x85, 0x9d, 0x0c, 0xf8, 0xe5, 0x96, 0x0a, 0x60, 0xa4, 0x0c, 0xab, 0x45, 0xba, 0x3e, 0xa9, 0x54, - 0x32, 0x29, 0x86, 0xa8, 0x92, 0x52, 0x01, 0x8f, 0x66, 0x82, 0x64, 0xc8, 0xdd, 0xf2, 0xe7, 0x29, - 0x40, 0xa3, 0x32, 0x7c, 0xd5, 0xfa, 0xe0, 0x36, 0x54, 0x5c, 0xcf, 0x70, 0xbc, 0x66, 0xe4, 0x72, - 0x53, 0x66, 0x50, 0x3f, 0x56, 0xdd, 0x85, 0x99, 0xbe, 0x63, 0x77, 0x1c, 0xe2, 0xba, 0x4d, 0xcb, - 0xf6, 0xcc, 0x17, 0xa7, 0xa2, 0xc4, 0xaa, 0x48, 0xf0, 0x2e, 0x83, 0xa2, 0x06, 0xe4, 0x5f, 0x98, - 0x5d, 0x8f, 0x38, 0x6e, 0x2d, 0xbb, 0x98, 0x5e, 0xaa, 0xac, 0x3e, 0x38, 0xcb, 0x6a, 0xcb, 0xef, - 0x30, 0xfc, 0x83, 0xd3, 0x3e, 0xd1, 0xe5, 0x5a, 0xb5, 0x6c, 0xc9, 0x85, 0xca, 0x96, 0xdb, 0x00, - 0x01, 0x3e, 0x8d, 0x5a, 0xbb, 0x7b, 0x4f, 0x9f, 0x1d, 0x54, 0xa7, 0x50, 0x09, 0xa6, 0x77, 0xf7, - 0x36, 0x1a, 0x3b, 0x0d, 0x1a, 0xd7, 0xf0, 0x8a, 0xb4, 0x8d, 0x6a, 0x43, 0x34, 0x0f, 0xd3, 0x2f, - 0x29, 0x54, 0xde, 0xfe, 0xd2, 0x7a, 0x9e, 0x8d, 0xb7, 0xda, 0xf8, 0x47, 0x29, 0x28, 0x8b, 0x53, - 0x30, 0xd1, 0x51, 0x54, 0x59, 0xa4, 0x42, 0x2c, 0x68, 0x8d, 0xc4, 0x4f, 0x47, 0x5b, 0x94, 0x62, - 0x72, 0x48, 0xdd, 0x9d, 0x6f, 0x36, 0x69, 0x0b, 0xb3, 0xfa, 0x63, 0x74, 0x0f, 0xaa, 0x2d, 0xee, - 0xee, 0x91, 0xb4, 0xa3, 0xcf, 0x08, 0xb8, 0x92, 0x75, 0xca, 0xfe, 0x69, 0x33, 0x5c, 0x91, 0x76, - 0x0a, 0x7a, 0x49, 0x1e, 0x24, 0x0a, 0x43, 0xb7, 0x21, 0x47, 0x86, 0xc4, 0xf2, 0xdc, 0x5a, 0x91, - 0x05, 0xb0, 0xb2, 0xac, 0xc6, 0x1a, 0x14, 0xaa, 0x8b, 0x49, 0xfc, 0x5f, 0x70, 0x81, 0x55, 0xbd, - 0x8f, 0x1d, 0xc3, 0x52, 0xcb, 0xf3, 0x83, 0x83, 0x1d, 0x61, 0x3a, 0xfa, 0x89, 0x2a, 0x90, 0xda, - 0xda, 0x10, 0x8a, 0xa6, 0xb6, 0x36, 0xf0, 0x27, 0x1a, 0x20, 0x75, 0xdd, 0x44, 0xb6, 0x8c, 0x10, - 0x97, 0xec, 0xd3, 0x01, 0xfb, 0x39, 0xc8, 0x12, 0xc7, 0xb1, 0x1d, 0x66, 0xb5, 0x82, 0xce, 0x07, - 0xf8, 0x96, 0x90, 0x41, 0x27, 0x43, 0xfb, 0xd8, 0x77, 0x0c, 0x4e, 0x4d, 0xf3, 0x45, 0xdd, 0x86, - 0xd9, 0x10, 0xd6, 0x44, 0x81, 0xf4, 0x2e, 0x5c, 0x64, 0xc4, 0xb6, 0x09, 0xe9, 0xaf, 0x75, 0xcd, - 0x61, 0x22, 0xd7, 0x3e, 0x5c, 0x8a, 0x22, 0x7e, 0xbd, 0x36, 0xc2, 0x6f, 0x09, 0x8e, 0x07, 0x66, - 0x8f, 0x1c, 0xd8, 0x3b, 0xc9, 0xb2, 0xd1, 0xe8, 0x48, 0x6f, 0xdd, 0x22, 0xe3, 0xb0, 0x6f, 0xfc, - 0x2b, 0x0d, 0x2e, 0x8f, 0x2c, 0xff, 0x9a, 0x77, 0x75, 0x01, 0xa0, 0x43, 0x8f, 0x0f, 0x69, 0xd3, - 0x09, 0x7e, 0x5f, 0x54, 0x20, 0xbe, 0x9c, 0x34, 0xc0, 0x94, 0x84, 0x9c, 0x47, 0x90, 0x7b, 0xc2, - 0x5a, 0x35, 0x8a, 0x56, 0x19, 0xa9, 0x95, 0x65, 0xf4, 0xf8, 0x05, 0xb2, 0xa0, 0xb3, 0x6f, 0x96, - 0x5f, 0x09, 0x71, 0x9e, 0xe9, 0x3b, 0x3c, 0x8f, 0x17, 0x74, 0x7f, 0x4c, 0xb9, 0xb7, 0xba, 0x26, - 0xb1, 0x3c, 0x36, 0x9b, 0x61, 0xb3, 0x0a, 0x04, 0x2f, 0x43, 0x95, 0x73, 0x5a, 0x6b, 0xb7, 0x95, - 0x5c, 0xee, 0xd3, 0xd3, 0xc2, 0xf4, 0xf0, 0xaf, 0x35, 0xb8, 0xa0, 0x2c, 0x98, 0xc8, 0x76, 0xaf, - 0x40, 0x8e, 0x37, 0xa4, 0x44, 0x1e, 0x99, 0x0b, 0xaf, 0xe2, 0x6c, 0x74, 0x81, 0x83, 0x96, 0x21, - 0xcf, 0xbf, 0x64, 0xb1, 0x12, 0x8f, 0x2e, 0x91, 0xf0, 0x6d, 0x98, 0x15, 0x20, 0xd2, 0xb3, 0xe3, - 0x8e, 0x09, 0x33, 0x28, 0xfe, 0x18, 0xe6, 0xc2, 0x68, 0x13, 0xa9, 0xa4, 0x08, 0x99, 0x3a, 0x8f, - 0x90, 0x6b, 0x52, 0xc8, 0x67, 0xfd, 0xb6, 0x92, 0xf6, 0xa2, 0xbb, 0xae, 0xee, 0x48, 0x2a, 0xb2, - 0x23, 0xbe, 0x02, 0x92, 0xc4, 0x37, 0xaa, 0xc0, 0xac, 0x3c, 0x0e, 0x3b, 0xa6, 0xeb, 0x17, 0x43, - 0x1f, 0x01, 0x52, 0x81, 0xdf, 0xb4, 0x40, 0x1b, 0xe4, 0x85, 0x63, 0x74, 0x7a, 0xc4, 0x0f, 0xf5, - 0xb4, 0xca, 0x54, 0x81, 0x13, 0x05, 0xc7, 0x3f, 0x68, 0x50, 0x5a, 0xeb, 0x1a, 0x4e, 0x4f, 0x6e, - 0xd6, 0xdb, 0x90, 0xe3, 0xe5, 0xab, 0xb8, 0xf1, 0xdd, 0x09, 0x93, 0x51, 0x71, 0xf9, 0x60, 0x8d, - 0x17, 0xbb, 0x62, 0x15, 0xdd, 0x5c, 0xd1, 0x97, 0xdd, 0x88, 0xf4, 0x69, 0x37, 0xd0, 0xab, 0x90, - 0x35, 0xe8, 0x12, 0x16, 0x50, 0x2a, 0xd1, 0x8b, 0x03, 0xa3, 0xc6, 0x4a, 0x0d, 0x8e, 0x85, 0xdf, - 0x84, 0xa2, 0xc2, 0x81, 0xde, 0x87, 0x1e, 0x37, 0x44, 0x39, 0xb1, 0xb6, 0x7e, 0xb0, 0xf5, 0x9c, - 0x5f, 0x93, 0x2a, 0x00, 0x1b, 0x0d, 0x7f, 0x9c, 0xc2, 0xef, 0x8b, 0x55, 0x22, 0xe4, 0xa8, 0xf2, - 0x68, 0x49, 0xf2, 0xa4, 0xce, 0x25, 0xcf, 0x09, 0x94, 0x85, 0xfa, 0x13, 0x9d, 0x81, 0xd7, 0x21, - 0xc7, 0xe8, 0xc9, 0x23, 0x30, 0x1f, 0xc3, 0x56, 0x46, 0x0b, 0x8e, 0x88, 0x67, 0xa0, 0xbc, 0xef, - 0x19, 0xde, 0xc0, 0x95, 0x47, 0xe0, 0xf7, 0x1a, 0x54, 0x24, 0x64, 0xd2, 0xe6, 0x90, 0xbc, 0x54, - 0xf3, 0x20, 0xec, 0x5f, 0xa9, 0x2f, 0x41, 0xae, 0x7d, 0xb8, 0x6f, 0x7e, 0x24, 0x1b, 0x79, 0x62, - 0x44, 0xe1, 0x5d, 0xce, 0x87, 0x77, 0xd3, 0xc5, 0x88, 0x5e, 0xcf, 0x1c, 0xe3, 0x85, 0xb7, 0x65, - 0xb5, 0xc9, 0x09, 0xab, 0x82, 0x32, 0x7a, 0x00, 0x60, 0x37, 0x2a, 0xd1, 0x75, 0x67, 0xa5, 0x8f, - 0xda, 0x85, 0x9f, 0x85, 0x0b, 0x6b, 0x03, 0xef, 0xa8, 0x61, 0x19, 0x87, 0x5d, 0x19, 0x34, 0xf0, - 0x1c, 0x20, 0x0a, 0xdc, 0x30, 0x5d, 0x15, 0xda, 0x80, 0x59, 0x0a, 0x25, 0x96, 0x67, 0xb6, 0x94, - 0x08, 0x23, 0xf3, 0x88, 0x16, 0xc9, 0x23, 0x86, 0xeb, 0xbe, 0xb4, 0x9d, 0xb6, 0x50, 0xcd, 0x1f, - 0xe3, 0x0d, 0x4e, 0xfc, 0x99, 0x1b, 0xca, 0x14, 0x5f, 0x95, 0xca, 0x52, 0x40, 0xe5, 0x31, 0xf1, - 0xc6, 0x50, 0xc1, 0x0f, 0xe0, 0xa2, 0xc4, 0x14, 0x5d, 0x97, 0x31, 0xc8, 0x7b, 0x70, 0x4d, 0x22, - 0xaf, 0x1f, 0xd1, 0xbb, 0xc0, 0x53, 0xc1, 0xf0, 0xdf, 0x95, 0xf3, 0x11, 0xd4, 0x7c, 0x39, 0x59, - 0xe9, 0x67, 0x77, 0x55, 0x01, 0x06, 0xae, 0x38, 0x33, 0x05, 0x9d, 0x7d, 0x53, 0x98, 0x63, 0x77, - 0xfd, 0xac, 0x4c, 0xbf, 0xf1, 0x3a, 0xcc, 0x4b, 0x1a, 0xa2, 0x28, 0x0b, 0x13, 0x19, 0x11, 0x28, - 0x8e, 0x88, 0x30, 0x18, 0x5d, 0x3a, 0xde, 0xec, 0x2a, 0x66, 0xd8, 0xb4, 0x8c, 0xa6, 0xa6, 0xd0, - 0xbc, 0xc8, 0x4f, 0x04, 0x15, 0x4c, 0x0d, 0xda, 0x02, 0x4c, 0x09, 0xa8, 0x60, 0xb1, 0x11, 0x14, - 0x3c, 0xb2, 0x11, 0x23, 0xa4, 0x3f, 0x80, 0x05, 0x5f, 0x08, 0x6a, 0xb7, 0xa7, 0xc4, 0xe9, 0x99, - 0xae, 0xab, 0xf4, 0x09, 0xe2, 0x14, 0xbf, 0x03, 0x99, 0x3e, 0x11, 0x31, 0xa5, 0xb8, 0x8a, 0x96, - 0xf9, 0xdb, 0xd8, 0xb2, 0xb2, 0x98, 0xcd, 0xe3, 0x36, 0x5c, 0x97, 0xd4, 0xb9, 0x45, 0x63, 0xc9, - 0x47, 0x85, 0x92, 0x77, 0x48, 0x6e, 0xd6, 0xd1, 0x3b, 0x64, 0x9a, 0xef, 0xbd, 0xbc, 0x43, 0xd2, - 0x5c, 0xa1, 0xfa, 0xd6, 0x44, 0xb9, 0x62, 0x9b, 0xdb, 0xd4, 0x77, 0xc9, 0x89, 0x88, 0x1d, 0xc2, - 0x5c, 0xd8, 0x93, 0x27, 0x0a, 0x63, 0x73, 0x90, 0xf5, 0xec, 0x63, 0x22, 0x83, 0x18, 0x1f, 0x48, - 0x81, 0x7d, 0x37, 0x9f, 0x48, 0x60, 0x23, 0x20, 0xc6, 0x8e, 0xe4, 0xa4, 0xf2, 0xd2, 0xdd, 0x94, - 0xf5, 0x0f, 0x1f, 0xe0, 0x5d, 0xb8, 0x14, 0x0d, 0x13, 0x13, 0x89, 0xfc, 0x9c, 0x1f, 0xe0, 0xb8, - 0x48, 0x32, 0x11, 0xdd, 0x77, 0x83, 0x60, 0xa0, 0x04, 0x94, 0x89, 0x48, 0xea, 0x50, 0x8f, 0x8b, - 0x2f, 0xff, 0x89, 0xf3, 0xea, 0x87, 0x9b, 0x89, 0x88, 0xb9, 0x01, 0xb1, 0xc9, 0xb7, 0x3f, 0x88, - 0x11, 0xe9, 0xb1, 0x31, 0x42, 0x38, 0x49, 0x10, 0xc5, 0xbe, 0x86, 0x43, 0x27, 0x78, 0x04, 0x01, - 0x74, 0x52, 0x1e, 0x34, 0x87, 0xf8, 0x3c, 0xd8, 0x40, 0x1e, 0x6c, 0x35, 0xec, 0x4e, 0xb4, 0x19, - 0xef, 0x05, 0xb1, 0x73, 0x24, 0x32, 0x4f, 0x44, 0xf8, 0x7d, 0x58, 0x4c, 0x0e, 0xca, 0x93, 0x50, - 0xbe, 0x8f, 0xa1, 0xe0, 0x17, 0x94, 0xca, 0xbb, 0x72, 0x11, 0xf2, 0xbb, 0x7b, 0xfb, 0x4f, 0xd7, - 0xd6, 0x1b, 0x55, 0x6d, 0xf5, 0x1f, 0x69, 0x48, 0x6d, 0x3f, 0x47, 0xdf, 0x82, 0x2c, 0x7f, 0x2e, - 0x1a, 0xf3, 0x9a, 0x56, 0x1f, 0xf7, 0xf0, 0x84, 0xaf, 0x7e, 0xf2, 0xa7, 0xbf, 0x7e, 0x9e, 0xba, - 0x84, 0x2f, 0xac, 0x0c, 0xdf, 0x30, 0xba, 0xfd, 0x23, 0x63, 0xe5, 0x78, 0xb8, 0xc2, 0x72, 0xc2, - 0x43, 0xed, 0x3e, 0x7a, 0x0e, 0xe9, 0xa7, 0x03, 0x0f, 0x25, 0x3e, 0xb5, 0xd5, 0x93, 0x1f, 0xa4, - 0x70, 0x9d, 0x51, 0x9e, 0xc3, 0x33, 0x2a, 0xe5, 0xfe, 0xc0, 0xa3, 0x74, 0x87, 0x50, 0x54, 0xde, - 0x94, 0xd0, 0x99, 0x8f, 0x70, 0xf5, 0xb3, 0xdf, 0xab, 0x30, 0x66, 0xfc, 0xae, 0xe2, 0xcb, 0x2a, - 0x3f, 0xfe, 0xf4, 0xa5, 0xea, 0x73, 0x70, 0x62, 0x45, 0xf5, 0x09, 0x9e, 0x45, 0xa2, 0xfa, 0x28, - 0x4f, 0x11, 0xf1, 0xfa, 0x78, 0x27, 0x16, 0xa5, 0x6b, 0x8b, 0x77, 0xb0, 0x96, 0x87, 0xae, 0xc7, - 0xbc, 0xa3, 0xa8, 0x2f, 0x06, 0xf5, 0xc5, 0x64, 0x04, 0xc1, 0xe9, 0x06, 0xe3, 0x74, 0x05, 0x5f, - 0x52, 0x39, 0xb5, 0x7c, 0xbc, 0x87, 0xda, 0xfd, 0xd5, 0x23, 0xc8, 0xb2, 0x3e, 0x27, 0x6a, 0xca, - 0x8f, 0x7a, 0x4c, 0x87, 0x36, 0xe1, 0x04, 0x84, 0x3a, 0xa4, 0x78, 0x9e, 0x71, 0x9b, 0xc5, 0x15, - 0x9f, 0x1b, 0x6b, 0x75, 0x3e, 0xd4, 0xee, 0x2f, 0x69, 0xaf, 0x69, 0xab, 0xdf, 0xcb, 0x40, 0x96, - 0xb5, 0x8e, 0x50, 0x1f, 0x20, 0x68, 0x0a, 0x46, 0xf5, 0x1c, 0x69, 0x33, 0x46, 0xf5, 0x1c, 0xed, - 0x27, 0xe2, 0xeb, 0x8c, 0xf3, 0x3c, 0x9e, 0xf3, 0x39, 0xb3, 0x57, 0xfb, 0x15, 0xd6, 0x24, 0xa2, - 0x66, 0x7d, 0x09, 0x45, 0xa5, 0xb9, 0x87, 0xe2, 0x28, 0x86, 0xba, 0x83, 0xd1, 0x63, 0x12, 0xd3, - 0x19, 0xc4, 0x37, 0x19, 0xd3, 0x6b, 0xb8, 0xa6, 0x1a, 0x97, 0xf3, 0x75, 0x18, 0x26, 0x65, 0xfc, - 0xa9, 0x06, 0x95, 0x70, 0x83, 0x0f, 0xdd, 0x8c, 0x21, 0x1d, 0xed, 0x13, 0xd6, 0x6f, 0x8d, 0x47, - 0x4a, 0x14, 0x81, 0xf3, 0x3f, 0x26, 0xa4, 0x6f, 0x50, 0x4c, 0x61, 0x7b, 0xf4, 0x7d, 0x0d, 0x66, - 0x22, 0x6d, 0x3b, 0x14, 0xc7, 0x62, 0xa4, 0x29, 0x58, 0xbf, 0x7d, 0x06, 0x96, 0x90, 0xe4, 0x2e, - 0x93, 0xe4, 0x06, 0xbe, 0x3a, 0x6a, 0x0c, 0xcf, 0xec, 0x11, 0xcf, 0x16, 0xd2, 0xac, 0xfe, 0x33, - 0x0d, 0xf9, 0x75, 0xfe, 0x13, 0x2b, 0xe4, 0x41, 0xc1, 0xef, 0x84, 0xa1, 0x85, 0xb8, 0xae, 0x44, - 0x50, 0xb2, 0xd7, 0xaf, 0x27, 0xce, 0x0b, 0x11, 0xee, 0x30, 0x11, 0x16, 0xf1, 0x15, 0x5f, 0x04, - 0xf1, 0x53, 0xae, 0x15, 0x7e, 0xf9, 0x5e, 0x31, 0xda, 0x6d, 0xba, 0x25, 0xdf, 0xd5, 0xa0, 0xa4, - 0x36, 0xac, 0xd0, 0x8d, 0xd8, 0x7e, 0x88, 0xda, 0xf3, 0xaa, 0xe3, 0x71, 0x28, 0x82, 0xff, 0x3d, - 0xc6, 0xff, 0x26, 0x5e, 0x48, 0xe2, 0xef, 0x30, 0xfc, 0xb0, 0x08, 0xbc, 0xe5, 0x14, 0x2f, 0x42, - 0xa8, 0xa3, 0x15, 0x2f, 0x42, 0xb8, 0x63, 0x75, 0xb6, 0x08, 0x03, 0x86, 0x4f, 0x45, 0x38, 0x01, - 0x08, 0x3a, 0x4c, 0x28, 0xd6, 0xb8, 0xca, 0x25, 0x26, 0xea, 0x83, 0xa3, 0xcd, 0xa9, 0x98, 0x13, - 0x10, 0xe1, 0xdd, 0x35, 0x5d, 0xea, 0x8b, 0xab, 0xbf, 0xcd, 0x40, 0xf1, 0x89, 0x61, 0x5a, 0x1e, - 0xb1, 0x0c, 0xab, 0x45, 0x50, 0x07, 0xb2, 0x2c, 0x4b, 0x45, 0x03, 0x8f, 0xda, 0xf6, 0x89, 0x06, - 0x9e, 0x50, 0x4f, 0x04, 0xdf, 0x66, 0xac, 0xaf, 0xe3, 0xba, 0xcf, 0xba, 0x17, 0xd0, 0x5f, 0x61, - 0xfd, 0x0c, 0xaa, 0xf2, 0x31, 0xe4, 0x78, 0xff, 0x02, 0x45, 0xa8, 0x85, 0xfa, 0x1c, 0xf5, 0xab, - 0xf1, 0x93, 0x89, 0xa7, 0x4c, 0xe5, 0xe5, 0x32, 0x64, 0xca, 0xec, 0xdb, 0x00, 0x41, 0xc3, 0x2c, - 0x6a, 0xdf, 0x91, 0xfe, 0x5a, 0x7d, 0x31, 0x19, 0x41, 0x30, 0xbe, 0xcf, 0x18, 0xdf, 0xc2, 0xd7, - 0x63, 0x19, 0xb7, 0xfd, 0x05, 0x94, 0x79, 0x0b, 0x32, 0x9b, 0x86, 0x7b, 0x84, 0x22, 0x49, 0x48, - 0x79, 0xdb, 0xad, 0xd7, 0xe3, 0xa6, 0x04, 0xab, 0x5b, 0x8c, 0xd5, 0x02, 0x9e, 0x8f, 0x65, 0x75, - 0x64, 0xb8, 0x34, 0xa6, 0xa3, 0x01, 0x4c, 0xcb, 0xf7, 0x5a, 0x74, 0x2d, 0x62, 0xb3, 0xf0, 0xdb, - 0x6e, 0x7d, 0x21, 0x69, 0x5a, 0x30, 0x5c, 0x62, 0x0c, 0x31, 0xbe, 0x16, 0x6f, 0x54, 0x81, 0xfe, - 0x50, 0xbb, 0xff, 0x9a, 0xb6, 0xfa, 0xc3, 0x2a, 0x64, 0x68, 0xbd, 0x44, 0xb3, 0x48, 0x70, 0xcd, - 0x8c, 0x5a, 0x78, 0xa4, 0xb9, 0x13, 0xb5, 0xf0, 0xe8, 0x0d, 0x35, 0x26, 0x8b, 0xb0, 0x1f, 0x9a, - 0x12, 0x86, 0x45, 0x35, 0xf6, 0xa0, 0xa8, 0x5c, 0x46, 0x51, 0x0c, 0xc5, 0x70, 0xeb, 0x28, 0x9a, - 0x45, 0x62, 0x6e, 0xb2, 0x78, 0x91, 0x31, 0xad, 0xe3, 0x8b, 0x61, 0xa6, 0x6d, 0x8e, 0x46, 0xb9, - 0x7e, 0x0c, 0x25, 0xf5, 0xd6, 0x8a, 0x62, 0x88, 0x46, 0x7a, 0x53, 0xd1, 0x58, 0x11, 0x77, 0xe9, - 0x8d, 0x71, 0x1a, 0xff, 0x67, 0xb5, 0x12, 0x97, 0x72, 0xff, 0x10, 0xf2, 0xe2, 0x2e, 0x1b, 0xa7, - 0x6f, 0xb8, 0x9b, 0x15, 0xa7, 0x6f, 0xe4, 0x22, 0x1c, 0x53, 0x92, 0x30, 0xb6, 0xb4, 0x66, 0x97, - 0x01, 0x5a, 0xb0, 0x7c, 0x4c, 0xbc, 0x24, 0x96, 0x41, 0x7f, 0x26, 0x89, 0xa5, 0x72, 0x5f, 0x1a, - 0xcb, 0xb2, 0x43, 0x3c, 0x71, 0x96, 0xe5, 0x65, 0x04, 0x25, 0x50, 0x54, 0xa3, 0x21, 0x1e, 0x87, - 0x92, 0x58, 0x45, 0x06, 0x5c, 0x45, 0x28, 0x44, 0xdf, 0x01, 0x08, 0x2e, 0xde, 0xd1, 0xc2, 0x20, - 0xb6, 0x7b, 0x17, 0x2d, 0x0c, 0xe2, 0xef, 0xee, 0x31, 0x1e, 0x1c, 0x30, 0xe7, 0x95, 0x2c, 0x65, - 0xff, 0x13, 0x0d, 0xd0, 0xe8, 0x45, 0x1d, 0x3d, 0x88, 0x67, 0x11, 0xdb, 0x18, 0xac, 0xbf, 0x72, - 0x3e, 0xe4, 0xc4, 0xe8, 0x19, 0xc8, 0xd5, 0x62, 0x4b, 0xfa, 0x2f, 0xa9, 0x64, 0x9f, 0x69, 0x50, - 0x0e, 0x5d, 0xf5, 0xd1, 0x9d, 0x84, 0x7d, 0x8e, 0x34, 0x17, 0xeb, 0x77, 0xcf, 0xc4, 0x4b, 0xac, - 0x9d, 0x94, 0x53, 0x21, 0xeb, 0xc6, 0x1f, 0x68, 0x50, 0x09, 0xf7, 0x07, 0x50, 0x02, 0x83, 0x91, - 0x0e, 0x65, 0x7d, 0xe9, 0x6c, 0xc4, 0x73, 0xec, 0x56, 0x50, 0x4a, 0x7e, 0x08, 0x79, 0xd1, 0x56, - 0x88, 0x73, 0x8b, 0x70, 0x83, 0x33, 0xce, 0x2d, 0x22, 0x3d, 0x89, 0x24, 0xb7, 0xa0, 0x37, 0x74, - 0xc5, 0x13, 0x45, 0xf3, 0x21, 0x89, 0xe5, 0x78, 0x4f, 0x8c, 0x74, 0x2e, 0xc6, 0xb2, 0x0c, 0x3c, - 0x51, 0xb6, 0x1e, 0x50, 0x02, 0xc5, 0x33, 0x3c, 0x31, 0xda, 0xb9, 0x48, 0xf2, 0x44, 0xc6, 0x55, - 0xf1, 0xc4, 0xa0, 0x53, 0x10, 0xe7, 0x89, 0x23, 0xed, 0xdb, 0x38, 0x4f, 0x1c, 0x6d, 0x36, 0x24, - 0xed, 0x2d, 0x63, 0x1e, 0xf2, 0xc4, 0xd9, 0x98, 0xce, 0x02, 0x7a, 0x25, 0xc1, 0xa6, 0xb1, 0xad, - 0xe1, 0xfa, 0xab, 0xe7, 0xc4, 0x1e, 0xef, 0x01, 0x7c, 0x37, 0xa4, 0x07, 0xfc, 0x42, 0x83, 0xb9, - 0xb8, 0xd6, 0x04, 0x4a, 0x60, 0x96, 0xd0, 0x57, 0xae, 0x2f, 0x9f, 0x17, 0xfd, 0x1c, 0x76, 0xf3, - 0x7d, 0xe2, 0x51, 0xf5, 0x77, 0x5f, 0x2e, 0x68, 0x7f, 0xfc, 0x72, 0x41, 0xfb, 0xf3, 0x97, 0x0b, - 0xda, 0x4f, 0xff, 0xb2, 0x30, 0x75, 0x98, 0x63, 0xff, 0xdb, 0xe3, 0x8d, 0x7f, 0x05, 0x00, 0x00, - 0xff, 0xff, 0x63, 0x1c, 0x78, 0x24, 0x74, 0x32, 0x00, 0x00, + // 3669 bytes of a gzipped FileDescriptorProto + 0x1f, 0x8b, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0xff, 0xbc, 0x5b, 0x5b, 0x6f, 0x23, 0xc7, + 0x72, 0xd6, 0x90, 0x22, 0x29, 0x16, 0x2f, 0xe2, 0xb6, 0xb4, 0xbb, 0x14, 0x77, 0x57, 0xab, 0xed, + 0xbd, 0x69, 0x2f, 0x16, 0x6d, 0xd9, 0xc9, 0xc3, 0x26, 0x30, 0xac, 0x95, 0xe8, 0x95, 0x2c, 0xad, + 0x24, 0x8f, 0xa8, 0xb5, 0x03, 0x38, 0x11, 0x46, 0x64, 0x4b, 0x62, 0x44, 0xce, 0x30, 0x33, 0x43, + 0xae, 0xb4, 0x31, 0x12, 0xc0, 0x71, 0x82, 0xbc, 0xe4, 0x25, 0x06, 0x82, 0xc4, 0xaf, 0x41, 0x60, + 0xf8, 0x07, 0x04, 0xf9, 0x0b, 0x41, 0x5e, 0x12, 0x20, 0x7f, 0xe0, 0xc0, 0xe7, 0xbc, 0x9c, 0x5f, + 0x70, 0x2e, 0x4f, 0x07, 0x7d, 0x9b, 0xe9, 0xb9, 0x51, 0xb2, 0x69, 0xfb, 0x45, 0x3b, 0x5d, 0x5d, + 0x5d, 0x55, 0x5d, 0xdd, 0x55, 0xd5, 0xfd, 0x35, 0x17, 0xf2, 0x76, 0xbf, 0xb5, 0xd4, 0xb7, 0x2d, + 0xd7, 0x42, 0x45, 0xe2, 0xb6, 0xda, 0x0e, 0xb1, 0x87, 0xc4, 0xee, 0x1f, 0xd6, 0x66, 0x8f, 0xad, + 0x63, 0x8b, 0x75, 0xd4, 0xe9, 0x17, 0xe7, 0xa9, 0xcd, 0x51, 0x9e, 0x7a, 0x6f, 0xd8, 0x6a, 0xb1, + 0x3f, 0xfd, 0xc3, 0xfa, 0xe9, 0x50, 0x74, 0xdd, 0x60, 0x5d, 0xc6, 0xc0, 0x3d, 0x61, 0x7f, 0xfa, + 0x87, 0xec, 0x1f, 0xd1, 0x79, 0xf3, 0xd8, 0xb2, 0x8e, 0xbb, 0xa4, 0x6e, 0xf4, 0x3b, 0x75, 0xc3, + 0x34, 0x2d, 0xd7, 0x70, 0x3b, 0x96, 0xe9, 0xf0, 0x5e, 0xfc, 0xf7, 0x1a, 0x94, 0x75, 0xe2, 0xf4, + 0x2d, 0xd3, 0x21, 0xeb, 0xc4, 0x68, 0x13, 0x1b, 0xdd, 0x02, 0x68, 0x75, 0x07, 0x8e, 0x4b, 0xec, + 0x83, 0x4e, 0xbb, 0xaa, 0x2d, 0x68, 0x8b, 0x93, 0x7a, 0x5e, 0x50, 0x36, 0xda, 0xe8, 0x06, 0xe4, + 0x7b, 0xa4, 0x77, 0xc8, 0x7b, 0x53, 0xac, 0x77, 0x8a, 0x13, 0x36, 0xda, 0xa8, 0x06, 0x53, 0x36, + 0x19, 0x76, 0x9c, 0x8e, 0x65, 0x56, 0xd3, 0x0b, 0xda, 0x62, 0x5a, 0xf7, 0xda, 0x74, 0xa0, 0x6d, + 0x1c, 0xb9, 0x07, 0x2e, 0xb1, 0x7b, 0xd5, 0x49, 0x3e, 0x90, 0x12, 0x9a, 0xc4, 0xee, 0xe1, 0x2f, + 0x33, 0x50, 0xd4, 0x0d, 0xf3, 0x98, 0xe8, 0xe4, 0xaf, 0x06, 0xc4, 0x71, 0x51, 0x05, 0xd2, 0xa7, + 0xe4, 0x9c, 0xa9, 0x2f, 0xea, 0xf4, 0x93, 0x8f, 0x37, 0x8f, 0xc9, 0x01, 0x31, 0xb9, 0xe2, 0x22, + 0x1d, 0x6f, 0x1e, 0x93, 0x86, 0xd9, 0x46, 0xb3, 0x90, 0xe9, 0x76, 0x7a, 0x1d, 0x57, 0x68, 0xe5, + 0x8d, 0x80, 0x39, 0x93, 0x21, 0x73, 0x56, 0x01, 0x1c, 0xcb, 0x76, 0x0f, 0x2c, 0xbb, 0x4d, 0xec, + 0x6a, 0x66, 0x41, 0x5b, 0x2c, 0x2f, 0xdf, 0x5b, 0x52, 0x17, 0x62, 0x49, 0x35, 0x68, 0x69, 0xcf, + 0xb2, 0xdd, 0x1d, 0xca, 0xab, 0xe7, 0x1d, 0xf9, 0x89, 0x3e, 0x84, 0x02, 0x13, 0xe2, 0x1a, 0xf6, + 0x31, 0x71, 0xab, 0x59, 0x26, 0xe5, 0xfe, 0x05, 0x52, 0x9a, 0x8c, 0x59, 0x67, 0xea, 0xf9, 0x37, + 0xc2, 0x50, 0x74, 0x88, 0xdd, 0x31, 0xba, 0x9d, 0x37, 0xc6, 0x61, 0x97, 0x54, 0x73, 0x0b, 0xda, + 0xe2, 0x94, 0x1e, 0xa0, 0xd1, 0xf9, 0x9f, 0x92, 0x73, 0xe7, 0xc0, 0x32, 0xbb, 0xe7, 0xd5, 0x29, + 0xc6, 0x30, 0x45, 0x09, 0x3b, 0x66, 0xf7, 0x9c, 0x2d, 0x9a, 0x35, 0x30, 0x5d, 0xde, 0x9b, 0x67, + 0xbd, 0x79, 0x46, 0x61, 0xdd, 0x8b, 0x50, 0xe9, 0x75, 0xcc, 0x83, 0x9e, 0xd5, 0x3e, 0xf0, 0x1c, + 0x02, 0xcc, 0x21, 0xe5, 0x5e, 0xc7, 0x7c, 0x69, 0xb5, 0x75, 0xe9, 0x16, 0xca, 0x69, 0x9c, 0x05, + 0x39, 0x0b, 0x82, 0xd3, 0x38, 0x53, 0x39, 0x97, 0x60, 0x86, 0xca, 0x6c, 0xd9, 0xc4, 0x70, 0x89, + 0xcf, 0x5c, 0x64, 0xcc, 0x57, 0x7a, 0x1d, 0x73, 0x95, 0xf5, 0x04, 0xf8, 0x8d, 0xb3, 0x08, 0x7f, + 0x49, 0xf0, 0x1b, 0x67, 0x41, 0x7e, 0xbc, 0x04, 0x79, 0xcf, 0xe7, 0x68, 0x0a, 0x26, 0xb7, 0x77, + 0xb6, 0x1b, 0x95, 0x09, 0x04, 0x90, 0x5d, 0xd9, 0x5b, 0x6d, 0x6c, 0xaf, 0x55, 0x34, 0x54, 0x80, + 0xdc, 0x5a, 0x83, 0x37, 0x52, 0xf8, 0x39, 0x80, 0xef, 0x5d, 0x94, 0x83, 0xf4, 0x66, 0xe3, 0xcf, + 0x2a, 0x13, 0x94, 0xe7, 0x55, 0x43, 0xdf, 0xdb, 0xd8, 0xd9, 0xae, 0x68, 0x74, 0xf0, 0xaa, 0xde, + 0x58, 0x69, 0x36, 0x2a, 0x29, 0xca, 0xf1, 0x72, 0x67, 0xad, 0x92, 0x46, 0x79, 0xc8, 0xbc, 0x5a, + 0xd9, 0xda, 0x6f, 0x54, 0x26, 0xf1, 0x57, 0x1a, 0x94, 0xc4, 0x7a, 0xf1, 0x98, 0x40, 0xef, 0x41, + 0xf6, 0x84, 0xc5, 0x05, 0xdb, 0x8a, 0x85, 0xe5, 0x9b, 0xa1, 0xc5, 0x0d, 0xc4, 0x8e, 0x2e, 0x78, + 0x11, 0x86, 0xf4, 0xe9, 0xd0, 0xa9, 0xa6, 0x16, 0xd2, 0x8b, 0x85, 0xe5, 0xca, 0x12, 0x0f, 0xd8, + 0xa5, 0x4d, 0x72, 0xfe, 0xca, 0xe8, 0x0e, 0x88, 0x4e, 0x3b, 0x11, 0x82, 0xc9, 0x9e, 0x65, 0x13, + 0xb6, 0x63, 0xa7, 0x74, 0xf6, 0x4d, 0xb7, 0x31, 0x5b, 0x34, 0xb1, 0x5b, 0x79, 0x03, 0x7f, 0xab, + 0x01, 0xec, 0x0e, 0xdc, 0xe4, 0xd0, 0x98, 0x85, 0xcc, 0x90, 0x0a, 0x16, 0x61, 0xc1, 0x1b, 0x2c, + 0x26, 0x88, 0xe1, 0x10, 0x2f, 0x26, 0x68, 0x03, 0x5d, 0x87, 0x5c, 0xdf, 0x26, 0xc3, 0x83, 0xd3, + 0x21, 0x53, 0x32, 0xa5, 0x67, 0x69, 0x73, 0x73, 0x88, 0xee, 0x40, 0xb1, 0x73, 0x6c, 0x5a, 0x36, + 0x39, 0xe0, 0xb2, 0x32, 0xac, 0xb7, 0xc0, 0x69, 0xcc, 0x6e, 0x85, 0x85, 0x0b, 0xce, 0xaa, 0x2c, + 0x5b, 0x94, 0x84, 0x4d, 0x28, 0x30, 0x53, 0xc7, 0x72, 0xdf, 0x23, 0xdf, 0xc6, 0x14, 0x1b, 0x16, + 0x75, 0xa1, 0xb0, 0x1a, 0x7f, 0x06, 0x68, 0x8d, 0x74, 0x89, 0x4b, 0xc6, 0xc9, 0x1e, 0x8a, 0x4f, + 0xd2, 0xaa, 0x4f, 0xf0, 0x3f, 0x6b, 0x30, 0x13, 0x10, 0x3f, 0xd6, 0xb4, 0xaa, 0x90, 0x6b, 0x33, + 0x61, 0xdc, 0x82, 0xb4, 0x2e, 0x9b, 0xe8, 0x09, 0x4c, 0x09, 0x03, 0x9c, 0x6a, 0x3a, 0x61, 0xd3, + 0xe4, 0xb8, 0x4d, 0x0e, 0xfe, 0x36, 0x05, 0x79, 0x31, 0xd1, 0x9d, 0x3e, 0x5a, 0x81, 0x92, 0xcd, + 0x1b, 0x07, 0x6c, 0x3e, 0xc2, 0xa2, 0x5a, 0x72, 0x12, 0x5a, 0x9f, 0xd0, 0x8b, 0x62, 0x08, 0x23, + 0xa3, 0x3f, 0x81, 0x82, 0x14, 0xd1, 0x1f, 0xb8, 0xc2, 0xe5, 0xd5, 0xa0, 0x00, 0x7f, 0xff, 0xad, + 0x4f, 0xe8, 0x20, 0xd8, 0x77, 0x07, 0x2e, 0x6a, 0xc2, 0xac, 0x1c, 0xcc, 0x67, 0x23, 0xcc, 0x48, + 0x33, 0x29, 0x0b, 0x41, 0x29, 0xd1, 0xa5, 0x5a, 0x9f, 0xd0, 0x91, 0x18, 0xaf, 0x74, 0xaa, 0x26, + 0xb9, 0x67, 0x3c, 0x79, 0x47, 0x4c, 0x6a, 0x9e, 0x99, 0x51, 0x93, 0x9a, 0x67, 0xe6, 0xf3, 0x3c, + 0xe4, 0x44, 0x0b, 0xff, 0x57, 0x0a, 0x40, 0xae, 0xc6, 0x4e, 0x1f, 0xad, 0x41, 0xd9, 0x16, 0xad, + 0x80, 0xb7, 0x6e, 0xc4, 0x7a, 0x4b, 0x2c, 0xe2, 0x84, 0x5e, 0x92, 0x83, 0xb8, 0x71, 0xef, 0x43, + 0xd1, 0x93, 0xe2, 0x3b, 0x6c, 0x2e, 0xc6, 0x61, 0x9e, 0x84, 0x82, 0x1c, 0x40, 0x5d, 0xf6, 0x09, + 0x5c, 0xf5, 0xc6, 0xc7, 0xf8, 0xec, 0xce, 0x08, 0x9f, 0x79, 0x02, 0x67, 0xa4, 0x04, 0xd5, 0x6b, + 0xaa, 0x61, 0xbe, 0xdb, 0xe6, 0x62, 0xdc, 0x16, 0x35, 0x8c, 0x3a, 0x0e, 0x68, 0xbd, 0xe4, 0x4d, + 0xfc, 0xeb, 0x34, 0xe4, 0x56, 0xad, 0x5e, 0xdf, 0xb0, 0xe9, 0x6a, 0x64, 0x6d, 0xe2, 0x0c, 0xba, + 0x2e, 0x73, 0x57, 0x79, 0xf9, 0x6e, 0x50, 0xa2, 0x60, 0x93, 0xff, 0xea, 0x8c, 0x55, 0x17, 0x43, + 0xe8, 0x60, 0x51, 0x1e, 0x53, 0x97, 0x18, 0x2c, 0x8a, 0xa3, 0x18, 0x22, 0x03, 0x39, 0xed, 0x07, + 0x72, 0x0d, 0x72, 0x43, 0x62, 0xfb, 0x25, 0x7d, 0x7d, 0x42, 0x97, 0x04, 0xf4, 0x08, 0xa6, 0xc3, + 0xe5, 0x25, 0x23, 0x78, 0xca, 0xad, 0x60, 0x35, 0xba, 0x0b, 0xc5, 0x40, 0x8d, 0xcb, 0x0a, 0xbe, + 0x42, 0x4f, 0x29, 0x71, 0xd7, 0x64, 0x5e, 0xa5, 0xf5, 0xb8, 0xb8, 0x3e, 0x21, 0x33, 0xeb, 0x35, + 0x99, 0x59, 0xa7, 0xc4, 0x28, 0x91, 0x5b, 0x03, 0x49, 0xe6, 0x83, 0x60, 0x92, 0xc1, 0x1f, 0x40, + 0x29, 0xe0, 0x20, 0x5a, 0x77, 0x1a, 0x1f, 0xef, 0xaf, 0x6c, 0xf1, 0x22, 0xf5, 0x82, 0xd5, 0x25, + 0xbd, 0xa2, 0xd1, 0x5a, 0xb7, 0xd5, 0xd8, 0xdb, 0xab, 0xa4, 0x50, 0x09, 0xf2, 0xdb, 0x3b, 0xcd, + 0x03, 0xce, 0x95, 0xc6, 0x2f, 0x3c, 0x09, 0xa2, 0xc8, 0x29, 0xb5, 0x6d, 0x42, 0xa9, 0x6d, 0x9a, + 0xac, 0x6d, 0x29, 0xbf, 0xb6, 0xb1, 0x32, 0xb7, 0xd5, 0x58, 0xd9, 0x6b, 0x54, 0x26, 0x9f, 0x97, + 0xa1, 0xc8, 0xfd, 0x7b, 0x30, 0x30, 0x69, 0xa9, 0xfd, 0x77, 0x0d, 0xc0, 0x8f, 0x26, 0x54, 0x87, + 0x5c, 0x8b, 0xeb, 0xa9, 0x6a, 0x2c, 0x19, 0x5d, 0x8d, 0x5d, 0x32, 0x5d, 0x72, 0xa1, 0x77, 0x20, + 0xe7, 0x0c, 0x5a, 0x2d, 0xe2, 0xc8, 0x92, 0x77, 0x3d, 0x9c, 0x0f, 0x45, 0xb6, 0xd2, 0x25, 0x1f, + 0x1d, 0x72, 0x64, 0x74, 0xba, 0x03, 0x56, 0x00, 0x47, 0x0f, 0x11, 0x7c, 0xf8, 0xdf, 0x34, 0x28, + 0x28, 0x9b, 0xf7, 0x07, 0x26, 0xe1, 0x9b, 0x90, 0x67, 0x36, 0x90, 0xb6, 0x48, 0xc3, 0x53, 0xba, + 0x4f, 0x40, 0x7f, 0x0c, 0x79, 0x19, 0x01, 0x32, 0x13, 0x57, 0xe3, 0xc5, 0xee, 0xf4, 0x75, 0x9f, + 0x15, 0x6f, 0xc2, 0x15, 0xe6, 0x95, 0x16, 0x3d, 0x5c, 0x4b, 0x3f, 0xaa, 0xc7, 0x4f, 0x2d, 0x74, + 0xfc, 0xac, 0xc1, 0x54, 0xff, 0xe4, 0xdc, 0xe9, 0xb4, 0x8c, 0xae, 0xb0, 0xc2, 0x6b, 0xe3, 0x8f, + 0x00, 0xa9, 0xc2, 0xc6, 0x99, 0x2e, 0x2e, 0x41, 0x61, 0xdd, 0x70, 0x4e, 0x84, 0x49, 0xf8, 0x09, + 0x94, 0x68, 0x73, 0xf3, 0xd5, 0x25, 0x6c, 0x64, 0x97, 0x03, 0xc9, 0x3d, 0x96, 0xcf, 0x11, 0x4c, + 0x9e, 0x18, 0xce, 0x09, 0x9b, 0x68, 0x49, 0x67, 0xdf, 0xe8, 0x11, 0x54, 0x5a, 0x7c, 0x92, 0x07, + 0xa1, 0x2b, 0xc3, 0xb4, 0xa0, 0x7b, 0x27, 0xc1, 0x4f, 0xa1, 0xc8, 0xe7, 0xf0, 0x63, 0x1b, 0x81, + 0xaf, 0xc0, 0xf4, 0x9e, 0x69, 0xf4, 0x9d, 0x13, 0x4b, 0x56, 0x37, 0x3a, 0xe9, 0x8a, 0x4f, 0x1b, + 0x4b, 0xe3, 0x43, 0x98, 0xb6, 0x49, 0xcf, 0xe8, 0x98, 0x1d, 0xf3, 0xf8, 0xe0, 0xf0, 0xdc, 0x25, + 0x8e, 0xb8, 0x30, 0x95, 0x3d, 0xf2, 0x73, 0x4a, 0xa5, 0xa6, 0x1d, 0x76, 0xad, 0x43, 0x91, 0xe6, + 0xd8, 0x37, 0xfe, 0x4f, 0x0d, 0x8a, 0x9f, 0x18, 0x6e, 0x4b, 0x2e, 0x1d, 0xda, 0x80, 0xb2, 0x97, + 0xdc, 0x18, 0x45, 0xd8, 0x12, 0x2a, 0xb1, 0x6c, 0x8c, 0x3c, 0x4a, 0xcb, 0xea, 0x58, 0x6a, 0xa9, + 0x04, 0x26, 0xca, 0x30, 0x5b, 0xa4, 0xeb, 0x89, 0x4a, 0x25, 0x8b, 0x62, 0x8c, 0xaa, 0x28, 0x95, + 0xf0, 0x7c, 0xda, 0x3f, 0x7e, 0xf0, 0x5c, 0xf2, 0x75, 0x0a, 0x50, 0xd4, 0x86, 0xef, 0x7b, 0x22, + 0xbb, 0x0f, 0x65, 0xc7, 0x35, 0xec, 0xc8, 0xde, 0x28, 0x31, 0xaa, 0x97, 0xa0, 0x1f, 0xc2, 0x74, + 0xdf, 0xb6, 0x8e, 0x6d, 0xe2, 0x38, 0x07, 0xa6, 0xe5, 0x76, 0x8e, 0xce, 0xc5, 0xa1, 0xb6, 0x2c, + 0xc9, 0xdb, 0x8c, 0x8a, 0x1a, 0x90, 0x3b, 0xea, 0x74, 0x5d, 0x62, 0x3b, 0xd5, 0xcc, 0x42, 0x7a, + 0xb1, 0xbc, 0xfc, 0xe4, 0x22, 0xaf, 0x2d, 0x7d, 0xc8, 0xf8, 0x9b, 0xe7, 0x7d, 0xa2, 0xcb, 0xb1, + 0xea, 0x41, 0x31, 0x1b, 0x38, 0x28, 0xde, 0x07, 0xf0, 0xf9, 0x69, 0xaa, 0xdd, 0xde, 0xd9, 0xdd, + 0x6f, 0x56, 0x26, 0x50, 0x11, 0xa6, 0xb6, 0x77, 0xd6, 0x1a, 0x5b, 0x0d, 0x9a, 0x97, 0x71, 0x5d, + 0xfa, 0x46, 0xf5, 0x21, 0x9a, 0x83, 0xa9, 0xd7, 0x94, 0x2a, 0xef, 0xdb, 0x69, 0x3d, 0xc7, 0xda, + 0x1b, 0x6d, 0xfc, 0x4f, 0x29, 0x28, 0x89, 0x5d, 0x30, 0xd6, 0x56, 0x54, 0x55, 0xa4, 0x02, 0x2a, + 0xe8, 0xa9, 0x94, 0xef, 0x8e, 0xb6, 0x38, 0xfc, 0xca, 0x26, 0xcd, 0x0d, 0x7c, 0xb1, 0x49, 0x5b, + 0xb8, 0xd5, 0x6b, 0xc7, 0x86, 0x6f, 0x26, 0x36, 0x7c, 0xd1, 0x5d, 0x28, 0x79, 0xbb, 0xcd, 0x70, + 0x44, 0xad, 0xcd, 0xeb, 0x45, 0xb9, 0x91, 0x28, 0x0d, 0xdd, 0x87, 0x2c, 0x19, 0x12, 0xd3, 0x75, + 0xaa, 0x05, 0x96, 0x75, 0x4b, 0xf2, 0xfc, 0xdb, 0xa0, 0x54, 0x5d, 0x74, 0xe2, 0x3f, 0x82, 0x2b, + 0xec, 0x9e, 0xf1, 0xc2, 0x36, 0x4c, 0xf5, 0x42, 0xd4, 0x6c, 0x6e, 0x09, 0xd7, 0xd1, 0x4f, 0x54, + 0x86, 0xd4, 0xc6, 0x9a, 0x98, 0x68, 0x6a, 0x63, 0x0d, 0x7f, 0xa1, 0x01, 0x52, 0xc7, 0x8d, 0xe5, + 0xcb, 0x90, 0x70, 0xa9, 0x3e, 0xed, 0xab, 0x9f, 0x85, 0x0c, 0xb1, 0x6d, 0xcb, 0x66, 0x5e, 0xcb, + 0xeb, 0xbc, 0x81, 0xef, 0x09, 0x1b, 0x74, 0x32, 0xb4, 0x4e, 0xbd, 0xc0, 0xe0, 0xd2, 0x34, 0xcf, + 0xd4, 0x4d, 0x98, 0x09, 0x70, 0x8d, 0x95, 0xfd, 0x1f, 0xc2, 0x55, 0x26, 0x6c, 0x93, 0x90, 0xfe, + 0x4a, 0xb7, 0x33, 0x4c, 0xd4, 0xda, 0x87, 0x6b, 0x61, 0xc6, 0x9f, 0xd6, 0x47, 0xf8, 0x4f, 0x85, + 0xc6, 0x66, 0xa7, 0x47, 0x9a, 0xd6, 0x56, 0xb2, 0x6d, 0x34, 0x3b, 0x9e, 0x92, 0x73, 0x47, 0x94, + 0x49, 0xf6, 0x8d, 0xff, 0x43, 0x83, 0xeb, 0x91, 0xe1, 0x3f, 0xf1, 0xaa, 0xce, 0x03, 0x1c, 0xd3, + 0xed, 0x43, 0xda, 0xb4, 0x83, 0xdf, 0xd0, 0x15, 0x8a, 0x67, 0x27, 0x4d, 0x30, 0x45, 0x61, 0xe7, + 0xac, 0x58, 0x73, 0xf6, 0xc7, 0x91, 0x35, 0xe6, 0x16, 0x14, 0x18, 0x61, 0xcf, 0x35, 0xdc, 0x81, + 0x13, 0x59, 0x8c, 0xbf, 0x11, 0x5b, 0x40, 0x0e, 0x1a, 0x6b, 0x5e, 0xef, 0x40, 0x96, 0x1d, 0x4e, + 0xe5, 0xd1, 0x2c, 0x74, 0x1b, 0x50, 0xec, 0xd0, 0x05, 0x23, 0x3e, 0x81, 0xec, 0x4b, 0x86, 0xe8, + 0x29, 0x96, 0x4d, 0xca, 0xa5, 0x30, 0x8d, 0x1e, 0xc7, 0x19, 0xf2, 0x3a, 0xfb, 0x66, 0x27, 0x19, + 0x42, 0xec, 0x7d, 0x7d, 0x8b, 0x9f, 0x98, 0xf2, 0xba, 0xd7, 0xa6, 0x2e, 0x6b, 0x75, 0x3b, 0xc4, + 0x74, 0x59, 0xef, 0x24, 0xeb, 0x55, 0x28, 0x78, 0x09, 0x2a, 0x5c, 0xd3, 0x4a, 0xbb, 0xad, 0x9c, + 0x48, 0x3c, 0x79, 0x5a, 0x50, 0x1e, 0xfe, 0x46, 0x83, 0x2b, 0xca, 0x80, 0xb1, 0x1c, 0xf3, 0x14, + 0xb2, 0x1c, 0xb7, 0x14, 0xc5, 0x6f, 0x36, 0x38, 0x8a, 0xab, 0xd1, 0x05, 0x0f, 0x5a, 0x82, 0x1c, + 0xff, 0x92, 0xc7, 0xc2, 0x78, 0x76, 0xc9, 0x84, 0xef, 0xc3, 0x8c, 0x20, 0x91, 0x9e, 0x15, 0xb7, + 0xb7, 0x99, 0x43, 0xf1, 0xe7, 0x30, 0x1b, 0x64, 0x1b, 0x6b, 0x4a, 0x8a, 0x91, 0xa9, 0xcb, 0x18, + 0xb9, 0x22, 0x8d, 0xdc, 0xef, 0xb7, 0x95, 0x5a, 0x1d, 0x5e, 0x75, 0x75, 0x45, 0x52, 0xa1, 0x15, + 0xf1, 0x26, 0x20, 0x45, 0xfc, 0xac, 0x13, 0x98, 0x91, 0xdb, 0x61, 0xab, 0xe3, 0x78, 0x27, 0xb8, + 0x37, 0x80, 0x54, 0xe2, 0xcf, 0x6d, 0xd0, 0x1a, 0x39, 0xb2, 0x8d, 0xe3, 0x1e, 0xf1, 0xea, 0x13, + 0x3d, 0xcf, 0xab, 0xc4, 0xb1, 0x32, 0x7a, 0x1d, 0xae, 0xbc, 0xb4, 0x86, 0x34, 0x35, 0x50, 0xaa, + 0x1f, 0x32, 0xfc, 0x3e, 0xe7, 0x2d, 0x9b, 0xd7, 0xa6, 0xca, 0xd5, 0x01, 0x63, 0x29, 0xff, 0x5f, + 0x0d, 0x8a, 0x2b, 0x5d, 0xc3, 0xee, 0x49, 0xc5, 0xef, 0x43, 0x96, 0xdf, 0x52, 0x04, 0x30, 0xf0, + 0x20, 0x28, 0x46, 0xe5, 0xe5, 0x8d, 0x15, 0x7e, 0xa7, 0x11, 0xa3, 0xa8, 0xe1, 0xe2, 0xed, 0x60, + 0x2d, 0xf4, 0x96, 0xb0, 0x86, 0xde, 0x82, 0x8c, 0x41, 0x87, 0xb0, 0x14, 0x5c, 0x0e, 0xdf, 0x0f, + 0x99, 0x34, 0x76, 0x38, 0xe3, 0x5c, 0xf8, 0x3d, 0x28, 0x28, 0x1a, 0xe8, 0x0d, 0xf8, 0x45, 0x43, + 0x1c, 0xc0, 0x56, 0x56, 0x9b, 0x1b, 0xaf, 0xf8, 0xc5, 0xb8, 0x0c, 0xb0, 0xd6, 0xf0, 0xda, 0x29, + 0xfc, 0xa9, 0x18, 0x25, 0xf2, 0x9d, 0x6a, 0x8f, 0x96, 0x64, 0x4f, 0xea, 0x52, 0xf6, 0x9c, 0x41, + 0x49, 0x4c, 0x7f, 0xdc, 0xf4, 0xcd, 0xe4, 0x25, 0xa4, 0x6f, 0xc5, 0x78, 0x5d, 0x30, 0xe2, 0x69, + 0x28, 0x89, 0x84, 0x2e, 0xf6, 0xdf, 0xff, 0x68, 0x50, 0x96, 0x94, 0x71, 0x01, 0x4c, 0x89, 0xbd, + 0xf0, 0x0a, 0xe0, 0x21, 0x2f, 0xd7, 0x20, 0xdb, 0x3e, 0xdc, 0xeb, 0xbc, 0x91, 0x60, 0xb3, 0x68, + 0x51, 0x7a, 0x97, 0xeb, 0xe1, 0x2f, 0x3e, 0xa2, 0x45, 0x6f, 0xe1, 0xb6, 0x71, 0xe4, 0x6e, 0x98, + 0x6d, 0x72, 0xc6, 0xce, 0x8d, 0x93, 0xba, 0x4f, 0x60, 0x97, 0x52, 0xf1, 0x32, 0xc4, 0x0e, 0x8b, + 0xea, 0x4b, 0xd1, 0x0c, 0x5c, 0x59, 0x19, 0xb8, 0x27, 0x0d, 0xd3, 0x38, 0xec, 0xca, 0x8c, 0x45, + 0xcb, 0x2c, 0x25, 0xae, 0x75, 0x1c, 0x95, 0xda, 0x80, 0x19, 0x4a, 0x25, 0xa6, 0xdb, 0x69, 0x29, + 0xe9, 0x4d, 0x16, 0x31, 0x2d, 0x54, 0xc4, 0x0c, 0xc7, 0x79, 0x6d, 0xd9, 0x6d, 0x31, 0x35, 0xaf, + 0x8d, 0xd7, 0xb8, 0xf0, 0x7d, 0x27, 0x50, 0xa6, 0xbe, 0xaf, 0x94, 0x45, 0x5f, 0xca, 0x0b, 0xe2, + 0x8e, 0x90, 0x82, 0x9f, 0xc0, 0x55, 0xc9, 0x29, 0xc0, 0xbd, 0x11, 0xcc, 0x3b, 0x70, 0x4b, 0x32, + 0xaf, 0x9e, 0xd0, 0xdb, 0xd3, 0xae, 0x50, 0xf8, 0x43, 0xed, 0x7c, 0x0e, 0x55, 0xcf, 0x4e, 0x76, + 0x58, 0xb6, 0xba, 0xaa, 0x01, 0x03, 0x47, 0xec, 0x99, 0xbc, 0xce, 0xbe, 0x29, 0xcd, 0xb6, 0xba, + 0xde, 0x91, 0x80, 0x7e, 0xe3, 0x55, 0x98, 0x93, 0x32, 0xc4, 0x31, 0x36, 0x28, 0x24, 0x62, 0x50, + 0x9c, 0x10, 0xe1, 0x30, 0x3a, 0x74, 0xb4, 0xdb, 0x55, 0xce, 0xa0, 0x6b, 0x99, 0x4c, 0x4d, 0x91, + 0x79, 0x95, 0xef, 0x08, 0x6a, 0x98, 0x5a, 0x31, 0x04, 0x99, 0x0a, 0x50, 0xc9, 0x62, 0x21, 0x28, + 0x39, 0xb2, 0x10, 0x11, 0xd1, 0x9f, 0xc1, 0xbc, 0x67, 0x04, 0xf5, 0xdb, 0x2e, 0xb1, 0x7b, 0x1d, + 0xc7, 0x51, 0xe0, 0xa0, 0xb8, 0x89, 0x3f, 0x80, 0xc9, 0x3e, 0x11, 0x39, 0xa5, 0xb0, 0x8c, 0x96, + 0xf8, 0xfb, 0xed, 0x92, 0x32, 0x98, 0xf5, 0xe3, 0x36, 0xdc, 0x96, 0xd2, 0xb9, 0x47, 0x63, 0xc5, + 0x87, 0x8d, 0x92, 0xb7, 0x6e, 0xee, 0xd6, 0xe8, 0xad, 0x3b, 0xcd, 0xd7, 0xde, 0x83, 0x28, 0x3f, + 0xe2, 0x8e, 0x94, 0xb1, 0x35, 0x56, 0xad, 0xd8, 0xe4, 0x3e, 0xf5, 0x42, 0x72, 0x2c, 0x61, 0x87, + 0x30, 0x1b, 0x8c, 0xe4, 0xb1, 0xd2, 0xd8, 0x2c, 0x64, 0x5c, 0xeb, 0x94, 0xc8, 0x24, 0xc6, 0x1b, + 0xd2, 0x60, 0x2f, 0xcc, 0xc7, 0x32, 0xd8, 0xf0, 0x85, 0xb1, 0x2d, 0x39, 0xae, 0xbd, 0x74, 0x35, + 0xe5, 0xe1, 0x8b, 0x37, 0xf0, 0x36, 0x5c, 0x0b, 0xa7, 0x89, 0xb1, 0x4c, 0x7e, 0xc5, 0x37, 0x70, + 0x5c, 0x26, 0x19, 0x4b, 0xee, 0xc7, 0x7e, 0x32, 0x50, 0x12, 0xca, 0x58, 0x22, 0x75, 0xa8, 0xc5, + 0xe5, 0x97, 0x1f, 0x63, 0xbf, 0x7a, 0xe9, 0x66, 0x2c, 0x61, 0x8e, 0x2f, 0x6c, 0xfc, 0xe5, 0xf7, + 0x73, 0x44, 0x7a, 0x64, 0x8e, 0x10, 0x41, 0xe2, 0x67, 0xb1, 0x9f, 0x60, 0xd3, 0x09, 0x1d, 0x7e, + 0x02, 0x1d, 0x57, 0x07, 0xad, 0x21, 0x9e, 0x0e, 0xd6, 0x90, 0x1b, 0x5b, 0x4d, 0xbb, 0x63, 0x2d, + 0xc6, 0x27, 0x7e, 0xee, 0x8c, 0x64, 0xe6, 0xb1, 0x04, 0x7f, 0x0a, 0x0b, 0xc9, 0x49, 0x79, 0x1c, + 0xc9, 0x8f, 0xeb, 0x90, 0xf7, 0x0e, 0x94, 0xca, 0x6f, 0x1f, 0x0a, 0x90, 0xdb, 0xde, 0xd9, 0xdb, + 0x5d, 0x59, 0x6d, 0xf0, 0x1f, 0x3f, 0xac, 0xee, 0xe8, 0xfa, 0xfe, 0x6e, 0xb3, 0x92, 0x5a, 0xfe, + 0x6d, 0x1a, 0x52, 0x9b, 0xaf, 0xd0, 0x9f, 0x43, 0x86, 0xbf, 0x04, 0x8e, 0x78, 0xfe, 0xad, 0x8d, + 0x7a, 0xec, 0xc4, 0x37, 0xbe, 0xf8, 0xff, 0x5f, 0x7d, 0x95, 0xba, 0x8a, 0x2b, 0xf5, 0xe1, 0xbb, + 0x87, 0xc4, 0x35, 0xea, 0xa7, 0xc3, 0x3a, 0xab, 0x0f, 0xcf, 0xb4, 0xc7, 0x68, 0x1f, 0xd2, 0xbb, + 0x03, 0x17, 0x25, 0x3e, 0x0d, 0xd7, 0x92, 0xdf, 0x40, 0xf1, 0x1c, 0x13, 0x3c, 0x83, 0xcb, 0x8a, + 0xe0, 0xfe, 0xc0, 0xa5, 0x62, 0x07, 0x50, 0x50, 0x5f, 0x31, 0x2f, 0x7c, 0x33, 0xae, 0x5d, 0xfc, + 0x42, 0x8a, 0xef, 0x30, 0x75, 0x37, 0xf0, 0x35, 0x45, 0x1d, 0x7f, 0x6b, 0x55, 0x67, 0xd3, 0x3c, + 0x33, 0x51, 0xe2, 0xab, 0x72, 0x2d, 0xf9, 0xe1, 0x34, 0x76, 0x36, 0xee, 0x99, 0x49, 0xc5, 0x9a, + 0xe2, 0xdd, 0xb4, 0xe5, 0xa2, 0xdb, 0x31, 0xef, 0x66, 0xea, 0x0b, 0x51, 0x6d, 0x21, 0x99, 0x41, + 0x28, 0x5a, 0x60, 0x8a, 0x6a, 0xf8, 0xaa, 0xa2, 0xa8, 0xe5, 0xb1, 0x3d, 0xd3, 0x1e, 0x2f, 0x1f, + 0x43, 0x86, 0x21, 0xc4, 0xe8, 0x2f, 0xe4, 0x47, 0x2d, 0x06, 0xdb, 0x4e, 0x58, 0xfc, 0x00, 0xb6, + 0x8c, 0xab, 0x4c, 0x19, 0xc2, 0x25, 0xa9, 0x8c, 0x61, 0xc4, 0xcf, 0xb4, 0xc7, 0x8b, 0xda, 0xdb, + 0xda, 0xf2, 0x6f, 0x26, 0x21, 0xc3, 0xe0, 0x22, 0x64, 0x01, 0xf8, 0x68, 0x6a, 0x78, 0x96, 0x11, + 0x7c, 0x36, 0x3c, 0xcb, 0x28, 0x10, 0x8b, 0xe7, 0x99, 0xe2, 0x2a, 0x9e, 0x91, 0x8a, 0x19, 0x12, + 0x55, 0x67, 0xe0, 0x1a, 0xf5, 0xe9, 0x50, 0x00, 0x66, 0x3c, 0xcc, 0x50, 0x9c, 0xc0, 0x00, 0xaa, + 0x1a, 0xde, 0x21, 0x31, 0x88, 0x2a, 0xc6, 0x4c, 0xe7, 0x4d, 0x7c, 0x5d, 0xf1, 0x2c, 0x57, 0x6b, + 0x33, 0x46, 0xaa, 0xf7, 0xef, 0x34, 0x28, 0x07, 0x71, 0x51, 0x74, 0x37, 0x46, 0x72, 0x18, 0x5e, + 0xad, 0xdd, 0x1b, 0xcd, 0x94, 0x64, 0x01, 0x57, 0x7f, 0x4a, 0x48, 0xdf, 0xa0, 0x8c, 0xc2, 0xf1, + 0xe8, 0x1f, 0x34, 0x98, 0x0e, 0x81, 0x9d, 0x28, 0x4e, 0x43, 0x04, 0x4a, 0xad, 0xdd, 0xbf, 0x80, + 0x4b, 0x18, 0xf2, 0x80, 0x19, 0xb2, 0x80, 0x6f, 0x44, 0x5c, 0xe1, 0x76, 0x7a, 0xc4, 0xb5, 0x84, + 0x31, 0xde, 0x32, 0x70, 0x60, 0x32, 0x76, 0x19, 0x02, 0x40, 0x67, 0xec, 0x32, 0x04, 0x51, 0xcd, + 0x11, 0xcb, 0xc0, 0xd1, 0x48, 0xba, 0xc5, 0x7f, 0x97, 0x86, 0xdc, 0x2a, 0xff, 0x05, 0x22, 0x72, + 0x20, 0xef, 0x21, 0x80, 0x68, 0x3e, 0x0e, 0x8d, 0xf1, 0x6f, 0x0b, 0xb5, 0xdb, 0x89, 0xfd, 0x42, + 0xfb, 0x7d, 0xa6, 0xfd, 0x36, 0xae, 0x49, 0xed, 0xe2, 0x87, 0x8e, 0x75, 0x7e, 0xed, 0xaf, 0x1b, + 0xed, 0x36, 0x9d, 0xf8, 0xdf, 0x42, 0x51, 0x85, 0xe9, 0xd0, 0x9d, 0x58, 0x14, 0x48, 0x45, 0xfa, + 0x6a, 0x78, 0x14, 0x8b, 0xd0, 0xbe, 0xc8, 0xb4, 0x63, 0x7c, 0x2b, 0x41, 0xbb, 0xcd, 0xd8, 0x03, + 0x06, 0x70, 0x98, 0x2d, 0xde, 0x80, 0x00, 0x8a, 0x17, 0x6f, 0x40, 0x10, 0xa5, 0xbb, 0xd0, 0x80, + 0x01, 0x63, 0xa7, 0x06, 0xbc, 0x06, 0xf0, 0x41, 0x35, 0x14, 0xeb, 0x57, 0xe5, 0xea, 0x14, 0x0e, + 0xf9, 0x28, 0x1e, 0x17, 0xdd, 0x73, 0x21, 0xd5, 0xdd, 0x8e, 0x43, 0x43, 0x7f, 0xf9, 0x9b, 0x2c, + 0x14, 0x5e, 0x1a, 0x1d, 0xd3, 0x25, 0xa6, 0x61, 0xb6, 0x08, 0x3a, 0x82, 0x0c, 0x2b, 0x8d, 0xe1, + 0x2c, 0xa7, 0x62, 0x4d, 0xe1, 0x2c, 0x17, 0x00, 0x62, 0xf0, 0x3d, 0xa6, 0x79, 0x1e, 0xcf, 0x49, + 0xcd, 0x3d, 0x5f, 0x7c, 0x9d, 0x61, 0x28, 0x74, 0xc2, 0x7f, 0x09, 0x59, 0x01, 0xcf, 0x87, 0x84, + 0x05, 0xb0, 0x95, 0xda, 0xcd, 0xf8, 0xce, 0xa4, 0xed, 0xa5, 0xaa, 0x72, 0x18, 0x2f, 0xd5, 0xf5, + 0x06, 0xc0, 0x07, 0x08, 0xc3, 0xce, 0x8d, 0xe0, 0x89, 0xb5, 0x85, 0x64, 0x06, 0xa1, 0xf7, 0x11, + 0xd3, 0x7b, 0x17, 0xcf, 0xc7, 0xe9, 0x6d, 0x7b, 0xfc, 0x54, 0xf7, 0x21, 0x4c, 0xae, 0x1b, 0xce, + 0x09, 0x0a, 0x15, 0x3b, 0xe5, 0x47, 0x03, 0xb5, 0x5a, 0x5c, 0x97, 0xd0, 0x74, 0x97, 0x69, 0xba, + 0x85, 0xab, 0x71, 0x9a, 0x4e, 0x0c, 0x87, 0x56, 0x0f, 0x74, 0x02, 0x59, 0xfe, 0x3b, 0x82, 0xb0, + 0x2f, 0x03, 0xbf, 0x45, 0x08, 0xfb, 0x32, 0xf8, 0xd3, 0x83, 0xcb, 0x69, 0x72, 0x61, 0x4a, 0x3e, + 0xde, 0xa3, 0x5b, 0xa1, 0xa5, 0x09, 0x3e, 0xf4, 0xd7, 0xe6, 0x93, 0xba, 0x85, 0xbe, 0x87, 0x4c, + 0xdf, 0x1d, 0x7c, 0x33, 0x76, 0xed, 0x04, 0xf7, 0x33, 0xed, 0xf1, 0xdb, 0x1a, 0x2d, 0x13, 0xe0, + 0x83, 0xac, 0x91, 0xe8, 0x08, 0xe3, 0xb5, 0x91, 0xe8, 0x88, 0xe0, 0xb3, 0x78, 0x99, 0x29, 0x7f, + 0x8a, 0x1f, 0xc6, 0x29, 0x77, 0x6d, 0xc3, 0x74, 0x8e, 0x88, 0xfd, 0x16, 0x07, 0xd3, 0x9c, 0x93, + 0x4e, 0x9f, 0x46, 0xca, 0xef, 0xa7, 0x61, 0x92, 0x9e, 0x47, 0x69, 0x79, 0xf6, 0xaf, 0xf1, 0x61, + 0x6b, 0x22, 0xe0, 0x59, 0xd8, 0x9a, 0x28, 0x02, 0x10, 0x2d, 0xcf, 0xec, 0xb7, 0xe6, 0x84, 0x31, + 0x51, 0xaf, 0x3b, 0x50, 0x50, 0xee, 0xfa, 0x28, 0x46, 0x60, 0x10, 0x99, 0x0b, 0xd7, 0x85, 0x18, + 0xa0, 0x00, 0xdf, 0x66, 0x3a, 0xe7, 0xf0, 0x6c, 0x40, 0x67, 0x9b, 0x73, 0x51, 0xa5, 0x7f, 0x0d, + 0x45, 0x15, 0x13, 0x40, 0x31, 0x32, 0x43, 0xc8, 0x5f, 0x38, 0x25, 0xc6, 0x41, 0x0a, 0xd1, 0xec, + 0xe0, 0xfd, 0xae, 0x5e, 0xb2, 0x52, 0xe5, 0x7d, 0xc8, 0x09, 0xa0, 0x20, 0x6e, 0xb6, 0x41, 0xa8, + 0x30, 0x6e, 0xb6, 0x21, 0x94, 0x21, 0x7a, 0xcc, 0x63, 0x5a, 0xe9, 0x7d, 0x48, 0x96, 0x20, 0xa1, + 0xf1, 0x05, 0x71, 0x93, 0x34, 0xfa, 0xd8, 0x57, 0x92, 0x46, 0xe5, 0x2e, 0x3a, 0x4a, 0xe3, 0x31, + 0x71, 0x45, 0x2c, 0xc9, 0x7b, 0x1e, 0x4a, 0x10, 0xa8, 0xa6, 0x7c, 0x3c, 0x8a, 0x25, 0xe9, 0x54, + 0xee, 0x2b, 0x15, 0xf9, 0x1e, 0x7d, 0x0e, 0xe0, 0x43, 0x1a, 0xe1, 0xd3, 0x56, 0x2c, 0x2e, 0x1a, + 0x3e, 0x6d, 0xc5, 0xa3, 0x22, 0xd1, 0xfc, 0xe1, 0xeb, 0xe6, 0x17, 0x03, 0xaa, 0xfd, 0x5f, 0x34, + 0x40, 0x51, 0x04, 0x04, 0x3d, 0x89, 0xd7, 0x10, 0x8b, 0xb8, 0xd6, 0x9e, 0x5e, 0x8e, 0x39, 0xa9, + 0x44, 0xf8, 0x66, 0xb5, 0xd8, 0x88, 0xfe, 0x6b, 0x6a, 0xd8, 0x97, 0x1a, 0x94, 0x02, 0x10, 0x0a, + 0x7a, 0x90, 0xb0, 0xc6, 0x21, 0xd0, 0xb6, 0xf6, 0xf0, 0x42, 0xbe, 0xa4, 0x93, 0x98, 0xb2, 0x23, + 0xe4, 0x41, 0xfc, 0x1f, 0x35, 0x28, 0x07, 0x61, 0x17, 0x94, 0x20, 0x3f, 0x02, 0xfc, 0xd6, 0x16, + 0x2f, 0x66, 0xbc, 0x78, 0xa9, 0xfc, 0xb3, 0x79, 0x1f, 0x72, 0x02, 0xac, 0x89, 0x0b, 0x88, 0x20, + 0x6c, 0x1c, 0x17, 0x10, 0x21, 0xa4, 0x27, 0x21, 0x20, 0x6c, 0xab, 0x4b, 0x94, 0x10, 0x14, 0x88, + 0x4e, 0x92, 0xc6, 0xd1, 0x21, 0x18, 0x82, 0x83, 0x46, 0x69, 0xf4, 0x43, 0x50, 0xc2, 0x39, 0x28, + 0x41, 0xe0, 0x05, 0x21, 0x18, 0x46, 0x83, 0x12, 0x42, 0x90, 0x29, 0x55, 0x42, 0xd0, 0x07, 0x5f, + 0xe2, 0x42, 0x30, 0x82, 0x88, 0xc7, 0x85, 0x60, 0x14, 0xbf, 0x49, 0x58, 0x57, 0xa6, 0x3b, 0x10, + 0x82, 0x33, 0x31, 0x58, 0x0d, 0x7a, 0x9a, 0xe0, 0xd0, 0x58, 0xb0, 0xbd, 0xf6, 0xd6, 0x25, 0xb9, + 0x47, 0xee, 0x7d, 0xbe, 0x14, 0x72, 0xef, 0x7f, 0xad, 0xc1, 0x6c, 0x1c, 0xd6, 0x83, 0x12, 0x74, + 0x25, 0x00, 0xf5, 0xb5, 0xa5, 0xcb, 0xb2, 0x5f, 0xec, 0x35, 0x2f, 0x1a, 0x9e, 0x57, 0xfe, 0xfb, + 0xbb, 0x79, 0xed, 0xff, 0xbe, 0x9b, 0xd7, 0x7e, 0xf1, 0xdd, 0xbc, 0xf6, 0xaf, 0xbf, 0x9c, 0x9f, + 0x38, 0xcc, 0xb2, 0xff, 0xe1, 0xf5, 0xee, 0x1f, 0x02, 0x00, 0x00, 0xff, 0xff, 0x74, 0x55, 0x61, + 0xe6, 0x68, 0x36, 0x00, 0x00, } diff --git a/vendor/github.com/coreos/etcd/etcdserver/etcdserverpb/rpc.proto b/vendor/github.com/coreos/etcd/etcdserver/etcdserverpb/rpc.proto index a6cd00ab7..e80e6e7d0 100644 --- a/vendor/github.com/coreos/etcd/etcdserver/etcdserverpb/rpc.proto +++ b/vendor/github.com/coreos/etcd/etcdserver/etcdserverpb/rpc.proto @@ -15,7 +15,7 @@ service KV { // Range gets the keys in the range from the key-value store. rpc Range(RangeRequest) returns (RangeResponse) { option (google.api.http) = { - post: "/v3alpha/kv/range" + post: "/v3beta/kv/range" body: "*" }; } @@ -25,7 +25,7 @@ service KV { // and generates one event in the event history. rpc Put(PutRequest) returns (PutResponse) { option (google.api.http) = { - post: "/v3alpha/kv/put" + post: "/v3beta/kv/put" body: "*" }; } @@ -35,7 +35,7 @@ service KV { // and generates a delete event in the event history for every deleted key. rpc DeleteRange(DeleteRangeRequest) returns (DeleteRangeResponse) { option (google.api.http) = { - post: "/v3alpha/kv/deleterange" + post: "/v3beta/kv/deleterange" body: "*" }; } @@ -46,7 +46,7 @@ service KV { // It is not allowed to modify the same key several times within one txn. rpc Txn(TxnRequest) returns (TxnResponse) { option (google.api.http) = { - post: "/v3alpha/kv/txn" + post: "/v3beta/kv/txn" body: "*" }; } @@ -56,7 +56,7 @@ service KV { // indefinitely. rpc Compact(CompactionRequest) returns (CompactionResponse) { option (google.api.http) = { - post: "/v3alpha/kv/compaction" + post: "/v3beta/kv/compaction" body: "*" }; } @@ -70,7 +70,7 @@ service Watch { // last compaction revision. rpc Watch(stream WatchRequest) returns (stream WatchResponse) { option (google.api.http) = { - post: "/v3alpha/watch" + post: "/v3beta/watch" body: "*" }; } @@ -82,7 +82,7 @@ service Lease { // deleted if the lease expires. Each expired key generates a delete event in the event history. rpc LeaseGrant(LeaseGrantRequest) returns (LeaseGrantResponse) { option (google.api.http) = { - post: "/v3alpha/lease/grant" + post: "/v3beta/lease/grant" body: "*" }; } @@ -90,7 +90,7 @@ service Lease { // LeaseRevoke revokes a lease. All keys attached to the lease will expire and be deleted. rpc LeaseRevoke(LeaseRevokeRequest) returns (LeaseRevokeResponse) { option (google.api.http) = { - post: "/v3alpha/kv/lease/revoke" + post: "/v3beta/kv/lease/revoke" body: "*" }; } @@ -99,7 +99,7 @@ service Lease { // to the server and streaming keep alive responses from the server to the client. rpc LeaseKeepAlive(stream LeaseKeepAliveRequest) returns (stream LeaseKeepAliveResponse) { option (google.api.http) = { - post: "/v3alpha/lease/keepalive" + post: "/v3beta/lease/keepalive" body: "*" }; } @@ -107,19 +107,25 @@ service Lease { // LeaseTimeToLive retrieves lease information. rpc LeaseTimeToLive(LeaseTimeToLiveRequest) returns (LeaseTimeToLiveResponse) { option (google.api.http) = { - post: "/v3alpha/kv/lease/timetolive" + post: "/v3beta/kv/lease/timetolive" body: "*" }; } - // TODO(xiangli) List all existing Leases? + // LeaseLeases lists all existing leases. + rpc LeaseLeases(LeaseLeasesRequest) returns (LeaseLeasesResponse) { + option (google.api.http) = { + post: "/v3beta/kv/lease/leases" + body: "*" + }; + } } service Cluster { // MemberAdd adds a member into the cluster. rpc MemberAdd(MemberAddRequest) returns (MemberAddResponse) { option (google.api.http) = { - post: "/v3alpha/cluster/member/add" + post: "/v3beta/cluster/member/add" body: "*" }; } @@ -127,7 +133,7 @@ service Cluster { // MemberRemove removes an existing member from the cluster. rpc MemberRemove(MemberRemoveRequest) returns (MemberRemoveResponse) { option (google.api.http) = { - post: "/v3alpha/cluster/member/remove" + post: "/v3beta/cluster/member/remove" body: "*" }; } @@ -135,7 +141,7 @@ service Cluster { // MemberUpdate updates the member configuration. rpc MemberUpdate(MemberUpdateRequest) returns (MemberUpdateResponse) { option (google.api.http) = { - post: "/v3alpha/cluster/member/update" + post: "/v3beta/cluster/member/update" body: "*" }; } @@ -143,7 +149,7 @@ service Cluster { // MemberList lists all the members in the cluster. rpc MemberList(MemberListRequest) returns (MemberListResponse) { option (google.api.http) = { - post: "/v3alpha/cluster/member/list" + post: "/v3beta/cluster/member/list" body: "*" }; } @@ -153,7 +159,7 @@ service Maintenance { // Alarm activates, deactivates, and queries alarms regarding cluster health. rpc Alarm(AlarmRequest) returns (AlarmResponse) { option (google.api.http) = { - post: "/v3alpha/maintenance/alarm" + post: "/v3beta/maintenance/alarm" body: "*" }; } @@ -161,7 +167,7 @@ service Maintenance { // Status gets the status of the member. rpc Status(StatusRequest) returns (StatusResponse) { option (google.api.http) = { - post: "/v3alpha/maintenance/status" + post: "/v3beta/maintenance/status" body: "*" }; } @@ -169,17 +175,25 @@ service Maintenance { // Defragment defragments a member's backend database to recover storage space. rpc Defragment(DefragmentRequest) returns (DefragmentResponse) { option (google.api.http) = { - post: "/v3alpha/maintenance/defragment" + post: "/v3beta/maintenance/defragment" body: "*" }; } - // Hash returns the hash of the local KV state for consistency checking purpose. + // Hash computes the hash of the KV's backend. // This is designed for testing; do not use this in production when there // are ongoing transactions. rpc Hash(HashRequest) returns (HashResponse) { option (google.api.http) = { - post: "/v3alpha/maintenance/hash" + post: "/v3beta/maintenance/hash" + body: "*" + }; + } + + // HashKV computes the hash of all MVCC keys up to a given revision. + rpc HashKV(HashKVRequest) returns (HashKVResponse) { + option (google.api.http) = { + post: "/v3beta/maintenance/hash" body: "*" }; } @@ -187,7 +201,15 @@ service Maintenance { // Snapshot sends a snapshot of the entire backend from a member over a stream to a client. rpc Snapshot(SnapshotRequest) returns (stream SnapshotResponse) { option (google.api.http) = { - post: "/v3alpha/maintenance/snapshot" + post: "/v3beta/maintenance/snapshot" + body: "*" + }; + } + + // MoveLeader requests current leader node to transfer its leadership to transferee. + rpc MoveLeader(MoveLeaderRequest) returns (MoveLeaderResponse) { + option (google.api.http) = { + post: "/v3beta/maintenance/transfer-leadership" body: "*" }; } @@ -197,7 +219,7 @@ service Auth { // AuthEnable enables authentication. rpc AuthEnable(AuthEnableRequest) returns (AuthEnableResponse) { option (google.api.http) = { - post: "/v3alpha/auth/enable" + post: "/v3beta/auth/enable" body: "*" }; } @@ -205,7 +227,7 @@ service Auth { // AuthDisable disables authentication. rpc AuthDisable(AuthDisableRequest) returns (AuthDisableResponse) { option (google.api.http) = { - post: "/v3alpha/auth/disable" + post: "/v3beta/auth/disable" body: "*" }; } @@ -213,7 +235,7 @@ service Auth { // Authenticate processes an authenticate request. rpc Authenticate(AuthenticateRequest) returns (AuthenticateResponse) { option (google.api.http) = { - post: "/v3alpha/auth/authenticate" + post: "/v3beta/auth/authenticate" body: "*" }; } @@ -221,7 +243,7 @@ service Auth { // UserAdd adds a new user. rpc UserAdd(AuthUserAddRequest) returns (AuthUserAddResponse) { option (google.api.http) = { - post: "/v3alpha/auth/user/add" + post: "/v3beta/auth/user/add" body: "*" }; } @@ -229,7 +251,7 @@ service Auth { // UserGet gets detailed user information. rpc UserGet(AuthUserGetRequest) returns (AuthUserGetResponse) { option (google.api.http) = { - post: "/v3alpha/auth/user/get" + post: "/v3beta/auth/user/get" body: "*" }; } @@ -237,7 +259,7 @@ service Auth { // UserList gets a list of all users. rpc UserList(AuthUserListRequest) returns (AuthUserListResponse) { option (google.api.http) = { - post: "/v3alpha/auth/user/list" + post: "/v3beta/auth/user/list" body: "*" }; } @@ -245,7 +267,7 @@ service Auth { // UserDelete deletes a specified user. rpc UserDelete(AuthUserDeleteRequest) returns (AuthUserDeleteResponse) { option (google.api.http) = { - post: "/v3alpha/auth/user/delete" + post: "/v3beta/auth/user/delete" body: "*" }; } @@ -253,7 +275,7 @@ service Auth { // UserChangePassword changes the password of a specified user. rpc UserChangePassword(AuthUserChangePasswordRequest) returns (AuthUserChangePasswordResponse) { option (google.api.http) = { - post: "/v3alpha/auth/user/changepw" + post: "/v3beta/auth/user/changepw" body: "*" }; } @@ -261,7 +283,7 @@ service Auth { // UserGrant grants a role to a specified user. rpc UserGrantRole(AuthUserGrantRoleRequest) returns (AuthUserGrantRoleResponse) { option (google.api.http) = { - post: "/v3alpha/auth/user/grant" + post: "/v3beta/auth/user/grant" body: "*" }; } @@ -269,7 +291,7 @@ service Auth { // UserRevokeRole revokes a role of specified user. rpc UserRevokeRole(AuthUserRevokeRoleRequest) returns (AuthUserRevokeRoleResponse) { option (google.api.http) = { - post: "/v3alpha/auth/user/revoke" + post: "/v3beta/auth/user/revoke" body: "*" }; } @@ -277,7 +299,7 @@ service Auth { // RoleAdd adds a new role. rpc RoleAdd(AuthRoleAddRequest) returns (AuthRoleAddResponse) { option (google.api.http) = { - post: "/v3alpha/auth/role/add" + post: "/v3beta/auth/role/add" body: "*" }; } @@ -285,7 +307,7 @@ service Auth { // RoleGet gets detailed role information. rpc RoleGet(AuthRoleGetRequest) returns (AuthRoleGetResponse) { option (google.api.http) = { - post: "/v3alpha/auth/role/get" + post: "/v3beta/auth/role/get" body: "*" }; } @@ -293,7 +315,7 @@ service Auth { // RoleList gets lists of all roles. rpc RoleList(AuthRoleListRequest) returns (AuthRoleListResponse) { option (google.api.http) = { - post: "/v3alpha/auth/role/list" + post: "/v3beta/auth/role/list" body: "*" }; } @@ -301,7 +323,7 @@ service Auth { // RoleDelete deletes a specified role. rpc RoleDelete(AuthRoleDeleteRequest) returns (AuthRoleDeleteResponse) { option (google.api.http) = { - post: "/v3alpha/auth/role/delete" + post: "/v3beta/auth/role/delete" body: "*" }; } @@ -309,7 +331,7 @@ service Auth { // RoleGrantPermission grants a permission of a specified key or range to a specified role. rpc RoleGrantPermission(AuthRoleGrantPermissionRequest) returns (AuthRoleGrantPermissionResponse) { option (google.api.http) = { - post: "/v3alpha/auth/role/grant" + post: "/v3beta/auth/role/grant" body: "*" }; } @@ -317,7 +339,7 @@ service Auth { // RoleRevokePermission revokes a key or range permission of a specified role. rpc RoleRevokePermission(AuthRoleRevokePermissionRequest) returns (AuthRoleRevokePermissionResponse) { option (google.api.http) = { - post: "/v3alpha/auth/role/revoke" + post: "/v3beta/auth/role/revoke" body: "*" }; } @@ -380,7 +402,7 @@ message RangeRequest { // keys_only when set returns only the keys and not the values. bool keys_only = 8; - + // count_only when set returns only the count of the keys in the range. bool count_only = 9; @@ -469,6 +491,7 @@ message RequestOp { RangeRequest request_range = 1; PutRequest request_put = 2; DeleteRangeRequest request_delete_range = 3; + TxnRequest request_txn = 4; } } @@ -478,6 +501,7 @@ message ResponseOp { RangeResponse response_range = 1; PutResponse response_put = 2; DeleteRangeResponse response_delete_range = 3; + TxnResponse response_txn = 4; } } @@ -493,6 +517,7 @@ message Compare { CREATE = 1; MOD = 2; VALUE= 3; + LEASE = 4; } // result is logical comparison operation for this comparison. CompareResult result = 1; @@ -509,7 +534,15 @@ message Compare { int64 mod_revision = 6; // value is the value of the given key, in bytes. bytes value = 7; + // lease is the lease id of the given key. + int64 lease = 8; + // leave room for more target_union field tags, jump to 64 } + + // range_end compares the given target to all keys in the range [key, range_end). + // See RangeRequest for more details on key ranges. + bytes range_end = 64; + // TODO: fill out with most of the rest of RangeRequest fields when needed. } // From google paxosdb paper: @@ -552,7 +585,7 @@ message TxnResponse { // CompactionRequest compacts the key-value store up to a given revision. All superseded keys // with a revision less than the compaction revision will be removed. message CompactionRequest { - // revision is the key-value store revision for the compaction operation. + // revision is the key-value store revision for the compaction operation. int64 revision = 1; // physical is set so the RPC will wait until the compaction is physically // applied to the local database such that compacted entries are totally @@ -567,9 +600,22 @@ message CompactionResponse { message HashRequest { } +message HashKVRequest { + // revision is the key-value store revision for the hash operation. + int64 revision = 1; +} + +message HashKVResponse { + ResponseHeader header = 1; + // hash is the hash value computed from the responding member's MVCC keys up to a given revision. + uint32 hash = 2; + // compact_revision is the compacted revision of key-value store when hash begins. + int64 compact_revision = 3; +} + message HashResponse { ResponseHeader header = 1; - // hash is the hash value computed from the responding member's key-value store. + // hash is the hash value computed from the responding member's KV's backend. uint32 hash = 2; } @@ -648,7 +694,7 @@ message WatchResponse { // at a compacted index. // // This happens when creating a watcher at a compacted revision or the watcher cannot - // catch up with the progress of the key-value store. + // catch up with the progress of the key-value store. // // The client should treat the watcher as canceled and should not try to create any // watcher with the same start_revision again. @@ -661,7 +707,7 @@ message WatchResponse { } message LeaseGrantRequest { - // TTL is the advisory time-to-live in seconds. + // TTL is the advisory time-to-live in seconds. Expired lease will return -1. int64 TTL = 1; // ID is the requested ID for the lease. If ID is set to 0, the lessor chooses an ID. int64 ID = 2; @@ -717,6 +763,19 @@ message LeaseTimeToLiveResponse { repeated bytes keys = 5; } +message LeaseLeasesRequest { +} + +message LeaseStatus { + int64 ID = 1; + // TODO: int64 TTL = 2; +} + +message LeaseLeasesResponse { + ResponseHeader header = 1; + repeated LeaseStatus leases = 2; +} + message Member { // ID is the member ID for this member. uint64 ID = 1; @@ -781,9 +840,19 @@ message DefragmentResponse { ResponseHeader header = 1; } +message MoveLeaderRequest { + // targetID is the node ID for the new leader. + uint64 targetID = 1; +} + +message MoveLeaderResponse { + ResponseHeader header = 1; +} + enum AlarmType { NONE = 0; // default, used to query if any alarm is active NOSPACE = 1; // space quota is exhausted + CORRUPT = 2; // kv store corruption detected } message AlarmRequest { diff --git a/vendor/github.com/coreos/etcd/mvcc/mvccpb/kv.pb.go b/vendor/github.com/coreos/etcd/mvcc/mvccpb/kv.pb.go index 7033f1326..23fe337a5 100644 --- a/vendor/github.com/coreos/etcd/mvcc/mvccpb/kv.pb.go +++ b/vendor/github.com/coreos/etcd/mvcc/mvccpb/kv.pb.go @@ -1,6 +1,5 @@ -// Code generated by protoc-gen-gogo. +// Code generated by protoc-gen-gogo. DO NOT EDIT. // source: kv.proto -// DO NOT EDIT! /* Package mvccpb is a generated protocol buffer package. @@ -21,6 +20,8 @@ import ( math "math" + _ "github.com/gogo/protobuf/gogoproto" + io "io" ) @@ -198,24 +199,6 @@ func (m *Event) MarshalTo(dAtA []byte) (int, error) { return i, nil } -func encodeFixed64Kv(dAtA []byte, offset int, v uint64) int { - dAtA[offset] = uint8(v) - dAtA[offset+1] = uint8(v >> 8) - dAtA[offset+2] = uint8(v >> 16) - dAtA[offset+3] = uint8(v >> 24) - dAtA[offset+4] = uint8(v >> 32) - dAtA[offset+5] = uint8(v >> 40) - dAtA[offset+6] = uint8(v >> 48) - dAtA[offset+7] = uint8(v >> 56) - return offset + 8 -} -func encodeFixed32Kv(dAtA []byte, offset int, v uint32) int { - dAtA[offset] = uint8(v) - dAtA[offset+1] = uint8(v >> 8) - dAtA[offset+2] = uint8(v >> 16) - dAtA[offset+3] = uint8(v >> 24) - return offset + 4 -} func encodeVarintKv(dAtA []byte, offset int, v uint64) int { for v >= 1<<7 { dAtA[offset] = uint8(v&0x7f | 0x80) diff --git a/vendor/github.com/coreos/etcd/pkg/srv/srv.go b/vendor/github.com/coreos/etcd/pkg/srv/srv.go index fefcbcb4b..600061ce8 100644 --- a/vendor/github.com/coreos/etcd/pkg/srv/srv.go +++ b/vendor/github.com/coreos/etcd/pkg/srv/srv.go @@ -71,9 +71,10 @@ func GetCluster(service, name, dns string, apurls types.URLs) ([]string, error) // SRV records have a trailing dot but URL shouldn't. shortHost := strings.TrimSuffix(srv.Target, ".") urlHost := net.JoinHostPort(shortHost, port) - stringParts = append(stringParts, fmt.Sprintf("%s=%s://%s", n, scheme, urlHost)) if ok && url.Scheme != scheme { err = fmt.Errorf("bootstrap at %s from DNS for %s has scheme mismatch with expected peer %s", scheme+"://"+urlHost, service, url.String()) + } else { + stringParts = append(stringParts, fmt.Sprintf("%s=%s://%s", n, scheme, urlHost)) } } if len(stringParts) == 0 { diff --git a/vendor/github.com/coreos/etcd/pkg/tlsutil/cipher_suites.go b/vendor/github.com/coreos/etcd/pkg/tlsutil/cipher_suites.go new file mode 100644 index 000000000..b5916bb54 --- /dev/null +++ b/vendor/github.com/coreos/etcd/pkg/tlsutil/cipher_suites.go @@ -0,0 +1,51 @@ +// Copyright 2018 The etcd Authors +// +// 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. + +package tlsutil + +import "crypto/tls" + +// cipher suites implemented by Go +// https://github.com/golang/go/blob/dev.boringcrypto.go1.10/src/crypto/tls/cipher_suites.go +var cipherSuites = map[string]uint16{ + "TLS_RSA_WITH_RC4_128_SHA": tls.TLS_RSA_WITH_RC4_128_SHA, + "TLS_RSA_WITH_3DES_EDE_CBC_SHA": tls.TLS_RSA_WITH_3DES_EDE_CBC_SHA, + "TLS_RSA_WITH_AES_128_CBC_SHA": tls.TLS_RSA_WITH_AES_128_CBC_SHA, + "TLS_RSA_WITH_AES_256_CBC_SHA": tls.TLS_RSA_WITH_AES_256_CBC_SHA, + "TLS_RSA_WITH_AES_128_CBC_SHA256": tls.TLS_RSA_WITH_AES_128_CBC_SHA256, + "TLS_RSA_WITH_AES_128_GCM_SHA256": tls.TLS_RSA_WITH_AES_128_GCM_SHA256, + "TLS_RSA_WITH_AES_256_GCM_SHA384": tls.TLS_RSA_WITH_AES_256_GCM_SHA384, + "TLS_ECDHE_ECDSA_WITH_RC4_128_SHA": tls.TLS_ECDHE_ECDSA_WITH_RC4_128_SHA, + "TLS_ECDHE_ECDSA_WITH_AES_128_CBC_SHA": tls.TLS_ECDHE_ECDSA_WITH_AES_128_CBC_SHA, + "TLS_ECDHE_ECDSA_WITH_AES_256_CBC_SHA": tls.TLS_ECDHE_ECDSA_WITH_AES_256_CBC_SHA, + "TLS_ECDHE_RSA_WITH_RC4_128_SHA": tls.TLS_ECDHE_RSA_WITH_RC4_128_SHA, + "TLS_ECDHE_RSA_WITH_3DES_EDE_CBC_SHA": tls.TLS_ECDHE_RSA_WITH_3DES_EDE_CBC_SHA, + "TLS_ECDHE_RSA_WITH_AES_128_CBC_SHA": tls.TLS_ECDHE_RSA_WITH_AES_128_CBC_SHA, + "TLS_ECDHE_RSA_WITH_AES_256_CBC_SHA": tls.TLS_ECDHE_RSA_WITH_AES_256_CBC_SHA, + "TLS_ECDHE_ECDSA_WITH_AES_128_CBC_SHA256": tls.TLS_ECDHE_ECDSA_WITH_AES_128_CBC_SHA256, + "TLS_ECDHE_RSA_WITH_AES_128_CBC_SHA256": tls.TLS_ECDHE_RSA_WITH_AES_128_CBC_SHA256, + "TLS_ECDHE_RSA_WITH_AES_128_GCM_SHA256": tls.TLS_ECDHE_RSA_WITH_AES_128_GCM_SHA256, + "TLS_ECDHE_ECDSA_WITH_AES_128_GCM_SHA256": tls.TLS_ECDHE_ECDSA_WITH_AES_128_GCM_SHA256, + "TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384": tls.TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384, + "TLS_ECDHE_ECDSA_WITH_AES_256_GCM_SHA384": tls.TLS_ECDHE_ECDSA_WITH_AES_256_GCM_SHA384, + "TLS_ECDHE_RSA_WITH_CHACHA20_POLY1305": tls.TLS_ECDHE_RSA_WITH_CHACHA20_POLY1305, + "TLS_ECDHE_ECDSA_WITH_CHACHA20_POLY1305": tls.TLS_ECDHE_ECDSA_WITH_CHACHA20_POLY1305, +} + +// GetCipherSuite returns the corresponding cipher suite, +// and boolean value if it is supported. +func GetCipherSuite(s string) (uint16, bool) { + v, ok := cipherSuites[s] + return v, ok +} diff --git a/vendor/github.com/coreos/etcd/pkg/transport/keepalive_listener.go b/vendor/github.com/coreos/etcd/pkg/transport/keepalive_listener.go index 6ccae4ee4..4ff8e7f00 100644 --- a/vendor/github.com/coreos/etcd/pkg/transport/keepalive_listener.go +++ b/vendor/github.com/coreos/etcd/pkg/transport/keepalive_listener.go @@ -79,7 +79,7 @@ func (l *tlsKeepaliveListener) Accept() (c net.Conn, err error) { kac.SetKeepAlive(true) kac.SetKeepAlivePeriod(30 * time.Second) c = tls.Server(c, l.config) - return + return c, nil } // NewListener creates a Listener which accepts connections from an inner diff --git a/vendor/github.com/coreos/etcd/pkg/transport/listener.go b/vendor/github.com/coreos/etcd/pkg/transport/listener.go index 3b58b4154..48655063f 100644 --- a/vendor/github.com/coreos/etcd/pkg/transport/listener.go +++ b/vendor/github.com/coreos/etcd/pkg/transport/listener.go @@ -22,6 +22,7 @@ import ( "crypto/x509" "crypto/x509/pkix" "encoding/pem" + "errors" "fmt" "math/big" "net" @@ -52,15 +53,17 @@ func wrapTLS(addr, scheme string, tlsinfo *TLSInfo, l net.Listener) (net.Listene if scheme != "https" && scheme != "unixs" { return l, nil } - return newTLSListener(l, tlsinfo) + return newTLSListener(l, tlsinfo, checkSAN) } type TLSInfo struct { - CertFile string - KeyFile string - CAFile string - TrustedCAFile string - ClientCertAuth bool + CertFile string + KeyFile string + CAFile string // TODO: deprecate this in v4 + TrustedCAFile string + ClientCertAuth bool + CRLFile string + InsecureSkipVerify bool // ServerName ensures the cert matches the given host in case of discovery / virtual hosting ServerName string @@ -69,15 +72,23 @@ type TLSInfo struct { // connection will be closed immediately afterwards. HandshakeFailure func(*tls.Conn, error) + // CipherSuites is a list of supported cipher suites. + // If empty, Go auto-populates it by default. + // Note that cipher suites are prioritized in the given order. + CipherSuites []uint16 + selfCert bool // parseFunc exists to simplify testing. Typically, parseFunc // should be left nil. In that case, tls.X509KeyPair will be used. parseFunc func([]byte, []byte) (tls.Certificate, error) + + // AllowedCN is a CN which must be provided by a client. + AllowedCN string } func (info TLSInfo) String() string { - return fmt.Sprintf("cert = %s, key = %s, ca = %s, trusted-ca = %s, client-cert-auth = %v", info.CertFile, info.KeyFile, info.CAFile, info.TrustedCAFile, info.ClientCertAuth) + return fmt.Sprintf("cert = %s, key = %s, ca = %s, trusted-ca = %s, client-cert-auth = %v, crl-file = %s", info.CertFile, info.KeyFile, info.CAFile, info.TrustedCAFile, info.ClientCertAuth, info.CRLFile) } func (info TLSInfo) Empty() bool { @@ -162,16 +173,33 @@ func (info TLSInfo) baseConfig() (*tls.Config, error) { return nil, fmt.Errorf("KeyFile and CertFile must both be present[key: %v, cert: %v]", info.KeyFile, info.CertFile) } - tlsCert, err := tlsutil.NewCert(info.CertFile, info.KeyFile, info.parseFunc) + _, err := tlsutil.NewCert(info.CertFile, info.KeyFile, info.parseFunc) if err != nil { return nil, err } cfg := &tls.Config{ - Certificates: []tls.Certificate{*tlsCert}, - MinVersion: tls.VersionTLS12, - ServerName: info.ServerName, + MinVersion: tls.VersionTLS12, + ServerName: info.ServerName, } + + if len(info.CipherSuites) > 0 { + cfg.CipherSuites = info.CipherSuites + } + + if info.AllowedCN != "" { + cfg.VerifyPeerCertificate = func(rawCerts [][]byte, verifiedChains [][]*x509.Certificate) error { + for _, chains := range verifiedChains { + if len(chains) != 0 { + if info.AllowedCN == chains[0].Subject.CommonName { + return nil + } + } + } + return errors.New("CommonName authentication failed") + } + } + // this only reloads certs when there's a client request // TODO: support server-side refresh (e.g. inotify, SIGHUP), caching cfg.GetCertificate = func(clientHello *tls.ClientHelloInfo) (*tls.Certificate, error) { @@ -235,6 +263,7 @@ func (info TLSInfo) ClientConfig() (*tls.Config, error) { } else { cfg = &tls.Config{ServerName: info.ServerName} } + cfg.InsecureSkipVerify = info.InsecureSkipVerify CAFiles := info.cafiles() if len(CAFiles) > 0 { diff --git a/vendor/github.com/coreos/etcd/pkg/transport/listener_tls.go b/vendor/github.com/coreos/etcd/pkg/transport/listener_tls.go index 865118603..6f1600945 100644 --- a/vendor/github.com/coreos/etcd/pkg/transport/listener_tls.go +++ b/vendor/github.com/coreos/etcd/pkg/transport/listener_tls.go @@ -19,22 +19,33 @@ import ( "crypto/tls" "crypto/x509" "fmt" + "io/ioutil" "net" "strings" "sync" ) // tlsListener overrides a TLS listener so it will reject client -// certificates with insufficient SAN credentials. +// certificates with insufficient SAN credentials or CRL revoked +// certificates. type tlsListener struct { net.Listener connc chan net.Conn donec chan struct{} err error handshakeFailure func(*tls.Conn, error) + check tlsCheckFunc } -func newTLSListener(l net.Listener, tlsinfo *TLSInfo) (net.Listener, error) { +type tlsCheckFunc func(context.Context, *tls.Conn) error + +// NewTLSListener handshakes TLS connections and performs optional CRL checking. +func NewTLSListener(l net.Listener, tlsinfo *TLSInfo) (net.Listener, error) { + check := func(context.Context, *tls.Conn) error { return nil } + return newTLSListener(l, tlsinfo, check) +} + +func newTLSListener(l net.Listener, tlsinfo *TLSInfo, check tlsCheckFunc) (net.Listener, error) { if tlsinfo == nil || tlsinfo.Empty() { l.Close() return nil, fmt.Errorf("cannot listen on TLS for %s: KeyFile and CertFile are not presented", l.Addr().String()) @@ -48,11 +59,27 @@ func newTLSListener(l net.Listener, tlsinfo *TLSInfo) (net.Listener, error) { if hf == nil { hf = func(*tls.Conn, error) {} } + + if len(tlsinfo.CRLFile) > 0 { + prevCheck := check + check = func(ctx context.Context, tlsConn *tls.Conn) error { + if err := prevCheck(ctx, tlsConn); err != nil { + return err + } + st := tlsConn.ConnectionState() + if certs := st.PeerCertificates; len(certs) > 0 { + return checkCRL(tlsinfo.CRLFile, certs) + } + return nil + } + } + tlsl := &tlsListener{ Listener: tls.NewListener(l, tlscfg), connc: make(chan net.Conn), donec: make(chan struct{}), handshakeFailure: hf, + check: check, } go tlsl.acceptLoop() return tlsl, nil @@ -67,6 +94,15 @@ func (l *tlsListener) Accept() (net.Conn, error) { } } +func checkSAN(ctx context.Context, tlsConn *tls.Conn) error { + st := tlsConn.ConnectionState() + if certs := st.PeerCertificates; len(certs) > 0 { + addr := tlsConn.RemoteAddr().String() + return checkCertSAN(ctx, certs[0], addr) + } + return nil +} + // acceptLoop launches each TLS handshake in a separate goroutine // to prevent a hanging TLS connection from blocking other connections. func (l *tlsListener) acceptLoop() { @@ -111,20 +147,16 @@ func (l *tlsListener) acceptLoop() { pendingMu.Lock() delete(pending, conn) pendingMu.Unlock() + if herr != nil { l.handshakeFailure(tlsConn, herr) return } - - st := tlsConn.ConnectionState() - if len(st.PeerCertificates) > 0 { - cert := st.PeerCertificates[0] - addr := tlsConn.RemoteAddr().String() - if cerr := checkCert(ctx, cert, addr); cerr != nil { - l.handshakeFailure(tlsConn, cerr) - return - } + if err := l.check(ctx, tlsConn); err != nil { + l.handshakeFailure(tlsConn, err) + return } + select { case l.connc <- tlsConn: conn = nil @@ -134,11 +166,34 @@ func (l *tlsListener) acceptLoop() { } } -func checkCert(ctx context.Context, cert *x509.Certificate, remoteAddr string) error { - h, _, herr := net.SplitHostPort(remoteAddr) +func checkCRL(crlPath string, cert []*x509.Certificate) error { + // TODO: cache + crlBytes, err := ioutil.ReadFile(crlPath) + if err != nil { + return err + } + certList, err := x509.ParseCRL(crlBytes) + if err != nil { + return err + } + revokedSerials := make(map[string]struct{}) + for _, rc := range certList.TBSCertList.RevokedCertificates { + revokedSerials[string(rc.SerialNumber.Bytes())] = struct{}{} + } + for _, c := range cert { + serial := string(c.SerialNumber.Bytes()) + if _, ok := revokedSerials[serial]; ok { + return fmt.Errorf("transport: certificate serial %x revoked", serial) + } + } + return nil +} + +func checkCertSAN(ctx context.Context, cert *x509.Certificate, remoteAddr string) error { if len(cert.IPAddresses) == 0 && len(cert.DNSNames) == 0 { return nil } + h, _, herr := net.SplitHostPort(remoteAddr) if herr != nil { return herr } diff --git a/vendor/github.com/coreos/etcd/pkg/types/set.go b/vendor/github.com/coreos/etcd/pkg/types/set.go index 73ef431be..c111b0c0c 100644 --- a/vendor/github.com/coreos/etcd/pkg/types/set.go +++ b/vendor/github.com/coreos/etcd/pkg/types/set.go @@ -61,7 +61,7 @@ func (us *unsafeSet) Remove(value string) { // Contains returns whether the set contains the given value func (us *unsafeSet) Contains(value string) (exists bool) { _, exists = us.d[value] - return + return exists } // ContainsAll returns whether the set contains all given values @@ -94,7 +94,7 @@ func (us *unsafeSet) Values() (values []string) { for val := range us.d { values = append(values, val) } - return + return values } // Copy creates a new Set containing the values of the first diff --git a/vendor/github.com/coreos/etcd/version/version.go b/vendor/github.com/coreos/etcd/version/version.go index d2391963e..c68847dc3 100644 --- a/vendor/github.com/coreos/etcd/version/version.go +++ b/vendor/github.com/coreos/etcd/version/version.go @@ -26,7 +26,7 @@ import ( var ( // MinClusterVersion is the min cluster version this etcd binary is compatible with. MinClusterVersion = "3.0.0" - Version = "3.2.7" + Version = "3.3.10" APIVersion = "unknown" // Git SHA Value will be set during build diff --git a/vendor/github.com/gogo/protobuf/AUTHORS b/vendor/github.com/gogo/protobuf/AUTHORS new file mode 100644 index 000000000..3d97fc7a2 --- /dev/null +++ b/vendor/github.com/gogo/protobuf/AUTHORS @@ -0,0 +1,15 @@ +# This is the official list of GoGo authors for copyright purposes. +# This file is distinct from the CONTRIBUTORS file, which +# lists people. For example, employees are listed in CONTRIBUTORS, +# but not in AUTHORS, because the employer holds the copyright. + +# Names should be added to this file as one of +# Organization's name +# Individual's name +# Individual's name + +# Please keep the list sorted. + +Sendgrid, Inc +Vastech SA (PTY) LTD +Walter Schulze diff --git a/vendor/github.com/gogo/protobuf/CONTRIBUTORS b/vendor/github.com/gogo/protobuf/CONTRIBUTORS new file mode 100644 index 000000000..1b4f6c208 --- /dev/null +++ b/vendor/github.com/gogo/protobuf/CONTRIBUTORS @@ -0,0 +1,23 @@ +Anton Povarov +Brian Goff +Clayton Coleman +Denis Smirnov +DongYun Kang +Dwayne Schultz +Georg Apitz +Gustav Paul +Johan Brandhorst +John Shahid +John Tuley +Laurent +Patrick Lee +Peter Edge +Roger Johansson +Sam Nguyen +Sergio Arbeo +Stephen J Day +Tamir Duberstein +Todd Eisenberger +Tormod Erevik Lea +Vyacheslav Kim +Walter Schulze diff --git a/vendor/github.com/gogo/protobuf/LICENSE b/vendor/github.com/gogo/protobuf/LICENSE new file mode 100644 index 000000000..f57de90da --- /dev/null +++ b/vendor/github.com/gogo/protobuf/LICENSE @@ -0,0 +1,35 @@ +Copyright (c) 2013, The GoGo Authors. All rights reserved. + +Protocol Buffers for Go with Gadgets + +Go support for Protocol Buffers - Google's data interchange format + +Copyright 2010 The Go Authors. All rights reserved. +https://github.com/golang/protobuf + +Redistribution and use in source and binary forms, with or without +modification, are permitted provided that the following conditions are +met: + + * Redistributions of source code must retain the above copyright +notice, this list of conditions and the following disclaimer. + * Redistributions in binary form must reproduce the above +copyright notice, this list of conditions and the following disclaimer +in the documentation and/or other materials provided with the +distribution. + * Neither the name of Google Inc. nor the names of its +contributors may be used to endorse or promote products derived from +this software without specific prior written permission. + +THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS +"AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT +LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR +A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT +OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, +SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT +LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, +DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY +THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT +(INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE +OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. + diff --git a/vendor/github.com/gogo/protobuf/gogoproto/Makefile b/vendor/github.com/gogo/protobuf/gogoproto/Makefile new file mode 100644 index 000000000..0b4659b73 --- /dev/null +++ b/vendor/github.com/gogo/protobuf/gogoproto/Makefile @@ -0,0 +1,37 @@ +# Protocol Buffers for Go with Gadgets +# +# Copyright (c) 2013, The GoGo Authors. All rights reserved. +# http://github.com/gogo/protobuf +# +# Redistribution and use in source and binary forms, with or without +# modification, are permitted provided that the following conditions are +# met: +# +# * Redistributions of source code must retain the above copyright +# notice, this list of conditions and the following disclaimer. +# * Redistributions in binary form must reproduce the above +# copyright notice, this list of conditions and the following disclaimer +# in the documentation and/or other materials provided with the +# distribution. +# +# THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS +# "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT +# LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR +# A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT +# OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, +# SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT +# LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, +# DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY +# THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT +# (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE +# OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. + +regenerate: + go install github.com/gogo/protobuf/protoc-gen-gogo + protoc --gogo_out=Mgoogle/protobuf/descriptor.proto=github.com/gogo/protobuf/protoc-gen-gogo/descriptor:../../../../ --proto_path=../../../../:../protobuf/:. *.proto + +restore: + cp gogo.pb.golden gogo.pb.go + +preserve: + cp gogo.pb.go gogo.pb.golden diff --git a/vendor/github.com/gogo/protobuf/gogoproto/doc.go b/vendor/github.com/gogo/protobuf/gogoproto/doc.go new file mode 100644 index 000000000..147b5ecc6 --- /dev/null +++ b/vendor/github.com/gogo/protobuf/gogoproto/doc.go @@ -0,0 +1,169 @@ +// Protocol Buffers for Go with Gadgets +// +// Copyright (c) 2013, The GoGo Authors. All rights reserved. +// http://github.com/gogo/protobuf +// +// Redistribution and use in source and binary forms, with or without +// modification, are permitted provided that the following conditions are +// met: +// +// * Redistributions of source code must retain the above copyright +// notice, this list of conditions and the following disclaimer. +// * Redistributions in binary form must reproduce the above +// copyright notice, this list of conditions and the following disclaimer +// in the documentation and/or other materials provided with the +// distribution. +// +// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS +// "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT +// LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR +// A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT +// OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, +// SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT +// LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, +// DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY +// THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT +// (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE +// OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. + +/* +Package gogoproto provides extensions for protocol buffers to achieve: + + - fast marshalling and unmarshalling. + - peace of mind by optionally generating test and benchmark code. + - more canonical Go structures. + - less typing by optionally generating extra helper code. + - goprotobuf compatibility + +More Canonical Go Structures + +A lot of time working with a goprotobuf struct will lead you to a place where you create another struct that is easier to work with and then have a function to copy the values between the two structs. +You might also find that basic structs that started their life as part of an API need to be sent over the wire. With gob, you could just send it. With goprotobuf, you need to make a parallel struct. +Gogoprotobuf tries to fix these problems with the nullable, embed, customtype and customname field extensions. + + - nullable, if false, a field is generated without a pointer (see warning below). + - embed, if true, the field is generated as an embedded field. + - customtype, It works with the Marshal and Unmarshal methods, to allow you to have your own types in your struct, but marshal to bytes. For example, custom.Uuid or custom.Fixed128 + - customname (beta), Changes the generated fieldname. This is especially useful when generated methods conflict with fieldnames. + - casttype (beta), Changes the generated fieldtype. All generated code assumes that this type is castable to the protocol buffer field type. It does not work for structs or enums. + - castkey (beta), Changes the generated fieldtype for a map key. All generated code assumes that this type is castable to the protocol buffer field type. Only supported on maps. + - castvalue (beta), Changes the generated fieldtype for a map value. All generated code assumes that this type is castable to the protocol buffer field type. Only supported on maps. + +Warning about nullable: According to the Protocol Buffer specification, you should be able to tell whether a field is set or unset. With the option nullable=false this feature is lost, since your non-nullable fields will always be set. It can be seen as a layer on top of Protocol Buffers, where before and after marshalling all non-nullable fields are set and they cannot be unset. + +Let us look at: + + github.com/gogo/protobuf/test/example/example.proto + +for a quicker overview. + +The following message: + + package test; + + import "github.com/gogo/protobuf/gogoproto/gogo.proto"; + + message A { + optional string Description = 1 [(gogoproto.nullable) = false]; + optional int64 Number = 2 [(gogoproto.nullable) = false]; + optional bytes Id = 3 [(gogoproto.customtype) = "github.com/gogo/protobuf/test/custom.Uuid", (gogoproto.nullable) = false]; + } + +Will generate a go struct which looks a lot like this: + + type A struct { + Description string + Number int64 + Id github_com_gogo_protobuf_test_custom.Uuid + } + +You will see there are no pointers, since all fields are non-nullable. +You will also see a custom type which marshals to a string. +Be warned it is your responsibility to test your custom types thoroughly. +You should think of every possible empty and nil case for your marshaling, unmarshaling and size methods. + +Next we will embed the message A in message B. + + message B { + optional A A = 1 [(gogoproto.nullable) = false, (gogoproto.embed) = true]; + repeated bytes G = 2 [(gogoproto.customtype) = "github.com/gogo/protobuf/test/custom.Uint128", (gogoproto.nullable) = false]; + } + +See below that A is embedded in B. + + type B struct { + A + G []github_com_gogo_protobuf_test_custom.Uint128 + } + +Also see the repeated custom type. + + type Uint128 [2]uint64 + +Next we will create a custom name for one of our fields. + + message C { + optional int64 size = 1 [(gogoproto.customname) = "MySize"]; + } + +See below that the field's name is MySize and not Size. + + type C struct { + MySize *int64 + } + +The is useful when having a protocol buffer message with a field name which conflicts with a generated method. +As an example, having a field name size and using the sizer plugin to generate a Size method will cause a go compiler error. +Using customname you can fix this error without changing the field name. +This is typically useful when working with a protocol buffer that was designed before these methods and/or the go language were avialable. + +Gogoprotobuf also has some more subtle changes, these could be changed back: + + - the generated package name for imports do not have the extra /filename.pb, + but are actually the imports specified in the .proto file. + +Gogoprotobuf also has lost some features which should be brought back with time: + + - Marshalling and unmarshalling with reflect and without the unsafe package, + this requires work in pointer_reflect.go + +Why does nullable break protocol buffer specifications: + +The protocol buffer specification states, somewhere, that you should be able to tell whether a +field is set or unset. With the option nullable=false this feature is lost, +since your non-nullable fields will always be set. It can be seen as a layer on top of +protocol buffers, where before and after marshalling all non-nullable fields are set +and they cannot be unset. + +Goprotobuf Compatibility: + +Gogoprotobuf is compatible with Goprotobuf, because it is compatible with protocol buffers. +Gogoprotobuf generates the same code as goprotobuf if no extensions are used. +The enumprefix, getters and stringer extensions can be used to remove some of the unnecessary code generated by goprotobuf: + + - gogoproto_import, if false, the generated code imports github.com/golang/protobuf/proto instead of github.com/gogo/protobuf/proto. + - goproto_enum_prefix, if false, generates the enum constant names without the messagetype prefix + - goproto_enum_stringer (experimental), if false, the enum is generated without the default string method, this is useful for rather using enum_stringer, or allowing you to write your own string method. + - goproto_getters, if false, the message is generated without get methods, this is useful when you would rather want to use face + - goproto_stringer, if false, the message is generated without the default string method, this is useful for rather using stringer, or allowing you to write your own string method. + - goproto_extensions_map (beta), if false, the extensions field is generated as type []byte instead of type map[int32]proto.Extension + - goproto_unrecognized (beta), if false, XXX_unrecognized field is not generated. This is useful in conjunction with gogoproto.nullable=false, to generate structures completely devoid of pointers and reduce GC pressure at the cost of losing information about unrecognized fields. + - goproto_registration (beta), if true, the generated files will register all messages and types against both gogo/protobuf and golang/protobuf. This is necessary when using third-party packages which read registrations from golang/protobuf (such as the grpc-gateway). + +Less Typing and Peace of Mind is explained in their specific plugin folders godoc: + + - github.com/gogo/protobuf/plugin/ + +If you do not use any of these extension the code that is generated +will be the same as if goprotobuf has generated it. + +The most complete way to see examples is to look at + + github.com/gogo/protobuf/test/thetest.proto + +Gogoprototest is a seperate project, +because we want to keep gogoprotobuf independant of goprotobuf, +but we still want to test it thoroughly. + +*/ +package gogoproto diff --git a/vendor/github.com/gogo/protobuf/gogoproto/gogo.pb.go b/vendor/github.com/gogo/protobuf/gogoproto/gogo.pb.go new file mode 100644 index 000000000..97843b244 --- /dev/null +++ b/vendor/github.com/gogo/protobuf/gogoproto/gogo.pb.go @@ -0,0 +1,817 @@ +// Code generated by protoc-gen-gogo. DO NOT EDIT. +// source: gogo.proto + +package gogoproto // import "github.com/gogo/protobuf/gogoproto" + +import proto "github.com/gogo/protobuf/proto" +import fmt "fmt" +import math "math" +import descriptor "github.com/gogo/protobuf/protoc-gen-gogo/descriptor" + +// Reference imports to suppress errors if they are not otherwise used. +var _ = proto.Marshal +var _ = fmt.Errorf +var _ = math.Inf + +// This is a compile-time assertion to ensure that this generated file +// is compatible with the proto package it is being compiled against. +// A compilation error at this line likely means your copy of the +// proto package needs to be updated. +const _ = proto.GoGoProtoPackageIsVersion2 // please upgrade the proto package + +var E_GoprotoEnumPrefix = &proto.ExtensionDesc{ + ExtendedType: (*descriptor.EnumOptions)(nil), + ExtensionType: (*bool)(nil), + Field: 62001, + Name: "gogoproto.goproto_enum_prefix", + Tag: "varint,62001,opt,name=goproto_enum_prefix,json=goprotoEnumPrefix", + Filename: "gogo.proto", +} + +var E_GoprotoEnumStringer = &proto.ExtensionDesc{ + ExtendedType: (*descriptor.EnumOptions)(nil), + ExtensionType: (*bool)(nil), + Field: 62021, + Name: "gogoproto.goproto_enum_stringer", + Tag: "varint,62021,opt,name=goproto_enum_stringer,json=goprotoEnumStringer", + Filename: "gogo.proto", +} + +var E_EnumStringer = &proto.ExtensionDesc{ + ExtendedType: (*descriptor.EnumOptions)(nil), + ExtensionType: (*bool)(nil), + Field: 62022, + Name: "gogoproto.enum_stringer", + Tag: "varint,62022,opt,name=enum_stringer,json=enumStringer", + Filename: "gogo.proto", +} + +var E_EnumCustomname = &proto.ExtensionDesc{ + ExtendedType: (*descriptor.EnumOptions)(nil), + ExtensionType: (*string)(nil), + Field: 62023, + Name: "gogoproto.enum_customname", + Tag: "bytes,62023,opt,name=enum_customname,json=enumCustomname", + Filename: "gogo.proto", +} + +var E_Enumdecl = &proto.ExtensionDesc{ + ExtendedType: (*descriptor.EnumOptions)(nil), + ExtensionType: (*bool)(nil), + Field: 62024, + Name: "gogoproto.enumdecl", + Tag: "varint,62024,opt,name=enumdecl", + Filename: "gogo.proto", +} + +var E_EnumvalueCustomname = &proto.ExtensionDesc{ + ExtendedType: (*descriptor.EnumValueOptions)(nil), + ExtensionType: (*string)(nil), + Field: 66001, + Name: "gogoproto.enumvalue_customname", + Tag: "bytes,66001,opt,name=enumvalue_customname,json=enumvalueCustomname", + Filename: "gogo.proto", +} + +var E_GoprotoGettersAll = &proto.ExtensionDesc{ + ExtendedType: (*descriptor.FileOptions)(nil), + ExtensionType: (*bool)(nil), + Field: 63001, + Name: "gogoproto.goproto_getters_all", + Tag: "varint,63001,opt,name=goproto_getters_all,json=goprotoGettersAll", + Filename: "gogo.proto", +} + +var E_GoprotoEnumPrefixAll = &proto.ExtensionDesc{ + ExtendedType: (*descriptor.FileOptions)(nil), + ExtensionType: (*bool)(nil), + Field: 63002, + Name: "gogoproto.goproto_enum_prefix_all", + Tag: "varint,63002,opt,name=goproto_enum_prefix_all,json=goprotoEnumPrefixAll", + Filename: "gogo.proto", +} + +var E_GoprotoStringerAll = &proto.ExtensionDesc{ + ExtendedType: (*descriptor.FileOptions)(nil), + ExtensionType: (*bool)(nil), + Field: 63003, + Name: "gogoproto.goproto_stringer_all", + Tag: "varint,63003,opt,name=goproto_stringer_all,json=goprotoStringerAll", + Filename: "gogo.proto", +} + +var E_VerboseEqualAll = &proto.ExtensionDesc{ + ExtendedType: (*descriptor.FileOptions)(nil), + ExtensionType: (*bool)(nil), + Field: 63004, + Name: "gogoproto.verbose_equal_all", + Tag: "varint,63004,opt,name=verbose_equal_all,json=verboseEqualAll", + Filename: "gogo.proto", +} + +var E_FaceAll = &proto.ExtensionDesc{ + ExtendedType: (*descriptor.FileOptions)(nil), + ExtensionType: (*bool)(nil), + Field: 63005, + Name: "gogoproto.face_all", + Tag: "varint,63005,opt,name=face_all,json=faceAll", + Filename: "gogo.proto", +} + +var E_GostringAll = &proto.ExtensionDesc{ + ExtendedType: (*descriptor.FileOptions)(nil), + ExtensionType: (*bool)(nil), + Field: 63006, + Name: "gogoproto.gostring_all", + Tag: "varint,63006,opt,name=gostring_all,json=gostringAll", + Filename: "gogo.proto", +} + +var E_PopulateAll = &proto.ExtensionDesc{ + ExtendedType: (*descriptor.FileOptions)(nil), + ExtensionType: (*bool)(nil), + Field: 63007, + Name: "gogoproto.populate_all", + Tag: "varint,63007,opt,name=populate_all,json=populateAll", + Filename: "gogo.proto", +} + +var E_StringerAll = &proto.ExtensionDesc{ + ExtendedType: (*descriptor.FileOptions)(nil), + ExtensionType: (*bool)(nil), + Field: 63008, + Name: "gogoproto.stringer_all", + Tag: "varint,63008,opt,name=stringer_all,json=stringerAll", + Filename: "gogo.proto", +} + +var E_OnlyoneAll = &proto.ExtensionDesc{ + ExtendedType: (*descriptor.FileOptions)(nil), + ExtensionType: (*bool)(nil), + Field: 63009, + Name: "gogoproto.onlyone_all", + Tag: "varint,63009,opt,name=onlyone_all,json=onlyoneAll", + Filename: "gogo.proto", +} + +var E_EqualAll = &proto.ExtensionDesc{ + ExtendedType: (*descriptor.FileOptions)(nil), + ExtensionType: (*bool)(nil), + Field: 63013, + Name: "gogoproto.equal_all", + Tag: "varint,63013,opt,name=equal_all,json=equalAll", + Filename: "gogo.proto", +} + +var E_DescriptionAll = &proto.ExtensionDesc{ + ExtendedType: (*descriptor.FileOptions)(nil), + ExtensionType: (*bool)(nil), + Field: 63014, + Name: "gogoproto.description_all", + Tag: "varint,63014,opt,name=description_all,json=descriptionAll", + Filename: "gogo.proto", +} + +var E_TestgenAll = &proto.ExtensionDesc{ + ExtendedType: (*descriptor.FileOptions)(nil), + ExtensionType: (*bool)(nil), + Field: 63015, + Name: "gogoproto.testgen_all", + Tag: "varint,63015,opt,name=testgen_all,json=testgenAll", + Filename: "gogo.proto", +} + +var E_BenchgenAll = &proto.ExtensionDesc{ + ExtendedType: (*descriptor.FileOptions)(nil), + ExtensionType: (*bool)(nil), + Field: 63016, + Name: "gogoproto.benchgen_all", + Tag: "varint,63016,opt,name=benchgen_all,json=benchgenAll", + Filename: "gogo.proto", +} + +var E_MarshalerAll = &proto.ExtensionDesc{ + ExtendedType: (*descriptor.FileOptions)(nil), + ExtensionType: (*bool)(nil), + Field: 63017, + Name: "gogoproto.marshaler_all", + Tag: "varint,63017,opt,name=marshaler_all,json=marshalerAll", + Filename: "gogo.proto", +} + +var E_UnmarshalerAll = &proto.ExtensionDesc{ + ExtendedType: (*descriptor.FileOptions)(nil), + ExtensionType: (*bool)(nil), + Field: 63018, + Name: "gogoproto.unmarshaler_all", + Tag: "varint,63018,opt,name=unmarshaler_all,json=unmarshalerAll", + Filename: "gogo.proto", +} + +var E_StableMarshalerAll = &proto.ExtensionDesc{ + ExtendedType: (*descriptor.FileOptions)(nil), + ExtensionType: (*bool)(nil), + Field: 63019, + Name: "gogoproto.stable_marshaler_all", + Tag: "varint,63019,opt,name=stable_marshaler_all,json=stableMarshalerAll", + Filename: "gogo.proto", +} + +var E_SizerAll = &proto.ExtensionDesc{ + ExtendedType: (*descriptor.FileOptions)(nil), + ExtensionType: (*bool)(nil), + Field: 63020, + Name: "gogoproto.sizer_all", + Tag: "varint,63020,opt,name=sizer_all,json=sizerAll", + Filename: "gogo.proto", +} + +var E_GoprotoEnumStringerAll = &proto.ExtensionDesc{ + ExtendedType: (*descriptor.FileOptions)(nil), + ExtensionType: (*bool)(nil), + Field: 63021, + Name: "gogoproto.goproto_enum_stringer_all", + Tag: "varint,63021,opt,name=goproto_enum_stringer_all,json=goprotoEnumStringerAll", + Filename: "gogo.proto", +} + +var E_EnumStringerAll = &proto.ExtensionDesc{ + ExtendedType: (*descriptor.FileOptions)(nil), + ExtensionType: (*bool)(nil), + Field: 63022, + Name: "gogoproto.enum_stringer_all", + Tag: "varint,63022,opt,name=enum_stringer_all,json=enumStringerAll", + Filename: "gogo.proto", +} + +var E_UnsafeMarshalerAll = &proto.ExtensionDesc{ + ExtendedType: (*descriptor.FileOptions)(nil), + ExtensionType: (*bool)(nil), + Field: 63023, + Name: "gogoproto.unsafe_marshaler_all", + Tag: "varint,63023,opt,name=unsafe_marshaler_all,json=unsafeMarshalerAll", + Filename: "gogo.proto", +} + +var E_UnsafeUnmarshalerAll = &proto.ExtensionDesc{ + ExtendedType: (*descriptor.FileOptions)(nil), + ExtensionType: (*bool)(nil), + Field: 63024, + Name: "gogoproto.unsafe_unmarshaler_all", + Tag: "varint,63024,opt,name=unsafe_unmarshaler_all,json=unsafeUnmarshalerAll", + Filename: "gogo.proto", +} + +var E_GoprotoExtensionsMapAll = &proto.ExtensionDesc{ + ExtendedType: (*descriptor.FileOptions)(nil), + ExtensionType: (*bool)(nil), + Field: 63025, + Name: "gogoproto.goproto_extensions_map_all", + Tag: "varint,63025,opt,name=goproto_extensions_map_all,json=goprotoExtensionsMapAll", + Filename: "gogo.proto", +} + +var E_GoprotoUnrecognizedAll = &proto.ExtensionDesc{ + ExtendedType: (*descriptor.FileOptions)(nil), + ExtensionType: (*bool)(nil), + Field: 63026, + Name: "gogoproto.goproto_unrecognized_all", + Tag: "varint,63026,opt,name=goproto_unrecognized_all,json=goprotoUnrecognizedAll", + Filename: "gogo.proto", +} + +var E_GogoprotoImport = &proto.ExtensionDesc{ + ExtendedType: (*descriptor.FileOptions)(nil), + ExtensionType: (*bool)(nil), + Field: 63027, + Name: "gogoproto.gogoproto_import", + Tag: "varint,63027,opt,name=gogoproto_import,json=gogoprotoImport", + Filename: "gogo.proto", +} + +var E_ProtosizerAll = &proto.ExtensionDesc{ + ExtendedType: (*descriptor.FileOptions)(nil), + ExtensionType: (*bool)(nil), + Field: 63028, + Name: "gogoproto.protosizer_all", + Tag: "varint,63028,opt,name=protosizer_all,json=protosizerAll", + Filename: "gogo.proto", +} + +var E_CompareAll = &proto.ExtensionDesc{ + ExtendedType: (*descriptor.FileOptions)(nil), + ExtensionType: (*bool)(nil), + Field: 63029, + Name: "gogoproto.compare_all", + Tag: "varint,63029,opt,name=compare_all,json=compareAll", + Filename: "gogo.proto", +} + +var E_TypedeclAll = &proto.ExtensionDesc{ + ExtendedType: (*descriptor.FileOptions)(nil), + ExtensionType: (*bool)(nil), + Field: 63030, + Name: "gogoproto.typedecl_all", + Tag: "varint,63030,opt,name=typedecl_all,json=typedeclAll", + Filename: "gogo.proto", +} + +var E_EnumdeclAll = &proto.ExtensionDesc{ + ExtendedType: (*descriptor.FileOptions)(nil), + ExtensionType: (*bool)(nil), + Field: 63031, + Name: "gogoproto.enumdecl_all", + Tag: "varint,63031,opt,name=enumdecl_all,json=enumdeclAll", + Filename: "gogo.proto", +} + +var E_GoprotoRegistration = &proto.ExtensionDesc{ + ExtendedType: (*descriptor.FileOptions)(nil), + ExtensionType: (*bool)(nil), + Field: 63032, + Name: "gogoproto.goproto_registration", + Tag: "varint,63032,opt,name=goproto_registration,json=goprotoRegistration", + Filename: "gogo.proto", +} + +var E_MessagenameAll = &proto.ExtensionDesc{ + ExtendedType: (*descriptor.FileOptions)(nil), + ExtensionType: (*bool)(nil), + Field: 63033, + Name: "gogoproto.messagename_all", + Tag: "varint,63033,opt,name=messagename_all,json=messagenameAll", + Filename: "gogo.proto", +} + +var E_GoprotoGetters = &proto.ExtensionDesc{ + ExtendedType: (*descriptor.MessageOptions)(nil), + ExtensionType: (*bool)(nil), + Field: 64001, + Name: "gogoproto.goproto_getters", + Tag: "varint,64001,opt,name=goproto_getters,json=goprotoGetters", + Filename: "gogo.proto", +} + +var E_GoprotoStringer = &proto.ExtensionDesc{ + ExtendedType: (*descriptor.MessageOptions)(nil), + ExtensionType: (*bool)(nil), + Field: 64003, + Name: "gogoproto.goproto_stringer", + Tag: "varint,64003,opt,name=goproto_stringer,json=goprotoStringer", + Filename: "gogo.proto", +} + +var E_VerboseEqual = &proto.ExtensionDesc{ + ExtendedType: (*descriptor.MessageOptions)(nil), + ExtensionType: (*bool)(nil), + Field: 64004, + Name: "gogoproto.verbose_equal", + Tag: "varint,64004,opt,name=verbose_equal,json=verboseEqual", + Filename: "gogo.proto", +} + +var E_Face = &proto.ExtensionDesc{ + ExtendedType: (*descriptor.MessageOptions)(nil), + ExtensionType: (*bool)(nil), + Field: 64005, + Name: "gogoproto.face", + Tag: "varint,64005,opt,name=face", + Filename: "gogo.proto", +} + +var E_Gostring = &proto.ExtensionDesc{ + ExtendedType: (*descriptor.MessageOptions)(nil), + ExtensionType: (*bool)(nil), + Field: 64006, + Name: "gogoproto.gostring", + Tag: "varint,64006,opt,name=gostring", + Filename: "gogo.proto", +} + +var E_Populate = &proto.ExtensionDesc{ + ExtendedType: (*descriptor.MessageOptions)(nil), + ExtensionType: (*bool)(nil), + Field: 64007, + Name: "gogoproto.populate", + Tag: "varint,64007,opt,name=populate", + Filename: "gogo.proto", +} + +var E_Stringer = &proto.ExtensionDesc{ + ExtendedType: (*descriptor.MessageOptions)(nil), + ExtensionType: (*bool)(nil), + Field: 67008, + Name: "gogoproto.stringer", + Tag: "varint,67008,opt,name=stringer", + Filename: "gogo.proto", +} + +var E_Onlyone = &proto.ExtensionDesc{ + ExtendedType: (*descriptor.MessageOptions)(nil), + ExtensionType: (*bool)(nil), + Field: 64009, + Name: "gogoproto.onlyone", + Tag: "varint,64009,opt,name=onlyone", + Filename: "gogo.proto", +} + +var E_Equal = &proto.ExtensionDesc{ + ExtendedType: (*descriptor.MessageOptions)(nil), + ExtensionType: (*bool)(nil), + Field: 64013, + Name: "gogoproto.equal", + Tag: "varint,64013,opt,name=equal", + Filename: "gogo.proto", +} + +var E_Description = &proto.ExtensionDesc{ + ExtendedType: (*descriptor.MessageOptions)(nil), + ExtensionType: (*bool)(nil), + Field: 64014, + Name: "gogoproto.description", + Tag: "varint,64014,opt,name=description", + Filename: "gogo.proto", +} + +var E_Testgen = &proto.ExtensionDesc{ + ExtendedType: (*descriptor.MessageOptions)(nil), + ExtensionType: (*bool)(nil), + Field: 64015, + Name: "gogoproto.testgen", + Tag: "varint,64015,opt,name=testgen", + Filename: "gogo.proto", +} + +var E_Benchgen = &proto.ExtensionDesc{ + ExtendedType: (*descriptor.MessageOptions)(nil), + ExtensionType: (*bool)(nil), + Field: 64016, + Name: "gogoproto.benchgen", + Tag: "varint,64016,opt,name=benchgen", + Filename: "gogo.proto", +} + +var E_Marshaler = &proto.ExtensionDesc{ + ExtendedType: (*descriptor.MessageOptions)(nil), + ExtensionType: (*bool)(nil), + Field: 64017, + Name: "gogoproto.marshaler", + Tag: "varint,64017,opt,name=marshaler", + Filename: "gogo.proto", +} + +var E_Unmarshaler = &proto.ExtensionDesc{ + ExtendedType: (*descriptor.MessageOptions)(nil), + ExtensionType: (*bool)(nil), + Field: 64018, + Name: "gogoproto.unmarshaler", + Tag: "varint,64018,opt,name=unmarshaler", + Filename: "gogo.proto", +} + +var E_StableMarshaler = &proto.ExtensionDesc{ + ExtendedType: (*descriptor.MessageOptions)(nil), + ExtensionType: (*bool)(nil), + Field: 64019, + Name: "gogoproto.stable_marshaler", + Tag: "varint,64019,opt,name=stable_marshaler,json=stableMarshaler", + Filename: "gogo.proto", +} + +var E_Sizer = &proto.ExtensionDesc{ + ExtendedType: (*descriptor.MessageOptions)(nil), + ExtensionType: (*bool)(nil), + Field: 64020, + Name: "gogoproto.sizer", + Tag: "varint,64020,opt,name=sizer", + Filename: "gogo.proto", +} + +var E_UnsafeMarshaler = &proto.ExtensionDesc{ + ExtendedType: (*descriptor.MessageOptions)(nil), + ExtensionType: (*bool)(nil), + Field: 64023, + Name: "gogoproto.unsafe_marshaler", + Tag: "varint,64023,opt,name=unsafe_marshaler,json=unsafeMarshaler", + Filename: "gogo.proto", +} + +var E_UnsafeUnmarshaler = &proto.ExtensionDesc{ + ExtendedType: (*descriptor.MessageOptions)(nil), + ExtensionType: (*bool)(nil), + Field: 64024, + Name: "gogoproto.unsafe_unmarshaler", + Tag: "varint,64024,opt,name=unsafe_unmarshaler,json=unsafeUnmarshaler", + Filename: "gogo.proto", +} + +var E_GoprotoExtensionsMap = &proto.ExtensionDesc{ + ExtendedType: (*descriptor.MessageOptions)(nil), + ExtensionType: (*bool)(nil), + Field: 64025, + Name: "gogoproto.goproto_extensions_map", + Tag: "varint,64025,opt,name=goproto_extensions_map,json=goprotoExtensionsMap", + Filename: "gogo.proto", +} + +var E_GoprotoUnrecognized = &proto.ExtensionDesc{ + ExtendedType: (*descriptor.MessageOptions)(nil), + ExtensionType: (*bool)(nil), + Field: 64026, + Name: "gogoproto.goproto_unrecognized", + Tag: "varint,64026,opt,name=goproto_unrecognized,json=goprotoUnrecognized", + Filename: "gogo.proto", +} + +var E_Protosizer = &proto.ExtensionDesc{ + ExtendedType: (*descriptor.MessageOptions)(nil), + ExtensionType: (*bool)(nil), + Field: 64028, + Name: "gogoproto.protosizer", + Tag: "varint,64028,opt,name=protosizer", + Filename: "gogo.proto", +} + +var E_Compare = &proto.ExtensionDesc{ + ExtendedType: (*descriptor.MessageOptions)(nil), + ExtensionType: (*bool)(nil), + Field: 64029, + Name: "gogoproto.compare", + Tag: "varint,64029,opt,name=compare", + Filename: "gogo.proto", +} + +var E_Typedecl = &proto.ExtensionDesc{ + ExtendedType: (*descriptor.MessageOptions)(nil), + ExtensionType: (*bool)(nil), + Field: 64030, + Name: "gogoproto.typedecl", + Tag: "varint,64030,opt,name=typedecl", + Filename: "gogo.proto", +} + +var E_Messagename = &proto.ExtensionDesc{ + ExtendedType: (*descriptor.MessageOptions)(nil), + ExtensionType: (*bool)(nil), + Field: 64033, + Name: "gogoproto.messagename", + Tag: "varint,64033,opt,name=messagename", + Filename: "gogo.proto", +} + +var E_Nullable = &proto.ExtensionDesc{ + ExtendedType: (*descriptor.FieldOptions)(nil), + ExtensionType: (*bool)(nil), + Field: 65001, + Name: "gogoproto.nullable", + Tag: "varint,65001,opt,name=nullable", + Filename: "gogo.proto", +} + +var E_Embed = &proto.ExtensionDesc{ + ExtendedType: (*descriptor.FieldOptions)(nil), + ExtensionType: (*bool)(nil), + Field: 65002, + Name: "gogoproto.embed", + Tag: "varint,65002,opt,name=embed", + Filename: "gogo.proto", +} + +var E_Customtype = &proto.ExtensionDesc{ + ExtendedType: (*descriptor.FieldOptions)(nil), + ExtensionType: (*string)(nil), + Field: 65003, + Name: "gogoproto.customtype", + Tag: "bytes,65003,opt,name=customtype", + Filename: "gogo.proto", +} + +var E_Customname = &proto.ExtensionDesc{ + ExtendedType: (*descriptor.FieldOptions)(nil), + ExtensionType: (*string)(nil), + Field: 65004, + Name: "gogoproto.customname", + Tag: "bytes,65004,opt,name=customname", + Filename: "gogo.proto", +} + +var E_Jsontag = &proto.ExtensionDesc{ + ExtendedType: (*descriptor.FieldOptions)(nil), + ExtensionType: (*string)(nil), + Field: 65005, + Name: "gogoproto.jsontag", + Tag: "bytes,65005,opt,name=jsontag", + Filename: "gogo.proto", +} + +var E_Moretags = &proto.ExtensionDesc{ + ExtendedType: (*descriptor.FieldOptions)(nil), + ExtensionType: (*string)(nil), + Field: 65006, + Name: "gogoproto.moretags", + Tag: "bytes,65006,opt,name=moretags", + Filename: "gogo.proto", +} + +var E_Casttype = &proto.ExtensionDesc{ + ExtendedType: (*descriptor.FieldOptions)(nil), + ExtensionType: (*string)(nil), + Field: 65007, + Name: "gogoproto.casttype", + Tag: "bytes,65007,opt,name=casttype", + Filename: "gogo.proto", +} + +var E_Castkey = &proto.ExtensionDesc{ + ExtendedType: (*descriptor.FieldOptions)(nil), + ExtensionType: (*string)(nil), + Field: 65008, + Name: "gogoproto.castkey", + Tag: "bytes,65008,opt,name=castkey", + Filename: "gogo.proto", +} + +var E_Castvalue = &proto.ExtensionDesc{ + ExtendedType: (*descriptor.FieldOptions)(nil), + ExtensionType: (*string)(nil), + Field: 65009, + Name: "gogoproto.castvalue", + Tag: "bytes,65009,opt,name=castvalue", + Filename: "gogo.proto", +} + +var E_Stdtime = &proto.ExtensionDesc{ + ExtendedType: (*descriptor.FieldOptions)(nil), + ExtensionType: (*bool)(nil), + Field: 65010, + Name: "gogoproto.stdtime", + Tag: "varint,65010,opt,name=stdtime", + Filename: "gogo.proto", +} + +var E_Stdduration = &proto.ExtensionDesc{ + ExtendedType: (*descriptor.FieldOptions)(nil), + ExtensionType: (*bool)(nil), + Field: 65011, + Name: "gogoproto.stdduration", + Tag: "varint,65011,opt,name=stdduration", + Filename: "gogo.proto", +} + +func init() { + proto.RegisterExtension(E_GoprotoEnumPrefix) + proto.RegisterExtension(E_GoprotoEnumStringer) + proto.RegisterExtension(E_EnumStringer) + proto.RegisterExtension(E_EnumCustomname) + proto.RegisterExtension(E_Enumdecl) + proto.RegisterExtension(E_EnumvalueCustomname) + proto.RegisterExtension(E_GoprotoGettersAll) + proto.RegisterExtension(E_GoprotoEnumPrefixAll) + proto.RegisterExtension(E_GoprotoStringerAll) + proto.RegisterExtension(E_VerboseEqualAll) + proto.RegisterExtension(E_FaceAll) + proto.RegisterExtension(E_GostringAll) + proto.RegisterExtension(E_PopulateAll) + proto.RegisterExtension(E_StringerAll) + proto.RegisterExtension(E_OnlyoneAll) + proto.RegisterExtension(E_EqualAll) + proto.RegisterExtension(E_DescriptionAll) + proto.RegisterExtension(E_TestgenAll) + proto.RegisterExtension(E_BenchgenAll) + proto.RegisterExtension(E_MarshalerAll) + proto.RegisterExtension(E_UnmarshalerAll) + proto.RegisterExtension(E_StableMarshalerAll) + proto.RegisterExtension(E_SizerAll) + proto.RegisterExtension(E_GoprotoEnumStringerAll) + proto.RegisterExtension(E_EnumStringerAll) + proto.RegisterExtension(E_UnsafeMarshalerAll) + proto.RegisterExtension(E_UnsafeUnmarshalerAll) + proto.RegisterExtension(E_GoprotoExtensionsMapAll) + proto.RegisterExtension(E_GoprotoUnrecognizedAll) + proto.RegisterExtension(E_GogoprotoImport) + proto.RegisterExtension(E_ProtosizerAll) + proto.RegisterExtension(E_CompareAll) + proto.RegisterExtension(E_TypedeclAll) + proto.RegisterExtension(E_EnumdeclAll) + proto.RegisterExtension(E_GoprotoRegistration) + proto.RegisterExtension(E_MessagenameAll) + proto.RegisterExtension(E_GoprotoGetters) + proto.RegisterExtension(E_GoprotoStringer) + proto.RegisterExtension(E_VerboseEqual) + proto.RegisterExtension(E_Face) + proto.RegisterExtension(E_Gostring) + proto.RegisterExtension(E_Populate) + proto.RegisterExtension(E_Stringer) + proto.RegisterExtension(E_Onlyone) + proto.RegisterExtension(E_Equal) + proto.RegisterExtension(E_Description) + proto.RegisterExtension(E_Testgen) + proto.RegisterExtension(E_Benchgen) + proto.RegisterExtension(E_Marshaler) + proto.RegisterExtension(E_Unmarshaler) + proto.RegisterExtension(E_StableMarshaler) + proto.RegisterExtension(E_Sizer) + proto.RegisterExtension(E_UnsafeMarshaler) + proto.RegisterExtension(E_UnsafeUnmarshaler) + proto.RegisterExtension(E_GoprotoExtensionsMap) + proto.RegisterExtension(E_GoprotoUnrecognized) + proto.RegisterExtension(E_Protosizer) + proto.RegisterExtension(E_Compare) + proto.RegisterExtension(E_Typedecl) + proto.RegisterExtension(E_Messagename) + proto.RegisterExtension(E_Nullable) + proto.RegisterExtension(E_Embed) + proto.RegisterExtension(E_Customtype) + proto.RegisterExtension(E_Customname) + proto.RegisterExtension(E_Jsontag) + proto.RegisterExtension(E_Moretags) + proto.RegisterExtension(E_Casttype) + proto.RegisterExtension(E_Castkey) + proto.RegisterExtension(E_Castvalue) + proto.RegisterExtension(E_Stdtime) + proto.RegisterExtension(E_Stdduration) +} + +func init() { proto.RegisterFile("gogo.proto", fileDescriptor_gogo_68790841c0f79064) } + +var fileDescriptor_gogo_68790841c0f79064 = []byte{ + // 1246 bytes of a gzipped FileDescriptorProto + 0x1f, 0x8b, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0xff, 0x94, 0x98, 0x49, 0x6f, 0x1c, 0x45, + 0x14, 0x80, 0x85, 0x70, 0x64, 0xcf, 0xf3, 0x86, 0xc7, 0xc6, 0x84, 0x08, 0x44, 0xe0, 0xc4, 0xc9, + 0x3e, 0x45, 0x28, 0x65, 0x45, 0x96, 0x63, 0x39, 0x56, 0x10, 0x06, 0x63, 0xe2, 0xb0, 0x1d, 0x46, + 0x3d, 0x33, 0xe5, 0x76, 0x43, 0x77, 0xd7, 0xd0, 0x5d, 0x1d, 0xc5, 0xb9, 0xa1, 0xb0, 0x08, 0x21, + 0x76, 0x24, 0x48, 0x48, 0x02, 0x39, 0xb0, 0xaf, 0x61, 0xe7, 0xc6, 0x85, 0xe5, 0xca, 0x7f, 0xe0, + 0x02, 0x98, 0xdd, 0x37, 0x5f, 0xa2, 0xd7, 0xfd, 0x5e, 0x4f, 0xcd, 0x78, 0xa4, 0xaa, 0xb9, 0xb5, + 0xed, 0xfa, 0x3e, 0x57, 0xbf, 0x57, 0xf5, 0xde, 0x9b, 0x01, 0xf0, 0x95, 0xaf, 0x66, 0x5a, 0x89, + 0xd2, 0xaa, 0x5a, 0xc1, 0xe7, 0xfc, 0xf1, 0xc0, 0x41, 0x5f, 0x29, 0x3f, 0x94, 0xb3, 0xf9, 0x4f, + 0xf5, 0x6c, 0x63, 0xb6, 0x29, 0xd3, 0x46, 0x12, 0xb4, 0xb4, 0x4a, 0x8a, 0xc5, 0xe2, 0x6e, 0x98, + 0xa4, 0xc5, 0x35, 0x19, 0x67, 0x51, 0xad, 0x95, 0xc8, 0x8d, 0xe0, 0x74, 0xf5, 0xa6, 0x99, 0x82, + 0x9c, 0x61, 0x72, 0x66, 0x29, 0xce, 0xa2, 0x7b, 0x5a, 0x3a, 0x50, 0x71, 0xba, 0xff, 0xca, 0xaf, + 0xd7, 0x1e, 0xbc, 0xe6, 0xf6, 0xa1, 0xb5, 0x09, 0x42, 0xf1, 0x6f, 0xab, 0x39, 0x28, 0xd6, 0xe0, + 0xfa, 0x0e, 0x5f, 0xaa, 0x93, 0x20, 0xf6, 0x65, 0x62, 0x31, 0xfe, 0x40, 0xc6, 0x49, 0xc3, 0x78, + 0x1f, 0xa1, 0x62, 0x11, 0x46, 0xfb, 0x71, 0xfd, 0x48, 0xae, 0x11, 0x69, 0x4a, 0x96, 0x61, 0x3c, + 0x97, 0x34, 0xb2, 0x54, 0xab, 0x28, 0xf6, 0x22, 0x69, 0xd1, 0xfc, 0x94, 0x6b, 0x2a, 0x6b, 0x63, + 0x88, 0x2d, 0x96, 0x94, 0x10, 0x30, 0x84, 0xbf, 0x69, 0xca, 0x46, 0x68, 0x31, 0xfc, 0x4c, 0x1b, + 0x29, 0xd7, 0x8b, 0x93, 0x30, 0x85, 0xcf, 0xa7, 0xbc, 0x30, 0x93, 0xe6, 0x4e, 0x6e, 0xed, 0xe9, + 0x39, 0x89, 0xcb, 0x58, 0xf6, 0xcb, 0xd9, 0x81, 0x7c, 0x3b, 0x93, 0xa5, 0xc0, 0xd8, 0x93, 0x91, + 0x45, 0x5f, 0x6a, 0x2d, 0x93, 0xb4, 0xe6, 0x85, 0xbd, 0xb6, 0x77, 0x2c, 0x08, 0x4b, 0xe3, 0xb9, + 0xed, 0xce, 0x2c, 0x2e, 0x17, 0xe4, 0x42, 0x18, 0x8a, 0x75, 0xb8, 0xa1, 0xc7, 0xa9, 0x70, 0x70, + 0x9e, 0x27, 0xe7, 0xd4, 0x9e, 0x93, 0x81, 0xda, 0x55, 0xe0, 0xdf, 0x97, 0xb9, 0x74, 0x70, 0xbe, + 0x41, 0xce, 0x2a, 0xb1, 0x9c, 0x52, 0x34, 0xde, 0x09, 0x13, 0xa7, 0x64, 0x52, 0x57, 0xa9, 0xac, + 0xc9, 0xc7, 0x32, 0x2f, 0x74, 0xd0, 0x5d, 0x20, 0xdd, 0x38, 0x81, 0x4b, 0xc8, 0xa1, 0xeb, 0x30, + 0x0c, 0x6d, 0x78, 0x0d, 0xe9, 0xa0, 0xb8, 0x48, 0x8a, 0x41, 0x5c, 0x8f, 0xe8, 0x02, 0x8c, 0xf8, + 0xaa, 0x78, 0x25, 0x07, 0xfc, 0x12, 0xe1, 0xc3, 0xcc, 0x90, 0xa2, 0xa5, 0x5a, 0x59, 0xe8, 0x69, + 0x97, 0x1d, 0xbc, 0xc9, 0x0a, 0x66, 0x48, 0xd1, 0x47, 0x58, 0xdf, 0x62, 0x45, 0x6a, 0xc4, 0x73, + 0x1e, 0x86, 0x55, 0x1c, 0x6e, 0xa9, 0xd8, 0x65, 0x13, 0x97, 0xc9, 0x00, 0x84, 0xa0, 0x60, 0x0e, + 0x2a, 0xae, 0x89, 0x78, 0x7b, 0x9b, 0xaf, 0x07, 0x67, 0x60, 0x19, 0xc6, 0xb9, 0x40, 0x05, 0x2a, + 0x76, 0x50, 0xbc, 0x43, 0x8a, 0x31, 0x03, 0xa3, 0xd7, 0xd0, 0x32, 0xd5, 0xbe, 0x74, 0x91, 0xbc, + 0xcb, 0xaf, 0x41, 0x08, 0x85, 0xb2, 0x2e, 0xe3, 0xc6, 0xa6, 0x9b, 0xe1, 0x3d, 0x0e, 0x25, 0x33, + 0xa8, 0x58, 0x84, 0xd1, 0xc8, 0x4b, 0xd2, 0x4d, 0x2f, 0x74, 0x4a, 0xc7, 0xfb, 0xe4, 0x18, 0x29, + 0x21, 0x8a, 0x48, 0x16, 0xf7, 0xa3, 0xf9, 0x80, 0x23, 0x62, 0x60, 0x74, 0xf5, 0x52, 0xed, 0xd5, + 0x43, 0x59, 0xeb, 0xc7, 0xf6, 0x21, 0x5f, 0xbd, 0x82, 0x5d, 0x31, 0x8d, 0x73, 0x50, 0x49, 0x83, + 0x33, 0x4e, 0x9a, 0x8f, 0x38, 0xd3, 0x39, 0x80, 0xf0, 0x83, 0x70, 0x63, 0xcf, 0x36, 0xe1, 0x20, + 0xfb, 0x98, 0x64, 0xd3, 0x3d, 0x5a, 0x05, 0x95, 0x84, 0x7e, 0x95, 0x9f, 0x70, 0x49, 0x90, 0x5d, + 0xae, 0x55, 0x98, 0xca, 0xe2, 0xd4, 0xdb, 0xe8, 0x2f, 0x6a, 0x9f, 0x72, 0xd4, 0x0a, 0xb6, 0x23, + 0x6a, 0x27, 0x60, 0x9a, 0x8c, 0xfd, 0xe5, 0xf5, 0x33, 0x2e, 0xac, 0x05, 0xbd, 0xde, 0x99, 0xdd, + 0x87, 0xe1, 0x40, 0x19, 0xce, 0xd3, 0x5a, 0xc6, 0x29, 0x32, 0xb5, 0xc8, 0x6b, 0x39, 0x98, 0xaf, + 0x90, 0x99, 0x2b, 0xfe, 0x52, 0x29, 0x58, 0xf1, 0x5a, 0x28, 0x7f, 0x00, 0xf6, 0xb3, 0x3c, 0x8b, + 0x13, 0xd9, 0x50, 0x7e, 0x1c, 0x9c, 0x91, 0x4d, 0x07, 0xf5, 0xe7, 0x5d, 0xa9, 0x5a, 0x37, 0x70, + 0x34, 0x1f, 0x87, 0xeb, 0xca, 0x59, 0xa5, 0x16, 0x44, 0x2d, 0x95, 0x68, 0x8b, 0xf1, 0x0b, 0xce, + 0x54, 0xc9, 0x1d, 0xcf, 0x31, 0xb1, 0x04, 0x63, 0xf9, 0x8f, 0xae, 0x47, 0xf2, 0x4b, 0x12, 0x8d, + 0xb6, 0x29, 0x2a, 0x1c, 0x0d, 0x15, 0xb5, 0xbc, 0xc4, 0xa5, 0xfe, 0x7d, 0xc5, 0x85, 0x83, 0x10, + 0x2a, 0x1c, 0x7a, 0xab, 0x25, 0xb1, 0xdb, 0x3b, 0x18, 0xbe, 0xe6, 0xc2, 0xc1, 0x0c, 0x29, 0x78, + 0x60, 0x70, 0x50, 0x7c, 0xc3, 0x0a, 0x66, 0x50, 0x71, 0x6f, 0xbb, 0xd1, 0x26, 0xd2, 0x0f, 0x52, + 0x9d, 0x78, 0xb8, 0xda, 0xa2, 0xfa, 0x76, 0xbb, 0x73, 0x08, 0x5b, 0x33, 0x50, 0xac, 0x44, 0x91, + 0x4c, 0x53, 0xcf, 0x97, 0x38, 0x71, 0x38, 0x6c, 0xec, 0x3b, 0xae, 0x44, 0x06, 0x56, 0xdc, 0xcf, + 0xf1, 0xae, 0x59, 0xa5, 0x7a, 0xcb, 0x1e, 0xd1, 0x4a, 0xc1, 0xb0, 0xeb, 0xf1, 0x1d, 0x72, 0x75, + 0x8e, 0x2a, 0xe2, 0x2e, 0x3c, 0x40, 0x9d, 0x03, 0x85, 0x5d, 0x76, 0x76, 0xa7, 0x3c, 0x43, 0x1d, + 0xf3, 0x84, 0x38, 0x06, 0xa3, 0x1d, 0xc3, 0x84, 0x5d, 0xf5, 0x04, 0xa9, 0x46, 0xcc, 0x59, 0x42, + 0x1c, 0x82, 0x01, 0x1c, 0x0c, 0xec, 0xf8, 0x93, 0x84, 0xe7, 0xcb, 0xc5, 0x11, 0x18, 0xe2, 0x81, + 0xc0, 0x8e, 0x3e, 0x45, 0x68, 0x89, 0x20, 0xce, 0xc3, 0x80, 0x1d, 0x7f, 0x9a, 0x71, 0x46, 0x10, + 0x77, 0x0f, 0xe1, 0xf7, 0xcf, 0x0e, 0x50, 0x41, 0xe7, 0xd8, 0xcd, 0xc1, 0x20, 0x4d, 0x01, 0x76, + 0xfa, 0x19, 0xfa, 0xe7, 0x4c, 0x88, 0x3b, 0x60, 0x9f, 0x63, 0xc0, 0x9f, 0x23, 0xb4, 0x58, 0x2f, + 0x16, 0x61, 0xd8, 0xe8, 0xfc, 0x76, 0xfc, 0x79, 0xc2, 0x4d, 0x0a, 0xb7, 0x4e, 0x9d, 0xdf, 0x2e, + 0x78, 0x81, 0xb7, 0x4e, 0x04, 0x86, 0x8d, 0x9b, 0xbe, 0x9d, 0x7e, 0x91, 0xa3, 0xce, 0x88, 0x98, + 0x87, 0x4a, 0x59, 0xc8, 0xed, 0xfc, 0x4b, 0xc4, 0xb7, 0x19, 0x8c, 0x80, 0xd1, 0x48, 0xec, 0x8a, + 0x97, 0x39, 0x02, 0x06, 0x85, 0xd7, 0xa8, 0x7b, 0x38, 0xb0, 0x9b, 0x5e, 0xe1, 0x6b, 0xd4, 0x35, + 0x1b, 0x60, 0x36, 0xf3, 0x7a, 0x6a, 0x57, 0xbc, 0xca, 0xd9, 0xcc, 0xd7, 0xe3, 0x36, 0xba, 0xbb, + 0xad, 0xdd, 0xf1, 0x1a, 0x6f, 0xa3, 0xab, 0xd9, 0x8a, 0x55, 0xa8, 0xee, 0xed, 0xb4, 0x76, 0xdf, + 0xeb, 0xe4, 0x9b, 0xd8, 0xd3, 0x68, 0xc5, 0xfd, 0x30, 0xdd, 0xbb, 0xcb, 0xda, 0xad, 0xe7, 0x76, + 0xba, 0x3e, 0x17, 0x99, 0x4d, 0x56, 0x9c, 0x68, 0x97, 0x6b, 0xb3, 0xc3, 0xda, 0xb5, 0xe7, 0x77, + 0x3a, 0x2b, 0xb6, 0xd9, 0x60, 0xc5, 0x02, 0x40, 0xbb, 0xb9, 0xd9, 0x5d, 0x17, 0xc8, 0x65, 0x40, + 0x78, 0x35, 0xa8, 0xb7, 0xd9, 0xf9, 0x8b, 0x7c, 0x35, 0x88, 0xc0, 0xab, 0xc1, 0x6d, 0xcd, 0x4e, + 0x5f, 0xe2, 0xab, 0xc1, 0x08, 0x9e, 0x6c, 0xa3, 0x73, 0xd8, 0x0d, 0x97, 0xf9, 0x64, 0x1b, 0x94, + 0x98, 0x83, 0xa1, 0x38, 0x0b, 0x43, 0x3c, 0xa0, 0xd5, 0x9b, 0x7b, 0xb4, 0x2b, 0x19, 0x36, 0x99, + 0xff, 0x6d, 0x97, 0x76, 0xc0, 0x80, 0x38, 0x04, 0xfb, 0x64, 0x54, 0x97, 0x4d, 0x1b, 0xf9, 0xfb, + 0x2e, 0x17, 0x25, 0x5c, 0x2d, 0xe6, 0x01, 0x8a, 0x8f, 0xf6, 0xf8, 0x2a, 0x36, 0xf6, 0x8f, 0xdd, + 0xe2, 0x5b, 0x06, 0x03, 0x69, 0x0b, 0xf2, 0x17, 0xb7, 0x08, 0xb6, 0x3b, 0x05, 0xf9, 0x5b, 0x1f, + 0x86, 0xc1, 0x47, 0x52, 0x15, 0x6b, 0xcf, 0xb7, 0xd1, 0x7f, 0x12, 0xcd, 0xeb, 0x31, 0x60, 0x91, + 0x4a, 0xa4, 0xf6, 0xfc, 0xd4, 0xc6, 0xfe, 0x45, 0x6c, 0x09, 0x20, 0xdc, 0xf0, 0x52, 0xed, 0xf2, + 0xde, 0x7f, 0x33, 0xcc, 0x00, 0x6e, 0x1a, 0x9f, 0x1f, 0x95, 0x5b, 0x36, 0xf6, 0x1f, 0xde, 0x34, + 0xad, 0x17, 0x47, 0xa0, 0x82, 0x8f, 0xf9, 0xb7, 0x22, 0x36, 0xf8, 0x5f, 0x82, 0xdb, 0x04, 0xfe, + 0xe7, 0x54, 0x37, 0x75, 0x60, 0x0f, 0xf6, 0x7f, 0x94, 0x69, 0x5e, 0x2f, 0x16, 0x60, 0x38, 0xd5, + 0xcd, 0x66, 0x46, 0xf3, 0x95, 0x05, 0xff, 0x7f, 0xb7, 0xfc, 0xc8, 0x5d, 0x32, 0x47, 0x97, 0x60, + 0xb2, 0xa1, 0xa2, 0x6e, 0xf0, 0x28, 0x2c, 0xab, 0x65, 0xb5, 0x9a, 0x5f, 0xc5, 0x87, 0x6e, 0xf3, + 0x03, 0xbd, 0x99, 0xd5, 0x67, 0x1a, 0x2a, 0x9a, 0xc5, 0xc1, 0xb7, 0xfd, 0x7d, 0x5e, 0x39, 0x06, + 0x5f, 0x0d, 0x00, 0x00, 0xff, 0xff, 0x51, 0xf0, 0xa5, 0x95, 0x02, 0x14, 0x00, 0x00, +} diff --git a/vendor/github.com/gogo/protobuf/gogoproto/gogo.pb.golden b/vendor/github.com/gogo/protobuf/gogoproto/gogo.pb.golden new file mode 100644 index 000000000..f6502e4b9 --- /dev/null +++ b/vendor/github.com/gogo/protobuf/gogoproto/gogo.pb.golden @@ -0,0 +1,45 @@ +// Code generated by protoc-gen-go. +// source: gogo.proto +// DO NOT EDIT! + +package gogoproto + +import proto "github.com/gogo/protobuf/proto" +import json "encoding/json" +import math "math" +import google_protobuf "github.com/gogo/protobuf/protoc-gen-gogo/descriptor" + +// Reference proto, json, and math imports to suppress error if they are not otherwise used. +var _ = proto.Marshal +var _ = &json.SyntaxError{} +var _ = math.Inf + +var E_Nullable = &proto.ExtensionDesc{ + ExtendedType: (*google_protobuf.FieldOptions)(nil), + ExtensionType: (*bool)(nil), + Field: 51235, + Name: "gogoproto.nullable", + Tag: "varint,51235,opt,name=nullable", +} + +var E_Embed = &proto.ExtensionDesc{ + ExtendedType: (*google_protobuf.FieldOptions)(nil), + ExtensionType: (*bool)(nil), + Field: 51236, + Name: "gogoproto.embed", + Tag: "varint,51236,opt,name=embed", +} + +var E_Customtype = &proto.ExtensionDesc{ + ExtendedType: (*google_protobuf.FieldOptions)(nil), + ExtensionType: (*string)(nil), + Field: 51237, + Name: "gogoproto.customtype", + Tag: "bytes,51237,opt,name=customtype", +} + +func init() { + proto.RegisterExtension(E_Nullable) + proto.RegisterExtension(E_Embed) + proto.RegisterExtension(E_Customtype) +} diff --git a/vendor/github.com/gogo/protobuf/gogoproto/gogo.proto b/vendor/github.com/gogo/protobuf/gogoproto/gogo.proto new file mode 100644 index 000000000..bc8d889f1 --- /dev/null +++ b/vendor/github.com/gogo/protobuf/gogoproto/gogo.proto @@ -0,0 +1,136 @@ +// Protocol Buffers for Go with Gadgets +// +// Copyright (c) 2013, The GoGo Authors. All rights reserved. +// http://github.com/gogo/protobuf +// +// Redistribution and use in source and binary forms, with or without +// modification, are permitted provided that the following conditions are +// met: +// +// * Redistributions of source code must retain the above copyright +// notice, this list of conditions and the following disclaimer. +// * Redistributions in binary form must reproduce the above +// copyright notice, this list of conditions and the following disclaimer +// in the documentation and/or other materials provided with the +// distribution. +// +// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS +// "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT +// LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR +// A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT +// OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, +// SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT +// LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, +// DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY +// THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT +// (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE +// OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. + +syntax = "proto2"; +package gogoproto; + +import "google/protobuf/descriptor.proto"; + +option java_package = "com.google.protobuf"; +option java_outer_classname = "GoGoProtos"; +option go_package = "github.com/gogo/protobuf/gogoproto"; + +extend google.protobuf.EnumOptions { + optional bool goproto_enum_prefix = 62001; + optional bool goproto_enum_stringer = 62021; + optional bool enum_stringer = 62022; + optional string enum_customname = 62023; + optional bool enumdecl = 62024; +} + +extend google.protobuf.EnumValueOptions { + optional string enumvalue_customname = 66001; +} + +extend google.protobuf.FileOptions { + optional bool goproto_getters_all = 63001; + optional bool goproto_enum_prefix_all = 63002; + optional bool goproto_stringer_all = 63003; + optional bool verbose_equal_all = 63004; + optional bool face_all = 63005; + optional bool gostring_all = 63006; + optional bool populate_all = 63007; + optional bool stringer_all = 63008; + optional bool onlyone_all = 63009; + + optional bool equal_all = 63013; + optional bool description_all = 63014; + optional bool testgen_all = 63015; + optional bool benchgen_all = 63016; + optional bool marshaler_all = 63017; + optional bool unmarshaler_all = 63018; + optional bool stable_marshaler_all = 63019; + + optional bool sizer_all = 63020; + + optional bool goproto_enum_stringer_all = 63021; + optional bool enum_stringer_all = 63022; + + optional bool unsafe_marshaler_all = 63023; + optional bool unsafe_unmarshaler_all = 63024; + + optional bool goproto_extensions_map_all = 63025; + optional bool goproto_unrecognized_all = 63026; + optional bool gogoproto_import = 63027; + optional bool protosizer_all = 63028; + optional bool compare_all = 63029; + optional bool typedecl_all = 63030; + optional bool enumdecl_all = 63031; + + optional bool goproto_registration = 63032; + optional bool messagename_all = 63033; +} + +extend google.protobuf.MessageOptions { + optional bool goproto_getters = 64001; + optional bool goproto_stringer = 64003; + optional bool verbose_equal = 64004; + optional bool face = 64005; + optional bool gostring = 64006; + optional bool populate = 64007; + optional bool stringer = 67008; + optional bool onlyone = 64009; + + optional bool equal = 64013; + optional bool description = 64014; + optional bool testgen = 64015; + optional bool benchgen = 64016; + optional bool marshaler = 64017; + optional bool unmarshaler = 64018; + optional bool stable_marshaler = 64019; + + optional bool sizer = 64020; + + optional bool unsafe_marshaler = 64023; + optional bool unsafe_unmarshaler = 64024; + + optional bool goproto_extensions_map = 64025; + optional bool goproto_unrecognized = 64026; + + optional bool protosizer = 64028; + optional bool compare = 64029; + + optional bool typedecl = 64030; + + optional bool messagename = 64033; +} + +extend google.protobuf.FieldOptions { + optional bool nullable = 65001; + optional bool embed = 65002; + optional string customtype = 65003; + optional string customname = 65004; + optional string jsontag = 65005; + optional string moretags = 65006; + optional string casttype = 65007; + optional string castkey = 65008; + optional string castvalue = 65009; + + optional bool stdtime = 65010; + optional bool stdduration = 65011; +} diff --git a/vendor/github.com/gogo/protobuf/gogoproto/helper.go b/vendor/github.com/gogo/protobuf/gogoproto/helper.go new file mode 100644 index 000000000..22910c6d4 --- /dev/null +++ b/vendor/github.com/gogo/protobuf/gogoproto/helper.go @@ -0,0 +1,358 @@ +// Protocol Buffers for Go with Gadgets +// +// Copyright (c) 2013, The GoGo Authors. All rights reserved. +// http://github.com/gogo/protobuf +// +// Redistribution and use in source and binary forms, with or without +// modification, are permitted provided that the following conditions are +// met: +// +// * Redistributions of source code must retain the above copyright +// notice, this list of conditions and the following disclaimer. +// * Redistributions in binary form must reproduce the above +// copyright notice, this list of conditions and the following disclaimer +// in the documentation and/or other materials provided with the +// distribution. +// +// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS +// "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT +// LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR +// A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT +// OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, +// SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT +// LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, +// DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY +// THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT +// (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE +// OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. + +package gogoproto + +import google_protobuf "github.com/gogo/protobuf/protoc-gen-gogo/descriptor" +import proto "github.com/gogo/protobuf/proto" + +func IsEmbed(field *google_protobuf.FieldDescriptorProto) bool { + return proto.GetBoolExtension(field.Options, E_Embed, false) +} + +func IsNullable(field *google_protobuf.FieldDescriptorProto) bool { + return proto.GetBoolExtension(field.Options, E_Nullable, true) +} + +func IsStdTime(field *google_protobuf.FieldDescriptorProto) bool { + return proto.GetBoolExtension(field.Options, E_Stdtime, false) +} + +func IsStdDuration(field *google_protobuf.FieldDescriptorProto) bool { + return proto.GetBoolExtension(field.Options, E_Stdduration, false) +} + +func NeedsNilCheck(proto3 bool, field *google_protobuf.FieldDescriptorProto) bool { + nullable := IsNullable(field) + if field.IsMessage() || IsCustomType(field) { + return nullable + } + if proto3 { + return false + } + return nullable || *field.Type == google_protobuf.FieldDescriptorProto_TYPE_BYTES +} + +func IsCustomType(field *google_protobuf.FieldDescriptorProto) bool { + typ := GetCustomType(field) + if len(typ) > 0 { + return true + } + return false +} + +func IsCastType(field *google_protobuf.FieldDescriptorProto) bool { + typ := GetCastType(field) + if len(typ) > 0 { + return true + } + return false +} + +func IsCastKey(field *google_protobuf.FieldDescriptorProto) bool { + typ := GetCastKey(field) + if len(typ) > 0 { + return true + } + return false +} + +func IsCastValue(field *google_protobuf.FieldDescriptorProto) bool { + typ := GetCastValue(field) + if len(typ) > 0 { + return true + } + return false +} + +func HasEnumDecl(file *google_protobuf.FileDescriptorProto, enum *google_protobuf.EnumDescriptorProto) bool { + return proto.GetBoolExtension(enum.Options, E_Enumdecl, proto.GetBoolExtension(file.Options, E_EnumdeclAll, true)) +} + +func HasTypeDecl(file *google_protobuf.FileDescriptorProto, message *google_protobuf.DescriptorProto) bool { + return proto.GetBoolExtension(message.Options, E_Typedecl, proto.GetBoolExtension(file.Options, E_TypedeclAll, true)) +} + +func GetCustomType(field *google_protobuf.FieldDescriptorProto) string { + if field == nil { + return "" + } + if field.Options != nil { + v, err := proto.GetExtension(field.Options, E_Customtype) + if err == nil && v.(*string) != nil { + return *(v.(*string)) + } + } + return "" +} + +func GetCastType(field *google_protobuf.FieldDescriptorProto) string { + if field == nil { + return "" + } + if field.Options != nil { + v, err := proto.GetExtension(field.Options, E_Casttype) + if err == nil && v.(*string) != nil { + return *(v.(*string)) + } + } + return "" +} + +func GetCastKey(field *google_protobuf.FieldDescriptorProto) string { + if field == nil { + return "" + } + if field.Options != nil { + v, err := proto.GetExtension(field.Options, E_Castkey) + if err == nil && v.(*string) != nil { + return *(v.(*string)) + } + } + return "" +} + +func GetCastValue(field *google_protobuf.FieldDescriptorProto) string { + if field == nil { + return "" + } + if field.Options != nil { + v, err := proto.GetExtension(field.Options, E_Castvalue) + if err == nil && v.(*string) != nil { + return *(v.(*string)) + } + } + return "" +} + +func IsCustomName(field *google_protobuf.FieldDescriptorProto) bool { + name := GetCustomName(field) + if len(name) > 0 { + return true + } + return false +} + +func IsEnumCustomName(field *google_protobuf.EnumDescriptorProto) bool { + name := GetEnumCustomName(field) + if len(name) > 0 { + return true + } + return false +} + +func IsEnumValueCustomName(field *google_protobuf.EnumValueDescriptorProto) bool { + name := GetEnumValueCustomName(field) + if len(name) > 0 { + return true + } + return false +} + +func GetCustomName(field *google_protobuf.FieldDescriptorProto) string { + if field == nil { + return "" + } + if field.Options != nil { + v, err := proto.GetExtension(field.Options, E_Customname) + if err == nil && v.(*string) != nil { + return *(v.(*string)) + } + } + return "" +} + +func GetEnumCustomName(field *google_protobuf.EnumDescriptorProto) string { + if field == nil { + return "" + } + if field.Options != nil { + v, err := proto.GetExtension(field.Options, E_EnumCustomname) + if err == nil && v.(*string) != nil { + return *(v.(*string)) + } + } + return "" +} + +func GetEnumValueCustomName(field *google_protobuf.EnumValueDescriptorProto) string { + if field == nil { + return "" + } + if field.Options != nil { + v, err := proto.GetExtension(field.Options, E_EnumvalueCustomname) + if err == nil && v.(*string) != nil { + return *(v.(*string)) + } + } + return "" +} + +func GetJsonTag(field *google_protobuf.FieldDescriptorProto) *string { + if field == nil { + return nil + } + if field.Options != nil { + v, err := proto.GetExtension(field.Options, E_Jsontag) + if err == nil && v.(*string) != nil { + return (v.(*string)) + } + } + return nil +} + +func GetMoreTags(field *google_protobuf.FieldDescriptorProto) *string { + if field == nil { + return nil + } + if field.Options != nil { + v, err := proto.GetExtension(field.Options, E_Moretags) + if err == nil && v.(*string) != nil { + return (v.(*string)) + } + } + return nil +} + +type EnableFunc func(file *google_protobuf.FileDescriptorProto, message *google_protobuf.DescriptorProto) bool + +func EnabledGoEnumPrefix(file *google_protobuf.FileDescriptorProto, enum *google_protobuf.EnumDescriptorProto) bool { + return proto.GetBoolExtension(enum.Options, E_GoprotoEnumPrefix, proto.GetBoolExtension(file.Options, E_GoprotoEnumPrefixAll, true)) +} + +func EnabledGoStringer(file *google_protobuf.FileDescriptorProto, message *google_protobuf.DescriptorProto) bool { + return proto.GetBoolExtension(message.Options, E_GoprotoStringer, proto.GetBoolExtension(file.Options, E_GoprotoStringerAll, true)) +} + +func HasGoGetters(file *google_protobuf.FileDescriptorProto, message *google_protobuf.DescriptorProto) bool { + return proto.GetBoolExtension(message.Options, E_GoprotoGetters, proto.GetBoolExtension(file.Options, E_GoprotoGettersAll, true)) +} + +func IsUnion(file *google_protobuf.FileDescriptorProto, message *google_protobuf.DescriptorProto) bool { + return proto.GetBoolExtension(message.Options, E_Onlyone, proto.GetBoolExtension(file.Options, E_OnlyoneAll, false)) +} + +func HasGoString(file *google_protobuf.FileDescriptorProto, message *google_protobuf.DescriptorProto) bool { + return proto.GetBoolExtension(message.Options, E_Gostring, proto.GetBoolExtension(file.Options, E_GostringAll, false)) +} + +func HasEqual(file *google_protobuf.FileDescriptorProto, message *google_protobuf.DescriptorProto) bool { + return proto.GetBoolExtension(message.Options, E_Equal, proto.GetBoolExtension(file.Options, E_EqualAll, false)) +} + +func HasVerboseEqual(file *google_protobuf.FileDescriptorProto, message *google_protobuf.DescriptorProto) bool { + return proto.GetBoolExtension(message.Options, E_VerboseEqual, proto.GetBoolExtension(file.Options, E_VerboseEqualAll, false)) +} + +func IsStringer(file *google_protobuf.FileDescriptorProto, message *google_protobuf.DescriptorProto) bool { + return proto.GetBoolExtension(message.Options, E_Stringer, proto.GetBoolExtension(file.Options, E_StringerAll, false)) +} + +func IsFace(file *google_protobuf.FileDescriptorProto, message *google_protobuf.DescriptorProto) bool { + return proto.GetBoolExtension(message.Options, E_Face, proto.GetBoolExtension(file.Options, E_FaceAll, false)) +} + +func HasDescription(file *google_protobuf.FileDescriptorProto, message *google_protobuf.DescriptorProto) bool { + return proto.GetBoolExtension(message.Options, E_Description, proto.GetBoolExtension(file.Options, E_DescriptionAll, false)) +} + +func HasPopulate(file *google_protobuf.FileDescriptorProto, message *google_protobuf.DescriptorProto) bool { + return proto.GetBoolExtension(message.Options, E_Populate, proto.GetBoolExtension(file.Options, E_PopulateAll, false)) +} + +func HasTestGen(file *google_protobuf.FileDescriptorProto, message *google_protobuf.DescriptorProto) bool { + return proto.GetBoolExtension(message.Options, E_Testgen, proto.GetBoolExtension(file.Options, E_TestgenAll, false)) +} + +func HasBenchGen(file *google_protobuf.FileDescriptorProto, message *google_protobuf.DescriptorProto) bool { + return proto.GetBoolExtension(message.Options, E_Benchgen, proto.GetBoolExtension(file.Options, E_BenchgenAll, false)) +} + +func IsMarshaler(file *google_protobuf.FileDescriptorProto, message *google_protobuf.DescriptorProto) bool { + return proto.GetBoolExtension(message.Options, E_Marshaler, proto.GetBoolExtension(file.Options, E_MarshalerAll, false)) +} + +func IsUnmarshaler(file *google_protobuf.FileDescriptorProto, message *google_protobuf.DescriptorProto) bool { + return proto.GetBoolExtension(message.Options, E_Unmarshaler, proto.GetBoolExtension(file.Options, E_UnmarshalerAll, false)) +} + +func IsStableMarshaler(file *google_protobuf.FileDescriptorProto, message *google_protobuf.DescriptorProto) bool { + return proto.GetBoolExtension(message.Options, E_StableMarshaler, proto.GetBoolExtension(file.Options, E_StableMarshalerAll, false)) +} + +func IsSizer(file *google_protobuf.FileDescriptorProto, message *google_protobuf.DescriptorProto) bool { + return proto.GetBoolExtension(message.Options, E_Sizer, proto.GetBoolExtension(file.Options, E_SizerAll, false)) +} + +func IsProtoSizer(file *google_protobuf.FileDescriptorProto, message *google_protobuf.DescriptorProto) bool { + return proto.GetBoolExtension(message.Options, E_Protosizer, proto.GetBoolExtension(file.Options, E_ProtosizerAll, false)) +} + +func IsGoEnumStringer(file *google_protobuf.FileDescriptorProto, enum *google_protobuf.EnumDescriptorProto) bool { + return proto.GetBoolExtension(enum.Options, E_GoprotoEnumStringer, proto.GetBoolExtension(file.Options, E_GoprotoEnumStringerAll, true)) +} + +func IsEnumStringer(file *google_protobuf.FileDescriptorProto, enum *google_protobuf.EnumDescriptorProto) bool { + return proto.GetBoolExtension(enum.Options, E_EnumStringer, proto.GetBoolExtension(file.Options, E_EnumStringerAll, false)) +} + +func IsUnsafeMarshaler(file *google_protobuf.FileDescriptorProto, message *google_protobuf.DescriptorProto) bool { + return proto.GetBoolExtension(message.Options, E_UnsafeMarshaler, proto.GetBoolExtension(file.Options, E_UnsafeMarshalerAll, false)) +} + +func IsUnsafeUnmarshaler(file *google_protobuf.FileDescriptorProto, message *google_protobuf.DescriptorProto) bool { + return proto.GetBoolExtension(message.Options, E_UnsafeUnmarshaler, proto.GetBoolExtension(file.Options, E_UnsafeUnmarshalerAll, false)) +} + +func HasExtensionsMap(file *google_protobuf.FileDescriptorProto, message *google_protobuf.DescriptorProto) bool { + return proto.GetBoolExtension(message.Options, E_GoprotoExtensionsMap, proto.GetBoolExtension(file.Options, E_GoprotoExtensionsMapAll, true)) +} + +func HasUnrecognized(file *google_protobuf.FileDescriptorProto, message *google_protobuf.DescriptorProto) bool { + return proto.GetBoolExtension(message.Options, E_GoprotoUnrecognized, proto.GetBoolExtension(file.Options, E_GoprotoUnrecognizedAll, true)) +} + +func IsProto3(file *google_protobuf.FileDescriptorProto) bool { + return file.GetSyntax() == "proto3" +} + +func ImportsGoGoProto(file *google_protobuf.FileDescriptorProto) bool { + return proto.GetBoolExtension(file.Options, E_GogoprotoImport, true) +} + +func HasCompare(file *google_protobuf.FileDescriptorProto, message *google_protobuf.DescriptorProto) bool { + return proto.GetBoolExtension(message.Options, E_Compare, proto.GetBoolExtension(file.Options, E_CompareAll, false)) +} + +func RegistersGolangProto(file *google_protobuf.FileDescriptorProto) bool { + return proto.GetBoolExtension(file.Options, E_GoprotoRegistration, false) +} + +func HasMessageName(file *google_protobuf.FileDescriptorProto, message *google_protobuf.DescriptorProto) bool { + return proto.GetBoolExtension(message.Options, E_Messagename, proto.GetBoolExtension(file.Options, E_MessagenameAll, false)) +} diff --git a/vendor/github.com/gogo/protobuf/proto/Makefile b/vendor/github.com/gogo/protobuf/proto/Makefile new file mode 100644 index 000000000..00d65f327 --- /dev/null +++ b/vendor/github.com/gogo/protobuf/proto/Makefile @@ -0,0 +1,43 @@ +# Go support for Protocol Buffers - Google's data interchange format +# +# Copyright 2010 The Go Authors. All rights reserved. +# https://github.com/golang/protobuf +# +# Redistribution and use in source and binary forms, with or without +# modification, are permitted provided that the following conditions are +# met: +# +# * Redistributions of source code must retain the above copyright +# notice, this list of conditions and the following disclaimer. +# * Redistributions in binary form must reproduce the above +# copyright notice, this list of conditions and the following disclaimer +# in the documentation and/or other materials provided with the +# distribution. +# * Neither the name of Google Inc. nor the names of its +# contributors may be used to endorse or promote products derived from +# this software without specific prior written permission. +# +# THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS +# "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT +# LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR +# A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT +# OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, +# SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT +# LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, +# DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY +# THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT +# (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE +# OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. + +install: + go install + +test: install generate-test-pbs + go test + + +generate-test-pbs: + make install + make -C test_proto + make -C proto3_proto + make diff --git a/vendor/github.com/gogo/protobuf/proto/clone.go b/vendor/github.com/gogo/protobuf/proto/clone.go new file mode 100644 index 000000000..a26b046d9 --- /dev/null +++ b/vendor/github.com/gogo/protobuf/proto/clone.go @@ -0,0 +1,258 @@ +// Go support for Protocol Buffers - Google's data interchange format +// +// Copyright 2011 The Go Authors. All rights reserved. +// https://github.com/golang/protobuf +// +// Redistribution and use in source and binary forms, with or without +// modification, are permitted provided that the following conditions are +// met: +// +// * Redistributions of source code must retain the above copyright +// notice, this list of conditions and the following disclaimer. +// * Redistributions in binary form must reproduce the above +// copyright notice, this list of conditions and the following disclaimer +// in the documentation and/or other materials provided with the +// distribution. +// * Neither the name of Google Inc. nor the names of its +// contributors may be used to endorse or promote products derived from +// this software without specific prior written permission. +// +// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS +// "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT +// LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR +// A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT +// OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, +// SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT +// LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, +// DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY +// THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT +// (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE +// OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. + +// Protocol buffer deep copy and merge. +// TODO: RawMessage. + +package proto + +import ( + "fmt" + "log" + "reflect" + "strings" +) + +// Clone returns a deep copy of a protocol buffer. +func Clone(src Message) Message { + in := reflect.ValueOf(src) + if in.IsNil() { + return src + } + out := reflect.New(in.Type().Elem()) + dst := out.Interface().(Message) + Merge(dst, src) + return dst +} + +// Merger is the interface representing objects that can merge messages of the same type. +type Merger interface { + // Merge merges src into this message. + // Required and optional fields that are set in src will be set to that value in dst. + // Elements of repeated fields will be appended. + // + // Merge may panic if called with a different argument type than the receiver. + Merge(src Message) +} + +// generatedMerger is the custom merge method that generated protos will have. +// We must add this method since a generate Merge method will conflict with +// many existing protos that have a Merge data field already defined. +type generatedMerger interface { + XXX_Merge(src Message) +} + +// Merge merges src into dst. +// Required and optional fields that are set in src will be set to that value in dst. +// Elements of repeated fields will be appended. +// Merge panics if src and dst are not the same type, or if dst is nil. +func Merge(dst, src Message) { + if m, ok := dst.(Merger); ok { + m.Merge(src) + return + } + + in := reflect.ValueOf(src) + out := reflect.ValueOf(dst) + if out.IsNil() { + panic("proto: nil destination") + } + if in.Type() != out.Type() { + panic(fmt.Sprintf("proto.Merge(%T, %T) type mismatch", dst, src)) + } + if in.IsNil() { + return // Merge from nil src is a noop + } + if m, ok := dst.(generatedMerger); ok { + m.XXX_Merge(src) + return + } + mergeStruct(out.Elem(), in.Elem()) +} + +func mergeStruct(out, in reflect.Value) { + sprop := GetProperties(in.Type()) + for i := 0; i < in.NumField(); i++ { + f := in.Type().Field(i) + if strings.HasPrefix(f.Name, "XXX_") { + continue + } + mergeAny(out.Field(i), in.Field(i), false, sprop.Prop[i]) + } + + if emIn, ok := in.Addr().Interface().(extensionsBytes); ok { + emOut := out.Addr().Interface().(extensionsBytes) + bIn := emIn.GetExtensions() + bOut := emOut.GetExtensions() + *bOut = append(*bOut, *bIn...) + } else if emIn, err := extendable(in.Addr().Interface()); err == nil { + emOut, _ := extendable(out.Addr().Interface()) + mIn, muIn := emIn.extensionsRead() + if mIn != nil { + mOut := emOut.extensionsWrite() + muIn.Lock() + mergeExtension(mOut, mIn) + muIn.Unlock() + } + } + + uf := in.FieldByName("XXX_unrecognized") + if !uf.IsValid() { + return + } + uin := uf.Bytes() + if len(uin) > 0 { + out.FieldByName("XXX_unrecognized").SetBytes(append([]byte(nil), uin...)) + } +} + +// mergeAny performs a merge between two values of the same type. +// viaPtr indicates whether the values were indirected through a pointer (implying proto2). +// prop is set if this is a struct field (it may be nil). +func mergeAny(out, in reflect.Value, viaPtr bool, prop *Properties) { + if in.Type() == protoMessageType { + if !in.IsNil() { + if out.IsNil() { + out.Set(reflect.ValueOf(Clone(in.Interface().(Message)))) + } else { + Merge(out.Interface().(Message), in.Interface().(Message)) + } + } + return + } + switch in.Kind() { + case reflect.Bool, reflect.Float32, reflect.Float64, reflect.Int32, reflect.Int64, + reflect.String, reflect.Uint32, reflect.Uint64: + if !viaPtr && isProto3Zero(in) { + return + } + out.Set(in) + case reflect.Interface: + // Probably a oneof field; copy non-nil values. + if in.IsNil() { + return + } + // Allocate destination if it is not set, or set to a different type. + // Otherwise we will merge as normal. + if out.IsNil() || out.Elem().Type() != in.Elem().Type() { + out.Set(reflect.New(in.Elem().Elem().Type())) // interface -> *T -> T -> new(T) + } + mergeAny(out.Elem(), in.Elem(), false, nil) + case reflect.Map: + if in.Len() == 0 { + return + } + if out.IsNil() { + out.Set(reflect.MakeMap(in.Type())) + } + // For maps with value types of *T or []byte we need to deep copy each value. + elemKind := in.Type().Elem().Kind() + for _, key := range in.MapKeys() { + var val reflect.Value + switch elemKind { + case reflect.Ptr: + val = reflect.New(in.Type().Elem().Elem()) + mergeAny(val, in.MapIndex(key), false, nil) + case reflect.Slice: + val = in.MapIndex(key) + val = reflect.ValueOf(append([]byte{}, val.Bytes()...)) + default: + val = in.MapIndex(key) + } + out.SetMapIndex(key, val) + } + case reflect.Ptr: + if in.IsNil() { + return + } + if out.IsNil() { + out.Set(reflect.New(in.Elem().Type())) + } + mergeAny(out.Elem(), in.Elem(), true, nil) + case reflect.Slice: + if in.IsNil() { + return + } + if in.Type().Elem().Kind() == reflect.Uint8 { + // []byte is a scalar bytes field, not a repeated field. + + // Edge case: if this is in a proto3 message, a zero length + // bytes field is considered the zero value, and should not + // be merged. + if prop != nil && prop.proto3 && in.Len() == 0 { + return + } + + // Make a deep copy. + // Append to []byte{} instead of []byte(nil) so that we never end up + // with a nil result. + out.SetBytes(append([]byte{}, in.Bytes()...)) + return + } + n := in.Len() + if out.IsNil() { + out.Set(reflect.MakeSlice(in.Type(), 0, n)) + } + switch in.Type().Elem().Kind() { + case reflect.Bool, reflect.Float32, reflect.Float64, reflect.Int32, reflect.Int64, + reflect.String, reflect.Uint32, reflect.Uint64: + out.Set(reflect.AppendSlice(out, in)) + default: + for i := 0; i < n; i++ { + x := reflect.Indirect(reflect.New(in.Type().Elem())) + mergeAny(x, in.Index(i), false, nil) + out.Set(reflect.Append(out, x)) + } + } + case reflect.Struct: + mergeStruct(out, in) + default: + // unknown type, so not a protocol buffer + log.Printf("proto: don't know how to copy %v", in) + } +} + +func mergeExtension(out, in map[int32]Extension) { + for extNum, eIn := range in { + eOut := Extension{desc: eIn.desc} + if eIn.value != nil { + v := reflect.New(reflect.TypeOf(eIn.value)).Elem() + mergeAny(v, reflect.ValueOf(eIn.value), false, nil) + eOut.value = v.Interface() + } + if eIn.enc != nil { + eOut.enc = make([]byte, len(eIn.enc)) + copy(eOut.enc, eIn.enc) + } + + out[extNum] = eOut + } +} diff --git a/vendor/github.com/gogo/protobuf/proto/custom_gogo.go b/vendor/github.com/gogo/protobuf/proto/custom_gogo.go new file mode 100644 index 000000000..24552483c --- /dev/null +++ b/vendor/github.com/gogo/protobuf/proto/custom_gogo.go @@ -0,0 +1,39 @@ +// Protocol Buffers for Go with Gadgets +// +// Copyright (c) 2018, The GoGo Authors. All rights reserved. +// http://github.com/gogo/protobuf +// +// Redistribution and use in source and binary forms, with or without +// modification, are permitted provided that the following conditions are +// met: +// +// * Redistributions of source code must retain the above copyright +// notice, this list of conditions and the following disclaimer. +// * Redistributions in binary form must reproduce the above +// copyright notice, this list of conditions and the following disclaimer +// in the documentation and/or other materials provided with the +// distribution. +// +// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS +// "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT +// LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR +// A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT +// OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, +// SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT +// LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, +// DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY +// THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT +// (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE +// OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. + +package proto + +import "reflect" + +type custom interface { + Marshal() ([]byte, error) + Unmarshal(data []byte) error + Size() int +} + +var customType = reflect.TypeOf((*custom)(nil)).Elem() diff --git a/vendor/github.com/gogo/protobuf/proto/decode.go b/vendor/github.com/gogo/protobuf/proto/decode.go new file mode 100644 index 000000000..d9aa3c42d --- /dev/null +++ b/vendor/github.com/gogo/protobuf/proto/decode.go @@ -0,0 +1,428 @@ +// Go support for Protocol Buffers - Google's data interchange format +// +// Copyright 2010 The Go Authors. All rights reserved. +// https://github.com/golang/protobuf +// +// Redistribution and use in source and binary forms, with or without +// modification, are permitted provided that the following conditions are +// met: +// +// * Redistributions of source code must retain the above copyright +// notice, this list of conditions and the following disclaimer. +// * Redistributions in binary form must reproduce the above +// copyright notice, this list of conditions and the following disclaimer +// in the documentation and/or other materials provided with the +// distribution. +// * Neither the name of Google Inc. nor the names of its +// contributors may be used to endorse or promote products derived from +// this software without specific prior written permission. +// +// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS +// "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT +// LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR +// A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT +// OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, +// SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT +// LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, +// DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY +// THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT +// (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE +// OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. + +package proto + +/* + * Routines for decoding protocol buffer data to construct in-memory representations. + */ + +import ( + "errors" + "fmt" + "io" +) + +// errOverflow is returned when an integer is too large to be represented. +var errOverflow = errors.New("proto: integer overflow") + +// ErrInternalBadWireType is returned by generated code when an incorrect +// wire type is encountered. It does not get returned to user code. +var ErrInternalBadWireType = errors.New("proto: internal error: bad wiretype for oneof") + +// DecodeVarint reads a varint-encoded integer from the slice. +// It returns the integer and the number of bytes consumed, or +// zero if there is not enough. +// This is the format for the +// int32, int64, uint32, uint64, bool, and enum +// protocol buffer types. +func DecodeVarint(buf []byte) (x uint64, n int) { + for shift := uint(0); shift < 64; shift += 7 { + if n >= len(buf) { + return 0, 0 + } + b := uint64(buf[n]) + n++ + x |= (b & 0x7F) << shift + if (b & 0x80) == 0 { + return x, n + } + } + + // The number is too large to represent in a 64-bit value. + return 0, 0 +} + +func (p *Buffer) decodeVarintSlow() (x uint64, err error) { + i := p.index + l := len(p.buf) + + for shift := uint(0); shift < 64; shift += 7 { + if i >= l { + err = io.ErrUnexpectedEOF + return + } + b := p.buf[i] + i++ + x |= (uint64(b) & 0x7F) << shift + if b < 0x80 { + p.index = i + return + } + } + + // The number is too large to represent in a 64-bit value. + err = errOverflow + return +} + +// DecodeVarint reads a varint-encoded integer from the Buffer. +// This is the format for the +// int32, int64, uint32, uint64, bool, and enum +// protocol buffer types. +func (p *Buffer) DecodeVarint() (x uint64, err error) { + i := p.index + buf := p.buf + + if i >= len(buf) { + return 0, io.ErrUnexpectedEOF + } else if buf[i] < 0x80 { + p.index++ + return uint64(buf[i]), nil + } else if len(buf)-i < 10 { + return p.decodeVarintSlow() + } + + var b uint64 + // we already checked the first byte + x = uint64(buf[i]) - 0x80 + i++ + + b = uint64(buf[i]) + i++ + x += b << 7 + if b&0x80 == 0 { + goto done + } + x -= 0x80 << 7 + + b = uint64(buf[i]) + i++ + x += b << 14 + if b&0x80 == 0 { + goto done + } + x -= 0x80 << 14 + + b = uint64(buf[i]) + i++ + x += b << 21 + if b&0x80 == 0 { + goto done + } + x -= 0x80 << 21 + + b = uint64(buf[i]) + i++ + x += b << 28 + if b&0x80 == 0 { + goto done + } + x -= 0x80 << 28 + + b = uint64(buf[i]) + i++ + x += b << 35 + if b&0x80 == 0 { + goto done + } + x -= 0x80 << 35 + + b = uint64(buf[i]) + i++ + x += b << 42 + if b&0x80 == 0 { + goto done + } + x -= 0x80 << 42 + + b = uint64(buf[i]) + i++ + x += b << 49 + if b&0x80 == 0 { + goto done + } + x -= 0x80 << 49 + + b = uint64(buf[i]) + i++ + x += b << 56 + if b&0x80 == 0 { + goto done + } + x -= 0x80 << 56 + + b = uint64(buf[i]) + i++ + x += b << 63 + if b&0x80 == 0 { + goto done + } + // x -= 0x80 << 63 // Always zero. + + return 0, errOverflow + +done: + p.index = i + return x, nil +} + +// DecodeFixed64 reads a 64-bit integer from the Buffer. +// This is the format for the +// fixed64, sfixed64, and double protocol buffer types. +func (p *Buffer) DecodeFixed64() (x uint64, err error) { + // x, err already 0 + i := p.index + 8 + if i < 0 || i > len(p.buf) { + err = io.ErrUnexpectedEOF + return + } + p.index = i + + x = uint64(p.buf[i-8]) + x |= uint64(p.buf[i-7]) << 8 + x |= uint64(p.buf[i-6]) << 16 + x |= uint64(p.buf[i-5]) << 24 + x |= uint64(p.buf[i-4]) << 32 + x |= uint64(p.buf[i-3]) << 40 + x |= uint64(p.buf[i-2]) << 48 + x |= uint64(p.buf[i-1]) << 56 + return +} + +// DecodeFixed32 reads a 32-bit integer from the Buffer. +// This is the format for the +// fixed32, sfixed32, and float protocol buffer types. +func (p *Buffer) DecodeFixed32() (x uint64, err error) { + // x, err already 0 + i := p.index + 4 + if i < 0 || i > len(p.buf) { + err = io.ErrUnexpectedEOF + return + } + p.index = i + + x = uint64(p.buf[i-4]) + x |= uint64(p.buf[i-3]) << 8 + x |= uint64(p.buf[i-2]) << 16 + x |= uint64(p.buf[i-1]) << 24 + return +} + +// DecodeZigzag64 reads a zigzag-encoded 64-bit integer +// from the Buffer. +// This is the format used for the sint64 protocol buffer type. +func (p *Buffer) DecodeZigzag64() (x uint64, err error) { + x, err = p.DecodeVarint() + if err != nil { + return + } + x = (x >> 1) ^ uint64((int64(x&1)<<63)>>63) + return +} + +// DecodeZigzag32 reads a zigzag-encoded 32-bit integer +// from the Buffer. +// This is the format used for the sint32 protocol buffer type. +func (p *Buffer) DecodeZigzag32() (x uint64, err error) { + x, err = p.DecodeVarint() + if err != nil { + return + } + x = uint64((uint32(x) >> 1) ^ uint32((int32(x&1)<<31)>>31)) + return +} + +// DecodeRawBytes reads a count-delimited byte buffer from the Buffer. +// This is the format used for the bytes protocol buffer +// type and for embedded messages. +func (p *Buffer) DecodeRawBytes(alloc bool) (buf []byte, err error) { + n, err := p.DecodeVarint() + if err != nil { + return nil, err + } + + nb := int(n) + if nb < 0 { + return nil, fmt.Errorf("proto: bad byte length %d", nb) + } + end := p.index + nb + if end < p.index || end > len(p.buf) { + return nil, io.ErrUnexpectedEOF + } + + if !alloc { + // todo: check if can get more uses of alloc=false + buf = p.buf[p.index:end] + p.index += nb + return + } + + buf = make([]byte, nb) + copy(buf, p.buf[p.index:]) + p.index += nb + return +} + +// DecodeStringBytes reads an encoded string from the Buffer. +// This is the format used for the proto2 string type. +func (p *Buffer) DecodeStringBytes() (s string, err error) { + buf, err := p.DecodeRawBytes(false) + if err != nil { + return + } + return string(buf), nil +} + +// Unmarshaler is the interface representing objects that can +// unmarshal themselves. The argument points to data that may be +// overwritten, so implementations should not keep references to the +// buffer. +// Unmarshal implementations should not clear the receiver. +// Any unmarshaled data should be merged into the receiver. +// Callers of Unmarshal that do not want to retain existing data +// should Reset the receiver before calling Unmarshal. +type Unmarshaler interface { + Unmarshal([]byte) error +} + +// newUnmarshaler is the interface representing objects that can +// unmarshal themselves. The semantics are identical to Unmarshaler. +// +// This exists to support protoc-gen-go generated messages. +// The proto package will stop type-asserting to this interface in the future. +// +// DO NOT DEPEND ON THIS. +type newUnmarshaler interface { + XXX_Unmarshal([]byte) error +} + +// Unmarshal parses the protocol buffer representation in buf and places the +// decoded result in pb. If the struct underlying pb does not match +// the data in buf, the results can be unpredictable. +// +// Unmarshal resets pb before starting to unmarshal, so any +// existing data in pb is always removed. Use UnmarshalMerge +// to preserve and append to existing data. +func Unmarshal(buf []byte, pb Message) error { + pb.Reset() + if u, ok := pb.(newUnmarshaler); ok { + return u.XXX_Unmarshal(buf) + } + if u, ok := pb.(Unmarshaler); ok { + return u.Unmarshal(buf) + } + return NewBuffer(buf).Unmarshal(pb) +} + +// UnmarshalMerge parses the protocol buffer representation in buf and +// writes the decoded result to pb. If the struct underlying pb does not match +// the data in buf, the results can be unpredictable. +// +// UnmarshalMerge merges into existing data in pb. +// Most code should use Unmarshal instead. +func UnmarshalMerge(buf []byte, pb Message) error { + if u, ok := pb.(newUnmarshaler); ok { + return u.XXX_Unmarshal(buf) + } + if u, ok := pb.(Unmarshaler); ok { + // NOTE: The history of proto have unfortunately been inconsistent + // whether Unmarshaler should or should not implicitly clear itself. + // Some implementations do, most do not. + // Thus, calling this here may or may not do what people want. + // + // See https://github.com/golang/protobuf/issues/424 + return u.Unmarshal(buf) + } + return NewBuffer(buf).Unmarshal(pb) +} + +// DecodeMessage reads a count-delimited message from the Buffer. +func (p *Buffer) DecodeMessage(pb Message) error { + enc, err := p.DecodeRawBytes(false) + if err != nil { + return err + } + return NewBuffer(enc).Unmarshal(pb) +} + +// DecodeGroup reads a tag-delimited group from the Buffer. +// StartGroup tag is already consumed. This function consumes +// EndGroup tag. +func (p *Buffer) DecodeGroup(pb Message) error { + b := p.buf[p.index:] + x, y := findEndGroup(b) + if x < 0 { + return io.ErrUnexpectedEOF + } + err := Unmarshal(b[:x], pb) + p.index += y + return err +} + +// Unmarshal parses the protocol buffer representation in the +// Buffer and places the decoded result in pb. If the struct +// underlying pb does not match the data in the buffer, the results can be +// unpredictable. +// +// Unlike proto.Unmarshal, this does not reset pb before starting to unmarshal. +func (p *Buffer) Unmarshal(pb Message) error { + // If the object can unmarshal itself, let it. + if u, ok := pb.(newUnmarshaler); ok { + err := u.XXX_Unmarshal(p.buf[p.index:]) + p.index = len(p.buf) + return err + } + if u, ok := pb.(Unmarshaler); ok { + // NOTE: The history of proto have unfortunately been inconsistent + // whether Unmarshaler should or should not implicitly clear itself. + // Some implementations do, most do not. + // Thus, calling this here may or may not do what people want. + // + // See https://github.com/golang/protobuf/issues/424 + err := u.Unmarshal(p.buf[p.index:]) + p.index = len(p.buf) + return err + } + + // Slow workaround for messages that aren't Unmarshalers. + // This includes some hand-coded .pb.go files and + // bootstrap protos. + // TODO: fix all of those and then add Unmarshal to + // the Message interface. Then: + // The cast above and code below can be deleted. + // The old unmarshaler can be deleted. + // Clients can call Unmarshal directly (can already do that, actually). + var info InternalMessageInfo + err := info.Unmarshal(pb, p.buf[p.index:]) + p.index = len(p.buf) + return err +} diff --git a/vendor/github.com/gogo/protobuf/proto/discard.go b/vendor/github.com/gogo/protobuf/proto/discard.go new file mode 100644 index 000000000..fe1bd7d90 --- /dev/null +++ b/vendor/github.com/gogo/protobuf/proto/discard.go @@ -0,0 +1,350 @@ +// Go support for Protocol Buffers - Google's data interchange format +// +// Copyright 2017 The Go Authors. All rights reserved. +// https://github.com/golang/protobuf +// +// Redistribution and use in source and binary forms, with or without +// modification, are permitted provided that the following conditions are +// met: +// +// * Redistributions of source code must retain the above copyright +// notice, this list of conditions and the following disclaimer. +// * Redistributions in binary form must reproduce the above +// copyright notice, this list of conditions and the following disclaimer +// in the documentation and/or other materials provided with the +// distribution. +// * Neither the name of Google Inc. nor the names of its +// contributors may be used to endorse or promote products derived from +// this software without specific prior written permission. +// +// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS +// "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT +// LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR +// A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT +// OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, +// SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT +// LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, +// DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY +// THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT +// (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE +// OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. + +package proto + +import ( + "fmt" + "reflect" + "strings" + "sync" + "sync/atomic" +) + +type generatedDiscarder interface { + XXX_DiscardUnknown() +} + +// DiscardUnknown recursively discards all unknown fields from this message +// and all embedded messages. +// +// When unmarshaling a message with unrecognized fields, the tags and values +// of such fields are preserved in the Message. This allows a later call to +// marshal to be able to produce a message that continues to have those +// unrecognized fields. To avoid this, DiscardUnknown is used to +// explicitly clear the unknown fields after unmarshaling. +// +// For proto2 messages, the unknown fields of message extensions are only +// discarded from messages that have been accessed via GetExtension. +func DiscardUnknown(m Message) { + if m, ok := m.(generatedDiscarder); ok { + m.XXX_DiscardUnknown() + return + } + // TODO: Dynamically populate a InternalMessageInfo for legacy messages, + // but the master branch has no implementation for InternalMessageInfo, + // so it would be more work to replicate that approach. + discardLegacy(m) +} + +// DiscardUnknown recursively discards all unknown fields. +func (a *InternalMessageInfo) DiscardUnknown(m Message) { + di := atomicLoadDiscardInfo(&a.discard) + if di == nil { + di = getDiscardInfo(reflect.TypeOf(m).Elem()) + atomicStoreDiscardInfo(&a.discard, di) + } + di.discard(toPointer(&m)) +} + +type discardInfo struct { + typ reflect.Type + + initialized int32 // 0: only typ is valid, 1: everything is valid + lock sync.Mutex + + fields []discardFieldInfo + unrecognized field +} + +type discardFieldInfo struct { + field field // Offset of field, guaranteed to be valid + discard func(src pointer) +} + +var ( + discardInfoMap = map[reflect.Type]*discardInfo{} + discardInfoLock sync.Mutex +) + +func getDiscardInfo(t reflect.Type) *discardInfo { + discardInfoLock.Lock() + defer discardInfoLock.Unlock() + di := discardInfoMap[t] + if di == nil { + di = &discardInfo{typ: t} + discardInfoMap[t] = di + } + return di +} + +func (di *discardInfo) discard(src pointer) { + if src.isNil() { + return // Nothing to do. + } + + if atomic.LoadInt32(&di.initialized) == 0 { + di.computeDiscardInfo() + } + + for _, fi := range di.fields { + sfp := src.offset(fi.field) + fi.discard(sfp) + } + + // For proto2 messages, only discard unknown fields in message extensions + // that have been accessed via GetExtension. + if em, err := extendable(src.asPointerTo(di.typ).Interface()); err == nil { + // Ignore lock since DiscardUnknown is not concurrency safe. + emm, _ := em.extensionsRead() + for _, mx := range emm { + if m, ok := mx.value.(Message); ok { + DiscardUnknown(m) + } + } + } + + if di.unrecognized.IsValid() { + *src.offset(di.unrecognized).toBytes() = nil + } +} + +func (di *discardInfo) computeDiscardInfo() { + di.lock.Lock() + defer di.lock.Unlock() + if di.initialized != 0 { + return + } + t := di.typ + n := t.NumField() + + for i := 0; i < n; i++ { + f := t.Field(i) + if strings.HasPrefix(f.Name, "XXX_") { + continue + } + + dfi := discardFieldInfo{field: toField(&f)} + tf := f.Type + + // Unwrap tf to get its most basic type. + var isPointer, isSlice bool + if tf.Kind() == reflect.Slice && tf.Elem().Kind() != reflect.Uint8 { + isSlice = true + tf = tf.Elem() + } + if tf.Kind() == reflect.Ptr { + isPointer = true + tf = tf.Elem() + } + if isPointer && isSlice && tf.Kind() != reflect.Struct { + panic(fmt.Sprintf("%v.%s cannot be a slice of pointers to primitive types", t, f.Name)) + } + + switch tf.Kind() { + case reflect.Struct: + switch { + case !isPointer: + panic(fmt.Sprintf("%v.%s cannot be a direct struct value", t, f.Name)) + case isSlice: // E.g., []*pb.T + discardInfo := getDiscardInfo(tf) + dfi.discard = func(src pointer) { + sps := src.getPointerSlice() + for _, sp := range sps { + if !sp.isNil() { + discardInfo.discard(sp) + } + } + } + default: // E.g., *pb.T + discardInfo := getDiscardInfo(tf) + dfi.discard = func(src pointer) { + sp := src.getPointer() + if !sp.isNil() { + discardInfo.discard(sp) + } + } + } + case reflect.Map: + switch { + case isPointer || isSlice: + panic(fmt.Sprintf("%v.%s cannot be a pointer to a map or a slice of map values", t, f.Name)) + default: // E.g., map[K]V + if tf.Elem().Kind() == reflect.Ptr { // Proto struct (e.g., *T) + dfi.discard = func(src pointer) { + sm := src.asPointerTo(tf).Elem() + if sm.Len() == 0 { + return + } + for _, key := range sm.MapKeys() { + val := sm.MapIndex(key) + DiscardUnknown(val.Interface().(Message)) + } + } + } else { + dfi.discard = func(pointer) {} // Noop + } + } + case reflect.Interface: + // Must be oneof field. + switch { + case isPointer || isSlice: + panic(fmt.Sprintf("%v.%s cannot be a pointer to a interface or a slice of interface values", t, f.Name)) + default: // E.g., interface{} + // TODO: Make this faster? + dfi.discard = func(src pointer) { + su := src.asPointerTo(tf).Elem() + if !su.IsNil() { + sv := su.Elem().Elem().Field(0) + if sv.Kind() == reflect.Ptr && sv.IsNil() { + return + } + switch sv.Type().Kind() { + case reflect.Ptr: // Proto struct (e.g., *T) + DiscardUnknown(sv.Interface().(Message)) + } + } + } + } + default: + continue + } + di.fields = append(di.fields, dfi) + } + + di.unrecognized = invalidField + if f, ok := t.FieldByName("XXX_unrecognized"); ok { + if f.Type != reflect.TypeOf([]byte{}) { + panic("expected XXX_unrecognized to be of type []byte") + } + di.unrecognized = toField(&f) + } + + atomic.StoreInt32(&di.initialized, 1) +} + +func discardLegacy(m Message) { + v := reflect.ValueOf(m) + if v.Kind() != reflect.Ptr || v.IsNil() { + return + } + v = v.Elem() + if v.Kind() != reflect.Struct { + return + } + t := v.Type() + + for i := 0; i < v.NumField(); i++ { + f := t.Field(i) + if strings.HasPrefix(f.Name, "XXX_") { + continue + } + vf := v.Field(i) + tf := f.Type + + // Unwrap tf to get its most basic type. + var isPointer, isSlice bool + if tf.Kind() == reflect.Slice && tf.Elem().Kind() != reflect.Uint8 { + isSlice = true + tf = tf.Elem() + } + if tf.Kind() == reflect.Ptr { + isPointer = true + tf = tf.Elem() + } + if isPointer && isSlice && tf.Kind() != reflect.Struct { + panic(fmt.Sprintf("%T.%s cannot be a slice of pointers to primitive types", m, f.Name)) + } + + switch tf.Kind() { + case reflect.Struct: + switch { + case !isPointer: + panic(fmt.Sprintf("%T.%s cannot be a direct struct value", m, f.Name)) + case isSlice: // E.g., []*pb.T + for j := 0; j < vf.Len(); j++ { + discardLegacy(vf.Index(j).Interface().(Message)) + } + default: // E.g., *pb.T + discardLegacy(vf.Interface().(Message)) + } + case reflect.Map: + switch { + case isPointer || isSlice: + panic(fmt.Sprintf("%T.%s cannot be a pointer to a map or a slice of map values", m, f.Name)) + default: // E.g., map[K]V + tv := vf.Type().Elem() + if tv.Kind() == reflect.Ptr && tv.Implements(protoMessageType) { // Proto struct (e.g., *T) + for _, key := range vf.MapKeys() { + val := vf.MapIndex(key) + discardLegacy(val.Interface().(Message)) + } + } + } + case reflect.Interface: + // Must be oneof field. + switch { + case isPointer || isSlice: + panic(fmt.Sprintf("%T.%s cannot be a pointer to a interface or a slice of interface values", m, f.Name)) + default: // E.g., test_proto.isCommunique_Union interface + if !vf.IsNil() && f.Tag.Get("protobuf_oneof") != "" { + vf = vf.Elem() // E.g., *test_proto.Communique_Msg + if !vf.IsNil() { + vf = vf.Elem() // E.g., test_proto.Communique_Msg + vf = vf.Field(0) // E.g., Proto struct (e.g., *T) or primitive value + if vf.Kind() == reflect.Ptr { + discardLegacy(vf.Interface().(Message)) + } + } + } + } + } + } + + if vf := v.FieldByName("XXX_unrecognized"); vf.IsValid() { + if vf.Type() != reflect.TypeOf([]byte{}) { + panic("expected XXX_unrecognized to be of type []byte") + } + vf.Set(reflect.ValueOf([]byte(nil))) + } + + // For proto2 messages, only discard unknown fields in message extensions + // that have been accessed via GetExtension. + if em, err := extendable(m); err == nil { + // Ignore lock since discardLegacy is not concurrency safe. + emm, _ := em.extensionsRead() + for _, mx := range emm { + if m, ok := mx.value.(Message); ok { + discardLegacy(m) + } + } + } +} diff --git a/vendor/github.com/gogo/protobuf/proto/duration.go b/vendor/github.com/gogo/protobuf/proto/duration.go new file mode 100644 index 000000000..93464c91c --- /dev/null +++ b/vendor/github.com/gogo/protobuf/proto/duration.go @@ -0,0 +1,100 @@ +// Go support for Protocol Buffers - Google's data interchange format +// +// Copyright 2016 The Go Authors. All rights reserved. +// https://github.com/golang/protobuf +// +// Redistribution and use in source and binary forms, with or without +// modification, are permitted provided that the following conditions are +// met: +// +// * Redistributions of source code must retain the above copyright +// notice, this list of conditions and the following disclaimer. +// * Redistributions in binary form must reproduce the above +// copyright notice, this list of conditions and the following disclaimer +// in the documentation and/or other materials provided with the +// distribution. +// * Neither the name of Google Inc. nor the names of its +// contributors may be used to endorse or promote products derived from +// this software without specific prior written permission. +// +// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS +// "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT +// LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR +// A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT +// OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, +// SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT +// LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, +// DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY +// THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT +// (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE +// OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. + +package proto + +// This file implements conversions between google.protobuf.Duration +// and time.Duration. + +import ( + "errors" + "fmt" + "time" +) + +const ( + // Range of a Duration in seconds, as specified in + // google/protobuf/duration.proto. This is about 10,000 years in seconds. + maxSeconds = int64(10000 * 365.25 * 24 * 60 * 60) + minSeconds = -maxSeconds +) + +// validateDuration determines whether the Duration is valid according to the +// definition in google/protobuf/duration.proto. A valid Duration +// may still be too large to fit into a time.Duration (the range of Duration +// is about 10,000 years, and the range of time.Duration is about 290). +func validateDuration(d *duration) error { + if d == nil { + return errors.New("duration: nil Duration") + } + if d.Seconds < minSeconds || d.Seconds > maxSeconds { + return fmt.Errorf("duration: %#v: seconds out of range", d) + } + if d.Nanos <= -1e9 || d.Nanos >= 1e9 { + return fmt.Errorf("duration: %#v: nanos out of range", d) + } + // Seconds and Nanos must have the same sign, unless d.Nanos is zero. + if (d.Seconds < 0 && d.Nanos > 0) || (d.Seconds > 0 && d.Nanos < 0) { + return fmt.Errorf("duration: %#v: seconds and nanos have different signs", d) + } + return nil +} + +// DurationFromProto converts a Duration to a time.Duration. DurationFromProto +// returns an error if the Duration is invalid or is too large to be +// represented in a time.Duration. +func durationFromProto(p *duration) (time.Duration, error) { + if err := validateDuration(p); err != nil { + return 0, err + } + d := time.Duration(p.Seconds) * time.Second + if int64(d/time.Second) != p.Seconds { + return 0, fmt.Errorf("duration: %#v is out of range for time.Duration", p) + } + if p.Nanos != 0 { + d += time.Duration(p.Nanos) + if (d < 0) != (p.Nanos < 0) { + return 0, fmt.Errorf("duration: %#v is out of range for time.Duration", p) + } + } + return d, nil +} + +// DurationProto converts a time.Duration to a Duration. +func durationProto(d time.Duration) *duration { + nanos := d.Nanoseconds() + secs := nanos / 1e9 + nanos -= secs * 1e9 + return &duration{ + Seconds: secs, + Nanos: int32(nanos), + } +} diff --git a/vendor/github.com/gogo/protobuf/proto/duration_gogo.go b/vendor/github.com/gogo/protobuf/proto/duration_gogo.go new file mode 100644 index 000000000..e748e1730 --- /dev/null +++ b/vendor/github.com/gogo/protobuf/proto/duration_gogo.go @@ -0,0 +1,49 @@ +// Protocol Buffers for Go with Gadgets +// +// Copyright (c) 2016, The GoGo Authors. All rights reserved. +// http://github.com/gogo/protobuf +// +// Redistribution and use in source and binary forms, with or without +// modification, are permitted provided that the following conditions are +// met: +// +// * Redistributions of source code must retain the above copyright +// notice, this list of conditions and the following disclaimer. +// * Redistributions in binary form must reproduce the above +// copyright notice, this list of conditions and the following disclaimer +// in the documentation and/or other materials provided with the +// distribution. +// +// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS +// "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT +// LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR +// A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT +// OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, +// SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT +// LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, +// DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY +// THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT +// (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE +// OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. + +package proto + +import ( + "reflect" + "time" +) + +var durationType = reflect.TypeOf((*time.Duration)(nil)).Elem() + +type duration struct { + Seconds int64 `protobuf:"varint,1,opt,name=seconds,proto3" json:"seconds,omitempty"` + Nanos int32 `protobuf:"varint,2,opt,name=nanos,proto3" json:"nanos,omitempty"` +} + +func (m *duration) Reset() { *m = duration{} } +func (*duration) ProtoMessage() {} +func (*duration) String() string { return "duration" } + +func init() { + RegisterType((*duration)(nil), "gogo.protobuf.proto.duration") +} diff --git a/vendor/github.com/gogo/protobuf/proto/encode.go b/vendor/github.com/gogo/protobuf/proto/encode.go new file mode 100644 index 000000000..4c35d3373 --- /dev/null +++ b/vendor/github.com/gogo/protobuf/proto/encode.go @@ -0,0 +1,218 @@ +// Go support for Protocol Buffers - Google's data interchange format +// +// Copyright 2010 The Go Authors. All rights reserved. +// https://github.com/golang/protobuf +// +// Redistribution and use in source and binary forms, with or without +// modification, are permitted provided that the following conditions are +// met: +// +// * Redistributions of source code must retain the above copyright +// notice, this list of conditions and the following disclaimer. +// * Redistributions in binary form must reproduce the above +// copyright notice, this list of conditions and the following disclaimer +// in the documentation and/or other materials provided with the +// distribution. +// * Neither the name of Google Inc. nor the names of its +// contributors may be used to endorse or promote products derived from +// this software without specific prior written permission. +// +// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS +// "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT +// LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR +// A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT +// OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, +// SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT +// LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, +// DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY +// THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT +// (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE +// OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. + +package proto + +/* + * Routines for encoding data into the wire format for protocol buffers. + */ + +import ( + "errors" + "fmt" + "reflect" +) + +// RequiredNotSetError is an error type returned by either Marshal or Unmarshal. +// Marshal reports this when a required field is not initialized. +// Unmarshal reports this when a required field is missing from the wire data. +type RequiredNotSetError struct { + field string +} + +func (e *RequiredNotSetError) Error() string { + if e.field == "" { + return fmt.Sprintf("proto: required field not set") + } + return fmt.Sprintf("proto: required field %q not set", e.field) +} + +var ( + // errRepeatedHasNil is the error returned if Marshal is called with + // a struct with a repeated field containing a nil element. + errRepeatedHasNil = errors.New("proto: repeated field has nil element") + + // errOneofHasNil is the error returned if Marshal is called with + // a struct with a oneof field containing a nil element. + errOneofHasNil = errors.New("proto: oneof field has nil value") + + // ErrNil is the error returned if Marshal is called with nil. + ErrNil = errors.New("proto: Marshal called with nil") + + // ErrTooLarge is the error returned if Marshal is called with a + // message that encodes to >2GB. + ErrTooLarge = errors.New("proto: message encodes to over 2 GB") +) + +// The fundamental encoders that put bytes on the wire. +// Those that take integer types all accept uint64 and are +// therefore of type valueEncoder. + +const maxVarintBytes = 10 // maximum length of a varint + +// EncodeVarint returns the varint encoding of x. +// This is the format for the +// int32, int64, uint32, uint64, bool, and enum +// protocol buffer types. +// Not used by the package itself, but helpful to clients +// wishing to use the same encoding. +func EncodeVarint(x uint64) []byte { + var buf [maxVarintBytes]byte + var n int + for n = 0; x > 127; n++ { + buf[n] = 0x80 | uint8(x&0x7F) + x >>= 7 + } + buf[n] = uint8(x) + n++ + return buf[0:n] +} + +// EncodeVarint writes a varint-encoded integer to the Buffer. +// This is the format for the +// int32, int64, uint32, uint64, bool, and enum +// protocol buffer types. +func (p *Buffer) EncodeVarint(x uint64) error { + for x >= 1<<7 { + p.buf = append(p.buf, uint8(x&0x7f|0x80)) + x >>= 7 + } + p.buf = append(p.buf, uint8(x)) + return nil +} + +// SizeVarint returns the varint encoding size of an integer. +func SizeVarint(x uint64) int { + switch { + case x < 1<<7: + return 1 + case x < 1<<14: + return 2 + case x < 1<<21: + return 3 + case x < 1<<28: + return 4 + case x < 1<<35: + return 5 + case x < 1<<42: + return 6 + case x < 1<<49: + return 7 + case x < 1<<56: + return 8 + case x < 1<<63: + return 9 + } + return 10 +} + +// EncodeFixed64 writes a 64-bit integer to the Buffer. +// This is the format for the +// fixed64, sfixed64, and double protocol buffer types. +func (p *Buffer) EncodeFixed64(x uint64) error { + p.buf = append(p.buf, + uint8(x), + uint8(x>>8), + uint8(x>>16), + uint8(x>>24), + uint8(x>>32), + uint8(x>>40), + uint8(x>>48), + uint8(x>>56)) + return nil +} + +// EncodeFixed32 writes a 32-bit integer to the Buffer. +// This is the format for the +// fixed32, sfixed32, and float protocol buffer types. +func (p *Buffer) EncodeFixed32(x uint64) error { + p.buf = append(p.buf, + uint8(x), + uint8(x>>8), + uint8(x>>16), + uint8(x>>24)) + return nil +} + +// EncodeZigzag64 writes a zigzag-encoded 64-bit integer +// to the Buffer. +// This is the format used for the sint64 protocol buffer type. +func (p *Buffer) EncodeZigzag64(x uint64) error { + // use signed number to get arithmetic right shift. + return p.EncodeVarint(uint64((x << 1) ^ uint64((int64(x) >> 63)))) +} + +// EncodeZigzag32 writes a zigzag-encoded 32-bit integer +// to the Buffer. +// This is the format used for the sint32 protocol buffer type. +func (p *Buffer) EncodeZigzag32(x uint64) error { + // use signed number to get arithmetic right shift. + return p.EncodeVarint(uint64((uint32(x) << 1) ^ uint32((int32(x) >> 31)))) +} + +// EncodeRawBytes writes a count-delimited byte buffer to the Buffer. +// This is the format used for the bytes protocol buffer +// type and for embedded messages. +func (p *Buffer) EncodeRawBytes(b []byte) error { + p.EncodeVarint(uint64(len(b))) + p.buf = append(p.buf, b...) + return nil +} + +// EncodeStringBytes writes an encoded string to the Buffer. +// This is the format used for the proto2 string type. +func (p *Buffer) EncodeStringBytes(s string) error { + p.EncodeVarint(uint64(len(s))) + p.buf = append(p.buf, s...) + return nil +} + +// Marshaler is the interface representing objects that can marshal themselves. +type Marshaler interface { + Marshal() ([]byte, error) +} + +// EncodeMessage writes the protocol buffer to the Buffer, +// prefixed by a varint-encoded length. +func (p *Buffer) EncodeMessage(pb Message) error { + siz := Size(pb) + p.EncodeVarint(uint64(siz)) + return p.Marshal(pb) +} + +// All protocol buffer fields are nillable, but be careful. +func isNil(v reflect.Value) bool { + switch v.Kind() { + case reflect.Interface, reflect.Map, reflect.Ptr, reflect.Slice: + return v.IsNil() + } + return false +} diff --git a/vendor/github.com/gogo/protobuf/proto/encode_gogo.go b/vendor/github.com/gogo/protobuf/proto/encode_gogo.go new file mode 100644 index 000000000..0f5fb173e --- /dev/null +++ b/vendor/github.com/gogo/protobuf/proto/encode_gogo.go @@ -0,0 +1,33 @@ +// Protocol Buffers for Go with Gadgets +// +// Copyright (c) 2013, The GoGo Authors. All rights reserved. +// http://github.com/gogo/protobuf +// +// Redistribution and use in source and binary forms, with or without +// modification, are permitted provided that the following conditions are +// met: +// +// * Redistributions of source code must retain the above copyright +// notice, this list of conditions and the following disclaimer. +// * Redistributions in binary form must reproduce the above +// copyright notice, this list of conditions and the following disclaimer +// in the documentation and/or other materials provided with the +// distribution. +// +// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS +// "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT +// LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR +// A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT +// OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, +// SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT +// LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, +// DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY +// THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT +// (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE +// OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. + +package proto + +func NewRequiredNotSetError(field string) *RequiredNotSetError { + return &RequiredNotSetError{field} +} diff --git a/vendor/github.com/gogo/protobuf/proto/equal.go b/vendor/github.com/gogo/protobuf/proto/equal.go new file mode 100644 index 000000000..d4db5a1c1 --- /dev/null +++ b/vendor/github.com/gogo/protobuf/proto/equal.go @@ -0,0 +1,300 @@ +// Go support for Protocol Buffers - Google's data interchange format +// +// Copyright 2011 The Go Authors. All rights reserved. +// https://github.com/golang/protobuf +// +// Redistribution and use in source and binary forms, with or without +// modification, are permitted provided that the following conditions are +// met: +// +// * Redistributions of source code must retain the above copyright +// notice, this list of conditions and the following disclaimer. +// * Redistributions in binary form must reproduce the above +// copyright notice, this list of conditions and the following disclaimer +// in the documentation and/or other materials provided with the +// distribution. +// * Neither the name of Google Inc. nor the names of its +// contributors may be used to endorse or promote products derived from +// this software without specific prior written permission. +// +// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS +// "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT +// LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR +// A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT +// OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, +// SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT +// LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, +// DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY +// THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT +// (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE +// OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. + +// Protocol buffer comparison. + +package proto + +import ( + "bytes" + "log" + "reflect" + "strings" +) + +/* +Equal returns true iff protocol buffers a and b are equal. +The arguments must both be pointers to protocol buffer structs. + +Equality is defined in this way: + - Two messages are equal iff they are the same type, + corresponding fields are equal, unknown field sets + are equal, and extensions sets are equal. + - Two set scalar fields are equal iff their values are equal. + If the fields are of a floating-point type, remember that + NaN != x for all x, including NaN. If the message is defined + in a proto3 .proto file, fields are not "set"; specifically, + zero length proto3 "bytes" fields are equal (nil == {}). + - Two repeated fields are equal iff their lengths are the same, + and their corresponding elements are equal. Note a "bytes" field, + although represented by []byte, is not a repeated field and the + rule for the scalar fields described above applies. + - Two unset fields are equal. + - Two unknown field sets are equal if their current + encoded state is equal. + - Two extension sets are equal iff they have corresponding + elements that are pairwise equal. + - Two map fields are equal iff their lengths are the same, + and they contain the same set of elements. Zero-length map + fields are equal. + - Every other combination of things are not equal. + +The return value is undefined if a and b are not protocol buffers. +*/ +func Equal(a, b Message) bool { + if a == nil || b == nil { + return a == b + } + v1, v2 := reflect.ValueOf(a), reflect.ValueOf(b) + if v1.Type() != v2.Type() { + return false + } + if v1.Kind() == reflect.Ptr { + if v1.IsNil() { + return v2.IsNil() + } + if v2.IsNil() { + return false + } + v1, v2 = v1.Elem(), v2.Elem() + } + if v1.Kind() != reflect.Struct { + return false + } + return equalStruct(v1, v2) +} + +// v1 and v2 are known to have the same type. +func equalStruct(v1, v2 reflect.Value) bool { + sprop := GetProperties(v1.Type()) + for i := 0; i < v1.NumField(); i++ { + f := v1.Type().Field(i) + if strings.HasPrefix(f.Name, "XXX_") { + continue + } + f1, f2 := v1.Field(i), v2.Field(i) + if f.Type.Kind() == reflect.Ptr { + if n1, n2 := f1.IsNil(), f2.IsNil(); n1 && n2 { + // both unset + continue + } else if n1 != n2 { + // set/unset mismatch + return false + } + f1, f2 = f1.Elem(), f2.Elem() + } + if !equalAny(f1, f2, sprop.Prop[i]) { + return false + } + } + + if em1 := v1.FieldByName("XXX_InternalExtensions"); em1.IsValid() { + em2 := v2.FieldByName("XXX_InternalExtensions") + if !equalExtensions(v1.Type(), em1.Interface().(XXX_InternalExtensions), em2.Interface().(XXX_InternalExtensions)) { + return false + } + } + + if em1 := v1.FieldByName("XXX_extensions"); em1.IsValid() { + em2 := v2.FieldByName("XXX_extensions") + if !equalExtMap(v1.Type(), em1.Interface().(map[int32]Extension), em2.Interface().(map[int32]Extension)) { + return false + } + } + + uf := v1.FieldByName("XXX_unrecognized") + if !uf.IsValid() { + return true + } + + u1 := uf.Bytes() + u2 := v2.FieldByName("XXX_unrecognized").Bytes() + return bytes.Equal(u1, u2) +} + +// v1 and v2 are known to have the same type. +// prop may be nil. +func equalAny(v1, v2 reflect.Value, prop *Properties) bool { + if v1.Type() == protoMessageType { + m1, _ := v1.Interface().(Message) + m2, _ := v2.Interface().(Message) + return Equal(m1, m2) + } + switch v1.Kind() { + case reflect.Bool: + return v1.Bool() == v2.Bool() + case reflect.Float32, reflect.Float64: + return v1.Float() == v2.Float() + case reflect.Int32, reflect.Int64: + return v1.Int() == v2.Int() + case reflect.Interface: + // Probably a oneof field; compare the inner values. + n1, n2 := v1.IsNil(), v2.IsNil() + if n1 || n2 { + return n1 == n2 + } + e1, e2 := v1.Elem(), v2.Elem() + if e1.Type() != e2.Type() { + return false + } + return equalAny(e1, e2, nil) + case reflect.Map: + if v1.Len() != v2.Len() { + return false + } + for _, key := range v1.MapKeys() { + val2 := v2.MapIndex(key) + if !val2.IsValid() { + // This key was not found in the second map. + return false + } + if !equalAny(v1.MapIndex(key), val2, nil) { + return false + } + } + return true + case reflect.Ptr: + // Maps may have nil values in them, so check for nil. + if v1.IsNil() && v2.IsNil() { + return true + } + if v1.IsNil() != v2.IsNil() { + return false + } + return equalAny(v1.Elem(), v2.Elem(), prop) + case reflect.Slice: + if v1.Type().Elem().Kind() == reflect.Uint8 { + // short circuit: []byte + + // Edge case: if this is in a proto3 message, a zero length + // bytes field is considered the zero value. + if prop != nil && prop.proto3 && v1.Len() == 0 && v2.Len() == 0 { + return true + } + if v1.IsNil() != v2.IsNil() { + return false + } + return bytes.Equal(v1.Interface().([]byte), v2.Interface().([]byte)) + } + + if v1.Len() != v2.Len() { + return false + } + for i := 0; i < v1.Len(); i++ { + if !equalAny(v1.Index(i), v2.Index(i), prop) { + return false + } + } + return true + case reflect.String: + return v1.Interface().(string) == v2.Interface().(string) + case reflect.Struct: + return equalStruct(v1, v2) + case reflect.Uint32, reflect.Uint64: + return v1.Uint() == v2.Uint() + } + + // unknown type, so not a protocol buffer + log.Printf("proto: don't know how to compare %v", v1) + return false +} + +// base is the struct type that the extensions are based on. +// x1 and x2 are InternalExtensions. +func equalExtensions(base reflect.Type, x1, x2 XXX_InternalExtensions) bool { + em1, _ := x1.extensionsRead() + em2, _ := x2.extensionsRead() + return equalExtMap(base, em1, em2) +} + +func equalExtMap(base reflect.Type, em1, em2 map[int32]Extension) bool { + if len(em1) != len(em2) { + return false + } + + for extNum, e1 := range em1 { + e2, ok := em2[extNum] + if !ok { + return false + } + + m1, m2 := e1.value, e2.value + + if m1 == nil && m2 == nil { + // Both have only encoded form. + if bytes.Equal(e1.enc, e2.enc) { + continue + } + // The bytes are different, but the extensions might still be + // equal. We need to decode them to compare. + } + + if m1 != nil && m2 != nil { + // Both are unencoded. + if !equalAny(reflect.ValueOf(m1), reflect.ValueOf(m2), nil) { + return false + } + continue + } + + // At least one is encoded. To do a semantically correct comparison + // we need to unmarshal them first. + var desc *ExtensionDesc + if m := extensionMaps[base]; m != nil { + desc = m[extNum] + } + if desc == nil { + // If both have only encoded form and the bytes are the same, + // it is handled above. We get here when the bytes are different. + // We don't know how to decode it, so just compare them as byte + // slices. + log.Printf("proto: don't know how to compare extension %d of %v", extNum, base) + return false + } + var err error + if m1 == nil { + m1, err = decodeExtension(e1.enc, desc) + } + if m2 == nil && err == nil { + m2, err = decodeExtension(e2.enc, desc) + } + if err != nil { + // The encoded form is invalid. + log.Printf("proto: badly encoded extension %d of %v: %v", extNum, base, err) + return false + } + if !equalAny(reflect.ValueOf(m1), reflect.ValueOf(m2), nil) { + return false + } + } + + return true +} diff --git a/vendor/github.com/gogo/protobuf/proto/extensions.go b/vendor/github.com/gogo/protobuf/proto/extensions.go new file mode 100644 index 000000000..44ebd457c --- /dev/null +++ b/vendor/github.com/gogo/protobuf/proto/extensions.go @@ -0,0 +1,604 @@ +// Go support for Protocol Buffers - Google's data interchange format +// +// Copyright 2010 The Go Authors. All rights reserved. +// https://github.com/golang/protobuf +// +// Redistribution and use in source and binary forms, with or without +// modification, are permitted provided that the following conditions are +// met: +// +// * Redistributions of source code must retain the above copyright +// notice, this list of conditions and the following disclaimer. +// * Redistributions in binary form must reproduce the above +// copyright notice, this list of conditions and the following disclaimer +// in the documentation and/or other materials provided with the +// distribution. +// * Neither the name of Google Inc. nor the names of its +// contributors may be used to endorse or promote products derived from +// this software without specific prior written permission. +// +// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS +// "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT +// LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR +// A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT +// OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, +// SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT +// LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, +// DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY +// THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT +// (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE +// OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. + +package proto + +/* + * Types and routines for supporting protocol buffer extensions. + */ + +import ( + "errors" + "fmt" + "io" + "reflect" + "strconv" + "sync" +) + +// ErrMissingExtension is the error returned by GetExtension if the named extension is not in the message. +var ErrMissingExtension = errors.New("proto: missing extension") + +// ExtensionRange represents a range of message extensions for a protocol buffer. +// Used in code generated by the protocol compiler. +type ExtensionRange struct { + Start, End int32 // both inclusive +} + +// extendableProto is an interface implemented by any protocol buffer generated by the current +// proto compiler that may be extended. +type extendableProto interface { + Message + ExtensionRangeArray() []ExtensionRange + extensionsWrite() map[int32]Extension + extensionsRead() (map[int32]Extension, sync.Locker) +} + +// extendableProtoV1 is an interface implemented by a protocol buffer generated by the previous +// version of the proto compiler that may be extended. +type extendableProtoV1 interface { + Message + ExtensionRangeArray() []ExtensionRange + ExtensionMap() map[int32]Extension +} + +// extensionAdapter is a wrapper around extendableProtoV1 that implements extendableProto. +type extensionAdapter struct { + extendableProtoV1 +} + +func (e extensionAdapter) extensionsWrite() map[int32]Extension { + return e.ExtensionMap() +} + +func (e extensionAdapter) extensionsRead() (map[int32]Extension, sync.Locker) { + return e.ExtensionMap(), notLocker{} +} + +// notLocker is a sync.Locker whose Lock and Unlock methods are nops. +type notLocker struct{} + +func (n notLocker) Lock() {} +func (n notLocker) Unlock() {} + +// extendable returns the extendableProto interface for the given generated proto message. +// If the proto message has the old extension format, it returns a wrapper that implements +// the extendableProto interface. +func extendable(p interface{}) (extendableProto, error) { + switch p := p.(type) { + case extendableProto: + if isNilPtr(p) { + return nil, fmt.Errorf("proto: nil %T is not extendable", p) + } + return p, nil + case extendableProtoV1: + if isNilPtr(p) { + return nil, fmt.Errorf("proto: nil %T is not extendable", p) + } + return extensionAdapter{p}, nil + case extensionsBytes: + return slowExtensionAdapter{p}, nil + } + // Don't allocate a specific error containing %T: + // this is the hot path for Clone and MarshalText. + return nil, errNotExtendable +} + +var errNotExtendable = errors.New("proto: not an extendable proto.Message") + +func isNilPtr(x interface{}) bool { + v := reflect.ValueOf(x) + return v.Kind() == reflect.Ptr && v.IsNil() +} + +// XXX_InternalExtensions is an internal representation of proto extensions. +// +// Each generated message struct type embeds an anonymous XXX_InternalExtensions field, +// thus gaining the unexported 'extensions' method, which can be called only from the proto package. +// +// The methods of XXX_InternalExtensions are not concurrency safe in general, +// but calls to logically read-only methods such as has and get may be executed concurrently. +type XXX_InternalExtensions struct { + // The struct must be indirect so that if a user inadvertently copies a + // generated message and its embedded XXX_InternalExtensions, they + // avoid the mayhem of a copied mutex. + // + // The mutex serializes all logically read-only operations to p.extensionMap. + // It is up to the client to ensure that write operations to p.extensionMap are + // mutually exclusive with other accesses. + p *struct { + mu sync.Mutex + extensionMap map[int32]Extension + } +} + +// extensionsWrite returns the extension map, creating it on first use. +func (e *XXX_InternalExtensions) extensionsWrite() map[int32]Extension { + if e.p == nil { + e.p = new(struct { + mu sync.Mutex + extensionMap map[int32]Extension + }) + e.p.extensionMap = make(map[int32]Extension) + } + return e.p.extensionMap +} + +// extensionsRead returns the extensions map for read-only use. It may be nil. +// The caller must hold the returned mutex's lock when accessing Elements within the map. +func (e *XXX_InternalExtensions) extensionsRead() (map[int32]Extension, sync.Locker) { + if e.p == nil { + return nil, nil + } + return e.p.extensionMap, &e.p.mu +} + +// ExtensionDesc represents an extension specification. +// Used in generated code from the protocol compiler. +type ExtensionDesc struct { + ExtendedType Message // nil pointer to the type that is being extended + ExtensionType interface{} // nil pointer to the extension type + Field int32 // field number + Name string // fully-qualified name of extension, for text formatting + Tag string // protobuf tag style + Filename string // name of the file in which the extension is defined +} + +func (ed *ExtensionDesc) repeated() bool { + t := reflect.TypeOf(ed.ExtensionType) + return t.Kind() == reflect.Slice && t.Elem().Kind() != reflect.Uint8 +} + +// Extension represents an extension in a message. +type Extension struct { + // When an extension is stored in a message using SetExtension + // only desc and value are set. When the message is marshaled + // enc will be set to the encoded form of the message. + // + // When a message is unmarshaled and contains extensions, each + // extension will have only enc set. When such an extension is + // accessed using GetExtension (or GetExtensions) desc and value + // will be set. + desc *ExtensionDesc + value interface{} + enc []byte +} + +// SetRawExtension is for testing only. +func SetRawExtension(base Message, id int32, b []byte) { + if ebase, ok := base.(extensionsBytes); ok { + clearExtension(base, id) + ext := ebase.GetExtensions() + *ext = append(*ext, b...) + return + } + epb, err := extendable(base) + if err != nil { + return + } + extmap := epb.extensionsWrite() + extmap[id] = Extension{enc: b} +} + +// isExtensionField returns true iff the given field number is in an extension range. +func isExtensionField(pb extendableProto, field int32) bool { + for _, er := range pb.ExtensionRangeArray() { + if er.Start <= field && field <= er.End { + return true + } + } + return false +} + +// checkExtensionTypes checks that the given extension is valid for pb. +func checkExtensionTypes(pb extendableProto, extension *ExtensionDesc) error { + var pbi interface{} = pb + // Check the extended type. + if ea, ok := pbi.(extensionAdapter); ok { + pbi = ea.extendableProtoV1 + } + if ea, ok := pbi.(slowExtensionAdapter); ok { + pbi = ea.extensionsBytes + } + if a, b := reflect.TypeOf(pbi), reflect.TypeOf(extension.ExtendedType); a != b { + return fmt.Errorf("proto: bad extended type; %v does not extend %v", b, a) + } + // Check the range. + if !isExtensionField(pb, extension.Field) { + return errors.New("proto: bad extension number; not in declared ranges") + } + return nil +} + +// extPropKey is sufficient to uniquely identify an extension. +type extPropKey struct { + base reflect.Type + field int32 +} + +var extProp = struct { + sync.RWMutex + m map[extPropKey]*Properties +}{ + m: make(map[extPropKey]*Properties), +} + +func extensionProperties(ed *ExtensionDesc) *Properties { + key := extPropKey{base: reflect.TypeOf(ed.ExtendedType), field: ed.Field} + + extProp.RLock() + if prop, ok := extProp.m[key]; ok { + extProp.RUnlock() + return prop + } + extProp.RUnlock() + + extProp.Lock() + defer extProp.Unlock() + // Check again. + if prop, ok := extProp.m[key]; ok { + return prop + } + + prop := new(Properties) + prop.Init(reflect.TypeOf(ed.ExtensionType), "unknown_name", ed.Tag, nil) + extProp.m[key] = prop + return prop +} + +// HasExtension returns whether the given extension is present in pb. +func HasExtension(pb Message, extension *ExtensionDesc) bool { + if epb, doki := pb.(extensionsBytes); doki { + ext := epb.GetExtensions() + buf := *ext + o := 0 + for o < len(buf) { + tag, n := DecodeVarint(buf[o:]) + fieldNum := int32(tag >> 3) + if int32(fieldNum) == extension.Field { + return true + } + wireType := int(tag & 0x7) + o += n + l, err := size(buf[o:], wireType) + if err != nil { + return false + } + o += l + } + return false + } + // TODO: Check types, field numbers, etc.? + epb, err := extendable(pb) + if err != nil { + return false + } + extmap, mu := epb.extensionsRead() + if extmap == nil { + return false + } + mu.Lock() + _, ok := extmap[extension.Field] + mu.Unlock() + return ok +} + +// ClearExtension removes the given extension from pb. +func ClearExtension(pb Message, extension *ExtensionDesc) { + clearExtension(pb, extension.Field) +} + +func clearExtension(pb Message, fieldNum int32) { + if epb, ok := pb.(extensionsBytes); ok { + offset := 0 + for offset != -1 { + offset = deleteExtension(epb, fieldNum, offset) + } + return + } + epb, err := extendable(pb) + if err != nil { + return + } + // TODO: Check types, field numbers, etc.? + extmap := epb.extensionsWrite() + delete(extmap, fieldNum) +} + +// GetExtension retrieves a proto2 extended field from pb. +// +// If the descriptor is type complete (i.e., ExtensionDesc.ExtensionType is non-nil), +// then GetExtension parses the encoded field and returns a Go value of the specified type. +// If the field is not present, then the default value is returned (if one is specified), +// otherwise ErrMissingExtension is reported. +// +// If the descriptor is not type complete (i.e., ExtensionDesc.ExtensionType is nil), +// then GetExtension returns the raw encoded bytes of the field extension. +func GetExtension(pb Message, extension *ExtensionDesc) (interface{}, error) { + if epb, doki := pb.(extensionsBytes); doki { + ext := epb.GetExtensions() + return decodeExtensionFromBytes(extension, *ext) + } + + epb, err := extendable(pb) + if err != nil { + return nil, err + } + + if extension.ExtendedType != nil { + // can only check type if this is a complete descriptor + if cerr := checkExtensionTypes(epb, extension); cerr != nil { + return nil, cerr + } + } + + emap, mu := epb.extensionsRead() + if emap == nil { + return defaultExtensionValue(extension) + } + mu.Lock() + defer mu.Unlock() + e, ok := emap[extension.Field] + if !ok { + // defaultExtensionValue returns the default value or + // ErrMissingExtension if there is no default. + return defaultExtensionValue(extension) + } + + if e.value != nil { + // Already decoded. Check the descriptor, though. + if e.desc != extension { + // This shouldn't happen. If it does, it means that + // GetExtension was called twice with two different + // descriptors with the same field number. + return nil, errors.New("proto: descriptor conflict") + } + return e.value, nil + } + + if extension.ExtensionType == nil { + // incomplete descriptor + return e.enc, nil + } + + v, err := decodeExtension(e.enc, extension) + if err != nil { + return nil, err + } + + // Remember the decoded version and drop the encoded version. + // That way it is safe to mutate what we return. + e.value = v + e.desc = extension + e.enc = nil + emap[extension.Field] = e + return e.value, nil +} + +// defaultExtensionValue returns the default value for extension. +// If no default for an extension is defined ErrMissingExtension is returned. +func defaultExtensionValue(extension *ExtensionDesc) (interface{}, error) { + if extension.ExtensionType == nil { + // incomplete descriptor, so no default + return nil, ErrMissingExtension + } + + t := reflect.TypeOf(extension.ExtensionType) + props := extensionProperties(extension) + + sf, _, err := fieldDefault(t, props) + if err != nil { + return nil, err + } + + if sf == nil || sf.value == nil { + // There is no default value. + return nil, ErrMissingExtension + } + + if t.Kind() != reflect.Ptr { + // We do not need to return a Ptr, we can directly return sf.value. + return sf.value, nil + } + + // We need to return an interface{} that is a pointer to sf.value. + value := reflect.New(t).Elem() + value.Set(reflect.New(value.Type().Elem())) + if sf.kind == reflect.Int32 { + // We may have an int32 or an enum, but the underlying data is int32. + // Since we can't set an int32 into a non int32 reflect.value directly + // set it as a int32. + value.Elem().SetInt(int64(sf.value.(int32))) + } else { + value.Elem().Set(reflect.ValueOf(sf.value)) + } + return value.Interface(), nil +} + +// decodeExtension decodes an extension encoded in b. +func decodeExtension(b []byte, extension *ExtensionDesc) (interface{}, error) { + t := reflect.TypeOf(extension.ExtensionType) + unmarshal := typeUnmarshaler(t, extension.Tag) + + // t is a pointer to a struct, pointer to basic type or a slice. + // Allocate space to store the pointer/slice. + value := reflect.New(t).Elem() + + var err error + for { + x, n := decodeVarint(b) + if n == 0 { + return nil, io.ErrUnexpectedEOF + } + b = b[n:] + wire := int(x) & 7 + + b, err = unmarshal(b, valToPointer(value.Addr()), wire) + if err != nil { + return nil, err + } + + if len(b) == 0 { + break + } + } + return value.Interface(), nil +} + +// GetExtensions returns a slice of the extensions present in pb that are also listed in es. +// The returned slice has the same length as es; missing extensions will appear as nil elements. +func GetExtensions(pb Message, es []*ExtensionDesc) (extensions []interface{}, err error) { + epb, err := extendable(pb) + if err != nil { + return nil, err + } + extensions = make([]interface{}, len(es)) + for i, e := range es { + extensions[i], err = GetExtension(epb, e) + if err == ErrMissingExtension { + err = nil + } + if err != nil { + return + } + } + return +} + +// ExtensionDescs returns a new slice containing pb's extension descriptors, in undefined order. +// For non-registered extensions, ExtensionDescs returns an incomplete descriptor containing +// just the Field field, which defines the extension's field number. +func ExtensionDescs(pb Message) ([]*ExtensionDesc, error) { + epb, err := extendable(pb) + if err != nil { + return nil, err + } + registeredExtensions := RegisteredExtensions(pb) + + emap, mu := epb.extensionsRead() + if emap == nil { + return nil, nil + } + mu.Lock() + defer mu.Unlock() + extensions := make([]*ExtensionDesc, 0, len(emap)) + for extid, e := range emap { + desc := e.desc + if desc == nil { + desc = registeredExtensions[extid] + if desc == nil { + desc = &ExtensionDesc{Field: extid} + } + } + + extensions = append(extensions, desc) + } + return extensions, nil +} + +// SetExtension sets the specified extension of pb to the specified value. +func SetExtension(pb Message, extension *ExtensionDesc, value interface{}) error { + if epb, ok := pb.(extensionsBytes); ok { + newb, err := encodeExtension(extension, value) + if err != nil { + return err + } + bb := epb.GetExtensions() + *bb = append(*bb, newb...) + return nil + } + epb, err := extendable(pb) + if err != nil { + return err + } + if err := checkExtensionTypes(epb, extension); err != nil { + return err + } + typ := reflect.TypeOf(extension.ExtensionType) + if typ != reflect.TypeOf(value) { + return errors.New("proto: bad extension value type") + } + // nil extension values need to be caught early, because the + // encoder can't distinguish an ErrNil due to a nil extension + // from an ErrNil due to a missing field. Extensions are + // always optional, so the encoder would just swallow the error + // and drop all the extensions from the encoded message. + if reflect.ValueOf(value).IsNil() { + return fmt.Errorf("proto: SetExtension called with nil value of type %T", value) + } + + extmap := epb.extensionsWrite() + extmap[extension.Field] = Extension{desc: extension, value: value} + return nil +} + +// ClearAllExtensions clears all extensions from pb. +func ClearAllExtensions(pb Message) { + if epb, doki := pb.(extensionsBytes); doki { + ext := epb.GetExtensions() + *ext = []byte{} + return + } + epb, err := extendable(pb) + if err != nil { + return + } + m := epb.extensionsWrite() + for k := range m { + delete(m, k) + } +} + +// A global registry of extensions. +// The generated code will register the generated descriptors by calling RegisterExtension. + +var extensionMaps = make(map[reflect.Type]map[int32]*ExtensionDesc) + +// RegisterExtension is called from the generated code. +func RegisterExtension(desc *ExtensionDesc) { + st := reflect.TypeOf(desc.ExtendedType).Elem() + m := extensionMaps[st] + if m == nil { + m = make(map[int32]*ExtensionDesc) + extensionMaps[st] = m + } + if _, ok := m[desc.Field]; ok { + panic("proto: duplicate extension registered: " + st.String() + " " + strconv.Itoa(int(desc.Field))) + } + m[desc.Field] = desc +} + +// RegisteredExtensions returns a map of the registered extensions of a +// protocol buffer struct, indexed by the extension number. +// The argument pb should be a nil pointer to the struct type. +func RegisteredExtensions(pb Message) map[int32]*ExtensionDesc { + return extensionMaps[reflect.TypeOf(pb).Elem()] +} diff --git a/vendor/github.com/gogo/protobuf/proto/extensions_gogo.go b/vendor/github.com/gogo/protobuf/proto/extensions_gogo.go new file mode 100644 index 000000000..53ebd8cca --- /dev/null +++ b/vendor/github.com/gogo/protobuf/proto/extensions_gogo.go @@ -0,0 +1,368 @@ +// Protocol Buffers for Go with Gadgets +// +// Copyright (c) 2013, The GoGo Authors. All rights reserved. +// http://github.com/gogo/protobuf +// +// Redistribution and use in source and binary forms, with or without +// modification, are permitted provided that the following conditions are +// met: +// +// * Redistributions of source code must retain the above copyright +// notice, this list of conditions and the following disclaimer. +// * Redistributions in binary form must reproduce the above +// copyright notice, this list of conditions and the following disclaimer +// in the documentation and/or other materials provided with the +// distribution. +// +// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS +// "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT +// LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR +// A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT +// OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, +// SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT +// LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, +// DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY +// THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT +// (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE +// OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. + +package proto + +import ( + "bytes" + "errors" + "fmt" + "io" + "reflect" + "sort" + "strings" + "sync" +) + +type extensionsBytes interface { + Message + ExtensionRangeArray() []ExtensionRange + GetExtensions() *[]byte +} + +type slowExtensionAdapter struct { + extensionsBytes +} + +func (s slowExtensionAdapter) extensionsWrite() map[int32]Extension { + panic("Please report a bug to github.com/gogo/protobuf if you see this message: Writing extensions is not supported for extensions stored in a byte slice field.") +} + +func (s slowExtensionAdapter) extensionsRead() (map[int32]Extension, sync.Locker) { + b := s.GetExtensions() + m, err := BytesToExtensionsMap(*b) + if err != nil { + panic(err) + } + return m, notLocker{} +} + +func GetBoolExtension(pb Message, extension *ExtensionDesc, ifnotset bool) bool { + if reflect.ValueOf(pb).IsNil() { + return ifnotset + } + value, err := GetExtension(pb, extension) + if err != nil { + return ifnotset + } + if value == nil { + return ifnotset + } + if value.(*bool) == nil { + return ifnotset + } + return *(value.(*bool)) +} + +func (this *Extension) Equal(that *Extension) bool { + if err := this.Encode(); err != nil { + return false + } + if err := that.Encode(); err != nil { + return false + } + return bytes.Equal(this.enc, that.enc) +} + +func (this *Extension) Compare(that *Extension) int { + if err := this.Encode(); err != nil { + return 1 + } + if err := that.Encode(); err != nil { + return -1 + } + return bytes.Compare(this.enc, that.enc) +} + +func SizeOfInternalExtension(m extendableProto) (n int) { + info := getMarshalInfo(reflect.TypeOf(m)) + return info.sizeV1Extensions(m.extensionsWrite()) +} + +type sortableMapElem struct { + field int32 + ext Extension +} + +func newSortableExtensionsFromMap(m map[int32]Extension) sortableExtensions { + s := make(sortableExtensions, 0, len(m)) + for k, v := range m { + s = append(s, &sortableMapElem{field: k, ext: v}) + } + return s +} + +type sortableExtensions []*sortableMapElem + +func (this sortableExtensions) Len() int { return len(this) } + +func (this sortableExtensions) Swap(i, j int) { this[i], this[j] = this[j], this[i] } + +func (this sortableExtensions) Less(i, j int) bool { return this[i].field < this[j].field } + +func (this sortableExtensions) String() string { + sort.Sort(this) + ss := make([]string, len(this)) + for i := range this { + ss[i] = fmt.Sprintf("%d: %v", this[i].field, this[i].ext) + } + return "map[" + strings.Join(ss, ",") + "]" +} + +func StringFromInternalExtension(m extendableProto) string { + return StringFromExtensionsMap(m.extensionsWrite()) +} + +func StringFromExtensionsMap(m map[int32]Extension) string { + return newSortableExtensionsFromMap(m).String() +} + +func StringFromExtensionsBytes(ext []byte) string { + m, err := BytesToExtensionsMap(ext) + if err != nil { + panic(err) + } + return StringFromExtensionsMap(m) +} + +func EncodeInternalExtension(m extendableProto, data []byte) (n int, err error) { + return EncodeExtensionMap(m.extensionsWrite(), data) +} + +func EncodeExtensionMap(m map[int32]Extension, data []byte) (n int, err error) { + o := 0 + for _, e := range m { + if err := e.Encode(); err != nil { + return 0, err + } + n := copy(data[o:], e.enc) + if n != len(e.enc) { + return 0, io.ErrShortBuffer + } + o += n + } + return o, nil +} + +func GetRawExtension(m map[int32]Extension, id int32) ([]byte, error) { + e := m[id] + if err := e.Encode(); err != nil { + return nil, err + } + return e.enc, nil +} + +func size(buf []byte, wire int) (int, error) { + switch wire { + case WireVarint: + _, n := DecodeVarint(buf) + return n, nil + case WireFixed64: + return 8, nil + case WireBytes: + v, n := DecodeVarint(buf) + return int(v) + n, nil + case WireFixed32: + return 4, nil + case WireStartGroup: + offset := 0 + for { + u, n := DecodeVarint(buf[offset:]) + fwire := int(u & 0x7) + offset += n + if fwire == WireEndGroup { + return offset, nil + } + s, err := size(buf[offset:], wire) + if err != nil { + return 0, err + } + offset += s + } + } + return 0, fmt.Errorf("proto: can't get size for unknown wire type %d", wire) +} + +func BytesToExtensionsMap(buf []byte) (map[int32]Extension, error) { + m := make(map[int32]Extension) + i := 0 + for i < len(buf) { + tag, n := DecodeVarint(buf[i:]) + if n <= 0 { + return nil, fmt.Errorf("unable to decode varint") + } + fieldNum := int32(tag >> 3) + wireType := int(tag & 0x7) + l, err := size(buf[i+n:], wireType) + if err != nil { + return nil, err + } + end := i + int(l) + n + m[int32(fieldNum)] = Extension{enc: buf[i:end]} + i = end + } + return m, nil +} + +func NewExtension(e []byte) Extension { + ee := Extension{enc: make([]byte, len(e))} + copy(ee.enc, e) + return ee +} + +func AppendExtension(e Message, tag int32, buf []byte) { + if ee, eok := e.(extensionsBytes); eok { + ext := ee.GetExtensions() + *ext = append(*ext, buf...) + return + } + if ee, eok := e.(extendableProto); eok { + m := ee.extensionsWrite() + ext := m[int32(tag)] // may be missing + ext.enc = append(ext.enc, buf...) + m[int32(tag)] = ext + } +} + +func encodeExtension(extension *ExtensionDesc, value interface{}) ([]byte, error) { + u := getMarshalInfo(reflect.TypeOf(extension.ExtendedType)) + ei := u.getExtElemInfo(extension) + v := value + p := toAddrPointer(&v, ei.isptr) + siz := ei.sizer(p, SizeVarint(ei.wiretag)) + buf := make([]byte, 0, siz) + return ei.marshaler(buf, p, ei.wiretag, false) +} + +func decodeExtensionFromBytes(extension *ExtensionDesc, buf []byte) (interface{}, error) { + o := 0 + for o < len(buf) { + tag, n := DecodeVarint((buf)[o:]) + fieldNum := int32(tag >> 3) + wireType := int(tag & 0x7) + if o+n > len(buf) { + return nil, fmt.Errorf("unable to decode extension") + } + l, err := size((buf)[o+n:], wireType) + if err != nil { + return nil, err + } + if int32(fieldNum) == extension.Field { + if o+n+l > len(buf) { + return nil, fmt.Errorf("unable to decode extension") + } + v, err := decodeExtension((buf)[o:o+n+l], extension) + if err != nil { + return nil, err + } + return v, nil + } + o += n + l + } + return defaultExtensionValue(extension) +} + +func (this *Extension) Encode() error { + if this.enc == nil { + var err error + this.enc, err = encodeExtension(this.desc, this.value) + if err != nil { + return err + } + } + return nil +} + +func (this Extension) GoString() string { + if err := this.Encode(); err != nil { + return fmt.Sprintf("error encoding extension: %v", err) + } + return fmt.Sprintf("proto.NewExtension(%#v)", this.enc) +} + +func SetUnsafeExtension(pb Message, fieldNum int32, value interface{}) error { + typ := reflect.TypeOf(pb).Elem() + ext, ok := extensionMaps[typ] + if !ok { + return fmt.Errorf("proto: bad extended type; %s is not extendable", typ.String()) + } + desc, ok := ext[fieldNum] + if !ok { + return errors.New("proto: bad extension number; not in declared ranges") + } + return SetExtension(pb, desc, value) +} + +func GetUnsafeExtension(pb Message, fieldNum int32) (interface{}, error) { + typ := reflect.TypeOf(pb).Elem() + ext, ok := extensionMaps[typ] + if !ok { + return nil, fmt.Errorf("proto: bad extended type; %s is not extendable", typ.String()) + } + desc, ok := ext[fieldNum] + if !ok { + return nil, fmt.Errorf("unregistered field number %d", fieldNum) + } + return GetExtension(pb, desc) +} + +func NewUnsafeXXX_InternalExtensions(m map[int32]Extension) XXX_InternalExtensions { + x := &XXX_InternalExtensions{ + p: new(struct { + mu sync.Mutex + extensionMap map[int32]Extension + }), + } + x.p.extensionMap = m + return *x +} + +func GetUnsafeExtensionsMap(extendable Message) map[int32]Extension { + pb := extendable.(extendableProto) + return pb.extensionsWrite() +} + +func deleteExtension(pb extensionsBytes, theFieldNum int32, offset int) int { + ext := pb.GetExtensions() + for offset < len(*ext) { + tag, n1 := DecodeVarint((*ext)[offset:]) + fieldNum := int32(tag >> 3) + wireType := int(tag & 0x7) + n2, err := size((*ext)[offset+n1:], wireType) + if err != nil { + panic(err) + } + newOffset := offset + n1 + n2 + if fieldNum == theFieldNum { + *ext = append((*ext)[:offset], (*ext)[newOffset:]...) + return offset + } + offset = newOffset + } + return -1 +} diff --git a/vendor/github.com/gogo/protobuf/proto/lib.go b/vendor/github.com/gogo/protobuf/proto/lib.go new file mode 100644 index 000000000..37d178132 --- /dev/null +++ b/vendor/github.com/gogo/protobuf/proto/lib.go @@ -0,0 +1,929 @@ +// Go support for Protocol Buffers - Google's data interchange format +// +// Copyright 2010 The Go Authors. All rights reserved. +// https://github.com/golang/protobuf +// +// Redistribution and use in source and binary forms, with or without +// modification, are permitted provided that the following conditions are +// met: +// +// * Redistributions of source code must retain the above copyright +// notice, this list of conditions and the following disclaimer. +// * Redistributions in binary form must reproduce the above +// copyright notice, this list of conditions and the following disclaimer +// in the documentation and/or other materials provided with the +// distribution. +// * Neither the name of Google Inc. nor the names of its +// contributors may be used to endorse or promote products derived from +// this software without specific prior written permission. +// +// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS +// "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT +// LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR +// A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT +// OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, +// SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT +// LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, +// DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY +// THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT +// (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE +// OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. + +/* +Package proto converts data structures to and from the wire format of +protocol buffers. It works in concert with the Go source code generated +for .proto files by the protocol compiler. + +A summary of the properties of the protocol buffer interface +for a protocol buffer variable v: + + - Names are turned from camel_case to CamelCase for export. + - There are no methods on v to set fields; just treat + them as structure fields. + - There are getters that return a field's value if set, + and return the field's default value if unset. + The getters work even if the receiver is a nil message. + - The zero value for a struct is its correct initialization state. + All desired fields must be set before marshaling. + - A Reset() method will restore a protobuf struct to its zero state. + - Non-repeated fields are pointers to the values; nil means unset. + That is, optional or required field int32 f becomes F *int32. + - Repeated fields are slices. + - Helper functions are available to aid the setting of fields. + msg.Foo = proto.String("hello") // set field + - Constants are defined to hold the default values of all fields that + have them. They have the form Default_StructName_FieldName. + Because the getter methods handle defaulted values, + direct use of these constants should be rare. + - Enums are given type names and maps from names to values. + Enum values are prefixed by the enclosing message's name, or by the + enum's type name if it is a top-level enum. Enum types have a String + method, and a Enum method to assist in message construction. + - Nested messages, groups and enums have type names prefixed with the name of + the surrounding message type. + - Extensions are given descriptor names that start with E_, + followed by an underscore-delimited list of the nested messages + that contain it (if any) followed by the CamelCased name of the + extension field itself. HasExtension, ClearExtension, GetExtension + and SetExtension are functions for manipulating extensions. + - Oneof field sets are given a single field in their message, + with distinguished wrapper types for each possible field value. + - Marshal and Unmarshal are functions to encode and decode the wire format. + +When the .proto file specifies `syntax="proto3"`, there are some differences: + + - Non-repeated fields of non-message type are values instead of pointers. + - Enum types do not get an Enum method. + +The simplest way to describe this is to see an example. +Given file test.proto, containing + + package example; + + enum FOO { X = 17; } + + message Test { + required string label = 1; + optional int32 type = 2 [default=77]; + repeated int64 reps = 3; + optional group OptionalGroup = 4 { + required string RequiredField = 5; + } + oneof union { + int32 number = 6; + string name = 7; + } + } + +The resulting file, test.pb.go, is: + + package example + + import proto "github.com/gogo/protobuf/proto" + import math "math" + + type FOO int32 + const ( + FOO_X FOO = 17 + ) + var FOO_name = map[int32]string{ + 17: "X", + } + var FOO_value = map[string]int32{ + "X": 17, + } + + func (x FOO) Enum() *FOO { + p := new(FOO) + *p = x + return p + } + func (x FOO) String() string { + return proto.EnumName(FOO_name, int32(x)) + } + func (x *FOO) UnmarshalJSON(data []byte) error { + value, err := proto.UnmarshalJSONEnum(FOO_value, data) + if err != nil { + return err + } + *x = FOO(value) + return nil + } + + type Test struct { + Label *string `protobuf:"bytes,1,req,name=label" json:"label,omitempty"` + Type *int32 `protobuf:"varint,2,opt,name=type,def=77" json:"type,omitempty"` + Reps []int64 `protobuf:"varint,3,rep,name=reps" json:"reps,omitempty"` + Optionalgroup *Test_OptionalGroup `protobuf:"group,4,opt,name=OptionalGroup" json:"optionalgroup,omitempty"` + // Types that are valid to be assigned to Union: + // *Test_Number + // *Test_Name + Union isTest_Union `protobuf_oneof:"union"` + XXX_unrecognized []byte `json:"-"` + } + func (m *Test) Reset() { *m = Test{} } + func (m *Test) String() string { return proto.CompactTextString(m) } + func (*Test) ProtoMessage() {} + + type isTest_Union interface { + isTest_Union() + } + + type Test_Number struct { + Number int32 `protobuf:"varint,6,opt,name=number"` + } + type Test_Name struct { + Name string `protobuf:"bytes,7,opt,name=name"` + } + + func (*Test_Number) isTest_Union() {} + func (*Test_Name) isTest_Union() {} + + func (m *Test) GetUnion() isTest_Union { + if m != nil { + return m.Union + } + return nil + } + const Default_Test_Type int32 = 77 + + func (m *Test) GetLabel() string { + if m != nil && m.Label != nil { + return *m.Label + } + return "" + } + + func (m *Test) GetType() int32 { + if m != nil && m.Type != nil { + return *m.Type + } + return Default_Test_Type + } + + func (m *Test) GetOptionalgroup() *Test_OptionalGroup { + if m != nil { + return m.Optionalgroup + } + return nil + } + + type Test_OptionalGroup struct { + RequiredField *string `protobuf:"bytes,5,req" json:"RequiredField,omitempty"` + } + func (m *Test_OptionalGroup) Reset() { *m = Test_OptionalGroup{} } + func (m *Test_OptionalGroup) String() string { return proto.CompactTextString(m) } + + func (m *Test_OptionalGroup) GetRequiredField() string { + if m != nil && m.RequiredField != nil { + return *m.RequiredField + } + return "" + } + + func (m *Test) GetNumber() int32 { + if x, ok := m.GetUnion().(*Test_Number); ok { + return x.Number + } + return 0 + } + + func (m *Test) GetName() string { + if x, ok := m.GetUnion().(*Test_Name); ok { + return x.Name + } + return "" + } + + func init() { + proto.RegisterEnum("example.FOO", FOO_name, FOO_value) + } + +To create and play with a Test object: + + package main + + import ( + "log" + + "github.com/gogo/protobuf/proto" + pb "./example.pb" + ) + + func main() { + test := &pb.Test{ + Label: proto.String("hello"), + Type: proto.Int32(17), + Reps: []int64{1, 2, 3}, + Optionalgroup: &pb.Test_OptionalGroup{ + RequiredField: proto.String("good bye"), + }, + Union: &pb.Test_Name{"fred"}, + } + data, err := proto.Marshal(test) + if err != nil { + log.Fatal("marshaling error: ", err) + } + newTest := &pb.Test{} + err = proto.Unmarshal(data, newTest) + if err != nil { + log.Fatal("unmarshaling error: ", err) + } + // Now test and newTest contain the same data. + if test.GetLabel() != newTest.GetLabel() { + log.Fatalf("data mismatch %q != %q", test.GetLabel(), newTest.GetLabel()) + } + // Use a type switch to determine which oneof was set. + switch u := test.Union.(type) { + case *pb.Test_Number: // u.Number contains the number. + case *pb.Test_Name: // u.Name contains the string. + } + // etc. + } +*/ +package proto + +import ( + "encoding/json" + "errors" + "fmt" + "log" + "reflect" + "sort" + "strconv" + "sync" +) + +var errInvalidUTF8 = errors.New("proto: invalid UTF-8 string") + +// Message is implemented by generated protocol buffer messages. +type Message interface { + Reset() + String() string + ProtoMessage() +} + +// Stats records allocation details about the protocol buffer encoders +// and decoders. Useful for tuning the library itself. +type Stats struct { + Emalloc uint64 // mallocs in encode + Dmalloc uint64 // mallocs in decode + Encode uint64 // number of encodes + Decode uint64 // number of decodes + Chit uint64 // number of cache hits + Cmiss uint64 // number of cache misses + Size uint64 // number of sizes +} + +// Set to true to enable stats collection. +const collectStats = false + +var stats Stats + +// GetStats returns a copy of the global Stats structure. +func GetStats() Stats { return stats } + +// A Buffer is a buffer manager for marshaling and unmarshaling +// protocol buffers. It may be reused between invocations to +// reduce memory usage. It is not necessary to use a Buffer; +// the global functions Marshal and Unmarshal create a +// temporary Buffer and are fine for most applications. +type Buffer struct { + buf []byte // encode/decode byte stream + index int // read point + + deterministic bool +} + +// NewBuffer allocates a new Buffer and initializes its internal data to +// the contents of the argument slice. +func NewBuffer(e []byte) *Buffer { + return &Buffer{buf: e} +} + +// Reset resets the Buffer, ready for marshaling a new protocol buffer. +func (p *Buffer) Reset() { + p.buf = p.buf[0:0] // for reading/writing + p.index = 0 // for reading +} + +// SetBuf replaces the internal buffer with the slice, +// ready for unmarshaling the contents of the slice. +func (p *Buffer) SetBuf(s []byte) { + p.buf = s + p.index = 0 +} + +// Bytes returns the contents of the Buffer. +func (p *Buffer) Bytes() []byte { return p.buf } + +// SetDeterministic sets whether to use deterministic serialization. +// +// Deterministic serialization guarantees that for a given binary, equal +// messages will always be serialized to the same bytes. This implies: +// +// - Repeated serialization of a message will return the same bytes. +// - Different processes of the same binary (which may be executing on +// different machines) will serialize equal messages to the same bytes. +// +// Note that the deterministic serialization is NOT canonical across +// languages. It is not guaranteed to remain stable over time. It is unstable +// across different builds with schema changes due to unknown fields. +// Users who need canonical serialization (e.g., persistent storage in a +// canonical form, fingerprinting, etc.) should define their own +// canonicalization specification and implement their own serializer rather +// than relying on this API. +// +// If deterministic serialization is requested, map entries will be sorted +// by keys in lexographical order. This is an implementation detail and +// subject to change. +func (p *Buffer) SetDeterministic(deterministic bool) { + p.deterministic = deterministic +} + +/* + * Helper routines for simplifying the creation of optional fields of basic type. + */ + +// Bool is a helper routine that allocates a new bool value +// to store v and returns a pointer to it. +func Bool(v bool) *bool { + return &v +} + +// Int32 is a helper routine that allocates a new int32 value +// to store v and returns a pointer to it. +func Int32(v int32) *int32 { + return &v +} + +// Int is a helper routine that allocates a new int32 value +// to store v and returns a pointer to it, but unlike Int32 +// its argument value is an int. +func Int(v int) *int32 { + p := new(int32) + *p = int32(v) + return p +} + +// Int64 is a helper routine that allocates a new int64 value +// to store v and returns a pointer to it. +func Int64(v int64) *int64 { + return &v +} + +// Float32 is a helper routine that allocates a new float32 value +// to store v and returns a pointer to it. +func Float32(v float32) *float32 { + return &v +} + +// Float64 is a helper routine that allocates a new float64 value +// to store v and returns a pointer to it. +func Float64(v float64) *float64 { + return &v +} + +// Uint32 is a helper routine that allocates a new uint32 value +// to store v and returns a pointer to it. +func Uint32(v uint32) *uint32 { + return &v +} + +// Uint64 is a helper routine that allocates a new uint64 value +// to store v and returns a pointer to it. +func Uint64(v uint64) *uint64 { + return &v +} + +// String is a helper routine that allocates a new string value +// to store v and returns a pointer to it. +func String(v string) *string { + return &v +} + +// EnumName is a helper function to simplify printing protocol buffer enums +// by name. Given an enum map and a value, it returns a useful string. +func EnumName(m map[int32]string, v int32) string { + s, ok := m[v] + if ok { + return s + } + return strconv.Itoa(int(v)) +} + +// UnmarshalJSONEnum is a helper function to simplify recovering enum int values +// from their JSON-encoded representation. Given a map from the enum's symbolic +// names to its int values, and a byte buffer containing the JSON-encoded +// value, it returns an int32 that can be cast to the enum type by the caller. +// +// The function can deal with both JSON representations, numeric and symbolic. +func UnmarshalJSONEnum(m map[string]int32, data []byte, enumName string) (int32, error) { + if data[0] == '"' { + // New style: enums are strings. + var repr string + if err := json.Unmarshal(data, &repr); err != nil { + return -1, err + } + val, ok := m[repr] + if !ok { + return 0, fmt.Errorf("unrecognized enum %s value %q", enumName, repr) + } + return val, nil + } + // Old style: enums are ints. + var val int32 + if err := json.Unmarshal(data, &val); err != nil { + return 0, fmt.Errorf("cannot unmarshal %#q into enum %s", data, enumName) + } + return val, nil +} + +// DebugPrint dumps the encoded data in b in a debugging format with a header +// including the string s. Used in testing but made available for general debugging. +func (p *Buffer) DebugPrint(s string, b []byte) { + var u uint64 + + obuf := p.buf + sindex := p.index + p.buf = b + p.index = 0 + depth := 0 + + fmt.Printf("\n--- %s ---\n", s) + +out: + for { + for i := 0; i < depth; i++ { + fmt.Print(" ") + } + + index := p.index + if index == len(p.buf) { + break + } + + op, err := p.DecodeVarint() + if err != nil { + fmt.Printf("%3d: fetching op err %v\n", index, err) + break out + } + tag := op >> 3 + wire := op & 7 + + switch wire { + default: + fmt.Printf("%3d: t=%3d unknown wire=%d\n", + index, tag, wire) + break out + + case WireBytes: + var r []byte + + r, err = p.DecodeRawBytes(false) + if err != nil { + break out + } + fmt.Printf("%3d: t=%3d bytes [%d]", index, tag, len(r)) + if len(r) <= 6 { + for i := 0; i < len(r); i++ { + fmt.Printf(" %.2x", r[i]) + } + } else { + for i := 0; i < 3; i++ { + fmt.Printf(" %.2x", r[i]) + } + fmt.Printf(" ..") + for i := len(r) - 3; i < len(r); i++ { + fmt.Printf(" %.2x", r[i]) + } + } + fmt.Printf("\n") + + case WireFixed32: + u, err = p.DecodeFixed32() + if err != nil { + fmt.Printf("%3d: t=%3d fix32 err %v\n", index, tag, err) + break out + } + fmt.Printf("%3d: t=%3d fix32 %d\n", index, tag, u) + + case WireFixed64: + u, err = p.DecodeFixed64() + if err != nil { + fmt.Printf("%3d: t=%3d fix64 err %v\n", index, tag, err) + break out + } + fmt.Printf("%3d: t=%3d fix64 %d\n", index, tag, u) + + case WireVarint: + u, err = p.DecodeVarint() + if err != nil { + fmt.Printf("%3d: t=%3d varint err %v\n", index, tag, err) + break out + } + fmt.Printf("%3d: t=%3d varint %d\n", index, tag, u) + + case WireStartGroup: + fmt.Printf("%3d: t=%3d start\n", index, tag) + depth++ + + case WireEndGroup: + depth-- + fmt.Printf("%3d: t=%3d end\n", index, tag) + } + } + + if depth != 0 { + fmt.Printf("%3d: start-end not balanced %d\n", p.index, depth) + } + fmt.Printf("\n") + + p.buf = obuf + p.index = sindex +} + +// SetDefaults sets unset protocol buffer fields to their default values. +// It only modifies fields that are both unset and have defined defaults. +// It recursively sets default values in any non-nil sub-messages. +func SetDefaults(pb Message) { + setDefaults(reflect.ValueOf(pb), true, false) +} + +// v is a struct. +func setDefaults(v reflect.Value, recur, zeros bool) { + if v.Kind() == reflect.Ptr { + v = v.Elem() + } + + defaultMu.RLock() + dm, ok := defaults[v.Type()] + defaultMu.RUnlock() + if !ok { + dm = buildDefaultMessage(v.Type()) + defaultMu.Lock() + defaults[v.Type()] = dm + defaultMu.Unlock() + } + + for _, sf := range dm.scalars { + f := v.Field(sf.index) + if !f.IsNil() { + // field already set + continue + } + dv := sf.value + if dv == nil && !zeros { + // no explicit default, and don't want to set zeros + continue + } + fptr := f.Addr().Interface() // **T + // TODO: Consider batching the allocations we do here. + switch sf.kind { + case reflect.Bool: + b := new(bool) + if dv != nil { + *b = dv.(bool) + } + *(fptr.(**bool)) = b + case reflect.Float32: + f := new(float32) + if dv != nil { + *f = dv.(float32) + } + *(fptr.(**float32)) = f + case reflect.Float64: + f := new(float64) + if dv != nil { + *f = dv.(float64) + } + *(fptr.(**float64)) = f + case reflect.Int32: + // might be an enum + if ft := f.Type(); ft != int32PtrType { + // enum + f.Set(reflect.New(ft.Elem())) + if dv != nil { + f.Elem().SetInt(int64(dv.(int32))) + } + } else { + // int32 field + i := new(int32) + if dv != nil { + *i = dv.(int32) + } + *(fptr.(**int32)) = i + } + case reflect.Int64: + i := new(int64) + if dv != nil { + *i = dv.(int64) + } + *(fptr.(**int64)) = i + case reflect.String: + s := new(string) + if dv != nil { + *s = dv.(string) + } + *(fptr.(**string)) = s + case reflect.Uint8: + // exceptional case: []byte + var b []byte + if dv != nil { + db := dv.([]byte) + b = make([]byte, len(db)) + copy(b, db) + } else { + b = []byte{} + } + *(fptr.(*[]byte)) = b + case reflect.Uint32: + u := new(uint32) + if dv != nil { + *u = dv.(uint32) + } + *(fptr.(**uint32)) = u + case reflect.Uint64: + u := new(uint64) + if dv != nil { + *u = dv.(uint64) + } + *(fptr.(**uint64)) = u + default: + log.Printf("proto: can't set default for field %v (sf.kind=%v)", f, sf.kind) + } + } + + for _, ni := range dm.nested { + f := v.Field(ni) + // f is *T or T or []*T or []T + switch f.Kind() { + case reflect.Struct: + setDefaults(f, recur, zeros) + + case reflect.Ptr: + if f.IsNil() { + continue + } + setDefaults(f, recur, zeros) + + case reflect.Slice: + for i := 0; i < f.Len(); i++ { + e := f.Index(i) + if e.Kind() == reflect.Ptr && e.IsNil() { + continue + } + setDefaults(e, recur, zeros) + } + + case reflect.Map: + for _, k := range f.MapKeys() { + e := f.MapIndex(k) + if e.IsNil() { + continue + } + setDefaults(e, recur, zeros) + } + } + } +} + +var ( + // defaults maps a protocol buffer struct type to a slice of the fields, + // with its scalar fields set to their proto-declared non-zero default values. + defaultMu sync.RWMutex + defaults = make(map[reflect.Type]defaultMessage) + + int32PtrType = reflect.TypeOf((*int32)(nil)) +) + +// defaultMessage represents information about the default values of a message. +type defaultMessage struct { + scalars []scalarField + nested []int // struct field index of nested messages +} + +type scalarField struct { + index int // struct field index + kind reflect.Kind // element type (the T in *T or []T) + value interface{} // the proto-declared default value, or nil +} + +// t is a struct type. +func buildDefaultMessage(t reflect.Type) (dm defaultMessage) { + sprop := GetProperties(t) + for _, prop := range sprop.Prop { + fi, ok := sprop.decoderTags.get(prop.Tag) + if !ok { + // XXX_unrecognized + continue + } + ft := t.Field(fi).Type + + sf, nested, err := fieldDefault(ft, prop) + switch { + case err != nil: + log.Print(err) + case nested: + dm.nested = append(dm.nested, fi) + case sf != nil: + sf.index = fi + dm.scalars = append(dm.scalars, *sf) + } + } + + return dm +} + +// fieldDefault returns the scalarField for field type ft. +// sf will be nil if the field can not have a default. +// nestedMessage will be true if this is a nested message. +// Note that sf.index is not set on return. +func fieldDefault(ft reflect.Type, prop *Properties) (sf *scalarField, nestedMessage bool, err error) { + var canHaveDefault bool + switch ft.Kind() { + case reflect.Struct: + nestedMessage = true // non-nullable + + case reflect.Ptr: + if ft.Elem().Kind() == reflect.Struct { + nestedMessage = true + } else { + canHaveDefault = true // proto2 scalar field + } + + case reflect.Slice: + switch ft.Elem().Kind() { + case reflect.Ptr, reflect.Struct: + nestedMessage = true // repeated message + case reflect.Uint8: + canHaveDefault = true // bytes field + } + + case reflect.Map: + if ft.Elem().Kind() == reflect.Ptr { + nestedMessage = true // map with message values + } + } + + if !canHaveDefault { + if nestedMessage { + return nil, true, nil + } + return nil, false, nil + } + + // We now know that ft is a pointer or slice. + sf = &scalarField{kind: ft.Elem().Kind()} + + // scalar fields without defaults + if !prop.HasDefault { + return sf, false, nil + } + + // a scalar field: either *T or []byte + switch ft.Elem().Kind() { + case reflect.Bool: + x, err := strconv.ParseBool(prop.Default) + if err != nil { + return nil, false, fmt.Errorf("proto: bad default bool %q: %v", prop.Default, err) + } + sf.value = x + case reflect.Float32: + x, err := strconv.ParseFloat(prop.Default, 32) + if err != nil { + return nil, false, fmt.Errorf("proto: bad default float32 %q: %v", prop.Default, err) + } + sf.value = float32(x) + case reflect.Float64: + x, err := strconv.ParseFloat(prop.Default, 64) + if err != nil { + return nil, false, fmt.Errorf("proto: bad default float64 %q: %v", prop.Default, err) + } + sf.value = x + case reflect.Int32: + x, err := strconv.ParseInt(prop.Default, 10, 32) + if err != nil { + return nil, false, fmt.Errorf("proto: bad default int32 %q: %v", prop.Default, err) + } + sf.value = int32(x) + case reflect.Int64: + x, err := strconv.ParseInt(prop.Default, 10, 64) + if err != nil { + return nil, false, fmt.Errorf("proto: bad default int64 %q: %v", prop.Default, err) + } + sf.value = x + case reflect.String: + sf.value = prop.Default + case reflect.Uint8: + // []byte (not *uint8) + sf.value = []byte(prop.Default) + case reflect.Uint32: + x, err := strconv.ParseUint(prop.Default, 10, 32) + if err != nil { + return nil, false, fmt.Errorf("proto: bad default uint32 %q: %v", prop.Default, err) + } + sf.value = uint32(x) + case reflect.Uint64: + x, err := strconv.ParseUint(prop.Default, 10, 64) + if err != nil { + return nil, false, fmt.Errorf("proto: bad default uint64 %q: %v", prop.Default, err) + } + sf.value = x + default: + return nil, false, fmt.Errorf("proto: unhandled def kind %v", ft.Elem().Kind()) + } + + return sf, false, nil +} + +// mapKeys returns a sort.Interface to be used for sorting the map keys. +// Map fields may have key types of non-float scalars, strings and enums. +func mapKeys(vs []reflect.Value) sort.Interface { + s := mapKeySorter{vs: vs} + + // Type specialization per https://developers.google.com/protocol-buffers/docs/proto#maps. + if len(vs) == 0 { + return s + } + switch vs[0].Kind() { + case reflect.Int32, reflect.Int64: + s.less = func(a, b reflect.Value) bool { return a.Int() < b.Int() } + case reflect.Uint32, reflect.Uint64: + s.less = func(a, b reflect.Value) bool { return a.Uint() < b.Uint() } + case reflect.Bool: + s.less = func(a, b reflect.Value) bool { return !a.Bool() && b.Bool() } // false < true + case reflect.String: + s.less = func(a, b reflect.Value) bool { return a.String() < b.String() } + default: + panic(fmt.Sprintf("unsupported map key type: %v", vs[0].Kind())) + } + + return s +} + +type mapKeySorter struct { + vs []reflect.Value + less func(a, b reflect.Value) bool +} + +func (s mapKeySorter) Len() int { return len(s.vs) } +func (s mapKeySorter) Swap(i, j int) { s.vs[i], s.vs[j] = s.vs[j], s.vs[i] } +func (s mapKeySorter) Less(i, j int) bool { + return s.less(s.vs[i], s.vs[j]) +} + +// isProto3Zero reports whether v is a zero proto3 value. +func isProto3Zero(v reflect.Value) bool { + switch v.Kind() { + case reflect.Bool: + return !v.Bool() + case reflect.Int32, reflect.Int64: + return v.Int() == 0 + case reflect.Uint32, reflect.Uint64: + return v.Uint() == 0 + case reflect.Float32, reflect.Float64: + return v.Float() == 0 + case reflect.String: + return v.String() == "" + } + return false +} + +// ProtoPackageIsVersion2 is referenced from generated protocol buffer files +// to assert that that code is compatible with this version of the proto package. +const GoGoProtoPackageIsVersion2 = true + +// ProtoPackageIsVersion1 is referenced from generated protocol buffer files +// to assert that that code is compatible with this version of the proto package. +const GoGoProtoPackageIsVersion1 = true + +// InternalMessageInfo is a type used internally by generated .pb.go files. +// This type is not intended to be used by non-generated code. +// This type is not subject to any compatibility guarantee. +type InternalMessageInfo struct { + marshal *marshalInfo + unmarshal *unmarshalInfo + merge *mergeInfo + discard *discardInfo +} diff --git a/vendor/github.com/gogo/protobuf/proto/lib_gogo.go b/vendor/github.com/gogo/protobuf/proto/lib_gogo.go new file mode 100644 index 000000000..b3aa39190 --- /dev/null +++ b/vendor/github.com/gogo/protobuf/proto/lib_gogo.go @@ -0,0 +1,50 @@ +// Protocol Buffers for Go with Gadgets +// +// Copyright (c) 2013, The GoGo Authors. All rights reserved. +// http://github.com/gogo/protobuf +// +// Redistribution and use in source and binary forms, with or without +// modification, are permitted provided that the following conditions are +// met: +// +// * Redistributions of source code must retain the above copyright +// notice, this list of conditions and the following disclaimer. +// * Redistributions in binary form must reproduce the above +// copyright notice, this list of conditions and the following disclaimer +// in the documentation and/or other materials provided with the +// distribution. +// +// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS +// "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT +// LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR +// A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT +// OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, +// SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT +// LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, +// DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY +// THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT +// (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE +// OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. + +package proto + +import ( + "encoding/json" + "strconv" +) + +type Sizer interface { + Size() int +} + +type ProtoSizer interface { + ProtoSize() int +} + +func MarshalJSONEnum(m map[int32]string, value int32) ([]byte, error) { + s, ok := m[value] + if !ok { + s = strconv.Itoa(int(value)) + } + return json.Marshal(s) +} diff --git a/vendor/github.com/gogo/protobuf/proto/message_set.go b/vendor/github.com/gogo/protobuf/proto/message_set.go new file mode 100644 index 000000000..3b6ca41d5 --- /dev/null +++ b/vendor/github.com/gogo/protobuf/proto/message_set.go @@ -0,0 +1,314 @@ +// Go support for Protocol Buffers - Google's data interchange format +// +// Copyright 2010 The Go Authors. All rights reserved. +// https://github.com/golang/protobuf +// +// Redistribution and use in source and binary forms, with or without +// modification, are permitted provided that the following conditions are +// met: +// +// * Redistributions of source code must retain the above copyright +// notice, this list of conditions and the following disclaimer. +// * Redistributions in binary form must reproduce the above +// copyright notice, this list of conditions and the following disclaimer +// in the documentation and/or other materials provided with the +// distribution. +// * Neither the name of Google Inc. nor the names of its +// contributors may be used to endorse or promote products derived from +// this software without specific prior written permission. +// +// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS +// "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT +// LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR +// A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT +// OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, +// SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT +// LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, +// DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY +// THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT +// (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE +// OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. + +package proto + +/* + * Support for message sets. + */ + +import ( + "bytes" + "encoding/json" + "errors" + "fmt" + "reflect" + "sort" + "sync" +) + +// errNoMessageTypeID occurs when a protocol buffer does not have a message type ID. +// A message type ID is required for storing a protocol buffer in a message set. +var errNoMessageTypeID = errors.New("proto does not have a message type ID") + +// The first two types (_MessageSet_Item and messageSet) +// model what the protocol compiler produces for the following protocol message: +// message MessageSet { +// repeated group Item = 1 { +// required int32 type_id = 2; +// required string message = 3; +// }; +// } +// That is the MessageSet wire format. We can't use a proto to generate these +// because that would introduce a circular dependency between it and this package. + +type _MessageSet_Item struct { + TypeId *int32 `protobuf:"varint,2,req,name=type_id"` + Message []byte `protobuf:"bytes,3,req,name=message"` +} + +type messageSet struct { + Item []*_MessageSet_Item `protobuf:"group,1,rep"` + XXX_unrecognized []byte + // TODO: caching? +} + +// Make sure messageSet is a Message. +var _ Message = (*messageSet)(nil) + +// messageTypeIder is an interface satisfied by a protocol buffer type +// that may be stored in a MessageSet. +type messageTypeIder interface { + MessageTypeId() int32 +} + +func (ms *messageSet) find(pb Message) *_MessageSet_Item { + mti, ok := pb.(messageTypeIder) + if !ok { + return nil + } + id := mti.MessageTypeId() + for _, item := range ms.Item { + if *item.TypeId == id { + return item + } + } + return nil +} + +func (ms *messageSet) Has(pb Message) bool { + return ms.find(pb) != nil +} + +func (ms *messageSet) Unmarshal(pb Message) error { + if item := ms.find(pb); item != nil { + return Unmarshal(item.Message, pb) + } + if _, ok := pb.(messageTypeIder); !ok { + return errNoMessageTypeID + } + return nil // TODO: return error instead? +} + +func (ms *messageSet) Marshal(pb Message) error { + msg, err := Marshal(pb) + if err != nil { + return err + } + if item := ms.find(pb); item != nil { + // reuse existing item + item.Message = msg + return nil + } + + mti, ok := pb.(messageTypeIder) + if !ok { + return errNoMessageTypeID + } + + mtid := mti.MessageTypeId() + ms.Item = append(ms.Item, &_MessageSet_Item{ + TypeId: &mtid, + Message: msg, + }) + return nil +} + +func (ms *messageSet) Reset() { *ms = messageSet{} } +func (ms *messageSet) String() string { return CompactTextString(ms) } +func (*messageSet) ProtoMessage() {} + +// Support for the message_set_wire_format message option. + +func skipVarint(buf []byte) []byte { + i := 0 + for ; buf[i]&0x80 != 0; i++ { + } + return buf[i+1:] +} + +// MarshalMessageSet encodes the extension map represented by m in the message set wire format. +// It is called by generated Marshal methods on protocol buffer messages with the message_set_wire_format option. +func MarshalMessageSet(exts interface{}) ([]byte, error) { + return marshalMessageSet(exts, false) +} + +// marshaMessageSet implements above function, with the opt to turn on / off deterministic during Marshal. +func marshalMessageSet(exts interface{}, deterministic bool) ([]byte, error) { + switch exts := exts.(type) { + case *XXX_InternalExtensions: + var u marshalInfo + siz := u.sizeMessageSet(exts) + b := make([]byte, 0, siz) + return u.appendMessageSet(b, exts, deterministic) + + case map[int32]Extension: + // This is an old-style extension map. + // Wrap it in a new-style XXX_InternalExtensions. + ie := XXX_InternalExtensions{ + p: &struct { + mu sync.Mutex + extensionMap map[int32]Extension + }{ + extensionMap: exts, + }, + } + + var u marshalInfo + siz := u.sizeMessageSet(&ie) + b := make([]byte, 0, siz) + return u.appendMessageSet(b, &ie, deterministic) + + default: + return nil, errors.New("proto: not an extension map") + } +} + +// UnmarshalMessageSet decodes the extension map encoded in buf in the message set wire format. +// It is called by Unmarshal methods on protocol buffer messages with the message_set_wire_format option. +func UnmarshalMessageSet(buf []byte, exts interface{}) error { + var m map[int32]Extension + switch exts := exts.(type) { + case *XXX_InternalExtensions: + m = exts.extensionsWrite() + case map[int32]Extension: + m = exts + default: + return errors.New("proto: not an extension map") + } + + ms := new(messageSet) + if err := Unmarshal(buf, ms); err != nil { + return err + } + for _, item := range ms.Item { + id := *item.TypeId + msg := item.Message + + // Restore wire type and field number varint, plus length varint. + // Be careful to preserve duplicate items. + b := EncodeVarint(uint64(id)<<3 | WireBytes) + if ext, ok := m[id]; ok { + // Existing data; rip off the tag and length varint + // so we join the new data correctly. + // We can assume that ext.enc is set because we are unmarshaling. + o := ext.enc[len(b):] // skip wire type and field number + _, n := DecodeVarint(o) // calculate length of length varint + o = o[n:] // skip length varint + msg = append(o, msg...) // join old data and new data + } + b = append(b, EncodeVarint(uint64(len(msg)))...) + b = append(b, msg...) + + m[id] = Extension{enc: b} + } + return nil +} + +// MarshalMessageSetJSON encodes the extension map represented by m in JSON format. +// It is called by generated MarshalJSON methods on protocol buffer messages with the message_set_wire_format option. +func MarshalMessageSetJSON(exts interface{}) ([]byte, error) { + var m map[int32]Extension + switch exts := exts.(type) { + case *XXX_InternalExtensions: + var mu sync.Locker + m, mu = exts.extensionsRead() + if m != nil { + // Keep the extensions map locked until we're done marshaling to prevent + // races between marshaling and unmarshaling the lazily-{en,de}coded + // values. + mu.Lock() + defer mu.Unlock() + } + case map[int32]Extension: + m = exts + default: + return nil, errors.New("proto: not an extension map") + } + var b bytes.Buffer + b.WriteByte('{') + + // Process the map in key order for deterministic output. + ids := make([]int32, 0, len(m)) + for id := range m { + ids = append(ids, id) + } + sort.Sort(int32Slice(ids)) // int32Slice defined in text.go + + for i, id := range ids { + ext := m[id] + msd, ok := messageSetMap[id] + if !ok { + // Unknown type; we can't render it, so skip it. + continue + } + + if i > 0 && b.Len() > 1 { + b.WriteByte(',') + } + + fmt.Fprintf(&b, `"[%s]":`, msd.name) + + x := ext.value + if x == nil { + x = reflect.New(msd.t.Elem()).Interface() + if err := Unmarshal(ext.enc, x.(Message)); err != nil { + return nil, err + } + } + d, err := json.Marshal(x) + if err != nil { + return nil, err + } + b.Write(d) + } + b.WriteByte('}') + return b.Bytes(), nil +} + +// UnmarshalMessageSetJSON decodes the extension map encoded in buf in JSON format. +// It is called by generated UnmarshalJSON methods on protocol buffer messages with the message_set_wire_format option. +func UnmarshalMessageSetJSON(buf []byte, exts interface{}) error { + // Common-case fast path. + if len(buf) == 0 || bytes.Equal(buf, []byte("{}")) { + return nil + } + + // This is fairly tricky, and it's not clear that it is needed. + return errors.New("TODO: UnmarshalMessageSetJSON not yet implemented") +} + +// A global registry of types that can be used in a MessageSet. + +var messageSetMap = make(map[int32]messageSetDesc) + +type messageSetDesc struct { + t reflect.Type // pointer to struct + name string +} + +// RegisterMessageSetType is called from the generated code. +func RegisterMessageSetType(m Message, fieldNum int32, name string) { + messageSetMap[fieldNum] = messageSetDesc{ + t: reflect.TypeOf(m), + name: name, + } +} diff --git a/vendor/github.com/gogo/protobuf/proto/pointer_reflect.go b/vendor/github.com/gogo/protobuf/proto/pointer_reflect.go new file mode 100644 index 000000000..b6cad9083 --- /dev/null +++ b/vendor/github.com/gogo/protobuf/proto/pointer_reflect.go @@ -0,0 +1,357 @@ +// Go support for Protocol Buffers - Google's data interchange format +// +// Copyright 2012 The Go Authors. All rights reserved. +// https://github.com/golang/protobuf +// +// Redistribution and use in source and binary forms, with or without +// modification, are permitted provided that the following conditions are +// met: +// +// * Redistributions of source code must retain the above copyright +// notice, this list of conditions and the following disclaimer. +// * Redistributions in binary form must reproduce the above +// copyright notice, this list of conditions and the following disclaimer +// in the documentation and/or other materials provided with the +// distribution. +// * Neither the name of Google Inc. nor the names of its +// contributors may be used to endorse or promote products derived from +// this software without specific prior written permission. +// +// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS +// "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT +// LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR +// A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT +// OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, +// SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT +// LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, +// DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY +// THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT +// (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE +// OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. + +// +build purego appengine js + +// This file contains an implementation of proto field accesses using package reflect. +// It is slower than the code in pointer_unsafe.go but it avoids package unsafe and can +// be used on App Engine. + +package proto + +import ( + "reflect" + "sync" +) + +const unsafeAllowed = false + +// A field identifies a field in a struct, accessible from a pointer. +// In this implementation, a field is identified by the sequence of field indices +// passed to reflect's FieldByIndex. +type field []int + +// toField returns a field equivalent to the given reflect field. +func toField(f *reflect.StructField) field { + return f.Index +} + +// invalidField is an invalid field identifier. +var invalidField = field(nil) + +// zeroField is a noop when calling pointer.offset. +var zeroField = field([]int{}) + +// IsValid reports whether the field identifier is valid. +func (f field) IsValid() bool { return f != nil } + +// The pointer type is for the table-driven decoder. +// The implementation here uses a reflect.Value of pointer type to +// create a generic pointer. In pointer_unsafe.go we use unsafe +// instead of reflect to implement the same (but faster) interface. +type pointer struct { + v reflect.Value +} + +// toPointer converts an interface of pointer type to a pointer +// that points to the same target. +func toPointer(i *Message) pointer { + return pointer{v: reflect.ValueOf(*i)} +} + +// toAddrPointer converts an interface to a pointer that points to +// the interface data. +func toAddrPointer(i *interface{}, isptr bool) pointer { + v := reflect.ValueOf(*i) + u := reflect.New(v.Type()) + u.Elem().Set(v) + return pointer{v: u} +} + +// valToPointer converts v to a pointer. v must be of pointer type. +func valToPointer(v reflect.Value) pointer { + return pointer{v: v} +} + +// offset converts from a pointer to a structure to a pointer to +// one of its fields. +func (p pointer) offset(f field) pointer { + return pointer{v: p.v.Elem().FieldByIndex(f).Addr()} +} + +func (p pointer) isNil() bool { + return p.v.IsNil() +} + +// grow updates the slice s in place to make it one element longer. +// s must be addressable. +// Returns the (addressable) new element. +func grow(s reflect.Value) reflect.Value { + n, m := s.Len(), s.Cap() + if n < m { + s.SetLen(n + 1) + } else { + s.Set(reflect.Append(s, reflect.Zero(s.Type().Elem()))) + } + return s.Index(n) +} + +func (p pointer) toInt64() *int64 { + return p.v.Interface().(*int64) +} +func (p pointer) toInt64Ptr() **int64 { + return p.v.Interface().(**int64) +} +func (p pointer) toInt64Slice() *[]int64 { + return p.v.Interface().(*[]int64) +} + +var int32ptr = reflect.TypeOf((*int32)(nil)) + +func (p pointer) toInt32() *int32 { + return p.v.Convert(int32ptr).Interface().(*int32) +} + +// The toInt32Ptr/Slice methods don't work because of enums. +// Instead, we must use set/get methods for the int32ptr/slice case. +/* + func (p pointer) toInt32Ptr() **int32 { + return p.v.Interface().(**int32) +} + func (p pointer) toInt32Slice() *[]int32 { + return p.v.Interface().(*[]int32) +} +*/ +func (p pointer) getInt32Ptr() *int32 { + if p.v.Type().Elem().Elem() == reflect.TypeOf(int32(0)) { + // raw int32 type + return p.v.Elem().Interface().(*int32) + } + // an enum + return p.v.Elem().Convert(int32PtrType).Interface().(*int32) +} +func (p pointer) setInt32Ptr(v int32) { + // Allocate value in a *int32. Possibly convert that to a *enum. + // Then assign it to a **int32 or **enum. + // Note: we can convert *int32 to *enum, but we can't convert + // **int32 to **enum! + p.v.Elem().Set(reflect.ValueOf(&v).Convert(p.v.Type().Elem())) +} + +// getInt32Slice copies []int32 from p as a new slice. +// This behavior differs from the implementation in pointer_unsafe.go. +func (p pointer) getInt32Slice() []int32 { + if p.v.Type().Elem().Elem() == reflect.TypeOf(int32(0)) { + // raw int32 type + return p.v.Elem().Interface().([]int32) + } + // an enum + // Allocate a []int32, then assign []enum's values into it. + // Note: we can't convert []enum to []int32. + slice := p.v.Elem() + s := make([]int32, slice.Len()) + for i := 0; i < slice.Len(); i++ { + s[i] = int32(slice.Index(i).Int()) + } + return s +} + +// setInt32Slice copies []int32 into p as a new slice. +// This behavior differs from the implementation in pointer_unsafe.go. +func (p pointer) setInt32Slice(v []int32) { + if p.v.Type().Elem().Elem() == reflect.TypeOf(int32(0)) { + // raw int32 type + p.v.Elem().Set(reflect.ValueOf(v)) + return + } + // an enum + // Allocate a []enum, then assign []int32's values into it. + // Note: we can't convert []enum to []int32. + slice := reflect.MakeSlice(p.v.Type().Elem(), len(v), cap(v)) + for i, x := range v { + slice.Index(i).SetInt(int64(x)) + } + p.v.Elem().Set(slice) +} +func (p pointer) appendInt32Slice(v int32) { + grow(p.v.Elem()).SetInt(int64(v)) +} + +func (p pointer) toUint64() *uint64 { + return p.v.Interface().(*uint64) +} +func (p pointer) toUint64Ptr() **uint64 { + return p.v.Interface().(**uint64) +} +func (p pointer) toUint64Slice() *[]uint64 { + return p.v.Interface().(*[]uint64) +} +func (p pointer) toUint32() *uint32 { + return p.v.Interface().(*uint32) +} +func (p pointer) toUint32Ptr() **uint32 { + return p.v.Interface().(**uint32) +} +func (p pointer) toUint32Slice() *[]uint32 { + return p.v.Interface().(*[]uint32) +} +func (p pointer) toBool() *bool { + return p.v.Interface().(*bool) +} +func (p pointer) toBoolPtr() **bool { + return p.v.Interface().(**bool) +} +func (p pointer) toBoolSlice() *[]bool { + return p.v.Interface().(*[]bool) +} +func (p pointer) toFloat64() *float64 { + return p.v.Interface().(*float64) +} +func (p pointer) toFloat64Ptr() **float64 { + return p.v.Interface().(**float64) +} +func (p pointer) toFloat64Slice() *[]float64 { + return p.v.Interface().(*[]float64) +} +func (p pointer) toFloat32() *float32 { + return p.v.Interface().(*float32) +} +func (p pointer) toFloat32Ptr() **float32 { + return p.v.Interface().(**float32) +} +func (p pointer) toFloat32Slice() *[]float32 { + return p.v.Interface().(*[]float32) +} +func (p pointer) toString() *string { + return p.v.Interface().(*string) +} +func (p pointer) toStringPtr() **string { + return p.v.Interface().(**string) +} +func (p pointer) toStringSlice() *[]string { + return p.v.Interface().(*[]string) +} +func (p pointer) toBytes() *[]byte { + return p.v.Interface().(*[]byte) +} +func (p pointer) toBytesSlice() *[][]byte { + return p.v.Interface().(*[][]byte) +} +func (p pointer) toExtensions() *XXX_InternalExtensions { + return p.v.Interface().(*XXX_InternalExtensions) +} +func (p pointer) toOldExtensions() *map[int32]Extension { + return p.v.Interface().(*map[int32]Extension) +} +func (p pointer) getPointer() pointer { + return pointer{v: p.v.Elem()} +} +func (p pointer) setPointer(q pointer) { + p.v.Elem().Set(q.v) +} +func (p pointer) appendPointer(q pointer) { + grow(p.v.Elem()).Set(q.v) +} + +// getPointerSlice copies []*T from p as a new []pointer. +// This behavior differs from the implementation in pointer_unsafe.go. +func (p pointer) getPointerSlice() []pointer { + if p.v.IsNil() { + return nil + } + n := p.v.Elem().Len() + s := make([]pointer, n) + for i := 0; i < n; i++ { + s[i] = pointer{v: p.v.Elem().Index(i)} + } + return s +} + +// setPointerSlice copies []pointer into p as a new []*T. +// This behavior differs from the implementation in pointer_unsafe.go. +func (p pointer) setPointerSlice(v []pointer) { + if v == nil { + p.v.Elem().Set(reflect.New(p.v.Elem().Type()).Elem()) + return + } + s := reflect.MakeSlice(p.v.Elem().Type(), 0, len(v)) + for _, p := range v { + s = reflect.Append(s, p.v) + } + p.v.Elem().Set(s) +} + +// getInterfacePointer returns a pointer that points to the +// interface data of the interface pointed by p. +func (p pointer) getInterfacePointer() pointer { + if p.v.Elem().IsNil() { + return pointer{v: p.v.Elem()} + } + return pointer{v: p.v.Elem().Elem().Elem().Field(0).Addr()} // *interface -> interface -> *struct -> struct +} + +func (p pointer) asPointerTo(t reflect.Type) reflect.Value { + // TODO: check that p.v.Type().Elem() == t? + return p.v +} + +func atomicLoadUnmarshalInfo(p **unmarshalInfo) *unmarshalInfo { + atomicLock.Lock() + defer atomicLock.Unlock() + return *p +} +func atomicStoreUnmarshalInfo(p **unmarshalInfo, v *unmarshalInfo) { + atomicLock.Lock() + defer atomicLock.Unlock() + *p = v +} +func atomicLoadMarshalInfo(p **marshalInfo) *marshalInfo { + atomicLock.Lock() + defer atomicLock.Unlock() + return *p +} +func atomicStoreMarshalInfo(p **marshalInfo, v *marshalInfo) { + atomicLock.Lock() + defer atomicLock.Unlock() + *p = v +} +func atomicLoadMergeInfo(p **mergeInfo) *mergeInfo { + atomicLock.Lock() + defer atomicLock.Unlock() + return *p +} +func atomicStoreMergeInfo(p **mergeInfo, v *mergeInfo) { + atomicLock.Lock() + defer atomicLock.Unlock() + *p = v +} +func atomicLoadDiscardInfo(p **discardInfo) *discardInfo { + atomicLock.Lock() + defer atomicLock.Unlock() + return *p +} +func atomicStoreDiscardInfo(p **discardInfo, v *discardInfo) { + atomicLock.Lock() + defer atomicLock.Unlock() + *p = v +} + +var atomicLock sync.Mutex diff --git a/vendor/github.com/gogo/protobuf/proto/pointer_reflect_gogo.go b/vendor/github.com/gogo/protobuf/proto/pointer_reflect_gogo.go new file mode 100644 index 000000000..7ffd3c29d --- /dev/null +++ b/vendor/github.com/gogo/protobuf/proto/pointer_reflect_gogo.go @@ -0,0 +1,59 @@ +// Protocol Buffers for Go with Gadgets +// +// Copyright (c) 2018, The GoGo Authors. All rights reserved. +// http://github.com/gogo/protobuf +// +// Redistribution and use in source and binary forms, with or without +// modification, are permitted provided that the following conditions are +// met: +// +// * Redistributions of source code must retain the above copyright +// notice, this list of conditions and the following disclaimer. +// * Redistributions in binary form must reproduce the above +// copyright notice, this list of conditions and the following disclaimer +// in the documentation and/or other materials provided with the +// distribution. +// +// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS +// "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT +// LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR +// A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT +// OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, +// SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT +// LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, +// DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY +// THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT +// (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE +// OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. + +// +build purego appengine js + +// This file contains an implementation of proto field accesses using package reflect. +// It is slower than the code in pointer_unsafe.go but it avoids package unsafe and can +// be used on App Engine. + +package proto + +import ( + "reflect" +) + +// TODO: untested, so probably incorrect. + +func (p pointer) getRef() pointer { + return pointer{v: p.v.Addr()} +} + +func (p pointer) appendRef(v pointer, typ reflect.Type) { + slice := p.getSlice(typ) + elem := v.asPointerTo(typ).Elem() + newSlice := reflect.Append(slice, elem) + slice.Set(newSlice) +} + +func (p pointer) getSlice(typ reflect.Type) reflect.Value { + sliceTyp := reflect.SliceOf(typ) + slice := p.asPointerTo(sliceTyp) + slice = slice.Elem() + return slice +} diff --git a/vendor/github.com/gogo/protobuf/proto/pointer_unsafe.go b/vendor/github.com/gogo/protobuf/proto/pointer_unsafe.go new file mode 100644 index 000000000..d55a335d9 --- /dev/null +++ b/vendor/github.com/gogo/protobuf/proto/pointer_unsafe.go @@ -0,0 +1,308 @@ +// Go support for Protocol Buffers - Google's data interchange format +// +// Copyright 2012 The Go Authors. All rights reserved. +// https://github.com/golang/protobuf +// +// Redistribution and use in source and binary forms, with or without +// modification, are permitted provided that the following conditions are +// met: +// +// * Redistributions of source code must retain the above copyright +// notice, this list of conditions and the following disclaimer. +// * Redistributions in binary form must reproduce the above +// copyright notice, this list of conditions and the following disclaimer +// in the documentation and/or other materials provided with the +// distribution. +// * Neither the name of Google Inc. nor the names of its +// contributors may be used to endorse or promote products derived from +// this software without specific prior written permission. +// +// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS +// "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT +// LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR +// A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT +// OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, +// SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT +// LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, +// DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY +// THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT +// (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE +// OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. + +// +build !purego,!appengine,!js + +// This file contains the implementation of the proto field accesses using package unsafe. + +package proto + +import ( + "reflect" + "sync/atomic" + "unsafe" +) + +const unsafeAllowed = true + +// A field identifies a field in a struct, accessible from a pointer. +// In this implementation, a field is identified by its byte offset from the start of the struct. +type field uintptr + +// toField returns a field equivalent to the given reflect field. +func toField(f *reflect.StructField) field { + return field(f.Offset) +} + +// invalidField is an invalid field identifier. +const invalidField = ^field(0) + +// zeroField is a noop when calling pointer.offset. +const zeroField = field(0) + +// IsValid reports whether the field identifier is valid. +func (f field) IsValid() bool { + return f != invalidField +} + +// The pointer type below is for the new table-driven encoder/decoder. +// The implementation here uses unsafe.Pointer to create a generic pointer. +// In pointer_reflect.go we use reflect instead of unsafe to implement +// the same (but slower) interface. +type pointer struct { + p unsafe.Pointer +} + +// size of pointer +var ptrSize = unsafe.Sizeof(uintptr(0)) + +// toPointer converts an interface of pointer type to a pointer +// that points to the same target. +func toPointer(i *Message) pointer { + // Super-tricky - read pointer out of data word of interface value. + // Saves ~25ns over the equivalent: + // return valToPointer(reflect.ValueOf(*i)) + return pointer{p: (*[2]unsafe.Pointer)(unsafe.Pointer(i))[1]} +} + +// toAddrPointer converts an interface to a pointer that points to +// the interface data. +func toAddrPointer(i *interface{}, isptr bool) pointer { + // Super-tricky - read or get the address of data word of interface value. + if isptr { + // The interface is of pointer type, thus it is a direct interface. + // The data word is the pointer data itself. We take its address. + return pointer{p: unsafe.Pointer(uintptr(unsafe.Pointer(i)) + ptrSize)} + } + // The interface is not of pointer type. The data word is the pointer + // to the data. + return pointer{p: (*[2]unsafe.Pointer)(unsafe.Pointer(i))[1]} +} + +// valToPointer converts v to a pointer. v must be of pointer type. +func valToPointer(v reflect.Value) pointer { + return pointer{p: unsafe.Pointer(v.Pointer())} +} + +// offset converts from a pointer to a structure to a pointer to +// one of its fields. +func (p pointer) offset(f field) pointer { + // For safety, we should panic if !f.IsValid, however calling panic causes + // this to no longer be inlineable, which is a serious performance cost. + /* + if !f.IsValid() { + panic("invalid field") + } + */ + return pointer{p: unsafe.Pointer(uintptr(p.p) + uintptr(f))} +} + +func (p pointer) isNil() bool { + return p.p == nil +} + +func (p pointer) toInt64() *int64 { + return (*int64)(p.p) +} +func (p pointer) toInt64Ptr() **int64 { + return (**int64)(p.p) +} +func (p pointer) toInt64Slice() *[]int64 { + return (*[]int64)(p.p) +} +func (p pointer) toInt32() *int32 { + return (*int32)(p.p) +} + +// See pointer_reflect.go for why toInt32Ptr/Slice doesn't exist. +/* + func (p pointer) toInt32Ptr() **int32 { + return (**int32)(p.p) + } + func (p pointer) toInt32Slice() *[]int32 { + return (*[]int32)(p.p) + } +*/ +func (p pointer) getInt32Ptr() *int32 { + return *(**int32)(p.p) +} +func (p pointer) setInt32Ptr(v int32) { + *(**int32)(p.p) = &v +} + +// getInt32Slice loads a []int32 from p. +// The value returned is aliased with the original slice. +// This behavior differs from the implementation in pointer_reflect.go. +func (p pointer) getInt32Slice() []int32 { + return *(*[]int32)(p.p) +} + +// setInt32Slice stores a []int32 to p. +// The value set is aliased with the input slice. +// This behavior differs from the implementation in pointer_reflect.go. +func (p pointer) setInt32Slice(v []int32) { + *(*[]int32)(p.p) = v +} + +// TODO: Can we get rid of appendInt32Slice and use setInt32Slice instead? +func (p pointer) appendInt32Slice(v int32) { + s := (*[]int32)(p.p) + *s = append(*s, v) +} + +func (p pointer) toUint64() *uint64 { + return (*uint64)(p.p) +} +func (p pointer) toUint64Ptr() **uint64 { + return (**uint64)(p.p) +} +func (p pointer) toUint64Slice() *[]uint64 { + return (*[]uint64)(p.p) +} +func (p pointer) toUint32() *uint32 { + return (*uint32)(p.p) +} +func (p pointer) toUint32Ptr() **uint32 { + return (**uint32)(p.p) +} +func (p pointer) toUint32Slice() *[]uint32 { + return (*[]uint32)(p.p) +} +func (p pointer) toBool() *bool { + return (*bool)(p.p) +} +func (p pointer) toBoolPtr() **bool { + return (**bool)(p.p) +} +func (p pointer) toBoolSlice() *[]bool { + return (*[]bool)(p.p) +} +func (p pointer) toFloat64() *float64 { + return (*float64)(p.p) +} +func (p pointer) toFloat64Ptr() **float64 { + return (**float64)(p.p) +} +func (p pointer) toFloat64Slice() *[]float64 { + return (*[]float64)(p.p) +} +func (p pointer) toFloat32() *float32 { + return (*float32)(p.p) +} +func (p pointer) toFloat32Ptr() **float32 { + return (**float32)(p.p) +} +func (p pointer) toFloat32Slice() *[]float32 { + return (*[]float32)(p.p) +} +func (p pointer) toString() *string { + return (*string)(p.p) +} +func (p pointer) toStringPtr() **string { + return (**string)(p.p) +} +func (p pointer) toStringSlice() *[]string { + return (*[]string)(p.p) +} +func (p pointer) toBytes() *[]byte { + return (*[]byte)(p.p) +} +func (p pointer) toBytesSlice() *[][]byte { + return (*[][]byte)(p.p) +} +func (p pointer) toExtensions() *XXX_InternalExtensions { + return (*XXX_InternalExtensions)(p.p) +} +func (p pointer) toOldExtensions() *map[int32]Extension { + return (*map[int32]Extension)(p.p) +} + +// getPointerSlice loads []*T from p as a []pointer. +// The value returned is aliased with the original slice. +// This behavior differs from the implementation in pointer_reflect.go. +func (p pointer) getPointerSlice() []pointer { + // Super-tricky - p should point to a []*T where T is a + // message type. We load it as []pointer. + return *(*[]pointer)(p.p) +} + +// setPointerSlice stores []pointer into p as a []*T. +// The value set is aliased with the input slice. +// This behavior differs from the implementation in pointer_reflect.go. +func (p pointer) setPointerSlice(v []pointer) { + // Super-tricky - p should point to a []*T where T is a + // message type. We store it as []pointer. + *(*[]pointer)(p.p) = v +} + +// getPointer loads the pointer at p and returns it. +func (p pointer) getPointer() pointer { + return pointer{p: *(*unsafe.Pointer)(p.p)} +} + +// setPointer stores the pointer q at p. +func (p pointer) setPointer(q pointer) { + *(*unsafe.Pointer)(p.p) = q.p +} + +// append q to the slice pointed to by p. +func (p pointer) appendPointer(q pointer) { + s := (*[]unsafe.Pointer)(p.p) + *s = append(*s, q.p) +} + +// getInterfacePointer returns a pointer that points to the +// interface data of the interface pointed by p. +func (p pointer) getInterfacePointer() pointer { + // Super-tricky - read pointer out of data word of interface value. + return pointer{p: (*(*[2]unsafe.Pointer)(p.p))[1]} +} + +// asPointerTo returns a reflect.Value that is a pointer to an +// object of type t stored at p. +func (p pointer) asPointerTo(t reflect.Type) reflect.Value { + return reflect.NewAt(t, p.p) +} + +func atomicLoadUnmarshalInfo(p **unmarshalInfo) *unmarshalInfo { + return (*unmarshalInfo)(atomic.LoadPointer((*unsafe.Pointer)(unsafe.Pointer(p)))) +} +func atomicStoreUnmarshalInfo(p **unmarshalInfo, v *unmarshalInfo) { + atomic.StorePointer((*unsafe.Pointer)(unsafe.Pointer(p)), unsafe.Pointer(v)) +} +func atomicLoadMarshalInfo(p **marshalInfo) *marshalInfo { + return (*marshalInfo)(atomic.LoadPointer((*unsafe.Pointer)(unsafe.Pointer(p)))) +} +func atomicStoreMarshalInfo(p **marshalInfo, v *marshalInfo) { + atomic.StorePointer((*unsafe.Pointer)(unsafe.Pointer(p)), unsafe.Pointer(v)) +} +func atomicLoadMergeInfo(p **mergeInfo) *mergeInfo { + return (*mergeInfo)(atomic.LoadPointer((*unsafe.Pointer)(unsafe.Pointer(p)))) +} +func atomicStoreMergeInfo(p **mergeInfo, v *mergeInfo) { + atomic.StorePointer((*unsafe.Pointer)(unsafe.Pointer(p)), unsafe.Pointer(v)) +} +func atomicLoadDiscardInfo(p **discardInfo) *discardInfo { + return (*discardInfo)(atomic.LoadPointer((*unsafe.Pointer)(unsafe.Pointer(p)))) +} +func atomicStoreDiscardInfo(p **discardInfo, v *discardInfo) { + atomic.StorePointer((*unsafe.Pointer)(unsafe.Pointer(p)), unsafe.Pointer(v)) +} diff --git a/vendor/github.com/gogo/protobuf/proto/pointer_unsafe_gogo.go b/vendor/github.com/gogo/protobuf/proto/pointer_unsafe_gogo.go new file mode 100644 index 000000000..aca8eed02 --- /dev/null +++ b/vendor/github.com/gogo/protobuf/proto/pointer_unsafe_gogo.go @@ -0,0 +1,56 @@ +// Protocol Buffers for Go with Gadgets +// +// Copyright (c) 2018, The GoGo Authors. All rights reserved. +// http://github.com/gogo/protobuf +// +// Redistribution and use in source and binary forms, with or without +// modification, are permitted provided that the following conditions are +// met: +// +// * Redistributions of source code must retain the above copyright +// notice, this list of conditions and the following disclaimer. +// * Redistributions in binary form must reproduce the above +// copyright notice, this list of conditions and the following disclaimer +// in the documentation and/or other materials provided with the +// distribution. +// +// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS +// "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT +// LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR +// A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT +// OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, +// SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT +// LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, +// DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY +// THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT +// (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE +// OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. + +// +build !purego,!appengine,!js + +// This file contains the implementation of the proto field accesses using package unsafe. + +package proto + +import ( + "reflect" + "unsafe" +) + +func (p pointer) getRef() pointer { + return pointer{p: (unsafe.Pointer)(&p.p)} +} + +func (p pointer) appendRef(v pointer, typ reflect.Type) { + slice := p.getSlice(typ) + elem := v.asPointerTo(typ).Elem() + newSlice := reflect.Append(slice, elem) + slice.Set(newSlice) +} + +func (p pointer) getSlice(typ reflect.Type) reflect.Value { + sliceTyp := reflect.SliceOf(typ) + slice := p.asPointerTo(sliceTyp) + slice = slice.Elem() + return slice +} diff --git a/vendor/github.com/gogo/protobuf/proto/properties.go b/vendor/github.com/gogo/protobuf/proto/properties.go new file mode 100644 index 000000000..7a5e28efe --- /dev/null +++ b/vendor/github.com/gogo/protobuf/proto/properties.go @@ -0,0 +1,600 @@ +// Protocol Buffers for Go with Gadgets +// +// Copyright (c) 2013, The GoGo Authors. All rights reserved. +// http://github.com/gogo/protobuf +// +// Go support for Protocol Buffers - Google's data interchange format +// +// Copyright 2010 The Go Authors. All rights reserved. +// https://github.com/golang/protobuf +// +// Redistribution and use in source and binary forms, with or without +// modification, are permitted provided that the following conditions are +// met: +// +// * Redistributions of source code must retain the above copyright +// notice, this list of conditions and the following disclaimer. +// * Redistributions in binary form must reproduce the above +// copyright notice, this list of conditions and the following disclaimer +// in the documentation and/or other materials provided with the +// distribution. +// * Neither the name of Google Inc. nor the names of its +// contributors may be used to endorse or promote products derived from +// this software without specific prior written permission. +// +// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS +// "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT +// LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR +// A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT +// OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, +// SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT +// LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, +// DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY +// THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT +// (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE +// OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. + +package proto + +/* + * Routines for encoding data into the wire format for protocol buffers. + */ + +import ( + "fmt" + "log" + "os" + "reflect" + "sort" + "strconv" + "strings" + "sync" +) + +const debug bool = false + +// Constants that identify the encoding of a value on the wire. +const ( + WireVarint = 0 + WireFixed64 = 1 + WireBytes = 2 + WireStartGroup = 3 + WireEndGroup = 4 + WireFixed32 = 5 +) + +// tagMap is an optimization over map[int]int for typical protocol buffer +// use-cases. Encoded protocol buffers are often in tag order with small tag +// numbers. +type tagMap struct { + fastTags []int + slowTags map[int]int +} + +// tagMapFastLimit is the upper bound on the tag number that will be stored in +// the tagMap slice rather than its map. +const tagMapFastLimit = 1024 + +func (p *tagMap) get(t int) (int, bool) { + if t > 0 && t < tagMapFastLimit { + if t >= len(p.fastTags) { + return 0, false + } + fi := p.fastTags[t] + return fi, fi >= 0 + } + fi, ok := p.slowTags[t] + return fi, ok +} + +func (p *tagMap) put(t int, fi int) { + if t > 0 && t < tagMapFastLimit { + for len(p.fastTags) < t+1 { + p.fastTags = append(p.fastTags, -1) + } + p.fastTags[t] = fi + return + } + if p.slowTags == nil { + p.slowTags = make(map[int]int) + } + p.slowTags[t] = fi +} + +// StructProperties represents properties for all the fields of a struct. +// decoderTags and decoderOrigNames should only be used by the decoder. +type StructProperties struct { + Prop []*Properties // properties for each field + reqCount int // required count + decoderTags tagMap // map from proto tag to struct field number + decoderOrigNames map[string]int // map from original name to struct field number + order []int // list of struct field numbers in tag order + + // OneofTypes contains information about the oneof fields in this message. + // It is keyed by the original name of a field. + OneofTypes map[string]*OneofProperties +} + +// OneofProperties represents information about a specific field in a oneof. +type OneofProperties struct { + Type reflect.Type // pointer to generated struct type for this oneof field + Field int // struct field number of the containing oneof in the message + Prop *Properties +} + +// Implement the sorting interface so we can sort the fields in tag order, as recommended by the spec. +// See encode.go, (*Buffer).enc_struct. + +func (sp *StructProperties) Len() int { return len(sp.order) } +func (sp *StructProperties) Less(i, j int) bool { + return sp.Prop[sp.order[i]].Tag < sp.Prop[sp.order[j]].Tag +} +func (sp *StructProperties) Swap(i, j int) { sp.order[i], sp.order[j] = sp.order[j], sp.order[i] } + +// Properties represents the protocol-specific behavior of a single struct field. +type Properties struct { + Name string // name of the field, for error messages + OrigName string // original name before protocol compiler (always set) + JSONName string // name to use for JSON; determined by protoc + Wire string + WireType int + Tag int + Required bool + Optional bool + Repeated bool + Packed bool // relevant for repeated primitives only + Enum string // set for enum types only + proto3 bool // whether this is known to be a proto3 field; set for []byte only + oneof bool // whether this is a oneof field + + Default string // default value + HasDefault bool // whether an explicit default was provided + CustomType string + CastType string + StdTime bool + StdDuration bool + + stype reflect.Type // set for struct types only + ctype reflect.Type // set for custom types only + sprop *StructProperties // set for struct types only + + mtype reflect.Type // set for map types only + mkeyprop *Properties // set for map types only + mvalprop *Properties // set for map types only +} + +// String formats the properties in the protobuf struct field tag style. +func (p *Properties) String() string { + s := p.Wire + s += "," + s += strconv.Itoa(p.Tag) + if p.Required { + s += ",req" + } + if p.Optional { + s += ",opt" + } + if p.Repeated { + s += ",rep" + } + if p.Packed { + s += ",packed" + } + s += ",name=" + p.OrigName + if p.JSONName != p.OrigName { + s += ",json=" + p.JSONName + } + if p.proto3 { + s += ",proto3" + } + if p.oneof { + s += ",oneof" + } + if len(p.Enum) > 0 { + s += ",enum=" + p.Enum + } + if p.HasDefault { + s += ",def=" + p.Default + } + return s +} + +// Parse populates p by parsing a string in the protobuf struct field tag style. +func (p *Properties) Parse(s string) { + // "bytes,49,opt,name=foo,def=hello!" + fields := strings.Split(s, ",") // breaks def=, but handled below. + if len(fields) < 2 { + fmt.Fprintf(os.Stderr, "proto: tag has too few fields: %q\n", s) + return + } + + p.Wire = fields[0] + switch p.Wire { + case "varint": + p.WireType = WireVarint + case "fixed32": + p.WireType = WireFixed32 + case "fixed64": + p.WireType = WireFixed64 + case "zigzag32": + p.WireType = WireVarint + case "zigzag64": + p.WireType = WireVarint + case "bytes", "group": + p.WireType = WireBytes + // no numeric converter for non-numeric types + default: + fmt.Fprintf(os.Stderr, "proto: tag has unknown wire type: %q\n", s) + return + } + + var err error + p.Tag, err = strconv.Atoi(fields[1]) + if err != nil { + return + } + +outer: + for i := 2; i < len(fields); i++ { + f := fields[i] + switch { + case f == "req": + p.Required = true + case f == "opt": + p.Optional = true + case f == "rep": + p.Repeated = true + case f == "packed": + p.Packed = true + case strings.HasPrefix(f, "name="): + p.OrigName = f[5:] + case strings.HasPrefix(f, "json="): + p.JSONName = f[5:] + case strings.HasPrefix(f, "enum="): + p.Enum = f[5:] + case f == "proto3": + p.proto3 = true + case f == "oneof": + p.oneof = true + case strings.HasPrefix(f, "def="): + p.HasDefault = true + p.Default = f[4:] // rest of string + if i+1 < len(fields) { + // Commas aren't escaped, and def is always last. + p.Default += "," + strings.Join(fields[i+1:], ",") + break outer + } + case strings.HasPrefix(f, "embedded="): + p.OrigName = strings.Split(f, "=")[1] + case strings.HasPrefix(f, "customtype="): + p.CustomType = strings.Split(f, "=")[1] + case strings.HasPrefix(f, "casttype="): + p.CastType = strings.Split(f, "=")[1] + case f == "stdtime": + p.StdTime = true + case f == "stdduration": + p.StdDuration = true + } + } +} + +var protoMessageType = reflect.TypeOf((*Message)(nil)).Elem() + +// setFieldProps initializes the field properties for submessages and maps. +func (p *Properties) setFieldProps(typ reflect.Type, f *reflect.StructField, lockGetProp bool) { + isMap := typ.Kind() == reflect.Map + if len(p.CustomType) > 0 && !isMap { + p.ctype = typ + p.setTag(lockGetProp) + return + } + if p.StdTime && !isMap { + p.setTag(lockGetProp) + return + } + if p.StdDuration && !isMap { + p.setTag(lockGetProp) + return + } + switch t1 := typ; t1.Kind() { + case reflect.Struct: + p.stype = typ + case reflect.Ptr: + if t1.Elem().Kind() == reflect.Struct { + p.stype = t1.Elem() + } + case reflect.Slice: + switch t2 := t1.Elem(); t2.Kind() { + case reflect.Ptr: + switch t3 := t2.Elem(); t3.Kind() { + case reflect.Struct: + p.stype = t3 + } + case reflect.Struct: + p.stype = t2 + } + + case reflect.Map: + + p.mtype = t1 + p.mkeyprop = &Properties{} + p.mkeyprop.init(reflect.PtrTo(p.mtype.Key()), "Key", f.Tag.Get("protobuf_key"), nil, lockGetProp) + p.mvalprop = &Properties{} + vtype := p.mtype.Elem() + if vtype.Kind() != reflect.Ptr && vtype.Kind() != reflect.Slice { + // The value type is not a message (*T) or bytes ([]byte), + // so we need encoders for the pointer to this type. + vtype = reflect.PtrTo(vtype) + } + + p.mvalprop.CustomType = p.CustomType + p.mvalprop.StdDuration = p.StdDuration + p.mvalprop.StdTime = p.StdTime + p.mvalprop.init(vtype, "Value", f.Tag.Get("protobuf_val"), nil, lockGetProp) + } + p.setTag(lockGetProp) +} + +func (p *Properties) setTag(lockGetProp bool) { + if p.stype != nil { + if lockGetProp { + p.sprop = GetProperties(p.stype) + } else { + p.sprop = getPropertiesLocked(p.stype) + } + } +} + +var ( + marshalerType = reflect.TypeOf((*Marshaler)(nil)).Elem() +) + +// Init populates the properties from a protocol buffer struct tag. +func (p *Properties) Init(typ reflect.Type, name, tag string, f *reflect.StructField) { + p.init(typ, name, tag, f, true) +} + +func (p *Properties) init(typ reflect.Type, name, tag string, f *reflect.StructField, lockGetProp bool) { + // "bytes,49,opt,def=hello!" + p.Name = name + p.OrigName = name + if tag == "" { + return + } + p.Parse(tag) + p.setFieldProps(typ, f, lockGetProp) +} + +var ( + propertiesMu sync.RWMutex + propertiesMap = make(map[reflect.Type]*StructProperties) +) + +// GetProperties returns the list of properties for the type represented by t. +// t must represent a generated struct type of a protocol message. +func GetProperties(t reflect.Type) *StructProperties { + if t.Kind() != reflect.Struct { + panic("proto: type must have kind struct") + } + + // Most calls to GetProperties in a long-running program will be + // retrieving details for types we have seen before. + propertiesMu.RLock() + sprop, ok := propertiesMap[t] + propertiesMu.RUnlock() + if ok { + if collectStats { + stats.Chit++ + } + return sprop + } + + propertiesMu.Lock() + sprop = getPropertiesLocked(t) + propertiesMu.Unlock() + return sprop +} + +// getPropertiesLocked requires that propertiesMu is held. +func getPropertiesLocked(t reflect.Type) *StructProperties { + if prop, ok := propertiesMap[t]; ok { + if collectStats { + stats.Chit++ + } + return prop + } + if collectStats { + stats.Cmiss++ + } + + prop := new(StructProperties) + // in case of recursive protos, fill this in now. + propertiesMap[t] = prop + + // build properties + prop.Prop = make([]*Properties, t.NumField()) + prop.order = make([]int, t.NumField()) + + isOneofMessage := false + for i := 0; i < t.NumField(); i++ { + f := t.Field(i) + p := new(Properties) + name := f.Name + p.init(f.Type, name, f.Tag.Get("protobuf"), &f, false) + + oneof := f.Tag.Get("protobuf_oneof") // special case + if oneof != "" { + isOneofMessage = true + // Oneof fields don't use the traditional protobuf tag. + p.OrigName = oneof + } + prop.Prop[i] = p + prop.order[i] = i + if debug { + print(i, " ", f.Name, " ", t.String(), " ") + if p.Tag > 0 { + print(p.String()) + } + print("\n") + } + } + + // Re-order prop.order. + sort.Sort(prop) + + type oneofMessage interface { + XXX_OneofFuncs() (func(Message, *Buffer) error, func(Message, int, int, *Buffer) (bool, error), func(Message) int, []interface{}) + } + if om, ok := reflect.Zero(reflect.PtrTo(t)).Interface().(oneofMessage); isOneofMessage && ok { + var oots []interface{} + _, _, _, oots = om.XXX_OneofFuncs() + + // Interpret oneof metadata. + prop.OneofTypes = make(map[string]*OneofProperties) + for _, oot := range oots { + oop := &OneofProperties{ + Type: reflect.ValueOf(oot).Type(), // *T + Prop: new(Properties), + } + sft := oop.Type.Elem().Field(0) + oop.Prop.Name = sft.Name + oop.Prop.Parse(sft.Tag.Get("protobuf")) + // There will be exactly one interface field that + // this new value is assignable to. + for i := 0; i < t.NumField(); i++ { + f := t.Field(i) + if f.Type.Kind() != reflect.Interface { + continue + } + if !oop.Type.AssignableTo(f.Type) { + continue + } + oop.Field = i + break + } + prop.OneofTypes[oop.Prop.OrigName] = oop + } + } + + // build required counts + // build tags + reqCount := 0 + prop.decoderOrigNames = make(map[string]int) + for i, p := range prop.Prop { + if strings.HasPrefix(p.Name, "XXX_") { + // Internal fields should not appear in tags/origNames maps. + // They are handled specially when encoding and decoding. + continue + } + if p.Required { + reqCount++ + } + prop.decoderTags.put(p.Tag, i) + prop.decoderOrigNames[p.OrigName] = i + } + prop.reqCount = reqCount + + return prop +} + +// A global registry of enum types. +// The generated code will register the generated maps by calling RegisterEnum. + +var enumValueMaps = make(map[string]map[string]int32) +var enumStringMaps = make(map[string]map[int32]string) + +// RegisterEnum is called from the generated code to install the enum descriptor +// maps into the global table to aid parsing text format protocol buffers. +func RegisterEnum(typeName string, unusedNameMap map[int32]string, valueMap map[string]int32) { + if _, ok := enumValueMaps[typeName]; ok { + panic("proto: duplicate enum registered: " + typeName) + } + enumValueMaps[typeName] = valueMap + if _, ok := enumStringMaps[typeName]; ok { + panic("proto: duplicate enum registered: " + typeName) + } + enumStringMaps[typeName] = unusedNameMap +} + +// EnumValueMap returns the mapping from names to integers of the +// enum type enumType, or a nil if not found. +func EnumValueMap(enumType string) map[string]int32 { + return enumValueMaps[enumType] +} + +// A registry of all linked message types. +// The string is a fully-qualified proto name ("pkg.Message"). +var ( + protoTypedNils = make(map[string]Message) // a map from proto names to typed nil pointers + protoMapTypes = make(map[string]reflect.Type) // a map from proto names to map types + revProtoTypes = make(map[reflect.Type]string) +) + +// RegisterType is called from generated code and maps from the fully qualified +// proto name to the type (pointer to struct) of the protocol buffer. +func RegisterType(x Message, name string) { + if _, ok := protoTypedNils[name]; ok { + // TODO: Some day, make this a panic. + log.Printf("proto: duplicate proto type registered: %s", name) + return + } + t := reflect.TypeOf(x) + if v := reflect.ValueOf(x); v.Kind() == reflect.Ptr && v.Pointer() == 0 { + // Generated code always calls RegisterType with nil x. + // This check is just for extra safety. + protoTypedNils[name] = x + } else { + protoTypedNils[name] = reflect.Zero(t).Interface().(Message) + } + revProtoTypes[t] = name +} + +// RegisterMapType is called from generated code and maps from the fully qualified +// proto name to the native map type of the proto map definition. +func RegisterMapType(x interface{}, name string) { + if reflect.TypeOf(x).Kind() != reflect.Map { + panic(fmt.Sprintf("RegisterMapType(%T, %q); want map", x, name)) + } + if _, ok := protoMapTypes[name]; ok { + log.Printf("proto: duplicate proto type registered: %s", name) + return + } + t := reflect.TypeOf(x) + protoMapTypes[name] = t + revProtoTypes[t] = name +} + +// MessageName returns the fully-qualified proto name for the given message type. +func MessageName(x Message) string { + type xname interface { + XXX_MessageName() string + } + if m, ok := x.(xname); ok { + return m.XXX_MessageName() + } + return revProtoTypes[reflect.TypeOf(x)] +} + +// MessageType returns the message type (pointer to struct) for a named message. +// The type is not guaranteed to implement proto.Message if the name refers to a +// map entry. +func MessageType(name string) reflect.Type { + if t, ok := protoTypedNils[name]; ok { + return reflect.TypeOf(t) + } + return protoMapTypes[name] +} + +// A registry of all linked proto files. +var ( + protoFiles = make(map[string][]byte) // file name => fileDescriptor +) + +// RegisterFile is called from generated code and maps from the +// full file name of a .proto file to its compressed FileDescriptorProto. +func RegisterFile(filename string, fileDescriptor []byte) { + protoFiles[filename] = fileDescriptor +} + +// FileDescriptor returns the compressed FileDescriptorProto for a .proto file. +func FileDescriptor(filename string) []byte { return protoFiles[filename] } diff --git a/vendor/github.com/gogo/protobuf/proto/properties_gogo.go b/vendor/github.com/gogo/protobuf/proto/properties_gogo.go new file mode 100644 index 000000000..40ea3dd93 --- /dev/null +++ b/vendor/github.com/gogo/protobuf/proto/properties_gogo.go @@ -0,0 +1,36 @@ +// Protocol Buffers for Go with Gadgets +// +// Copyright (c) 2018, The GoGo Authors. All rights reserved. +// http://github.com/gogo/protobuf +// +// Redistribution and use in source and binary forms, with or without +// modification, are permitted provided that the following conditions are +// met: +// +// * Redistributions of source code must retain the above copyright +// notice, this list of conditions and the following disclaimer. +// * Redistributions in binary form must reproduce the above +// copyright notice, this list of conditions and the following disclaimer +// in the documentation and/or other materials provided with the +// distribution. +// +// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS +// "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT +// LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR +// A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT +// OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, +// SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT +// LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, +// DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY +// THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT +// (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE +// OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. + +package proto + +import ( + "reflect" +) + +var sizerType = reflect.TypeOf((*Sizer)(nil)).Elem() +var protosizerType = reflect.TypeOf((*ProtoSizer)(nil)).Elem() diff --git a/vendor/github.com/gogo/protobuf/proto/skip_gogo.go b/vendor/github.com/gogo/protobuf/proto/skip_gogo.go new file mode 100644 index 000000000..5a5fd93f7 --- /dev/null +++ b/vendor/github.com/gogo/protobuf/proto/skip_gogo.go @@ -0,0 +1,119 @@ +// Protocol Buffers for Go with Gadgets +// +// Copyright (c) 2013, The GoGo Authors. All rights reserved. +// http://github.com/gogo/protobuf +// +// Redistribution and use in source and binary forms, with or without +// modification, are permitted provided that the following conditions are +// met: +// +// * Redistributions of source code must retain the above copyright +// notice, this list of conditions and the following disclaimer. +// * Redistributions in binary form must reproduce the above +// copyright notice, this list of conditions and the following disclaimer +// in the documentation and/or other materials provided with the +// distribution. +// +// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS +// "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT +// LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR +// A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT +// OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, +// SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT +// LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, +// DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY +// THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT +// (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE +// OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. + +package proto + +import ( + "fmt" + "io" +) + +func Skip(data []byte) (n int, err error) { + l := len(data) + index := 0 + for index < l { + var wire uint64 + for shift := uint(0); ; shift += 7 { + if index >= l { + return 0, io.ErrUnexpectedEOF + } + b := data[index] + index++ + wire |= (uint64(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + wireType := int(wire & 0x7) + switch wireType { + case 0: + for { + if index >= l { + return 0, io.ErrUnexpectedEOF + } + index++ + if data[index-1] < 0x80 { + break + } + } + return index, nil + case 1: + index += 8 + return index, nil + case 2: + var length int + for shift := uint(0); ; shift += 7 { + if index >= l { + return 0, io.ErrUnexpectedEOF + } + b := data[index] + index++ + length |= (int(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + index += length + return index, nil + case 3: + for { + var innerWire uint64 + var start int = index + for shift := uint(0); ; shift += 7 { + if index >= l { + return 0, io.ErrUnexpectedEOF + } + b := data[index] + index++ + innerWire |= (uint64(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + innerWireType := int(innerWire & 0x7) + if innerWireType == 4 { + break + } + next, err := Skip(data[start:]) + if err != nil { + return 0, err + } + index = start + next + } + return index, nil + case 4: + return index, nil + case 5: + index += 4 + return index, nil + default: + return 0, fmt.Errorf("proto: illegal wireType %d", wireType) + } + } + panic("unreachable") +} diff --git a/vendor/github.com/gogo/protobuf/proto/table_marshal.go b/vendor/github.com/gogo/protobuf/proto/table_marshal.go new file mode 100644 index 000000000..3d233d191 --- /dev/null +++ b/vendor/github.com/gogo/protobuf/proto/table_marshal.go @@ -0,0 +1,2799 @@ +// Go support for Protocol Buffers - Google's data interchange format +// +// Copyright 2016 The Go Authors. All rights reserved. +// https://github.com/golang/protobuf +// +// Redistribution and use in source and binary forms, with or without +// modification, are permitted provided that the following conditions are +// met: +// +// * Redistributions of source code must retain the above copyright +// notice, this list of conditions and the following disclaimer. +// * Redistributions in binary form must reproduce the above +// copyright notice, this list of conditions and the following disclaimer +// in the documentation and/or other materials provided with the +// distribution. +// * Neither the name of Google Inc. nor the names of its +// contributors may be used to endorse or promote products derived from +// this software without specific prior written permission. +// +// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS +// "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT +// LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR +// A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT +// OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, +// SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT +// LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, +// DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY +// THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT +// (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE +// OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. + +package proto + +import ( + "errors" + "fmt" + "math" + "reflect" + "sort" + "strconv" + "strings" + "sync" + "sync/atomic" + "unicode/utf8" +) + +// a sizer takes a pointer to a field and the size of its tag, computes the size of +// the encoded data. +type sizer func(pointer, int) int + +// a marshaler takes a byte slice, a pointer to a field, and its tag (in wire format), +// marshals the field to the end of the slice, returns the slice and error (if any). +type marshaler func(b []byte, ptr pointer, wiretag uint64, deterministic bool) ([]byte, error) + +// marshalInfo is the information used for marshaling a message. +type marshalInfo struct { + typ reflect.Type + fields []*marshalFieldInfo + unrecognized field // offset of XXX_unrecognized + extensions field // offset of XXX_InternalExtensions + v1extensions field // offset of XXX_extensions + sizecache field // offset of XXX_sizecache + initialized int32 // 0 -- only typ is set, 1 -- fully initialized + messageset bool // uses message set wire format + hasmarshaler bool // has custom marshaler + sync.RWMutex // protect extElems map, also for initialization + extElems map[int32]*marshalElemInfo // info of extension elements + + hassizer bool // has custom sizer + hasprotosizer bool // has custom protosizer + + bytesExtensions field // offset of XXX_extensions where the field type is []byte +} + +// marshalFieldInfo is the information used for marshaling a field of a message. +type marshalFieldInfo struct { + field field + wiretag uint64 // tag in wire format + tagsize int // size of tag in wire format + sizer sizer + marshaler marshaler + isPointer bool + required bool // field is required + name string // name of the field, for error reporting + oneofElems map[reflect.Type]*marshalElemInfo // info of oneof elements +} + +// marshalElemInfo is the information used for marshaling an extension or oneof element. +type marshalElemInfo struct { + wiretag uint64 // tag in wire format + tagsize int // size of tag in wire format + sizer sizer + marshaler marshaler + isptr bool // elem is pointer typed, thus interface of this type is a direct interface (extension only) +} + +var ( + marshalInfoMap = map[reflect.Type]*marshalInfo{} + marshalInfoLock sync.Mutex +) + +// getMarshalInfo returns the information to marshal a given type of message. +// The info it returns may not necessarily initialized. +// t is the type of the message (NOT the pointer to it). +func getMarshalInfo(t reflect.Type) *marshalInfo { + marshalInfoLock.Lock() + u, ok := marshalInfoMap[t] + if !ok { + u = &marshalInfo{typ: t} + marshalInfoMap[t] = u + } + marshalInfoLock.Unlock() + return u +} + +// Size is the entry point from generated code, +// and should be ONLY called by generated code. +// It computes the size of encoded data of msg. +// a is a pointer to a place to store cached marshal info. +func (a *InternalMessageInfo) Size(msg Message) int { + u := getMessageMarshalInfo(msg, a) + ptr := toPointer(&msg) + if ptr.isNil() { + // We get here if msg is a typed nil ((*SomeMessage)(nil)), + // so it satisfies the interface, and msg == nil wouldn't + // catch it. We don't want crash in this case. + return 0 + } + return u.size(ptr) +} + +// Marshal is the entry point from generated code, +// and should be ONLY called by generated code. +// It marshals msg to the end of b. +// a is a pointer to a place to store cached marshal info. +func (a *InternalMessageInfo) Marshal(b []byte, msg Message, deterministic bool) ([]byte, error) { + u := getMessageMarshalInfo(msg, a) + ptr := toPointer(&msg) + if ptr.isNil() { + // We get here if msg is a typed nil ((*SomeMessage)(nil)), + // so it satisfies the interface, and msg == nil wouldn't + // catch it. We don't want crash in this case. + return b, ErrNil + } + return u.marshal(b, ptr, deterministic) +} + +func getMessageMarshalInfo(msg interface{}, a *InternalMessageInfo) *marshalInfo { + // u := a.marshal, but atomically. + // We use an atomic here to ensure memory consistency. + u := atomicLoadMarshalInfo(&a.marshal) + if u == nil { + // Get marshal information from type of message. + t := reflect.ValueOf(msg).Type() + if t.Kind() != reflect.Ptr { + panic(fmt.Sprintf("cannot handle non-pointer message type %v", t)) + } + u = getMarshalInfo(t.Elem()) + // Store it in the cache for later users. + // a.marshal = u, but atomically. + atomicStoreMarshalInfo(&a.marshal, u) + } + return u +} + +// size is the main function to compute the size of the encoded data of a message. +// ptr is the pointer to the message. +func (u *marshalInfo) size(ptr pointer) int { + if atomic.LoadInt32(&u.initialized) == 0 { + u.computeMarshalInfo() + } + + // If the message can marshal itself, let it do it, for compatibility. + // NOTE: This is not efficient. + if u.hasmarshaler { + // Uses the message's Size method if available + if u.hassizer { + s := ptr.asPointerTo(u.typ).Interface().(Sizer) + return s.Size() + } + // Uses the message's ProtoSize method if available + if u.hasprotosizer { + s := ptr.asPointerTo(u.typ).Interface().(ProtoSizer) + return s.ProtoSize() + } + + m := ptr.asPointerTo(u.typ).Interface().(Marshaler) + b, _ := m.Marshal() + return len(b) + } + + n := 0 + for _, f := range u.fields { + if f.isPointer && ptr.offset(f.field).getPointer().isNil() { + // nil pointer always marshals to nothing + continue + } + n += f.sizer(ptr.offset(f.field), f.tagsize) + } + if u.extensions.IsValid() { + e := ptr.offset(u.extensions).toExtensions() + if u.messageset { + n += u.sizeMessageSet(e) + } else { + n += u.sizeExtensions(e) + } + } + if u.v1extensions.IsValid() { + m := *ptr.offset(u.v1extensions).toOldExtensions() + n += u.sizeV1Extensions(m) + } + if u.bytesExtensions.IsValid() { + s := *ptr.offset(u.bytesExtensions).toBytes() + n += len(s) + } + if u.unrecognized.IsValid() { + s := *ptr.offset(u.unrecognized).toBytes() + n += len(s) + } + + // cache the result for use in marshal + if u.sizecache.IsValid() { + atomic.StoreInt32(ptr.offset(u.sizecache).toInt32(), int32(n)) + } + return n +} + +// cachedsize gets the size from cache. If there is no cache (i.e. message is not generated), +// fall back to compute the size. +func (u *marshalInfo) cachedsize(ptr pointer) int { + if u.sizecache.IsValid() { + return int(atomic.LoadInt32(ptr.offset(u.sizecache).toInt32())) + } + return u.size(ptr) +} + +// marshal is the main function to marshal a message. It takes a byte slice and appends +// the encoded data to the end of the slice, returns the slice and error (if any). +// ptr is the pointer to the message. +// If deterministic is true, map is marshaled in deterministic order. +func (u *marshalInfo) marshal(b []byte, ptr pointer, deterministic bool) ([]byte, error) { + if atomic.LoadInt32(&u.initialized) == 0 { + u.computeMarshalInfo() + } + + // If the message can marshal itself, let it do it, for compatibility. + // NOTE: This is not efficient. + if u.hasmarshaler { + if deterministic { + return nil, errors.New("proto: deterministic not supported by the Marshal method of " + u.typ.String()) + } + m := ptr.asPointerTo(u.typ).Interface().(Marshaler) + b1, err := m.Marshal() + b = append(b, b1...) + return b, err + } + + var err, errreq error + // The old marshaler encodes extensions at beginning. + if u.extensions.IsValid() { + e := ptr.offset(u.extensions).toExtensions() + if u.messageset { + b, err = u.appendMessageSet(b, e, deterministic) + } else { + b, err = u.appendExtensions(b, e, deterministic) + } + if err != nil { + return b, err + } + } + if u.v1extensions.IsValid() { + m := *ptr.offset(u.v1extensions).toOldExtensions() + b, err = u.appendV1Extensions(b, m, deterministic) + if err != nil { + return b, err + } + } + if u.bytesExtensions.IsValid() { + s := *ptr.offset(u.bytesExtensions).toBytes() + b = append(b, s...) + } + for _, f := range u.fields { + if f.required && errreq == nil { + if f.isPointer && ptr.offset(f.field).getPointer().isNil() { + // Required field is not set. + // We record the error but keep going, to give a complete marshaling. + errreq = &RequiredNotSetError{f.name} + continue + } + } + if f.isPointer && ptr.offset(f.field).getPointer().isNil() { + // nil pointer always marshals to nothing + continue + } + b, err = f.marshaler(b, ptr.offset(f.field), f.wiretag, deterministic) + if err != nil { + if err1, ok := err.(*RequiredNotSetError); ok { + // Required field in submessage is not set. + // We record the error but keep going, to give a complete marshaling. + if errreq == nil { + errreq = &RequiredNotSetError{f.name + "." + err1.field} + } + continue + } + if err == errRepeatedHasNil { + err = errors.New("proto: repeated field " + f.name + " has nil element") + } + return b, err + } + } + if u.unrecognized.IsValid() { + s := *ptr.offset(u.unrecognized).toBytes() + b = append(b, s...) + } + return b, errreq +} + +// computeMarshalInfo initializes the marshal info. +func (u *marshalInfo) computeMarshalInfo() { + u.Lock() + defer u.Unlock() + if u.initialized != 0 { // non-atomic read is ok as it is protected by the lock + return + } + + t := u.typ + u.unrecognized = invalidField + u.extensions = invalidField + u.v1extensions = invalidField + u.bytesExtensions = invalidField + u.sizecache = invalidField + isOneofMessage := false + + if reflect.PtrTo(t).Implements(sizerType) { + u.hassizer = true + } + if reflect.PtrTo(t).Implements(protosizerType) { + u.hasprotosizer = true + } + // If the message can marshal itself, let it do it, for compatibility. + // NOTE: This is not efficient. + if reflect.PtrTo(t).Implements(marshalerType) { + u.hasmarshaler = true + atomic.StoreInt32(&u.initialized, 1) + return + } + + n := t.NumField() + + // deal with XXX fields first + for i := 0; i < t.NumField(); i++ { + f := t.Field(i) + if f.Tag.Get("protobuf_oneof") != "" { + isOneofMessage = true + } + if !strings.HasPrefix(f.Name, "XXX_") { + continue + } + switch f.Name { + case "XXX_sizecache": + u.sizecache = toField(&f) + case "XXX_unrecognized": + u.unrecognized = toField(&f) + case "XXX_InternalExtensions": + u.extensions = toField(&f) + u.messageset = f.Tag.Get("protobuf_messageset") == "1" + case "XXX_extensions": + if f.Type.Kind() == reflect.Map { + u.v1extensions = toField(&f) + } else { + u.bytesExtensions = toField(&f) + } + case "XXX_NoUnkeyedLiteral": + // nothing to do + default: + panic("unknown XXX field: " + f.Name) + } + n-- + } + + // get oneof implementers + var oneofImplementers []interface{} + // gogo: isOneofMessage is needed for embedded oneof messages, without a marshaler and unmarshaler + if m, ok := reflect.Zero(reflect.PtrTo(t)).Interface().(oneofMessage); ok && isOneofMessage { + _, _, _, oneofImplementers = m.XXX_OneofFuncs() + } + + // normal fields + fields := make([]marshalFieldInfo, n) // batch allocation + u.fields = make([]*marshalFieldInfo, 0, n) + for i, j := 0, 0; i < t.NumField(); i++ { + f := t.Field(i) + + if strings.HasPrefix(f.Name, "XXX_") { + continue + } + field := &fields[j] + j++ + field.name = f.Name + u.fields = append(u.fields, field) + if f.Tag.Get("protobuf_oneof") != "" { + field.computeOneofFieldInfo(&f, oneofImplementers) + continue + } + if f.Tag.Get("protobuf") == "" { + // field has no tag (not in generated message), ignore it + u.fields = u.fields[:len(u.fields)-1] + j-- + continue + } + field.computeMarshalFieldInfo(&f) + } + + // fields are marshaled in tag order on the wire. + sort.Sort(byTag(u.fields)) + + atomic.StoreInt32(&u.initialized, 1) +} + +// helper for sorting fields by tag +type byTag []*marshalFieldInfo + +func (a byTag) Len() int { return len(a) } +func (a byTag) Swap(i, j int) { a[i], a[j] = a[j], a[i] } +func (a byTag) Less(i, j int) bool { return a[i].wiretag < a[j].wiretag } + +// getExtElemInfo returns the information to marshal an extension element. +// The info it returns is initialized. +func (u *marshalInfo) getExtElemInfo(desc *ExtensionDesc) *marshalElemInfo { + // get from cache first + u.RLock() + e, ok := u.extElems[desc.Field] + u.RUnlock() + if ok { + return e + } + + t := reflect.TypeOf(desc.ExtensionType) // pointer or slice to basic type or struct + tags := strings.Split(desc.Tag, ",") + tag, err := strconv.Atoi(tags[1]) + if err != nil { + panic("tag is not an integer") + } + wt := wiretype(tags[0]) + sizr, marshalr := typeMarshaler(t, tags, false, false) + e = &marshalElemInfo{ + wiretag: uint64(tag)<<3 | wt, + tagsize: SizeVarint(uint64(tag) << 3), + sizer: sizr, + marshaler: marshalr, + isptr: t.Kind() == reflect.Ptr, + } + + // update cache + u.Lock() + if u.extElems == nil { + u.extElems = make(map[int32]*marshalElemInfo) + } + u.extElems[desc.Field] = e + u.Unlock() + return e +} + +// computeMarshalFieldInfo fills up the information to marshal a field. +func (fi *marshalFieldInfo) computeMarshalFieldInfo(f *reflect.StructField) { + // parse protobuf tag of the field. + // tag has format of "bytes,49,opt,name=foo,def=hello!" + tags := strings.Split(f.Tag.Get("protobuf"), ",") + if tags[0] == "" { + return + } + tag, err := strconv.Atoi(tags[1]) + if err != nil { + panic("tag is not an integer") + } + wt := wiretype(tags[0]) + if tags[2] == "req" { + fi.required = true + } + fi.setTag(f, tag, wt) + fi.setMarshaler(f, tags) +} + +func (fi *marshalFieldInfo) computeOneofFieldInfo(f *reflect.StructField, oneofImplementers []interface{}) { + fi.field = toField(f) + fi.wiretag = 1<<31 - 1 // Use a large tag number, make oneofs sorted at the end. This tag will not appear on the wire. + fi.isPointer = true + fi.sizer, fi.marshaler = makeOneOfMarshaler(fi, f) + fi.oneofElems = make(map[reflect.Type]*marshalElemInfo) + + ityp := f.Type // interface type + for _, o := range oneofImplementers { + t := reflect.TypeOf(o) + if !t.Implements(ityp) { + continue + } + sf := t.Elem().Field(0) // oneof implementer is a struct with a single field + tags := strings.Split(sf.Tag.Get("protobuf"), ",") + tag, err := strconv.Atoi(tags[1]) + if err != nil { + panic("tag is not an integer") + } + wt := wiretype(tags[0]) + sizr, marshalr := typeMarshaler(sf.Type, tags, false, true) // oneof should not omit any zero value + fi.oneofElems[t.Elem()] = &marshalElemInfo{ + wiretag: uint64(tag)<<3 | wt, + tagsize: SizeVarint(uint64(tag) << 3), + sizer: sizr, + marshaler: marshalr, + } + } +} + +type oneofMessage interface { + XXX_OneofFuncs() (func(Message, *Buffer) error, func(Message, int, int, *Buffer) (bool, error), func(Message) int, []interface{}) +} + +// wiretype returns the wire encoding of the type. +func wiretype(encoding string) uint64 { + switch encoding { + case "fixed32": + return WireFixed32 + case "fixed64": + return WireFixed64 + case "varint", "zigzag32", "zigzag64": + return WireVarint + case "bytes": + return WireBytes + case "group": + return WireStartGroup + } + panic("unknown wire type " + encoding) +} + +// setTag fills up the tag (in wire format) and its size in the info of a field. +func (fi *marshalFieldInfo) setTag(f *reflect.StructField, tag int, wt uint64) { + fi.field = toField(f) + fi.wiretag = uint64(tag)<<3 | wt + fi.tagsize = SizeVarint(uint64(tag) << 3) +} + +// setMarshaler fills up the sizer and marshaler in the info of a field. +func (fi *marshalFieldInfo) setMarshaler(f *reflect.StructField, tags []string) { + switch f.Type.Kind() { + case reflect.Map: + // map field + fi.isPointer = true + fi.sizer, fi.marshaler = makeMapMarshaler(f) + return + case reflect.Ptr, reflect.Slice: + fi.isPointer = true + } + fi.sizer, fi.marshaler = typeMarshaler(f.Type, tags, true, false) +} + +// typeMarshaler returns the sizer and marshaler of a given field. +// t is the type of the field. +// tags is the generated "protobuf" tag of the field. +// If nozero is true, zero value is not marshaled to the wire. +// If oneof is true, it is a oneof field. +func typeMarshaler(t reflect.Type, tags []string, nozero, oneof bool) (sizer, marshaler) { + encoding := tags[0] + + pointer := false + slice := false + if t.Kind() == reflect.Slice && t.Elem().Kind() != reflect.Uint8 { + slice = true + t = t.Elem() + } + if t.Kind() == reflect.Ptr { + pointer = true + t = t.Elem() + } + + packed := false + proto3 := false + ctype := false + isTime := false + isDuration := false + for i := 2; i < len(tags); i++ { + if tags[i] == "packed" { + packed = true + } + if tags[i] == "proto3" { + proto3 = true + } + if strings.HasPrefix(tags[i], "customtype=") { + ctype = true + } + if tags[i] == "stdtime" { + isTime = true + } + if tags[i] == "stdduration" { + isDuration = true + } + } + if !proto3 && !pointer && !slice { + nozero = false + } + + if ctype { + if reflect.PtrTo(t).Implements(customType) { + if slice { + return makeMessageRefSliceMarshaler(getMarshalInfo(t)) + } + if pointer { + return makeCustomPtrMarshaler(getMarshalInfo(t)) + } + return makeCustomMarshaler(getMarshalInfo(t)) + } else { + panic(fmt.Sprintf("custom type: type: %v, does not implement the proto.custom interface", t)) + } + } + + if isTime { + if pointer { + if slice { + return makeTimePtrSliceMarshaler(getMarshalInfo(t)) + } + return makeTimePtrMarshaler(getMarshalInfo(t)) + } + if slice { + return makeTimeSliceMarshaler(getMarshalInfo(t)) + } + return makeTimeMarshaler(getMarshalInfo(t)) + } + + if isDuration { + if pointer { + if slice { + return makeDurationPtrSliceMarshaler(getMarshalInfo(t)) + } + return makeDurationPtrMarshaler(getMarshalInfo(t)) + } + if slice { + return makeDurationSliceMarshaler(getMarshalInfo(t)) + } + return makeDurationMarshaler(getMarshalInfo(t)) + } + + switch t.Kind() { + case reflect.Bool: + if pointer { + return sizeBoolPtr, appendBoolPtr + } + if slice { + if packed { + return sizeBoolPackedSlice, appendBoolPackedSlice + } + return sizeBoolSlice, appendBoolSlice + } + if nozero { + return sizeBoolValueNoZero, appendBoolValueNoZero + } + return sizeBoolValue, appendBoolValue + case reflect.Uint32: + switch encoding { + case "fixed32": + if pointer { + return sizeFixed32Ptr, appendFixed32Ptr + } + if slice { + if packed { + return sizeFixed32PackedSlice, appendFixed32PackedSlice + } + return sizeFixed32Slice, appendFixed32Slice + } + if nozero { + return sizeFixed32ValueNoZero, appendFixed32ValueNoZero + } + return sizeFixed32Value, appendFixed32Value + case "varint": + if pointer { + return sizeVarint32Ptr, appendVarint32Ptr + } + if slice { + if packed { + return sizeVarint32PackedSlice, appendVarint32PackedSlice + } + return sizeVarint32Slice, appendVarint32Slice + } + if nozero { + return sizeVarint32ValueNoZero, appendVarint32ValueNoZero + } + return sizeVarint32Value, appendVarint32Value + } + case reflect.Int32: + switch encoding { + case "fixed32": + if pointer { + return sizeFixedS32Ptr, appendFixedS32Ptr + } + if slice { + if packed { + return sizeFixedS32PackedSlice, appendFixedS32PackedSlice + } + return sizeFixedS32Slice, appendFixedS32Slice + } + if nozero { + return sizeFixedS32ValueNoZero, appendFixedS32ValueNoZero + } + return sizeFixedS32Value, appendFixedS32Value + case "varint": + if pointer { + return sizeVarintS32Ptr, appendVarintS32Ptr + } + if slice { + if packed { + return sizeVarintS32PackedSlice, appendVarintS32PackedSlice + } + return sizeVarintS32Slice, appendVarintS32Slice + } + if nozero { + return sizeVarintS32ValueNoZero, appendVarintS32ValueNoZero + } + return sizeVarintS32Value, appendVarintS32Value + case "zigzag32": + if pointer { + return sizeZigzag32Ptr, appendZigzag32Ptr + } + if slice { + if packed { + return sizeZigzag32PackedSlice, appendZigzag32PackedSlice + } + return sizeZigzag32Slice, appendZigzag32Slice + } + if nozero { + return sizeZigzag32ValueNoZero, appendZigzag32ValueNoZero + } + return sizeZigzag32Value, appendZigzag32Value + } + case reflect.Uint64: + switch encoding { + case "fixed64": + if pointer { + return sizeFixed64Ptr, appendFixed64Ptr + } + if slice { + if packed { + return sizeFixed64PackedSlice, appendFixed64PackedSlice + } + return sizeFixed64Slice, appendFixed64Slice + } + if nozero { + return sizeFixed64ValueNoZero, appendFixed64ValueNoZero + } + return sizeFixed64Value, appendFixed64Value + case "varint": + if pointer { + return sizeVarint64Ptr, appendVarint64Ptr + } + if slice { + if packed { + return sizeVarint64PackedSlice, appendVarint64PackedSlice + } + return sizeVarint64Slice, appendVarint64Slice + } + if nozero { + return sizeVarint64ValueNoZero, appendVarint64ValueNoZero + } + return sizeVarint64Value, appendVarint64Value + } + case reflect.Int64: + switch encoding { + case "fixed64": + if pointer { + return sizeFixedS64Ptr, appendFixedS64Ptr + } + if slice { + if packed { + return sizeFixedS64PackedSlice, appendFixedS64PackedSlice + } + return sizeFixedS64Slice, appendFixedS64Slice + } + if nozero { + return sizeFixedS64ValueNoZero, appendFixedS64ValueNoZero + } + return sizeFixedS64Value, appendFixedS64Value + case "varint": + if pointer { + return sizeVarintS64Ptr, appendVarintS64Ptr + } + if slice { + if packed { + return sizeVarintS64PackedSlice, appendVarintS64PackedSlice + } + return sizeVarintS64Slice, appendVarintS64Slice + } + if nozero { + return sizeVarintS64ValueNoZero, appendVarintS64ValueNoZero + } + return sizeVarintS64Value, appendVarintS64Value + case "zigzag64": + if pointer { + return sizeZigzag64Ptr, appendZigzag64Ptr + } + if slice { + if packed { + return sizeZigzag64PackedSlice, appendZigzag64PackedSlice + } + return sizeZigzag64Slice, appendZigzag64Slice + } + if nozero { + return sizeZigzag64ValueNoZero, appendZigzag64ValueNoZero + } + return sizeZigzag64Value, appendZigzag64Value + } + case reflect.Float32: + if pointer { + return sizeFloat32Ptr, appendFloat32Ptr + } + if slice { + if packed { + return sizeFloat32PackedSlice, appendFloat32PackedSlice + } + return sizeFloat32Slice, appendFloat32Slice + } + if nozero { + return sizeFloat32ValueNoZero, appendFloat32ValueNoZero + } + return sizeFloat32Value, appendFloat32Value + case reflect.Float64: + if pointer { + return sizeFloat64Ptr, appendFloat64Ptr + } + if slice { + if packed { + return sizeFloat64PackedSlice, appendFloat64PackedSlice + } + return sizeFloat64Slice, appendFloat64Slice + } + if nozero { + return sizeFloat64ValueNoZero, appendFloat64ValueNoZero + } + return sizeFloat64Value, appendFloat64Value + case reflect.String: + if pointer { + return sizeStringPtr, appendStringPtr + } + if slice { + return sizeStringSlice, appendStringSlice + } + if nozero { + return sizeStringValueNoZero, appendStringValueNoZero + } + return sizeStringValue, appendStringValue + case reflect.Slice: + if slice { + return sizeBytesSlice, appendBytesSlice + } + if oneof { + // Oneof bytes field may also have "proto3" tag. + // We want to marshal it as a oneof field. Do this + // check before the proto3 check. + return sizeBytesOneof, appendBytesOneof + } + if proto3 { + return sizeBytes3, appendBytes3 + } + return sizeBytes, appendBytes + case reflect.Struct: + switch encoding { + case "group": + if slice { + return makeGroupSliceMarshaler(getMarshalInfo(t)) + } + return makeGroupMarshaler(getMarshalInfo(t)) + case "bytes": + if pointer { + if slice { + return makeMessageSliceMarshaler(getMarshalInfo(t)) + } + return makeMessageMarshaler(getMarshalInfo(t)) + } else { + if slice { + return makeMessageRefSliceMarshaler(getMarshalInfo(t)) + } + return makeMessageRefMarshaler(getMarshalInfo(t)) + } + } + } + panic(fmt.Sprintf("unknown or mismatched type: type: %v, wire type: %v", t, encoding)) +} + +// Below are functions to size/marshal a specific type of a field. +// They are stored in the field's info, and called by function pointers. +// They have type sizer or marshaler. + +func sizeFixed32Value(_ pointer, tagsize int) int { + return 4 + tagsize +} +func sizeFixed32ValueNoZero(ptr pointer, tagsize int) int { + v := *ptr.toUint32() + if v == 0 { + return 0 + } + return 4 + tagsize +} +func sizeFixed32Ptr(ptr pointer, tagsize int) int { + p := *ptr.toUint32Ptr() + if p == nil { + return 0 + } + return 4 + tagsize +} +func sizeFixed32Slice(ptr pointer, tagsize int) int { + s := *ptr.toUint32Slice() + return (4 + tagsize) * len(s) +} +func sizeFixed32PackedSlice(ptr pointer, tagsize int) int { + s := *ptr.toUint32Slice() + if len(s) == 0 { + return 0 + } + return 4*len(s) + SizeVarint(uint64(4*len(s))) + tagsize +} +func sizeFixedS32Value(_ pointer, tagsize int) int { + return 4 + tagsize +} +func sizeFixedS32ValueNoZero(ptr pointer, tagsize int) int { + v := *ptr.toInt32() + if v == 0 { + return 0 + } + return 4 + tagsize +} +func sizeFixedS32Ptr(ptr pointer, tagsize int) int { + p := ptr.getInt32Ptr() + if p == nil { + return 0 + } + return 4 + tagsize +} +func sizeFixedS32Slice(ptr pointer, tagsize int) int { + s := ptr.getInt32Slice() + return (4 + tagsize) * len(s) +} +func sizeFixedS32PackedSlice(ptr pointer, tagsize int) int { + s := ptr.getInt32Slice() + if len(s) == 0 { + return 0 + } + return 4*len(s) + SizeVarint(uint64(4*len(s))) + tagsize +} +func sizeFloat32Value(_ pointer, tagsize int) int { + return 4 + tagsize +} +func sizeFloat32ValueNoZero(ptr pointer, tagsize int) int { + v := math.Float32bits(*ptr.toFloat32()) + if v == 0 { + return 0 + } + return 4 + tagsize +} +func sizeFloat32Ptr(ptr pointer, tagsize int) int { + p := *ptr.toFloat32Ptr() + if p == nil { + return 0 + } + return 4 + tagsize +} +func sizeFloat32Slice(ptr pointer, tagsize int) int { + s := *ptr.toFloat32Slice() + return (4 + tagsize) * len(s) +} +func sizeFloat32PackedSlice(ptr pointer, tagsize int) int { + s := *ptr.toFloat32Slice() + if len(s) == 0 { + return 0 + } + return 4*len(s) + SizeVarint(uint64(4*len(s))) + tagsize +} +func sizeFixed64Value(_ pointer, tagsize int) int { + return 8 + tagsize +} +func sizeFixed64ValueNoZero(ptr pointer, tagsize int) int { + v := *ptr.toUint64() + if v == 0 { + return 0 + } + return 8 + tagsize +} +func sizeFixed64Ptr(ptr pointer, tagsize int) int { + p := *ptr.toUint64Ptr() + if p == nil { + return 0 + } + return 8 + tagsize +} +func sizeFixed64Slice(ptr pointer, tagsize int) int { + s := *ptr.toUint64Slice() + return (8 + tagsize) * len(s) +} +func sizeFixed64PackedSlice(ptr pointer, tagsize int) int { + s := *ptr.toUint64Slice() + if len(s) == 0 { + return 0 + } + return 8*len(s) + SizeVarint(uint64(8*len(s))) + tagsize +} +func sizeFixedS64Value(_ pointer, tagsize int) int { + return 8 + tagsize +} +func sizeFixedS64ValueNoZero(ptr pointer, tagsize int) int { + v := *ptr.toInt64() + if v == 0 { + return 0 + } + return 8 + tagsize +} +func sizeFixedS64Ptr(ptr pointer, tagsize int) int { + p := *ptr.toInt64Ptr() + if p == nil { + return 0 + } + return 8 + tagsize +} +func sizeFixedS64Slice(ptr pointer, tagsize int) int { + s := *ptr.toInt64Slice() + return (8 + tagsize) * len(s) +} +func sizeFixedS64PackedSlice(ptr pointer, tagsize int) int { + s := *ptr.toInt64Slice() + if len(s) == 0 { + return 0 + } + return 8*len(s) + SizeVarint(uint64(8*len(s))) + tagsize +} +func sizeFloat64Value(_ pointer, tagsize int) int { + return 8 + tagsize +} +func sizeFloat64ValueNoZero(ptr pointer, tagsize int) int { + v := math.Float64bits(*ptr.toFloat64()) + if v == 0 { + return 0 + } + return 8 + tagsize +} +func sizeFloat64Ptr(ptr pointer, tagsize int) int { + p := *ptr.toFloat64Ptr() + if p == nil { + return 0 + } + return 8 + tagsize +} +func sizeFloat64Slice(ptr pointer, tagsize int) int { + s := *ptr.toFloat64Slice() + return (8 + tagsize) * len(s) +} +func sizeFloat64PackedSlice(ptr pointer, tagsize int) int { + s := *ptr.toFloat64Slice() + if len(s) == 0 { + return 0 + } + return 8*len(s) + SizeVarint(uint64(8*len(s))) + tagsize +} +func sizeVarint32Value(ptr pointer, tagsize int) int { + v := *ptr.toUint32() + return SizeVarint(uint64(v)) + tagsize +} +func sizeVarint32ValueNoZero(ptr pointer, tagsize int) int { + v := *ptr.toUint32() + if v == 0 { + return 0 + } + return SizeVarint(uint64(v)) + tagsize +} +func sizeVarint32Ptr(ptr pointer, tagsize int) int { + p := *ptr.toUint32Ptr() + if p == nil { + return 0 + } + return SizeVarint(uint64(*p)) + tagsize +} +func sizeVarint32Slice(ptr pointer, tagsize int) int { + s := *ptr.toUint32Slice() + n := 0 + for _, v := range s { + n += SizeVarint(uint64(v)) + tagsize + } + return n +} +func sizeVarint32PackedSlice(ptr pointer, tagsize int) int { + s := *ptr.toUint32Slice() + if len(s) == 0 { + return 0 + } + n := 0 + for _, v := range s { + n += SizeVarint(uint64(v)) + } + return n + SizeVarint(uint64(n)) + tagsize +} +func sizeVarintS32Value(ptr pointer, tagsize int) int { + v := *ptr.toInt32() + return SizeVarint(uint64(v)) + tagsize +} +func sizeVarintS32ValueNoZero(ptr pointer, tagsize int) int { + v := *ptr.toInt32() + if v == 0 { + return 0 + } + return SizeVarint(uint64(v)) + tagsize +} +func sizeVarintS32Ptr(ptr pointer, tagsize int) int { + p := ptr.getInt32Ptr() + if p == nil { + return 0 + } + return SizeVarint(uint64(*p)) + tagsize +} +func sizeVarintS32Slice(ptr pointer, tagsize int) int { + s := ptr.getInt32Slice() + n := 0 + for _, v := range s { + n += SizeVarint(uint64(v)) + tagsize + } + return n +} +func sizeVarintS32PackedSlice(ptr pointer, tagsize int) int { + s := ptr.getInt32Slice() + if len(s) == 0 { + return 0 + } + n := 0 + for _, v := range s { + n += SizeVarint(uint64(v)) + } + return n + SizeVarint(uint64(n)) + tagsize +} +func sizeVarint64Value(ptr pointer, tagsize int) int { + v := *ptr.toUint64() + return SizeVarint(v) + tagsize +} +func sizeVarint64ValueNoZero(ptr pointer, tagsize int) int { + v := *ptr.toUint64() + if v == 0 { + return 0 + } + return SizeVarint(v) + tagsize +} +func sizeVarint64Ptr(ptr pointer, tagsize int) int { + p := *ptr.toUint64Ptr() + if p == nil { + return 0 + } + return SizeVarint(*p) + tagsize +} +func sizeVarint64Slice(ptr pointer, tagsize int) int { + s := *ptr.toUint64Slice() + n := 0 + for _, v := range s { + n += SizeVarint(v) + tagsize + } + return n +} +func sizeVarint64PackedSlice(ptr pointer, tagsize int) int { + s := *ptr.toUint64Slice() + if len(s) == 0 { + return 0 + } + n := 0 + for _, v := range s { + n += SizeVarint(v) + } + return n + SizeVarint(uint64(n)) + tagsize +} +func sizeVarintS64Value(ptr pointer, tagsize int) int { + v := *ptr.toInt64() + return SizeVarint(uint64(v)) + tagsize +} +func sizeVarintS64ValueNoZero(ptr pointer, tagsize int) int { + v := *ptr.toInt64() + if v == 0 { + return 0 + } + return SizeVarint(uint64(v)) + tagsize +} +func sizeVarintS64Ptr(ptr pointer, tagsize int) int { + p := *ptr.toInt64Ptr() + if p == nil { + return 0 + } + return SizeVarint(uint64(*p)) + tagsize +} +func sizeVarintS64Slice(ptr pointer, tagsize int) int { + s := *ptr.toInt64Slice() + n := 0 + for _, v := range s { + n += SizeVarint(uint64(v)) + tagsize + } + return n +} +func sizeVarintS64PackedSlice(ptr pointer, tagsize int) int { + s := *ptr.toInt64Slice() + if len(s) == 0 { + return 0 + } + n := 0 + for _, v := range s { + n += SizeVarint(uint64(v)) + } + return n + SizeVarint(uint64(n)) + tagsize +} +func sizeZigzag32Value(ptr pointer, tagsize int) int { + v := *ptr.toInt32() + return SizeVarint(uint64((uint32(v)<<1)^uint32((int32(v)>>31)))) + tagsize +} +func sizeZigzag32ValueNoZero(ptr pointer, tagsize int) int { + v := *ptr.toInt32() + if v == 0 { + return 0 + } + return SizeVarint(uint64((uint32(v)<<1)^uint32((int32(v)>>31)))) + tagsize +} +func sizeZigzag32Ptr(ptr pointer, tagsize int) int { + p := ptr.getInt32Ptr() + if p == nil { + return 0 + } + v := *p + return SizeVarint(uint64((uint32(v)<<1)^uint32((int32(v)>>31)))) + tagsize +} +func sizeZigzag32Slice(ptr pointer, tagsize int) int { + s := ptr.getInt32Slice() + n := 0 + for _, v := range s { + n += SizeVarint(uint64((uint32(v)<<1)^uint32((int32(v)>>31)))) + tagsize + } + return n +} +func sizeZigzag32PackedSlice(ptr pointer, tagsize int) int { + s := ptr.getInt32Slice() + if len(s) == 0 { + return 0 + } + n := 0 + for _, v := range s { + n += SizeVarint(uint64((uint32(v) << 1) ^ uint32((int32(v) >> 31)))) + } + return n + SizeVarint(uint64(n)) + tagsize +} +func sizeZigzag64Value(ptr pointer, tagsize int) int { + v := *ptr.toInt64() + return SizeVarint(uint64(v<<1)^uint64((int64(v)>>63))) + tagsize +} +func sizeZigzag64ValueNoZero(ptr pointer, tagsize int) int { + v := *ptr.toInt64() + if v == 0 { + return 0 + } + return SizeVarint(uint64(v<<1)^uint64((int64(v)>>63))) + tagsize +} +func sizeZigzag64Ptr(ptr pointer, tagsize int) int { + p := *ptr.toInt64Ptr() + if p == nil { + return 0 + } + v := *p + return SizeVarint(uint64(v<<1)^uint64((int64(v)>>63))) + tagsize +} +func sizeZigzag64Slice(ptr pointer, tagsize int) int { + s := *ptr.toInt64Slice() + n := 0 + for _, v := range s { + n += SizeVarint(uint64(v<<1)^uint64((int64(v)>>63))) + tagsize + } + return n +} +func sizeZigzag64PackedSlice(ptr pointer, tagsize int) int { + s := *ptr.toInt64Slice() + if len(s) == 0 { + return 0 + } + n := 0 + for _, v := range s { + n += SizeVarint(uint64(v<<1) ^ uint64((int64(v) >> 63))) + } + return n + SizeVarint(uint64(n)) + tagsize +} +func sizeBoolValue(_ pointer, tagsize int) int { + return 1 + tagsize +} +func sizeBoolValueNoZero(ptr pointer, tagsize int) int { + v := *ptr.toBool() + if !v { + return 0 + } + return 1 + tagsize +} +func sizeBoolPtr(ptr pointer, tagsize int) int { + p := *ptr.toBoolPtr() + if p == nil { + return 0 + } + return 1 + tagsize +} +func sizeBoolSlice(ptr pointer, tagsize int) int { + s := *ptr.toBoolSlice() + return (1 + tagsize) * len(s) +} +func sizeBoolPackedSlice(ptr pointer, tagsize int) int { + s := *ptr.toBoolSlice() + if len(s) == 0 { + return 0 + } + return len(s) + SizeVarint(uint64(len(s))) + tagsize +} +func sizeStringValue(ptr pointer, tagsize int) int { + v := *ptr.toString() + return len(v) + SizeVarint(uint64(len(v))) + tagsize +} +func sizeStringValueNoZero(ptr pointer, tagsize int) int { + v := *ptr.toString() + if v == "" { + return 0 + } + return len(v) + SizeVarint(uint64(len(v))) + tagsize +} +func sizeStringPtr(ptr pointer, tagsize int) int { + p := *ptr.toStringPtr() + if p == nil { + return 0 + } + v := *p + return len(v) + SizeVarint(uint64(len(v))) + tagsize +} +func sizeStringSlice(ptr pointer, tagsize int) int { + s := *ptr.toStringSlice() + n := 0 + for _, v := range s { + n += len(v) + SizeVarint(uint64(len(v))) + tagsize + } + return n +} +func sizeBytes(ptr pointer, tagsize int) int { + v := *ptr.toBytes() + if v == nil { + return 0 + } + return len(v) + SizeVarint(uint64(len(v))) + tagsize +} +func sizeBytes3(ptr pointer, tagsize int) int { + v := *ptr.toBytes() + if len(v) == 0 { + return 0 + } + return len(v) + SizeVarint(uint64(len(v))) + tagsize +} +func sizeBytesOneof(ptr pointer, tagsize int) int { + v := *ptr.toBytes() + return len(v) + SizeVarint(uint64(len(v))) + tagsize +} +func sizeBytesSlice(ptr pointer, tagsize int) int { + s := *ptr.toBytesSlice() + n := 0 + for _, v := range s { + n += len(v) + SizeVarint(uint64(len(v))) + tagsize + } + return n +} + +// appendFixed32 appends an encoded fixed32 to b. +func appendFixed32(b []byte, v uint32) []byte { + b = append(b, + byte(v), + byte(v>>8), + byte(v>>16), + byte(v>>24)) + return b +} + +// appendFixed64 appends an encoded fixed64 to b. +func appendFixed64(b []byte, v uint64) []byte { + b = append(b, + byte(v), + byte(v>>8), + byte(v>>16), + byte(v>>24), + byte(v>>32), + byte(v>>40), + byte(v>>48), + byte(v>>56)) + return b +} + +// appendVarint appends an encoded varint to b. +func appendVarint(b []byte, v uint64) []byte { + // TODO: make 1-byte (maybe 2-byte) case inline-able, once we + // have non-leaf inliner. + switch { + case v < 1<<7: + b = append(b, byte(v)) + case v < 1<<14: + b = append(b, + byte(v&0x7f|0x80), + byte(v>>7)) + case v < 1<<21: + b = append(b, + byte(v&0x7f|0x80), + byte((v>>7)&0x7f|0x80), + byte(v>>14)) + case v < 1<<28: + b = append(b, + byte(v&0x7f|0x80), + byte((v>>7)&0x7f|0x80), + byte((v>>14)&0x7f|0x80), + byte(v>>21)) + case v < 1<<35: + b = append(b, + byte(v&0x7f|0x80), + byte((v>>7)&0x7f|0x80), + byte((v>>14)&0x7f|0x80), + byte((v>>21)&0x7f|0x80), + byte(v>>28)) + case v < 1<<42: + b = append(b, + byte(v&0x7f|0x80), + byte((v>>7)&0x7f|0x80), + byte((v>>14)&0x7f|0x80), + byte((v>>21)&0x7f|0x80), + byte((v>>28)&0x7f|0x80), + byte(v>>35)) + case v < 1<<49: + b = append(b, + byte(v&0x7f|0x80), + byte((v>>7)&0x7f|0x80), + byte((v>>14)&0x7f|0x80), + byte((v>>21)&0x7f|0x80), + byte((v>>28)&0x7f|0x80), + byte((v>>35)&0x7f|0x80), + byte(v>>42)) + case v < 1<<56: + b = append(b, + byte(v&0x7f|0x80), + byte((v>>7)&0x7f|0x80), + byte((v>>14)&0x7f|0x80), + byte((v>>21)&0x7f|0x80), + byte((v>>28)&0x7f|0x80), + byte((v>>35)&0x7f|0x80), + byte((v>>42)&0x7f|0x80), + byte(v>>49)) + case v < 1<<63: + b = append(b, + byte(v&0x7f|0x80), + byte((v>>7)&0x7f|0x80), + byte((v>>14)&0x7f|0x80), + byte((v>>21)&0x7f|0x80), + byte((v>>28)&0x7f|0x80), + byte((v>>35)&0x7f|0x80), + byte((v>>42)&0x7f|0x80), + byte((v>>49)&0x7f|0x80), + byte(v>>56)) + default: + b = append(b, + byte(v&0x7f|0x80), + byte((v>>7)&0x7f|0x80), + byte((v>>14)&0x7f|0x80), + byte((v>>21)&0x7f|0x80), + byte((v>>28)&0x7f|0x80), + byte((v>>35)&0x7f|0x80), + byte((v>>42)&0x7f|0x80), + byte((v>>49)&0x7f|0x80), + byte((v>>56)&0x7f|0x80), + 1) + } + return b +} + +func appendFixed32Value(b []byte, ptr pointer, wiretag uint64, _ bool) ([]byte, error) { + v := *ptr.toUint32() + b = appendVarint(b, wiretag) + b = appendFixed32(b, v) + return b, nil +} +func appendFixed32ValueNoZero(b []byte, ptr pointer, wiretag uint64, _ bool) ([]byte, error) { + v := *ptr.toUint32() + if v == 0 { + return b, nil + } + b = appendVarint(b, wiretag) + b = appendFixed32(b, v) + return b, nil +} +func appendFixed32Ptr(b []byte, ptr pointer, wiretag uint64, _ bool) ([]byte, error) { + p := *ptr.toUint32Ptr() + if p == nil { + return b, nil + } + b = appendVarint(b, wiretag) + b = appendFixed32(b, *p) + return b, nil +} +func appendFixed32Slice(b []byte, ptr pointer, wiretag uint64, _ bool) ([]byte, error) { + s := *ptr.toUint32Slice() + for _, v := range s { + b = appendVarint(b, wiretag) + b = appendFixed32(b, v) + } + return b, nil +} +func appendFixed32PackedSlice(b []byte, ptr pointer, wiretag uint64, _ bool) ([]byte, error) { + s := *ptr.toUint32Slice() + if len(s) == 0 { + return b, nil + } + b = appendVarint(b, wiretag&^7|WireBytes) + b = appendVarint(b, uint64(4*len(s))) + for _, v := range s { + b = appendFixed32(b, v) + } + return b, nil +} +func appendFixedS32Value(b []byte, ptr pointer, wiretag uint64, _ bool) ([]byte, error) { + v := *ptr.toInt32() + b = appendVarint(b, wiretag) + b = appendFixed32(b, uint32(v)) + return b, nil +} +func appendFixedS32ValueNoZero(b []byte, ptr pointer, wiretag uint64, _ bool) ([]byte, error) { + v := *ptr.toInt32() + if v == 0 { + return b, nil + } + b = appendVarint(b, wiretag) + b = appendFixed32(b, uint32(v)) + return b, nil +} +func appendFixedS32Ptr(b []byte, ptr pointer, wiretag uint64, _ bool) ([]byte, error) { + p := ptr.getInt32Ptr() + if p == nil { + return b, nil + } + b = appendVarint(b, wiretag) + b = appendFixed32(b, uint32(*p)) + return b, nil +} +func appendFixedS32Slice(b []byte, ptr pointer, wiretag uint64, _ bool) ([]byte, error) { + s := ptr.getInt32Slice() + for _, v := range s { + b = appendVarint(b, wiretag) + b = appendFixed32(b, uint32(v)) + } + return b, nil +} +func appendFixedS32PackedSlice(b []byte, ptr pointer, wiretag uint64, _ bool) ([]byte, error) { + s := ptr.getInt32Slice() + if len(s) == 0 { + return b, nil + } + b = appendVarint(b, wiretag&^7|WireBytes) + b = appendVarint(b, uint64(4*len(s))) + for _, v := range s { + b = appendFixed32(b, uint32(v)) + } + return b, nil +} +func appendFloat32Value(b []byte, ptr pointer, wiretag uint64, _ bool) ([]byte, error) { + v := math.Float32bits(*ptr.toFloat32()) + b = appendVarint(b, wiretag) + b = appendFixed32(b, v) + return b, nil +} +func appendFloat32ValueNoZero(b []byte, ptr pointer, wiretag uint64, _ bool) ([]byte, error) { + v := math.Float32bits(*ptr.toFloat32()) + if v == 0 { + return b, nil + } + b = appendVarint(b, wiretag) + b = appendFixed32(b, v) + return b, nil +} +func appendFloat32Ptr(b []byte, ptr pointer, wiretag uint64, _ bool) ([]byte, error) { + p := *ptr.toFloat32Ptr() + if p == nil { + return b, nil + } + b = appendVarint(b, wiretag) + b = appendFixed32(b, math.Float32bits(*p)) + return b, nil +} +func appendFloat32Slice(b []byte, ptr pointer, wiretag uint64, _ bool) ([]byte, error) { + s := *ptr.toFloat32Slice() + for _, v := range s { + b = appendVarint(b, wiretag) + b = appendFixed32(b, math.Float32bits(v)) + } + return b, nil +} +func appendFloat32PackedSlice(b []byte, ptr pointer, wiretag uint64, _ bool) ([]byte, error) { + s := *ptr.toFloat32Slice() + if len(s) == 0 { + return b, nil + } + b = appendVarint(b, wiretag&^7|WireBytes) + b = appendVarint(b, uint64(4*len(s))) + for _, v := range s { + b = appendFixed32(b, math.Float32bits(v)) + } + return b, nil +} +func appendFixed64Value(b []byte, ptr pointer, wiretag uint64, _ bool) ([]byte, error) { + v := *ptr.toUint64() + b = appendVarint(b, wiretag) + b = appendFixed64(b, v) + return b, nil +} +func appendFixed64ValueNoZero(b []byte, ptr pointer, wiretag uint64, _ bool) ([]byte, error) { + v := *ptr.toUint64() + if v == 0 { + return b, nil + } + b = appendVarint(b, wiretag) + b = appendFixed64(b, v) + return b, nil +} +func appendFixed64Ptr(b []byte, ptr pointer, wiretag uint64, _ bool) ([]byte, error) { + p := *ptr.toUint64Ptr() + if p == nil { + return b, nil + } + b = appendVarint(b, wiretag) + b = appendFixed64(b, *p) + return b, nil +} +func appendFixed64Slice(b []byte, ptr pointer, wiretag uint64, _ bool) ([]byte, error) { + s := *ptr.toUint64Slice() + for _, v := range s { + b = appendVarint(b, wiretag) + b = appendFixed64(b, v) + } + return b, nil +} +func appendFixed64PackedSlice(b []byte, ptr pointer, wiretag uint64, _ bool) ([]byte, error) { + s := *ptr.toUint64Slice() + if len(s) == 0 { + return b, nil + } + b = appendVarint(b, wiretag&^7|WireBytes) + b = appendVarint(b, uint64(8*len(s))) + for _, v := range s { + b = appendFixed64(b, v) + } + return b, nil +} +func appendFixedS64Value(b []byte, ptr pointer, wiretag uint64, _ bool) ([]byte, error) { + v := *ptr.toInt64() + b = appendVarint(b, wiretag) + b = appendFixed64(b, uint64(v)) + return b, nil +} +func appendFixedS64ValueNoZero(b []byte, ptr pointer, wiretag uint64, _ bool) ([]byte, error) { + v := *ptr.toInt64() + if v == 0 { + return b, nil + } + b = appendVarint(b, wiretag) + b = appendFixed64(b, uint64(v)) + return b, nil +} +func appendFixedS64Ptr(b []byte, ptr pointer, wiretag uint64, _ bool) ([]byte, error) { + p := *ptr.toInt64Ptr() + if p == nil { + return b, nil + } + b = appendVarint(b, wiretag) + b = appendFixed64(b, uint64(*p)) + return b, nil +} +func appendFixedS64Slice(b []byte, ptr pointer, wiretag uint64, _ bool) ([]byte, error) { + s := *ptr.toInt64Slice() + for _, v := range s { + b = appendVarint(b, wiretag) + b = appendFixed64(b, uint64(v)) + } + return b, nil +} +func appendFixedS64PackedSlice(b []byte, ptr pointer, wiretag uint64, _ bool) ([]byte, error) { + s := *ptr.toInt64Slice() + if len(s) == 0 { + return b, nil + } + b = appendVarint(b, wiretag&^7|WireBytes) + b = appendVarint(b, uint64(8*len(s))) + for _, v := range s { + b = appendFixed64(b, uint64(v)) + } + return b, nil +} +func appendFloat64Value(b []byte, ptr pointer, wiretag uint64, _ bool) ([]byte, error) { + v := math.Float64bits(*ptr.toFloat64()) + b = appendVarint(b, wiretag) + b = appendFixed64(b, v) + return b, nil +} +func appendFloat64ValueNoZero(b []byte, ptr pointer, wiretag uint64, _ bool) ([]byte, error) { + v := math.Float64bits(*ptr.toFloat64()) + if v == 0 { + return b, nil + } + b = appendVarint(b, wiretag) + b = appendFixed64(b, v) + return b, nil +} +func appendFloat64Ptr(b []byte, ptr pointer, wiretag uint64, _ bool) ([]byte, error) { + p := *ptr.toFloat64Ptr() + if p == nil { + return b, nil + } + b = appendVarint(b, wiretag) + b = appendFixed64(b, math.Float64bits(*p)) + return b, nil +} +func appendFloat64Slice(b []byte, ptr pointer, wiretag uint64, _ bool) ([]byte, error) { + s := *ptr.toFloat64Slice() + for _, v := range s { + b = appendVarint(b, wiretag) + b = appendFixed64(b, math.Float64bits(v)) + } + return b, nil +} +func appendFloat64PackedSlice(b []byte, ptr pointer, wiretag uint64, _ bool) ([]byte, error) { + s := *ptr.toFloat64Slice() + if len(s) == 0 { + return b, nil + } + b = appendVarint(b, wiretag&^7|WireBytes) + b = appendVarint(b, uint64(8*len(s))) + for _, v := range s { + b = appendFixed64(b, math.Float64bits(v)) + } + return b, nil +} +func appendVarint32Value(b []byte, ptr pointer, wiretag uint64, _ bool) ([]byte, error) { + v := *ptr.toUint32() + b = appendVarint(b, wiretag) + b = appendVarint(b, uint64(v)) + return b, nil +} +func appendVarint32ValueNoZero(b []byte, ptr pointer, wiretag uint64, _ bool) ([]byte, error) { + v := *ptr.toUint32() + if v == 0 { + return b, nil + } + b = appendVarint(b, wiretag) + b = appendVarint(b, uint64(v)) + return b, nil +} +func appendVarint32Ptr(b []byte, ptr pointer, wiretag uint64, _ bool) ([]byte, error) { + p := *ptr.toUint32Ptr() + if p == nil { + return b, nil + } + b = appendVarint(b, wiretag) + b = appendVarint(b, uint64(*p)) + return b, nil +} +func appendVarint32Slice(b []byte, ptr pointer, wiretag uint64, _ bool) ([]byte, error) { + s := *ptr.toUint32Slice() + for _, v := range s { + b = appendVarint(b, wiretag) + b = appendVarint(b, uint64(v)) + } + return b, nil +} +func appendVarint32PackedSlice(b []byte, ptr pointer, wiretag uint64, _ bool) ([]byte, error) { + s := *ptr.toUint32Slice() + if len(s) == 0 { + return b, nil + } + b = appendVarint(b, wiretag&^7|WireBytes) + // compute size + n := 0 + for _, v := range s { + n += SizeVarint(uint64(v)) + } + b = appendVarint(b, uint64(n)) + for _, v := range s { + b = appendVarint(b, uint64(v)) + } + return b, nil +} +func appendVarintS32Value(b []byte, ptr pointer, wiretag uint64, _ bool) ([]byte, error) { + v := *ptr.toInt32() + b = appendVarint(b, wiretag) + b = appendVarint(b, uint64(v)) + return b, nil +} +func appendVarintS32ValueNoZero(b []byte, ptr pointer, wiretag uint64, _ bool) ([]byte, error) { + v := *ptr.toInt32() + if v == 0 { + return b, nil + } + b = appendVarint(b, wiretag) + b = appendVarint(b, uint64(v)) + return b, nil +} +func appendVarintS32Ptr(b []byte, ptr pointer, wiretag uint64, _ bool) ([]byte, error) { + p := ptr.getInt32Ptr() + if p == nil { + return b, nil + } + b = appendVarint(b, wiretag) + b = appendVarint(b, uint64(*p)) + return b, nil +} +func appendVarintS32Slice(b []byte, ptr pointer, wiretag uint64, _ bool) ([]byte, error) { + s := ptr.getInt32Slice() + for _, v := range s { + b = appendVarint(b, wiretag) + b = appendVarint(b, uint64(v)) + } + return b, nil +} +func appendVarintS32PackedSlice(b []byte, ptr pointer, wiretag uint64, _ bool) ([]byte, error) { + s := ptr.getInt32Slice() + if len(s) == 0 { + return b, nil + } + b = appendVarint(b, wiretag&^7|WireBytes) + // compute size + n := 0 + for _, v := range s { + n += SizeVarint(uint64(v)) + } + b = appendVarint(b, uint64(n)) + for _, v := range s { + b = appendVarint(b, uint64(v)) + } + return b, nil +} +func appendVarint64Value(b []byte, ptr pointer, wiretag uint64, _ bool) ([]byte, error) { + v := *ptr.toUint64() + b = appendVarint(b, wiretag) + b = appendVarint(b, v) + return b, nil +} +func appendVarint64ValueNoZero(b []byte, ptr pointer, wiretag uint64, _ bool) ([]byte, error) { + v := *ptr.toUint64() + if v == 0 { + return b, nil + } + b = appendVarint(b, wiretag) + b = appendVarint(b, v) + return b, nil +} +func appendVarint64Ptr(b []byte, ptr pointer, wiretag uint64, _ bool) ([]byte, error) { + p := *ptr.toUint64Ptr() + if p == nil { + return b, nil + } + b = appendVarint(b, wiretag) + b = appendVarint(b, *p) + return b, nil +} +func appendVarint64Slice(b []byte, ptr pointer, wiretag uint64, _ bool) ([]byte, error) { + s := *ptr.toUint64Slice() + for _, v := range s { + b = appendVarint(b, wiretag) + b = appendVarint(b, v) + } + return b, nil +} +func appendVarint64PackedSlice(b []byte, ptr pointer, wiretag uint64, _ bool) ([]byte, error) { + s := *ptr.toUint64Slice() + if len(s) == 0 { + return b, nil + } + b = appendVarint(b, wiretag&^7|WireBytes) + // compute size + n := 0 + for _, v := range s { + n += SizeVarint(v) + } + b = appendVarint(b, uint64(n)) + for _, v := range s { + b = appendVarint(b, v) + } + return b, nil +} +func appendVarintS64Value(b []byte, ptr pointer, wiretag uint64, _ bool) ([]byte, error) { + v := *ptr.toInt64() + b = appendVarint(b, wiretag) + b = appendVarint(b, uint64(v)) + return b, nil +} +func appendVarintS64ValueNoZero(b []byte, ptr pointer, wiretag uint64, _ bool) ([]byte, error) { + v := *ptr.toInt64() + if v == 0 { + return b, nil + } + b = appendVarint(b, wiretag) + b = appendVarint(b, uint64(v)) + return b, nil +} +func appendVarintS64Ptr(b []byte, ptr pointer, wiretag uint64, _ bool) ([]byte, error) { + p := *ptr.toInt64Ptr() + if p == nil { + return b, nil + } + b = appendVarint(b, wiretag) + b = appendVarint(b, uint64(*p)) + return b, nil +} +func appendVarintS64Slice(b []byte, ptr pointer, wiretag uint64, _ bool) ([]byte, error) { + s := *ptr.toInt64Slice() + for _, v := range s { + b = appendVarint(b, wiretag) + b = appendVarint(b, uint64(v)) + } + return b, nil +} +func appendVarintS64PackedSlice(b []byte, ptr pointer, wiretag uint64, _ bool) ([]byte, error) { + s := *ptr.toInt64Slice() + if len(s) == 0 { + return b, nil + } + b = appendVarint(b, wiretag&^7|WireBytes) + // compute size + n := 0 + for _, v := range s { + n += SizeVarint(uint64(v)) + } + b = appendVarint(b, uint64(n)) + for _, v := range s { + b = appendVarint(b, uint64(v)) + } + return b, nil +} +func appendZigzag32Value(b []byte, ptr pointer, wiretag uint64, _ bool) ([]byte, error) { + v := *ptr.toInt32() + b = appendVarint(b, wiretag) + b = appendVarint(b, uint64((uint32(v)<<1)^uint32((int32(v)>>31)))) + return b, nil +} +func appendZigzag32ValueNoZero(b []byte, ptr pointer, wiretag uint64, _ bool) ([]byte, error) { + v := *ptr.toInt32() + if v == 0 { + return b, nil + } + b = appendVarint(b, wiretag) + b = appendVarint(b, uint64((uint32(v)<<1)^uint32((int32(v)>>31)))) + return b, nil +} +func appendZigzag32Ptr(b []byte, ptr pointer, wiretag uint64, _ bool) ([]byte, error) { + p := ptr.getInt32Ptr() + if p == nil { + return b, nil + } + b = appendVarint(b, wiretag) + v := *p + b = appendVarint(b, uint64((uint32(v)<<1)^uint32((int32(v)>>31)))) + return b, nil +} +func appendZigzag32Slice(b []byte, ptr pointer, wiretag uint64, _ bool) ([]byte, error) { + s := ptr.getInt32Slice() + for _, v := range s { + b = appendVarint(b, wiretag) + b = appendVarint(b, uint64((uint32(v)<<1)^uint32((int32(v)>>31)))) + } + return b, nil +} +func appendZigzag32PackedSlice(b []byte, ptr pointer, wiretag uint64, _ bool) ([]byte, error) { + s := ptr.getInt32Slice() + if len(s) == 0 { + return b, nil + } + b = appendVarint(b, wiretag&^7|WireBytes) + // compute size + n := 0 + for _, v := range s { + n += SizeVarint(uint64((uint32(v) << 1) ^ uint32((int32(v) >> 31)))) + } + b = appendVarint(b, uint64(n)) + for _, v := range s { + b = appendVarint(b, uint64((uint32(v)<<1)^uint32((int32(v)>>31)))) + } + return b, nil +} +func appendZigzag64Value(b []byte, ptr pointer, wiretag uint64, _ bool) ([]byte, error) { + v := *ptr.toInt64() + b = appendVarint(b, wiretag) + b = appendVarint(b, uint64(v<<1)^uint64((int64(v)>>63))) + return b, nil +} +func appendZigzag64ValueNoZero(b []byte, ptr pointer, wiretag uint64, _ bool) ([]byte, error) { + v := *ptr.toInt64() + if v == 0 { + return b, nil + } + b = appendVarint(b, wiretag) + b = appendVarint(b, uint64(v<<1)^uint64((int64(v)>>63))) + return b, nil +} +func appendZigzag64Ptr(b []byte, ptr pointer, wiretag uint64, _ bool) ([]byte, error) { + p := *ptr.toInt64Ptr() + if p == nil { + return b, nil + } + b = appendVarint(b, wiretag) + v := *p + b = appendVarint(b, uint64(v<<1)^uint64((int64(v)>>63))) + return b, nil +} +func appendZigzag64Slice(b []byte, ptr pointer, wiretag uint64, _ bool) ([]byte, error) { + s := *ptr.toInt64Slice() + for _, v := range s { + b = appendVarint(b, wiretag) + b = appendVarint(b, uint64(v<<1)^uint64((int64(v)>>63))) + } + return b, nil +} +func appendZigzag64PackedSlice(b []byte, ptr pointer, wiretag uint64, _ bool) ([]byte, error) { + s := *ptr.toInt64Slice() + if len(s) == 0 { + return b, nil + } + b = appendVarint(b, wiretag&^7|WireBytes) + // compute size + n := 0 + for _, v := range s { + n += SizeVarint(uint64(v<<1) ^ uint64((int64(v) >> 63))) + } + b = appendVarint(b, uint64(n)) + for _, v := range s { + b = appendVarint(b, uint64(v<<1)^uint64((int64(v)>>63))) + } + return b, nil +} +func appendBoolValue(b []byte, ptr pointer, wiretag uint64, _ bool) ([]byte, error) { + v := *ptr.toBool() + b = appendVarint(b, wiretag) + if v { + b = append(b, 1) + } else { + b = append(b, 0) + } + return b, nil +} +func appendBoolValueNoZero(b []byte, ptr pointer, wiretag uint64, _ bool) ([]byte, error) { + v := *ptr.toBool() + if !v { + return b, nil + } + b = appendVarint(b, wiretag) + b = append(b, 1) + return b, nil +} + +func appendBoolPtr(b []byte, ptr pointer, wiretag uint64, _ bool) ([]byte, error) { + p := *ptr.toBoolPtr() + if p == nil { + return b, nil + } + b = appendVarint(b, wiretag) + if *p { + b = append(b, 1) + } else { + b = append(b, 0) + } + return b, nil +} +func appendBoolSlice(b []byte, ptr pointer, wiretag uint64, _ bool) ([]byte, error) { + s := *ptr.toBoolSlice() + for _, v := range s { + b = appendVarint(b, wiretag) + if v { + b = append(b, 1) + } else { + b = append(b, 0) + } + } + return b, nil +} +func appendBoolPackedSlice(b []byte, ptr pointer, wiretag uint64, _ bool) ([]byte, error) { + s := *ptr.toBoolSlice() + if len(s) == 0 { + return b, nil + } + b = appendVarint(b, wiretag&^7|WireBytes) + b = appendVarint(b, uint64(len(s))) + for _, v := range s { + if v { + b = append(b, 1) + } else { + b = append(b, 0) + } + } + return b, nil +} +func appendStringValue(b []byte, ptr pointer, wiretag uint64, _ bool) ([]byte, error) { + v := *ptr.toString() + if !utf8.ValidString(v) { + return nil, errInvalidUTF8 + } + b = appendVarint(b, wiretag) + b = appendVarint(b, uint64(len(v))) + b = append(b, v...) + return b, nil +} +func appendStringValueNoZero(b []byte, ptr pointer, wiretag uint64, _ bool) ([]byte, error) { + v := *ptr.toString() + if v == "" { + return b, nil + } + if !utf8.ValidString(v) { + return nil, errInvalidUTF8 + } + b = appendVarint(b, wiretag) + b = appendVarint(b, uint64(len(v))) + b = append(b, v...) + return b, nil +} +func appendStringPtr(b []byte, ptr pointer, wiretag uint64, _ bool) ([]byte, error) { + p := *ptr.toStringPtr() + if p == nil { + return b, nil + } + v := *p + if !utf8.ValidString(v) { + return nil, errInvalidUTF8 + } + b = appendVarint(b, wiretag) + b = appendVarint(b, uint64(len(v))) + b = append(b, v...) + return b, nil +} +func appendStringSlice(b []byte, ptr pointer, wiretag uint64, _ bool) ([]byte, error) { + s := *ptr.toStringSlice() + for _, v := range s { + if !utf8.ValidString(v) { + return nil, errInvalidUTF8 + } + b = appendVarint(b, wiretag) + b = appendVarint(b, uint64(len(v))) + b = append(b, v...) + } + return b, nil +} +func appendBytes(b []byte, ptr pointer, wiretag uint64, _ bool) ([]byte, error) { + v := *ptr.toBytes() + if v == nil { + return b, nil + } + b = appendVarint(b, wiretag) + b = appendVarint(b, uint64(len(v))) + b = append(b, v...) + return b, nil +} +func appendBytes3(b []byte, ptr pointer, wiretag uint64, _ bool) ([]byte, error) { + v := *ptr.toBytes() + if len(v) == 0 { + return b, nil + } + b = appendVarint(b, wiretag) + b = appendVarint(b, uint64(len(v))) + b = append(b, v...) + return b, nil +} +func appendBytesOneof(b []byte, ptr pointer, wiretag uint64, _ bool) ([]byte, error) { + v := *ptr.toBytes() + b = appendVarint(b, wiretag) + b = appendVarint(b, uint64(len(v))) + b = append(b, v...) + return b, nil +} +func appendBytesSlice(b []byte, ptr pointer, wiretag uint64, _ bool) ([]byte, error) { + s := *ptr.toBytesSlice() + for _, v := range s { + b = appendVarint(b, wiretag) + b = appendVarint(b, uint64(len(v))) + b = append(b, v...) + } + return b, nil +} + +// makeGroupMarshaler returns the sizer and marshaler for a group. +// u is the marshal info of the underlying message. +func makeGroupMarshaler(u *marshalInfo) (sizer, marshaler) { + return func(ptr pointer, tagsize int) int { + p := ptr.getPointer() + if p.isNil() { + return 0 + } + return u.size(p) + 2*tagsize + }, + func(b []byte, ptr pointer, wiretag uint64, deterministic bool) ([]byte, error) { + p := ptr.getPointer() + if p.isNil() { + return b, nil + } + var err error + b = appendVarint(b, wiretag) // start group + b, err = u.marshal(b, p, deterministic) + b = appendVarint(b, wiretag+(WireEndGroup-WireStartGroup)) // end group + return b, err + } +} + +// makeGroupSliceMarshaler returns the sizer and marshaler for a group slice. +// u is the marshal info of the underlying message. +func makeGroupSliceMarshaler(u *marshalInfo) (sizer, marshaler) { + return func(ptr pointer, tagsize int) int { + s := ptr.getPointerSlice() + n := 0 + for _, v := range s { + if v.isNil() { + continue + } + n += u.size(v) + 2*tagsize + } + return n + }, + func(b []byte, ptr pointer, wiretag uint64, deterministic bool) ([]byte, error) { + s := ptr.getPointerSlice() + var err, errreq error + for _, v := range s { + if v.isNil() { + return b, errRepeatedHasNil + } + b = appendVarint(b, wiretag) // start group + b, err = u.marshal(b, v, deterministic) + b = appendVarint(b, wiretag+(WireEndGroup-WireStartGroup)) // end group + if err != nil { + if _, ok := err.(*RequiredNotSetError); ok { + // Required field in submessage is not set. + // We record the error but keep going, to give a complete marshaling. + if errreq == nil { + errreq = err + } + continue + } + if err == ErrNil { + err = errRepeatedHasNil + } + return b, err + } + } + return b, errreq + } +} + +// makeMessageMarshaler returns the sizer and marshaler for a message field. +// u is the marshal info of the message. +func makeMessageMarshaler(u *marshalInfo) (sizer, marshaler) { + return func(ptr pointer, tagsize int) int { + p := ptr.getPointer() + if p.isNil() { + return 0 + } + siz := u.size(p) + return siz + SizeVarint(uint64(siz)) + tagsize + }, + func(b []byte, ptr pointer, wiretag uint64, deterministic bool) ([]byte, error) { + p := ptr.getPointer() + if p.isNil() { + return b, nil + } + b = appendVarint(b, wiretag) + siz := u.cachedsize(p) + b = appendVarint(b, uint64(siz)) + return u.marshal(b, p, deterministic) + } +} + +// makeMessageSliceMarshaler returns the sizer and marshaler for a message slice. +// u is the marshal info of the message. +func makeMessageSliceMarshaler(u *marshalInfo) (sizer, marshaler) { + return func(ptr pointer, tagsize int) int { + s := ptr.getPointerSlice() + n := 0 + for _, v := range s { + if v.isNil() { + continue + } + siz := u.size(v) + n += siz + SizeVarint(uint64(siz)) + tagsize + } + return n + }, + func(b []byte, ptr pointer, wiretag uint64, deterministic bool) ([]byte, error) { + s := ptr.getPointerSlice() + var err, errreq error + for _, v := range s { + if v.isNil() { + return b, errRepeatedHasNil + } + b = appendVarint(b, wiretag) + siz := u.cachedsize(v) + b = appendVarint(b, uint64(siz)) + b, err = u.marshal(b, v, deterministic) + if err != nil { + if _, ok := err.(*RequiredNotSetError); ok { + // Required field in submessage is not set. + // We record the error but keep going, to give a complete marshaling. + if errreq == nil { + errreq = err + } + continue + } + if err == ErrNil { + err = errRepeatedHasNil + } + return b, err + } + } + return b, errreq + } +} + +// makeMapMarshaler returns the sizer and marshaler for a map field. +// f is the pointer to the reflect data structure of the field. +func makeMapMarshaler(f *reflect.StructField) (sizer, marshaler) { + // figure out key and value type + t := f.Type + keyType := t.Key() + valType := t.Elem() + tags := strings.Split(f.Tag.Get("protobuf"), ",") + keyTags := strings.Split(f.Tag.Get("protobuf_key"), ",") + valTags := strings.Split(f.Tag.Get("protobuf_val"), ",") + for _, t := range tags { + if strings.HasPrefix(t, "customtype=") { + valTags = append(valTags, t) + } + if t == "stdtime" { + valTags = append(valTags, t) + } + if t == "stdduration" { + valTags = append(valTags, t) + } + } + keySizer, keyMarshaler := typeMarshaler(keyType, keyTags, false, false) // don't omit zero value in map + valSizer, valMarshaler := typeMarshaler(valType, valTags, false, false) // don't omit zero value in map + keyWireTag := 1<<3 | wiretype(keyTags[0]) + valWireTag := 2<<3 | wiretype(valTags[0]) + + // We create an interface to get the addresses of the map key and value. + // If value is pointer-typed, the interface is a direct interface, the + // idata itself is the value. Otherwise, the idata is the pointer to the + // value. + // Key cannot be pointer-typed. + valIsPtr := valType.Kind() == reflect.Ptr + return func(ptr pointer, tagsize int) int { + m := ptr.asPointerTo(t).Elem() // the map + n := 0 + for _, k := range m.MapKeys() { + ki := k.Interface() + vi := m.MapIndex(k).Interface() + kaddr := toAddrPointer(&ki, false) // pointer to key + vaddr := toAddrPointer(&vi, valIsPtr) // pointer to value + siz := keySizer(kaddr, 1) + valSizer(vaddr, 1) // tag of key = 1 (size=1), tag of val = 2 (size=1) + n += siz + SizeVarint(uint64(siz)) + tagsize + } + return n + }, + func(b []byte, ptr pointer, tag uint64, deterministic bool) ([]byte, error) { + m := ptr.asPointerTo(t).Elem() // the map + var err error + keys := m.MapKeys() + if len(keys) > 1 && deterministic { + sort.Sort(mapKeys(keys)) + } + for _, k := range keys { + ki := k.Interface() + vi := m.MapIndex(k).Interface() + kaddr := toAddrPointer(&ki, false) // pointer to key + vaddr := toAddrPointer(&vi, valIsPtr) // pointer to value + b = appendVarint(b, tag) + siz := keySizer(kaddr, 1) + valSizer(vaddr, 1) // tag of key = 1 (size=1), tag of val = 2 (size=1) + b = appendVarint(b, uint64(siz)) + b, err = keyMarshaler(b, kaddr, keyWireTag, deterministic) + if err != nil { + return b, err + } + b, err = valMarshaler(b, vaddr, valWireTag, deterministic) + if err != nil && err != ErrNil { // allow nil value in map + return b, err + } + } + return b, nil + } +} + +// makeOneOfMarshaler returns the sizer and marshaler for a oneof field. +// fi is the marshal info of the field. +// f is the pointer to the reflect data structure of the field. +func makeOneOfMarshaler(fi *marshalFieldInfo, f *reflect.StructField) (sizer, marshaler) { + // Oneof field is an interface. We need to get the actual data type on the fly. + t := f.Type + return func(ptr pointer, _ int) int { + p := ptr.getInterfacePointer() + if p.isNil() { + return 0 + } + v := ptr.asPointerTo(t).Elem().Elem().Elem() // *interface -> interface -> *struct -> struct + telem := v.Type() + e := fi.oneofElems[telem] + return e.sizer(p, e.tagsize) + }, + func(b []byte, ptr pointer, _ uint64, deterministic bool) ([]byte, error) { + p := ptr.getInterfacePointer() + if p.isNil() { + return b, nil + } + v := ptr.asPointerTo(t).Elem().Elem().Elem() // *interface -> interface -> *struct -> struct + telem := v.Type() + if telem.Field(0).Type.Kind() == reflect.Ptr && p.getPointer().isNil() { + return b, errOneofHasNil + } + e := fi.oneofElems[telem] + return e.marshaler(b, p, e.wiretag, deterministic) + } +} + +// sizeExtensions computes the size of encoded data for a XXX_InternalExtensions field. +func (u *marshalInfo) sizeExtensions(ext *XXX_InternalExtensions) int { + m, mu := ext.extensionsRead() + if m == nil { + return 0 + } + mu.Lock() + + n := 0 + for _, e := range m { + if e.value == nil || e.desc == nil { + // Extension is only in its encoded form. + n += len(e.enc) + continue + } + + // We don't skip extensions that have an encoded form set, + // because the extension value may have been mutated after + // the last time this function was called. + ei := u.getExtElemInfo(e.desc) + v := e.value + p := toAddrPointer(&v, ei.isptr) + n += ei.sizer(p, ei.tagsize) + } + mu.Unlock() + return n +} + +// appendExtensions marshals a XXX_InternalExtensions field to the end of byte slice b. +func (u *marshalInfo) appendExtensions(b []byte, ext *XXX_InternalExtensions, deterministic bool) ([]byte, error) { + m, mu := ext.extensionsRead() + if m == nil { + return b, nil + } + mu.Lock() + defer mu.Unlock() + + var err error + + // Fast-path for common cases: zero or one extensions. + // Don't bother sorting the keys. + if len(m) <= 1 { + for _, e := range m { + if e.value == nil || e.desc == nil { + // Extension is only in its encoded form. + b = append(b, e.enc...) + continue + } + + // We don't skip extensions that have an encoded form set, + // because the extension value may have been mutated after + // the last time this function was called. + + ei := u.getExtElemInfo(e.desc) + v := e.value + p := toAddrPointer(&v, ei.isptr) + b, err = ei.marshaler(b, p, ei.wiretag, deterministic) + if err != nil { + return b, err + } + } + return b, nil + } + + // Sort the keys to provide a deterministic encoding. + // Not sure this is required, but the old code does it. + keys := make([]int, 0, len(m)) + for k := range m { + keys = append(keys, int(k)) + } + sort.Ints(keys) + + for _, k := range keys { + e := m[int32(k)] + if e.value == nil || e.desc == nil { + // Extension is only in its encoded form. + b = append(b, e.enc...) + continue + } + + // We don't skip extensions that have an encoded form set, + // because the extension value may have been mutated after + // the last time this function was called. + + ei := u.getExtElemInfo(e.desc) + v := e.value + p := toAddrPointer(&v, ei.isptr) + b, err = ei.marshaler(b, p, ei.wiretag, deterministic) + if err != nil { + return b, err + } + } + return b, nil +} + +// message set format is: +// message MessageSet { +// repeated group Item = 1 { +// required int32 type_id = 2; +// required string message = 3; +// }; +// } + +// sizeMessageSet computes the size of encoded data for a XXX_InternalExtensions field +// in message set format (above). +func (u *marshalInfo) sizeMessageSet(ext *XXX_InternalExtensions) int { + m, mu := ext.extensionsRead() + if m == nil { + return 0 + } + mu.Lock() + + n := 0 + for id, e := range m { + n += 2 // start group, end group. tag = 1 (size=1) + n += SizeVarint(uint64(id)) + 1 // type_id, tag = 2 (size=1) + + if e.value == nil || e.desc == nil { + // Extension is only in its encoded form. + msgWithLen := skipVarint(e.enc) // skip old tag, but leave the length varint + siz := len(msgWithLen) + n += siz + 1 // message, tag = 3 (size=1) + continue + } + + // We don't skip extensions that have an encoded form set, + // because the extension value may have been mutated after + // the last time this function was called. + + ei := u.getExtElemInfo(e.desc) + v := e.value + p := toAddrPointer(&v, ei.isptr) + n += ei.sizer(p, 1) // message, tag = 3 (size=1) + } + mu.Unlock() + return n +} + +// appendMessageSet marshals a XXX_InternalExtensions field in message set format (above) +// to the end of byte slice b. +func (u *marshalInfo) appendMessageSet(b []byte, ext *XXX_InternalExtensions, deterministic bool) ([]byte, error) { + m, mu := ext.extensionsRead() + if m == nil { + return b, nil + } + mu.Lock() + defer mu.Unlock() + + var err error + + // Fast-path for common cases: zero or one extensions. + // Don't bother sorting the keys. + if len(m) <= 1 { + for id, e := range m { + b = append(b, 1<<3|WireStartGroup) + b = append(b, 2<<3|WireVarint) + b = appendVarint(b, uint64(id)) + + if e.value == nil || e.desc == nil { + // Extension is only in its encoded form. + msgWithLen := skipVarint(e.enc) // skip old tag, but leave the length varint + b = append(b, 3<<3|WireBytes) + b = append(b, msgWithLen...) + b = append(b, 1<<3|WireEndGroup) + continue + } + + // We don't skip extensions that have an encoded form set, + // because the extension value may have been mutated after + // the last time this function was called. + + ei := u.getExtElemInfo(e.desc) + v := e.value + p := toAddrPointer(&v, ei.isptr) + b, err = ei.marshaler(b, p, 3<<3|WireBytes, deterministic) + if err != nil { + return b, err + } + b = append(b, 1<<3|WireEndGroup) + } + return b, nil + } + + // Sort the keys to provide a deterministic encoding. + keys := make([]int, 0, len(m)) + for k := range m { + keys = append(keys, int(k)) + } + sort.Ints(keys) + + for _, id := range keys { + e := m[int32(id)] + b = append(b, 1<<3|WireStartGroup) + b = append(b, 2<<3|WireVarint) + b = appendVarint(b, uint64(id)) + + if e.value == nil || e.desc == nil { + // Extension is only in its encoded form. + msgWithLen := skipVarint(e.enc) // skip old tag, but leave the length varint + b = append(b, 3<<3|WireBytes) + b = append(b, msgWithLen...) + b = append(b, 1<<3|WireEndGroup) + continue + } + + // We don't skip extensions that have an encoded form set, + // because the extension value may have been mutated after + // the last time this function was called. + + ei := u.getExtElemInfo(e.desc) + v := e.value + p := toAddrPointer(&v, ei.isptr) + b, err = ei.marshaler(b, p, 3<<3|WireBytes, deterministic) + b = append(b, 1<<3|WireEndGroup) + if err != nil { + return b, err + } + } + return b, nil +} + +// sizeV1Extensions computes the size of encoded data for a V1-API extension field. +func (u *marshalInfo) sizeV1Extensions(m map[int32]Extension) int { + if m == nil { + return 0 + } + + n := 0 + for _, e := range m { + if e.value == nil || e.desc == nil { + // Extension is only in its encoded form. + n += len(e.enc) + continue + } + + // We don't skip extensions that have an encoded form set, + // because the extension value may have been mutated after + // the last time this function was called. + + ei := u.getExtElemInfo(e.desc) + v := e.value + p := toAddrPointer(&v, ei.isptr) + n += ei.sizer(p, ei.tagsize) + } + return n +} + +// appendV1Extensions marshals a V1-API extension field to the end of byte slice b. +func (u *marshalInfo) appendV1Extensions(b []byte, m map[int32]Extension, deterministic bool) ([]byte, error) { + if m == nil { + return b, nil + } + + // Sort the keys to provide a deterministic encoding. + keys := make([]int, 0, len(m)) + for k := range m { + keys = append(keys, int(k)) + } + sort.Ints(keys) + + var err error + for _, k := range keys { + e := m[int32(k)] + if e.value == nil || e.desc == nil { + // Extension is only in its encoded form. + b = append(b, e.enc...) + continue + } + + // We don't skip extensions that have an encoded form set, + // because the extension value may have been mutated after + // the last time this function was called. + + ei := u.getExtElemInfo(e.desc) + v := e.value + p := toAddrPointer(&v, ei.isptr) + b, err = ei.marshaler(b, p, ei.wiretag, deterministic) + if err != nil { + return b, err + } + } + return b, nil +} + +// newMarshaler is the interface representing objects that can marshal themselves. +// +// This exists to support protoc-gen-go generated messages. +// The proto package will stop type-asserting to this interface in the future. +// +// DO NOT DEPEND ON THIS. +type newMarshaler interface { + XXX_Size() int + XXX_Marshal(b []byte, deterministic bool) ([]byte, error) +} + +// Size returns the encoded size of a protocol buffer message. +// This is the main entry point. +func Size(pb Message) int { + if m, ok := pb.(newMarshaler); ok { + return m.XXX_Size() + } + if m, ok := pb.(Marshaler); ok { + // If the message can marshal itself, let it do it, for compatibility. + // NOTE: This is not efficient. + b, _ := m.Marshal() + return len(b) + } + // in case somehow we didn't generate the wrapper + if pb == nil { + return 0 + } + var info InternalMessageInfo + return info.Size(pb) +} + +// Marshal takes a protocol buffer message +// and encodes it into the wire format, returning the data. +// This is the main entry point. +func Marshal(pb Message) ([]byte, error) { + if m, ok := pb.(newMarshaler); ok { + siz := m.XXX_Size() + b := make([]byte, 0, siz) + return m.XXX_Marshal(b, false) + } + if m, ok := pb.(Marshaler); ok { + // If the message can marshal itself, let it do it, for compatibility. + // NOTE: This is not efficient. + return m.Marshal() + } + // in case somehow we didn't generate the wrapper + if pb == nil { + return nil, ErrNil + } + var info InternalMessageInfo + siz := info.Size(pb) + b := make([]byte, 0, siz) + return info.Marshal(b, pb, false) +} + +// Marshal takes a protocol buffer message +// and encodes it into the wire format, writing the result to the +// Buffer. +// This is an alternative entry point. It is not necessary to use +// a Buffer for most applications. +func (p *Buffer) Marshal(pb Message) error { + var err error + if m, ok := pb.(newMarshaler); ok { + siz := m.XXX_Size() + p.grow(siz) // make sure buf has enough capacity + p.buf, err = m.XXX_Marshal(p.buf, p.deterministic) + return err + } + if m, ok := pb.(Marshaler); ok { + // If the message can marshal itself, let it do it, for compatibility. + // NOTE: This is not efficient. + var b []byte + b, err = m.Marshal() + p.buf = append(p.buf, b...) + return err + } + // in case somehow we didn't generate the wrapper + if pb == nil { + return ErrNil + } + var info InternalMessageInfo + siz := info.Size(pb) + p.grow(siz) // make sure buf has enough capacity + p.buf, err = info.Marshal(p.buf, pb, p.deterministic) + return err +} + +// grow grows the buffer's capacity, if necessary, to guarantee space for +// another n bytes. After grow(n), at least n bytes can be written to the +// buffer without another allocation. +func (p *Buffer) grow(n int) { + need := len(p.buf) + n + if need <= cap(p.buf) { + return + } + newCap := len(p.buf) * 2 + if newCap < need { + newCap = need + } + p.buf = append(make([]byte, 0, newCap), p.buf...) +} diff --git a/vendor/github.com/gogo/protobuf/proto/table_marshal_gogo.go b/vendor/github.com/gogo/protobuf/proto/table_marshal_gogo.go new file mode 100644 index 000000000..997f57c1e --- /dev/null +++ b/vendor/github.com/gogo/protobuf/proto/table_marshal_gogo.go @@ -0,0 +1,388 @@ +// Protocol Buffers for Go with Gadgets +// +// Copyright (c) 2018, The GoGo Authors. All rights reserved. +// http://github.com/gogo/protobuf +// +// Redistribution and use in source and binary forms, with or without +// modification, are permitted provided that the following conditions are +// met: +// +// * Redistributions of source code must retain the above copyright +// notice, this list of conditions and the following disclaimer. +// * Redistributions in binary form must reproduce the above +// copyright notice, this list of conditions and the following disclaimer +// in the documentation and/or other materials provided with the +// distribution. +// +// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS +// "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT +// LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR +// A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT +// OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, +// SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT +// LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, +// DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY +// THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT +// (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE +// OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. + +package proto + +import ( + "reflect" + "time" +) + +// makeMessageRefMarshaler differs a bit from makeMessageMarshaler +// It marshal a message T instead of a *T +func makeMessageRefMarshaler(u *marshalInfo) (sizer, marshaler) { + return func(ptr pointer, tagsize int) int { + siz := u.size(ptr) + return siz + SizeVarint(uint64(siz)) + tagsize + }, + func(b []byte, ptr pointer, wiretag uint64, deterministic bool) ([]byte, error) { + b = appendVarint(b, wiretag) + siz := u.cachedsize(ptr) + b = appendVarint(b, uint64(siz)) + return u.marshal(b, ptr, deterministic) + } +} + +// makeMessageRefSliceMarshaler differs quite a lot from makeMessageSliceMarshaler +// It marshals a slice of messages []T instead of []*T +func makeMessageRefSliceMarshaler(u *marshalInfo) (sizer, marshaler) { + return func(ptr pointer, tagsize int) int { + s := ptr.getSlice(u.typ) + n := 0 + for i := 0; i < s.Len(); i++ { + elem := s.Index(i) + e := elem.Interface() + v := toAddrPointer(&e, false) + siz := u.size(v) + n += siz + SizeVarint(uint64(siz)) + tagsize + } + return n + }, + func(b []byte, ptr pointer, wiretag uint64, deterministic bool) ([]byte, error) { + s := ptr.getSlice(u.typ) + var err, errreq error + for i := 0; i < s.Len(); i++ { + elem := s.Index(i) + e := elem.Interface() + v := toAddrPointer(&e, false) + b = appendVarint(b, wiretag) + siz := u.size(v) + b = appendVarint(b, uint64(siz)) + b, err = u.marshal(b, v, deterministic) + + if err != nil { + if _, ok := err.(*RequiredNotSetError); ok { + // Required field in submessage is not set. + // We record the error but keep going, to give a complete marshaling. + if errreq == nil { + errreq = err + } + continue + } + if err == ErrNil { + err = errRepeatedHasNil + } + return b, err + } + } + + return b, errreq + } +} + +func makeCustomPtrMarshaler(u *marshalInfo) (sizer, marshaler) { + return func(ptr pointer, tagsize int) int { + if ptr.isNil() { + return 0 + } + m := ptr.asPointerTo(reflect.PtrTo(u.typ)).Elem().Interface().(custom) + siz := m.Size() + return tagsize + SizeVarint(uint64(siz)) + siz + }, func(b []byte, ptr pointer, wiretag uint64, deterministic bool) ([]byte, error) { + if ptr.isNil() { + return b, nil + } + m := ptr.asPointerTo(reflect.PtrTo(u.typ)).Elem().Interface().(custom) + siz := m.Size() + buf, err := m.Marshal() + if err != nil { + return nil, err + } + b = appendVarint(b, wiretag) + b = appendVarint(b, uint64(siz)) + b = append(b, buf...) + return b, nil + } +} + +func makeCustomMarshaler(u *marshalInfo) (sizer, marshaler) { + return func(ptr pointer, tagsize int) int { + m := ptr.asPointerTo(u.typ).Interface().(custom) + siz := m.Size() + return tagsize + SizeVarint(uint64(siz)) + siz + }, func(b []byte, ptr pointer, wiretag uint64, deterministic bool) ([]byte, error) { + m := ptr.asPointerTo(u.typ).Interface().(custom) + siz := m.Size() + buf, err := m.Marshal() + if err != nil { + return nil, err + } + b = appendVarint(b, wiretag) + b = appendVarint(b, uint64(siz)) + b = append(b, buf...) + return b, nil + } +} + +func makeTimeMarshaler(u *marshalInfo) (sizer, marshaler) { + return func(ptr pointer, tagsize int) int { + t := ptr.asPointerTo(u.typ).Interface().(*time.Time) + ts, err := timestampProto(*t) + if err != nil { + return 0 + } + siz := Size(ts) + return tagsize + SizeVarint(uint64(siz)) + siz + }, func(b []byte, ptr pointer, wiretag uint64, deterministic bool) ([]byte, error) { + t := ptr.asPointerTo(u.typ).Interface().(*time.Time) + ts, err := timestampProto(*t) + if err != nil { + return nil, err + } + buf, err := Marshal(ts) + if err != nil { + return nil, err + } + b = appendVarint(b, wiretag) + b = appendVarint(b, uint64(len(buf))) + b = append(b, buf...) + return b, nil + } +} + +func makeTimePtrMarshaler(u *marshalInfo) (sizer, marshaler) { + return func(ptr pointer, tagsize int) int { + if ptr.isNil() { + return 0 + } + t := ptr.asPointerTo(reflect.PtrTo(u.typ)).Elem().Interface().(*time.Time) + ts, err := timestampProto(*t) + if err != nil { + return 0 + } + siz := Size(ts) + return tagsize + SizeVarint(uint64(siz)) + siz + }, func(b []byte, ptr pointer, wiretag uint64, deterministic bool) ([]byte, error) { + if ptr.isNil() { + return b, nil + } + t := ptr.asPointerTo(reflect.PtrTo(u.typ)).Elem().Interface().(*time.Time) + ts, err := timestampProto(*t) + if err != nil { + return nil, err + } + buf, err := Marshal(ts) + if err != nil { + return nil, err + } + b = appendVarint(b, wiretag) + b = appendVarint(b, uint64(len(buf))) + b = append(b, buf...) + return b, nil + } +} + +func makeTimeSliceMarshaler(u *marshalInfo) (sizer, marshaler) { + return func(ptr pointer, tagsize int) int { + s := ptr.getSlice(u.typ) + n := 0 + for i := 0; i < s.Len(); i++ { + elem := s.Index(i) + t := elem.Interface().(time.Time) + ts, err := timestampProto(t) + if err != nil { + return 0 + } + siz := Size(ts) + n += siz + SizeVarint(uint64(siz)) + tagsize + } + return n + }, + func(b []byte, ptr pointer, wiretag uint64, deterministic bool) ([]byte, error) { + s := ptr.getSlice(u.typ) + for i := 0; i < s.Len(); i++ { + elem := s.Index(i) + t := elem.Interface().(time.Time) + ts, err := timestampProto(t) + if err != nil { + return nil, err + } + siz := Size(ts) + buf, err := Marshal(ts) + if err != nil { + return nil, err + } + b = appendVarint(b, wiretag) + b = appendVarint(b, uint64(siz)) + b = append(b, buf...) + } + + return b, nil + } +} + +func makeTimePtrSliceMarshaler(u *marshalInfo) (sizer, marshaler) { + return func(ptr pointer, tagsize int) int { + s := ptr.getSlice(reflect.PtrTo(u.typ)) + n := 0 + for i := 0; i < s.Len(); i++ { + elem := s.Index(i) + t := elem.Interface().(*time.Time) + ts, err := timestampProto(*t) + if err != nil { + return 0 + } + siz := Size(ts) + n += siz + SizeVarint(uint64(siz)) + tagsize + } + return n + }, + func(b []byte, ptr pointer, wiretag uint64, deterministic bool) ([]byte, error) { + s := ptr.getSlice(reflect.PtrTo(u.typ)) + for i := 0; i < s.Len(); i++ { + elem := s.Index(i) + t := elem.Interface().(*time.Time) + ts, err := timestampProto(*t) + if err != nil { + return nil, err + } + siz := Size(ts) + buf, err := Marshal(ts) + if err != nil { + return nil, err + } + b = appendVarint(b, wiretag) + b = appendVarint(b, uint64(siz)) + b = append(b, buf...) + } + + return b, nil + } +} + +func makeDurationMarshaler(u *marshalInfo) (sizer, marshaler) { + return func(ptr pointer, tagsize int) int { + d := ptr.asPointerTo(u.typ).Interface().(*time.Duration) + dur := durationProto(*d) + siz := Size(dur) + return tagsize + SizeVarint(uint64(siz)) + siz + }, func(b []byte, ptr pointer, wiretag uint64, deterministic bool) ([]byte, error) { + d := ptr.asPointerTo(u.typ).Interface().(*time.Duration) + dur := durationProto(*d) + buf, err := Marshal(dur) + if err != nil { + return nil, err + } + b = appendVarint(b, wiretag) + b = appendVarint(b, uint64(len(buf))) + b = append(b, buf...) + return b, nil + } +} + +func makeDurationPtrMarshaler(u *marshalInfo) (sizer, marshaler) { + return func(ptr pointer, tagsize int) int { + if ptr.isNil() { + return 0 + } + d := ptr.asPointerTo(reflect.PtrTo(u.typ)).Elem().Interface().(*time.Duration) + dur := durationProto(*d) + siz := Size(dur) + return tagsize + SizeVarint(uint64(siz)) + siz + }, func(b []byte, ptr pointer, wiretag uint64, deterministic bool) ([]byte, error) { + if ptr.isNil() { + return b, nil + } + d := ptr.asPointerTo(reflect.PtrTo(u.typ)).Elem().Interface().(*time.Duration) + dur := durationProto(*d) + buf, err := Marshal(dur) + if err != nil { + return nil, err + } + b = appendVarint(b, wiretag) + b = appendVarint(b, uint64(len(buf))) + b = append(b, buf...) + return b, nil + } +} + +func makeDurationSliceMarshaler(u *marshalInfo) (sizer, marshaler) { + return func(ptr pointer, tagsize int) int { + s := ptr.getSlice(u.typ) + n := 0 + for i := 0; i < s.Len(); i++ { + elem := s.Index(i) + d := elem.Interface().(time.Duration) + dur := durationProto(d) + siz := Size(dur) + n += siz + SizeVarint(uint64(siz)) + tagsize + } + return n + }, + func(b []byte, ptr pointer, wiretag uint64, deterministic bool) ([]byte, error) { + s := ptr.getSlice(u.typ) + for i := 0; i < s.Len(); i++ { + elem := s.Index(i) + d := elem.Interface().(time.Duration) + dur := durationProto(d) + siz := Size(dur) + buf, err := Marshal(dur) + if err != nil { + return nil, err + } + b = appendVarint(b, wiretag) + b = appendVarint(b, uint64(siz)) + b = append(b, buf...) + } + + return b, nil + } +} + +func makeDurationPtrSliceMarshaler(u *marshalInfo) (sizer, marshaler) { + return func(ptr pointer, tagsize int) int { + s := ptr.getSlice(reflect.PtrTo(u.typ)) + n := 0 + for i := 0; i < s.Len(); i++ { + elem := s.Index(i) + d := elem.Interface().(*time.Duration) + dur := durationProto(*d) + siz := Size(dur) + n += siz + SizeVarint(uint64(siz)) + tagsize + } + return n + }, + func(b []byte, ptr pointer, wiretag uint64, deterministic bool) ([]byte, error) { + s := ptr.getSlice(reflect.PtrTo(u.typ)) + for i := 0; i < s.Len(); i++ { + elem := s.Index(i) + d := elem.Interface().(*time.Duration) + dur := durationProto(*d) + siz := Size(dur) + buf, err := Marshal(dur) + if err != nil { + return nil, err + } + b = appendVarint(b, wiretag) + b = appendVarint(b, uint64(siz)) + b = append(b, buf...) + } + + return b, nil + } +} diff --git a/vendor/github.com/gogo/protobuf/proto/table_merge.go b/vendor/github.com/gogo/protobuf/proto/table_merge.go new file mode 100644 index 000000000..f520106e0 --- /dev/null +++ b/vendor/github.com/gogo/protobuf/proto/table_merge.go @@ -0,0 +1,657 @@ +// Go support for Protocol Buffers - Google's data interchange format +// +// Copyright 2016 The Go Authors. All rights reserved. +// https://github.com/golang/protobuf +// +// Redistribution and use in source and binary forms, with or without +// modification, are permitted provided that the following conditions are +// met: +// +// * Redistributions of source code must retain the above copyright +// notice, this list of conditions and the following disclaimer. +// * Redistributions in binary form must reproduce the above +// copyright notice, this list of conditions and the following disclaimer +// in the documentation and/or other materials provided with the +// distribution. +// * Neither the name of Google Inc. nor the names of its +// contributors may be used to endorse or promote products derived from +// this software without specific prior written permission. +// +// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS +// "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT +// LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR +// A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT +// OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, +// SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT +// LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, +// DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY +// THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT +// (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE +// OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. + +package proto + +import ( + "fmt" + "reflect" + "strings" + "sync" + "sync/atomic" +) + +// Merge merges the src message into dst. +// This assumes that dst and src of the same type and are non-nil. +func (a *InternalMessageInfo) Merge(dst, src Message) { + mi := atomicLoadMergeInfo(&a.merge) + if mi == nil { + mi = getMergeInfo(reflect.TypeOf(dst).Elem()) + atomicStoreMergeInfo(&a.merge, mi) + } + mi.merge(toPointer(&dst), toPointer(&src)) +} + +type mergeInfo struct { + typ reflect.Type + + initialized int32 // 0: only typ is valid, 1: everything is valid + lock sync.Mutex + + fields []mergeFieldInfo + unrecognized field // Offset of XXX_unrecognized +} + +type mergeFieldInfo struct { + field field // Offset of field, guaranteed to be valid + + // isPointer reports whether the value in the field is a pointer. + // This is true for the following situations: + // * Pointer to struct + // * Pointer to basic type (proto2 only) + // * Slice (first value in slice header is a pointer) + // * String (first value in string header is a pointer) + isPointer bool + + // basicWidth reports the width of the field assuming that it is directly + // embedded in the struct (as is the case for basic types in proto3). + // The possible values are: + // 0: invalid + // 1: bool + // 4: int32, uint32, float32 + // 8: int64, uint64, float64 + basicWidth int + + // Where dst and src are pointers to the types being merged. + merge func(dst, src pointer) +} + +var ( + mergeInfoMap = map[reflect.Type]*mergeInfo{} + mergeInfoLock sync.Mutex +) + +func getMergeInfo(t reflect.Type) *mergeInfo { + mergeInfoLock.Lock() + defer mergeInfoLock.Unlock() + mi := mergeInfoMap[t] + if mi == nil { + mi = &mergeInfo{typ: t} + mergeInfoMap[t] = mi + } + return mi +} + +// merge merges src into dst assuming they are both of type *mi.typ. +func (mi *mergeInfo) merge(dst, src pointer) { + if dst.isNil() { + panic("proto: nil destination") + } + if src.isNil() { + return // Nothing to do. + } + + if atomic.LoadInt32(&mi.initialized) == 0 { + mi.computeMergeInfo() + } + + for _, fi := range mi.fields { + sfp := src.offset(fi.field) + + // As an optimization, we can avoid the merge function call cost + // if we know for sure that the source will have no effect + // by checking if it is the zero value. + if unsafeAllowed { + if fi.isPointer && sfp.getPointer().isNil() { // Could be slice or string + continue + } + if fi.basicWidth > 0 { + switch { + case fi.basicWidth == 1 && !*sfp.toBool(): + continue + case fi.basicWidth == 4 && *sfp.toUint32() == 0: + continue + case fi.basicWidth == 8 && *sfp.toUint64() == 0: + continue + } + } + } + + dfp := dst.offset(fi.field) + fi.merge(dfp, sfp) + } + + // TODO: Make this faster? + out := dst.asPointerTo(mi.typ).Elem() + in := src.asPointerTo(mi.typ).Elem() + if emIn, err := extendable(in.Addr().Interface()); err == nil { + emOut, _ := extendable(out.Addr().Interface()) + mIn, muIn := emIn.extensionsRead() + if mIn != nil { + mOut := emOut.extensionsWrite() + muIn.Lock() + mergeExtension(mOut, mIn) + muIn.Unlock() + } + } + + if mi.unrecognized.IsValid() { + if b := *src.offset(mi.unrecognized).toBytes(); len(b) > 0 { + *dst.offset(mi.unrecognized).toBytes() = append([]byte(nil), b...) + } + } +} + +func (mi *mergeInfo) computeMergeInfo() { + mi.lock.Lock() + defer mi.lock.Unlock() + if mi.initialized != 0 { + return + } + t := mi.typ + n := t.NumField() + + props := GetProperties(t) + for i := 0; i < n; i++ { + f := t.Field(i) + if strings.HasPrefix(f.Name, "XXX_") { + continue + } + + mfi := mergeFieldInfo{field: toField(&f)} + tf := f.Type + + // As an optimization, we can avoid the merge function call cost + // if we know for sure that the source will have no effect + // by checking if it is the zero value. + if unsafeAllowed { + switch tf.Kind() { + case reflect.Ptr, reflect.Slice, reflect.String: + // As a special case, we assume slices and strings are pointers + // since we know that the first field in the SliceSlice or + // StringHeader is a data pointer. + mfi.isPointer = true + case reflect.Bool: + mfi.basicWidth = 1 + case reflect.Int32, reflect.Uint32, reflect.Float32: + mfi.basicWidth = 4 + case reflect.Int64, reflect.Uint64, reflect.Float64: + mfi.basicWidth = 8 + } + } + + // Unwrap tf to get at its most basic type. + var isPointer, isSlice bool + if tf.Kind() == reflect.Slice && tf.Elem().Kind() != reflect.Uint8 { + isSlice = true + tf = tf.Elem() + } + if tf.Kind() == reflect.Ptr { + isPointer = true + tf = tf.Elem() + } + if isPointer && isSlice && tf.Kind() != reflect.Struct { + panic("both pointer and slice for basic type in " + tf.Name()) + } + + switch tf.Kind() { + case reflect.Int32: + switch { + case isSlice: // E.g., []int32 + mfi.merge = func(dst, src pointer) { + // NOTE: toInt32Slice is not defined (see pointer_reflect.go). + /* + sfsp := src.toInt32Slice() + if *sfsp != nil { + dfsp := dst.toInt32Slice() + *dfsp = append(*dfsp, *sfsp...) + if *dfsp == nil { + *dfsp = []int64{} + } + } + */ + sfs := src.getInt32Slice() + if sfs != nil { + dfs := dst.getInt32Slice() + dfs = append(dfs, sfs...) + if dfs == nil { + dfs = []int32{} + } + dst.setInt32Slice(dfs) + } + } + case isPointer: // E.g., *int32 + mfi.merge = func(dst, src pointer) { + // NOTE: toInt32Ptr is not defined (see pointer_reflect.go). + /* + sfpp := src.toInt32Ptr() + if *sfpp != nil { + dfpp := dst.toInt32Ptr() + if *dfpp == nil { + *dfpp = Int32(**sfpp) + } else { + **dfpp = **sfpp + } + } + */ + sfp := src.getInt32Ptr() + if sfp != nil { + dfp := dst.getInt32Ptr() + if dfp == nil { + dst.setInt32Ptr(*sfp) + } else { + *dfp = *sfp + } + } + } + default: // E.g., int32 + mfi.merge = func(dst, src pointer) { + if v := *src.toInt32(); v != 0 { + *dst.toInt32() = v + } + } + } + case reflect.Int64: + switch { + case isSlice: // E.g., []int64 + mfi.merge = func(dst, src pointer) { + sfsp := src.toInt64Slice() + if *sfsp != nil { + dfsp := dst.toInt64Slice() + *dfsp = append(*dfsp, *sfsp...) + if *dfsp == nil { + *dfsp = []int64{} + } + } + } + case isPointer: // E.g., *int64 + mfi.merge = func(dst, src pointer) { + sfpp := src.toInt64Ptr() + if *sfpp != nil { + dfpp := dst.toInt64Ptr() + if *dfpp == nil { + *dfpp = Int64(**sfpp) + } else { + **dfpp = **sfpp + } + } + } + default: // E.g., int64 + mfi.merge = func(dst, src pointer) { + if v := *src.toInt64(); v != 0 { + *dst.toInt64() = v + } + } + } + case reflect.Uint32: + switch { + case isSlice: // E.g., []uint32 + mfi.merge = func(dst, src pointer) { + sfsp := src.toUint32Slice() + if *sfsp != nil { + dfsp := dst.toUint32Slice() + *dfsp = append(*dfsp, *sfsp...) + if *dfsp == nil { + *dfsp = []uint32{} + } + } + } + case isPointer: // E.g., *uint32 + mfi.merge = func(dst, src pointer) { + sfpp := src.toUint32Ptr() + if *sfpp != nil { + dfpp := dst.toUint32Ptr() + if *dfpp == nil { + *dfpp = Uint32(**sfpp) + } else { + **dfpp = **sfpp + } + } + } + default: // E.g., uint32 + mfi.merge = func(dst, src pointer) { + if v := *src.toUint32(); v != 0 { + *dst.toUint32() = v + } + } + } + case reflect.Uint64: + switch { + case isSlice: // E.g., []uint64 + mfi.merge = func(dst, src pointer) { + sfsp := src.toUint64Slice() + if *sfsp != nil { + dfsp := dst.toUint64Slice() + *dfsp = append(*dfsp, *sfsp...) + if *dfsp == nil { + *dfsp = []uint64{} + } + } + } + case isPointer: // E.g., *uint64 + mfi.merge = func(dst, src pointer) { + sfpp := src.toUint64Ptr() + if *sfpp != nil { + dfpp := dst.toUint64Ptr() + if *dfpp == nil { + *dfpp = Uint64(**sfpp) + } else { + **dfpp = **sfpp + } + } + } + default: // E.g., uint64 + mfi.merge = func(dst, src pointer) { + if v := *src.toUint64(); v != 0 { + *dst.toUint64() = v + } + } + } + case reflect.Float32: + switch { + case isSlice: // E.g., []float32 + mfi.merge = func(dst, src pointer) { + sfsp := src.toFloat32Slice() + if *sfsp != nil { + dfsp := dst.toFloat32Slice() + *dfsp = append(*dfsp, *sfsp...) + if *dfsp == nil { + *dfsp = []float32{} + } + } + } + case isPointer: // E.g., *float32 + mfi.merge = func(dst, src pointer) { + sfpp := src.toFloat32Ptr() + if *sfpp != nil { + dfpp := dst.toFloat32Ptr() + if *dfpp == nil { + *dfpp = Float32(**sfpp) + } else { + **dfpp = **sfpp + } + } + } + default: // E.g., float32 + mfi.merge = func(dst, src pointer) { + if v := *src.toFloat32(); v != 0 { + *dst.toFloat32() = v + } + } + } + case reflect.Float64: + switch { + case isSlice: // E.g., []float64 + mfi.merge = func(dst, src pointer) { + sfsp := src.toFloat64Slice() + if *sfsp != nil { + dfsp := dst.toFloat64Slice() + *dfsp = append(*dfsp, *sfsp...) + if *dfsp == nil { + *dfsp = []float64{} + } + } + } + case isPointer: // E.g., *float64 + mfi.merge = func(dst, src pointer) { + sfpp := src.toFloat64Ptr() + if *sfpp != nil { + dfpp := dst.toFloat64Ptr() + if *dfpp == nil { + *dfpp = Float64(**sfpp) + } else { + **dfpp = **sfpp + } + } + } + default: // E.g., float64 + mfi.merge = func(dst, src pointer) { + if v := *src.toFloat64(); v != 0 { + *dst.toFloat64() = v + } + } + } + case reflect.Bool: + switch { + case isSlice: // E.g., []bool + mfi.merge = func(dst, src pointer) { + sfsp := src.toBoolSlice() + if *sfsp != nil { + dfsp := dst.toBoolSlice() + *dfsp = append(*dfsp, *sfsp...) + if *dfsp == nil { + *dfsp = []bool{} + } + } + } + case isPointer: // E.g., *bool + mfi.merge = func(dst, src pointer) { + sfpp := src.toBoolPtr() + if *sfpp != nil { + dfpp := dst.toBoolPtr() + if *dfpp == nil { + *dfpp = Bool(**sfpp) + } else { + **dfpp = **sfpp + } + } + } + default: // E.g., bool + mfi.merge = func(dst, src pointer) { + if v := *src.toBool(); v { + *dst.toBool() = v + } + } + } + case reflect.String: + switch { + case isSlice: // E.g., []string + mfi.merge = func(dst, src pointer) { + sfsp := src.toStringSlice() + if *sfsp != nil { + dfsp := dst.toStringSlice() + *dfsp = append(*dfsp, *sfsp...) + if *dfsp == nil { + *dfsp = []string{} + } + } + } + case isPointer: // E.g., *string + mfi.merge = func(dst, src pointer) { + sfpp := src.toStringPtr() + if *sfpp != nil { + dfpp := dst.toStringPtr() + if *dfpp == nil { + *dfpp = String(**sfpp) + } else { + **dfpp = **sfpp + } + } + } + default: // E.g., string + mfi.merge = func(dst, src pointer) { + if v := *src.toString(); v != "" { + *dst.toString() = v + } + } + } + case reflect.Slice: + isProto3 := props.Prop[i].proto3 + switch { + case isPointer: + panic("bad pointer in byte slice case in " + tf.Name()) + case tf.Elem().Kind() != reflect.Uint8: + panic("bad element kind in byte slice case in " + tf.Name()) + case isSlice: // E.g., [][]byte + mfi.merge = func(dst, src pointer) { + sbsp := src.toBytesSlice() + if *sbsp != nil { + dbsp := dst.toBytesSlice() + for _, sb := range *sbsp { + if sb == nil { + *dbsp = append(*dbsp, nil) + } else { + *dbsp = append(*dbsp, append([]byte{}, sb...)) + } + } + if *dbsp == nil { + *dbsp = [][]byte{} + } + } + } + default: // E.g., []byte + mfi.merge = func(dst, src pointer) { + sbp := src.toBytes() + if *sbp != nil { + dbp := dst.toBytes() + if !isProto3 || len(*sbp) > 0 { + *dbp = append([]byte{}, *sbp...) + } + } + } + } + case reflect.Struct: + switch { + case !isPointer: + mergeInfo := getMergeInfo(tf) + mfi.merge = func(dst, src pointer) { + mergeInfo.merge(dst, src) + } + case isSlice: // E.g., []*pb.T + mergeInfo := getMergeInfo(tf) + mfi.merge = func(dst, src pointer) { + sps := src.getPointerSlice() + if sps != nil { + dps := dst.getPointerSlice() + for _, sp := range sps { + var dp pointer + if !sp.isNil() { + dp = valToPointer(reflect.New(tf)) + mergeInfo.merge(dp, sp) + } + dps = append(dps, dp) + } + if dps == nil { + dps = []pointer{} + } + dst.setPointerSlice(dps) + } + } + default: // E.g., *pb.T + mergeInfo := getMergeInfo(tf) + mfi.merge = func(dst, src pointer) { + sp := src.getPointer() + if !sp.isNil() { + dp := dst.getPointer() + if dp.isNil() { + dp = valToPointer(reflect.New(tf)) + dst.setPointer(dp) + } + mergeInfo.merge(dp, sp) + } + } + } + case reflect.Map: + switch { + case isPointer || isSlice: + panic("bad pointer or slice in map case in " + tf.Name()) + default: // E.g., map[K]V + mfi.merge = func(dst, src pointer) { + sm := src.asPointerTo(tf).Elem() + if sm.Len() == 0 { + return + } + dm := dst.asPointerTo(tf).Elem() + if dm.IsNil() { + dm.Set(reflect.MakeMap(tf)) + } + + switch tf.Elem().Kind() { + case reflect.Ptr: // Proto struct (e.g., *T) + for _, key := range sm.MapKeys() { + val := sm.MapIndex(key) + val = reflect.ValueOf(Clone(val.Interface().(Message))) + dm.SetMapIndex(key, val) + } + case reflect.Slice: // E.g. Bytes type (e.g., []byte) + for _, key := range sm.MapKeys() { + val := sm.MapIndex(key) + val = reflect.ValueOf(append([]byte{}, val.Bytes()...)) + dm.SetMapIndex(key, val) + } + default: // Basic type (e.g., string) + for _, key := range sm.MapKeys() { + val := sm.MapIndex(key) + dm.SetMapIndex(key, val) + } + } + } + } + case reflect.Interface: + // Must be oneof field. + switch { + case isPointer || isSlice: + panic("bad pointer or slice in interface case in " + tf.Name()) + default: // E.g., interface{} + // TODO: Make this faster? + mfi.merge = func(dst, src pointer) { + su := src.asPointerTo(tf).Elem() + if !su.IsNil() { + du := dst.asPointerTo(tf).Elem() + typ := su.Elem().Type() + if du.IsNil() || du.Elem().Type() != typ { + du.Set(reflect.New(typ.Elem())) // Initialize interface if empty + } + sv := su.Elem().Elem().Field(0) + if sv.Kind() == reflect.Ptr && sv.IsNil() { + return + } + dv := du.Elem().Elem().Field(0) + if dv.Kind() == reflect.Ptr && dv.IsNil() { + dv.Set(reflect.New(sv.Type().Elem())) // Initialize proto message if empty + } + switch sv.Type().Kind() { + case reflect.Ptr: // Proto struct (e.g., *T) + Merge(dv.Interface().(Message), sv.Interface().(Message)) + case reflect.Slice: // E.g. Bytes type (e.g., []byte) + dv.Set(reflect.ValueOf(append([]byte{}, sv.Bytes()...))) + default: // Basic type (e.g., string) + dv.Set(sv) + } + } + } + } + default: + panic(fmt.Sprintf("merger not found for type:%s", tf)) + } + mi.fields = append(mi.fields, mfi) + } + + mi.unrecognized = invalidField + if f, ok := t.FieldByName("XXX_unrecognized"); ok { + if f.Type != reflect.TypeOf([]byte{}) { + panic("expected XXX_unrecognized to be of type []byte") + } + mi.unrecognized = toField(&f) + } + + atomic.StoreInt32(&mi.initialized, 1) +} diff --git a/vendor/github.com/gogo/protobuf/proto/table_unmarshal.go b/vendor/github.com/gogo/protobuf/proto/table_unmarshal.go new file mode 100644 index 000000000..910e2dd6a --- /dev/null +++ b/vendor/github.com/gogo/protobuf/proto/table_unmarshal.go @@ -0,0 +1,2048 @@ +// Go support for Protocol Buffers - Google's data interchange format +// +// Copyright 2016 The Go Authors. All rights reserved. +// https://github.com/golang/protobuf +// +// Redistribution and use in source and binary forms, with or without +// modification, are permitted provided that the following conditions are +// met: +// +// * Redistributions of source code must retain the above copyright +// notice, this list of conditions and the following disclaimer. +// * Redistributions in binary form must reproduce the above +// copyright notice, this list of conditions and the following disclaimer +// in the documentation and/or other materials provided with the +// distribution. +// * Neither the name of Google Inc. nor the names of its +// contributors may be used to endorse or promote products derived from +// this software without specific prior written permission. +// +// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS +// "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT +// LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR +// A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT +// OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, +// SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT +// LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, +// DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY +// THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT +// (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE +// OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. + +package proto + +import ( + "errors" + "fmt" + "io" + "math" + "reflect" + "strconv" + "strings" + "sync" + "sync/atomic" + "unicode/utf8" +) + +// Unmarshal is the entry point from the generated .pb.go files. +// This function is not intended to be used by non-generated code. +// This function is not subject to any compatibility guarantee. +// msg contains a pointer to a protocol buffer struct. +// b is the data to be unmarshaled into the protocol buffer. +// a is a pointer to a place to store cached unmarshal information. +func (a *InternalMessageInfo) Unmarshal(msg Message, b []byte) error { + // Load the unmarshal information for this message type. + // The atomic load ensures memory consistency. + u := atomicLoadUnmarshalInfo(&a.unmarshal) + if u == nil { + // Slow path: find unmarshal info for msg, update a with it. + u = getUnmarshalInfo(reflect.TypeOf(msg).Elem()) + atomicStoreUnmarshalInfo(&a.unmarshal, u) + } + // Then do the unmarshaling. + err := u.unmarshal(toPointer(&msg), b) + return err +} + +type unmarshalInfo struct { + typ reflect.Type // type of the protobuf struct + + // 0 = only typ field is initialized + // 1 = completely initialized + initialized int32 + lock sync.Mutex // prevents double initialization + dense []unmarshalFieldInfo // fields indexed by tag # + sparse map[uint64]unmarshalFieldInfo // fields indexed by tag # + reqFields []string // names of required fields + reqMask uint64 // 1< 0 { + // Read tag and wire type. + // Special case 1 and 2 byte varints. + var x uint64 + if b[0] < 128 { + x = uint64(b[0]) + b = b[1:] + } else if len(b) >= 2 && b[1] < 128 { + x = uint64(b[0]&0x7f) + uint64(b[1])<<7 + b = b[2:] + } else { + var n int + x, n = decodeVarint(b) + if n == 0 { + return io.ErrUnexpectedEOF + } + b = b[n:] + } + tag := x >> 3 + wire := int(x) & 7 + + // Dispatch on the tag to one of the unmarshal* functions below. + var f unmarshalFieldInfo + if tag < uint64(len(u.dense)) { + f = u.dense[tag] + } else { + f = u.sparse[tag] + } + if fn := f.unmarshal; fn != nil { + var err error + b, err = fn(b, m.offset(f.field), wire) + if err == nil { + reqMask |= f.reqMask + continue + } + if r, ok := err.(*RequiredNotSetError); ok { + // Remember this error, but keep parsing. We need to produce + // a full parse even if a required field is missing. + rnse = r + reqMask |= f.reqMask + continue + } + if err != errInternalBadWireType { + return err + } + // Fragments with bad wire type are treated as unknown fields. + } + + // Unknown tag. + if !u.unrecognized.IsValid() { + // Don't keep unrecognized data; just skip it. + var err error + b, err = skipField(b, wire) + if err != nil { + return err + } + continue + } + // Keep unrecognized data around. + // maybe in extensions, maybe in the unrecognized field. + z := m.offset(u.unrecognized).toBytes() + var emap map[int32]Extension + var e Extension + for _, r := range u.extensionRanges { + if uint64(r.Start) <= tag && tag <= uint64(r.End) { + if u.extensions.IsValid() { + mp := m.offset(u.extensions).toExtensions() + emap = mp.extensionsWrite() + e = emap[int32(tag)] + z = &e.enc + break + } + if u.oldExtensions.IsValid() { + p := m.offset(u.oldExtensions).toOldExtensions() + emap = *p + if emap == nil { + emap = map[int32]Extension{} + *p = emap + } + e = emap[int32(tag)] + z = &e.enc + break + } + if u.bytesExtensions.IsValid() { + z = m.offset(u.bytesExtensions).toBytes() + break + } + panic("no extensions field available") + } + } + // Use wire type to skip data. + var err error + b0 := b + b, err = skipField(b, wire) + if err != nil { + return err + } + *z = encodeVarint(*z, tag<<3|uint64(wire)) + *z = append(*z, b0[:len(b0)-len(b)]...) + + if emap != nil { + emap[int32(tag)] = e + } + } + if rnse != nil { + // A required field of a submessage/group is missing. Return that error. + return rnse + } + if reqMask != u.reqMask { + // A required field of this message is missing. + for _, n := range u.reqFields { + if reqMask&1 == 0 { + return &RequiredNotSetError{n} + } + reqMask >>= 1 + } + } + return nil +} + +// computeUnmarshalInfo fills in u with information for use +// in unmarshaling protocol buffers of type u.typ. +func (u *unmarshalInfo) computeUnmarshalInfo() { + u.lock.Lock() + defer u.lock.Unlock() + if u.initialized != 0 { + return + } + t := u.typ + n := t.NumField() + + // Set up the "not found" value for the unrecognized byte buffer. + // This is the default for proto3. + u.unrecognized = invalidField + u.extensions = invalidField + u.oldExtensions = invalidField + u.bytesExtensions = invalidField + + // List of the generated type and offset for each oneof field. + type oneofField struct { + ityp reflect.Type // interface type of oneof field + field field // offset in containing message + } + var oneofFields []oneofField + + for i := 0; i < n; i++ { + f := t.Field(i) + if f.Name == "XXX_unrecognized" { + // The byte slice used to hold unrecognized input is special. + if f.Type != reflect.TypeOf(([]byte)(nil)) { + panic("bad type for XXX_unrecognized field: " + f.Type.Name()) + } + u.unrecognized = toField(&f) + continue + } + if f.Name == "XXX_InternalExtensions" { + // Ditto here. + if f.Type != reflect.TypeOf(XXX_InternalExtensions{}) { + panic("bad type for XXX_InternalExtensions field: " + f.Type.Name()) + } + u.extensions = toField(&f) + if f.Tag.Get("protobuf_messageset") == "1" { + u.isMessageSet = true + } + continue + } + if f.Name == "XXX_extensions" { + // An older form of the extensions field. + if f.Type == reflect.TypeOf((map[int32]Extension)(nil)) { + u.oldExtensions = toField(&f) + continue + } else if f.Type == reflect.TypeOf(([]byte)(nil)) { + u.bytesExtensions = toField(&f) + continue + } + panic("bad type for XXX_extensions field: " + f.Type.Name()) + } + if f.Name == "XXX_NoUnkeyedLiteral" || f.Name == "XXX_sizecache" { + continue + } + + oneof := f.Tag.Get("protobuf_oneof") + if oneof != "" { + oneofFields = append(oneofFields, oneofField{f.Type, toField(&f)}) + // The rest of oneof processing happens below. + continue + } + + tags := f.Tag.Get("protobuf") + tagArray := strings.Split(tags, ",") + if len(tagArray) < 2 { + panic("protobuf tag not enough fields in " + t.Name() + "." + f.Name + ": " + tags) + } + tag, err := strconv.Atoi(tagArray[1]) + if err != nil { + panic("protobuf tag field not an integer: " + tagArray[1]) + } + + name := "" + for _, tag := range tagArray[3:] { + if strings.HasPrefix(tag, "name=") { + name = tag[5:] + } + } + + // Extract unmarshaling function from the field (its type and tags). + unmarshal := fieldUnmarshaler(&f) + + // Required field? + var reqMask uint64 + if tagArray[2] == "req" { + bit := len(u.reqFields) + u.reqFields = append(u.reqFields, name) + reqMask = uint64(1) << uint(bit) + // TODO: if we have more than 64 required fields, we end up + // not verifying that all required fields are present. + // Fix this, perhaps using a count of required fields? + } + + // Store the info in the correct slot in the message. + u.setTag(tag, toField(&f), unmarshal, reqMask) + } + + // Find any types associated with oneof fields. + // TODO: XXX_OneofFuncs returns more info than we need. Get rid of some of it? + fn := reflect.Zero(reflect.PtrTo(t)).MethodByName("XXX_OneofFuncs") + // gogo: len(oneofFields) > 0 is needed for embedded oneof messages, without a marshaler and unmarshaler + if fn.IsValid() && len(oneofFields) > 0 { + res := fn.Call(nil)[3] // last return value from XXX_OneofFuncs: []interface{} + for i := res.Len() - 1; i >= 0; i-- { + v := res.Index(i) // interface{} + tptr := reflect.ValueOf(v.Interface()).Type() // *Msg_X + typ := tptr.Elem() // Msg_X + + f := typ.Field(0) // oneof implementers have one field + baseUnmarshal := fieldUnmarshaler(&f) + tagstr := strings.Split(f.Tag.Get("protobuf"), ",")[1] + tag, err := strconv.Atoi(tagstr) + if err != nil { + panic("protobuf tag field not an integer: " + tagstr) + } + + // Find the oneof field that this struct implements. + // Might take O(n^2) to process all of the oneofs, but who cares. + for _, of := range oneofFields { + if tptr.Implements(of.ityp) { + // We have found the corresponding interface for this struct. + // That lets us know where this struct should be stored + // when we encounter it during unmarshaling. + unmarshal := makeUnmarshalOneof(typ, of.ityp, baseUnmarshal) + u.setTag(tag, of.field, unmarshal, 0) + } + } + } + } + + // Get extension ranges, if any. + fn = reflect.Zero(reflect.PtrTo(t)).MethodByName("ExtensionRangeArray") + if fn.IsValid() { + if !u.extensions.IsValid() && !u.oldExtensions.IsValid() && !u.bytesExtensions.IsValid() { + panic("a message with extensions, but no extensions field in " + t.Name()) + } + u.extensionRanges = fn.Call(nil)[0].Interface().([]ExtensionRange) + } + + // Explicitly disallow tag 0. This will ensure we flag an error + // when decoding a buffer of all zeros. Without this code, we + // would decode and skip an all-zero buffer of even length. + // [0 0] is [tag=0/wiretype=varint varint-encoded-0]. + u.setTag(0, zeroField, func(b []byte, f pointer, w int) ([]byte, error) { + return nil, fmt.Errorf("proto: %s: illegal tag 0 (wire type %d)", t, w) + }, 0) + + // Set mask for required field check. + u.reqMask = uint64(1)<= 0 && (tag < 16 || tag < 2*n) { // TODO: what are the right numbers here? + for len(u.dense) <= tag { + u.dense = append(u.dense, unmarshalFieldInfo{}) + } + u.dense[tag] = i + return + } + if u.sparse == nil { + u.sparse = map[uint64]unmarshalFieldInfo{} + } + u.sparse[uint64(tag)] = i +} + +// fieldUnmarshaler returns an unmarshaler for the given field. +func fieldUnmarshaler(f *reflect.StructField) unmarshaler { + if f.Type.Kind() == reflect.Map { + return makeUnmarshalMap(f) + } + return typeUnmarshaler(f.Type, f.Tag.Get("protobuf")) +} + +// typeUnmarshaler returns an unmarshaler for the given field type / field tag pair. +func typeUnmarshaler(t reflect.Type, tags string) unmarshaler { + tagArray := strings.Split(tags, ",") + encoding := tagArray[0] + name := "unknown" + ctype := false + isTime := false + isDuration := false + for _, tag := range tagArray[3:] { + if strings.HasPrefix(tag, "name=") { + name = tag[5:] + } + if strings.HasPrefix(tag, "customtype=") { + ctype = true + } + if tag == "stdtime" { + isTime = true + } + if tag == "stdduration" { + isDuration = true + } + } + + // Figure out packaging (pointer, slice, or both) + slice := false + pointer := false + if t.Kind() == reflect.Slice && t.Elem().Kind() != reflect.Uint8 { + slice = true + t = t.Elem() + } + if t.Kind() == reflect.Ptr { + pointer = true + t = t.Elem() + } + + if ctype { + if reflect.PtrTo(t).Implements(customType) { + if slice { + return makeUnmarshalCustomSlice(getUnmarshalInfo(t), name) + } + if pointer { + return makeUnmarshalCustomPtr(getUnmarshalInfo(t), name) + } + return makeUnmarshalCustom(getUnmarshalInfo(t), name) + } else { + panic(fmt.Sprintf("custom type: type: %v, does not implement the proto.custom interface", t)) + } + } + + if isTime { + if pointer { + if slice { + return makeUnmarshalTimePtrSlice(getUnmarshalInfo(t), name) + } + return makeUnmarshalTimePtr(getUnmarshalInfo(t), name) + } + if slice { + return makeUnmarshalTimeSlice(getUnmarshalInfo(t), name) + } + return makeUnmarshalTime(getUnmarshalInfo(t), name) + } + + if isDuration { + if pointer { + if slice { + return makeUnmarshalDurationPtrSlice(getUnmarshalInfo(t), name) + } + return makeUnmarshalDurationPtr(getUnmarshalInfo(t), name) + } + if slice { + return makeUnmarshalDurationSlice(getUnmarshalInfo(t), name) + } + return makeUnmarshalDuration(getUnmarshalInfo(t), name) + } + + // We'll never have both pointer and slice for basic types. + if pointer && slice && t.Kind() != reflect.Struct { + panic("both pointer and slice for basic type in " + t.Name()) + } + + switch t.Kind() { + case reflect.Bool: + if pointer { + return unmarshalBoolPtr + } + if slice { + return unmarshalBoolSlice + } + return unmarshalBoolValue + case reflect.Int32: + switch encoding { + case "fixed32": + if pointer { + return unmarshalFixedS32Ptr + } + if slice { + return unmarshalFixedS32Slice + } + return unmarshalFixedS32Value + case "varint": + // this could be int32 or enum + if pointer { + return unmarshalInt32Ptr + } + if slice { + return unmarshalInt32Slice + } + return unmarshalInt32Value + case "zigzag32": + if pointer { + return unmarshalSint32Ptr + } + if slice { + return unmarshalSint32Slice + } + return unmarshalSint32Value + } + case reflect.Int64: + switch encoding { + case "fixed64": + if pointer { + return unmarshalFixedS64Ptr + } + if slice { + return unmarshalFixedS64Slice + } + return unmarshalFixedS64Value + case "varint": + if pointer { + return unmarshalInt64Ptr + } + if slice { + return unmarshalInt64Slice + } + return unmarshalInt64Value + case "zigzag64": + if pointer { + return unmarshalSint64Ptr + } + if slice { + return unmarshalSint64Slice + } + return unmarshalSint64Value + } + case reflect.Uint32: + switch encoding { + case "fixed32": + if pointer { + return unmarshalFixed32Ptr + } + if slice { + return unmarshalFixed32Slice + } + return unmarshalFixed32Value + case "varint": + if pointer { + return unmarshalUint32Ptr + } + if slice { + return unmarshalUint32Slice + } + return unmarshalUint32Value + } + case reflect.Uint64: + switch encoding { + case "fixed64": + if pointer { + return unmarshalFixed64Ptr + } + if slice { + return unmarshalFixed64Slice + } + return unmarshalFixed64Value + case "varint": + if pointer { + return unmarshalUint64Ptr + } + if slice { + return unmarshalUint64Slice + } + return unmarshalUint64Value + } + case reflect.Float32: + if pointer { + return unmarshalFloat32Ptr + } + if slice { + return unmarshalFloat32Slice + } + return unmarshalFloat32Value + case reflect.Float64: + if pointer { + return unmarshalFloat64Ptr + } + if slice { + return unmarshalFloat64Slice + } + return unmarshalFloat64Value + case reflect.Map: + panic("map type in typeUnmarshaler in " + t.Name()) + case reflect.Slice: + if pointer { + panic("bad pointer in slice case in " + t.Name()) + } + if slice { + return unmarshalBytesSlice + } + return unmarshalBytesValue + case reflect.String: + if pointer { + return unmarshalStringPtr + } + if slice { + return unmarshalStringSlice + } + return unmarshalStringValue + case reflect.Struct: + // message or group field + if !pointer { + switch encoding { + case "bytes": + if slice { + return makeUnmarshalMessageSlice(getUnmarshalInfo(t), name) + } + return makeUnmarshalMessage(getUnmarshalInfo(t), name) + } + } + switch encoding { + case "bytes": + if slice { + return makeUnmarshalMessageSlicePtr(getUnmarshalInfo(t), name) + } + return makeUnmarshalMessagePtr(getUnmarshalInfo(t), name) + case "group": + if slice { + return makeUnmarshalGroupSlicePtr(getUnmarshalInfo(t), name) + } + return makeUnmarshalGroupPtr(getUnmarshalInfo(t), name) + } + } + panic(fmt.Sprintf("unmarshaler not found type:%s encoding:%s", t, encoding)) +} + +// Below are all the unmarshalers for individual fields of various types. + +func unmarshalInt64Value(b []byte, f pointer, w int) ([]byte, error) { + if w != WireVarint { + return b, errInternalBadWireType + } + x, n := decodeVarint(b) + if n == 0 { + return nil, io.ErrUnexpectedEOF + } + b = b[n:] + v := int64(x) + *f.toInt64() = v + return b, nil +} + +func unmarshalInt64Ptr(b []byte, f pointer, w int) ([]byte, error) { + if w != WireVarint { + return b, errInternalBadWireType + } + x, n := decodeVarint(b) + if n == 0 { + return nil, io.ErrUnexpectedEOF + } + b = b[n:] + v := int64(x) + *f.toInt64Ptr() = &v + return b, nil +} + +func unmarshalInt64Slice(b []byte, f pointer, w int) ([]byte, error) { + if w == WireBytes { // packed + x, n := decodeVarint(b) + if n == 0 { + return nil, io.ErrUnexpectedEOF + } + b = b[n:] + if x > uint64(len(b)) { + return nil, io.ErrUnexpectedEOF + } + res := b[x:] + b = b[:x] + for len(b) > 0 { + x, n = decodeVarint(b) + if n == 0 { + return nil, io.ErrUnexpectedEOF + } + b = b[n:] + v := int64(x) + s := f.toInt64Slice() + *s = append(*s, v) + } + return res, nil + } + if w != WireVarint { + return b, errInternalBadWireType + } + x, n := decodeVarint(b) + if n == 0 { + return nil, io.ErrUnexpectedEOF + } + b = b[n:] + v := int64(x) + s := f.toInt64Slice() + *s = append(*s, v) + return b, nil +} + +func unmarshalSint64Value(b []byte, f pointer, w int) ([]byte, error) { + if w != WireVarint { + return b, errInternalBadWireType + } + x, n := decodeVarint(b) + if n == 0 { + return nil, io.ErrUnexpectedEOF + } + b = b[n:] + v := int64(x>>1) ^ int64(x)<<63>>63 + *f.toInt64() = v + return b, nil +} + +func unmarshalSint64Ptr(b []byte, f pointer, w int) ([]byte, error) { + if w != WireVarint { + return b, errInternalBadWireType + } + x, n := decodeVarint(b) + if n == 0 { + return nil, io.ErrUnexpectedEOF + } + b = b[n:] + v := int64(x>>1) ^ int64(x)<<63>>63 + *f.toInt64Ptr() = &v + return b, nil +} + +func unmarshalSint64Slice(b []byte, f pointer, w int) ([]byte, error) { + if w == WireBytes { // packed + x, n := decodeVarint(b) + if n == 0 { + return nil, io.ErrUnexpectedEOF + } + b = b[n:] + if x > uint64(len(b)) { + return nil, io.ErrUnexpectedEOF + } + res := b[x:] + b = b[:x] + for len(b) > 0 { + x, n = decodeVarint(b) + if n == 0 { + return nil, io.ErrUnexpectedEOF + } + b = b[n:] + v := int64(x>>1) ^ int64(x)<<63>>63 + s := f.toInt64Slice() + *s = append(*s, v) + } + return res, nil + } + if w != WireVarint { + return b, errInternalBadWireType + } + x, n := decodeVarint(b) + if n == 0 { + return nil, io.ErrUnexpectedEOF + } + b = b[n:] + v := int64(x>>1) ^ int64(x)<<63>>63 + s := f.toInt64Slice() + *s = append(*s, v) + return b, nil +} + +func unmarshalUint64Value(b []byte, f pointer, w int) ([]byte, error) { + if w != WireVarint { + return b, errInternalBadWireType + } + x, n := decodeVarint(b) + if n == 0 { + return nil, io.ErrUnexpectedEOF + } + b = b[n:] + v := uint64(x) + *f.toUint64() = v + return b, nil +} + +func unmarshalUint64Ptr(b []byte, f pointer, w int) ([]byte, error) { + if w != WireVarint { + return b, errInternalBadWireType + } + x, n := decodeVarint(b) + if n == 0 { + return nil, io.ErrUnexpectedEOF + } + b = b[n:] + v := uint64(x) + *f.toUint64Ptr() = &v + return b, nil +} + +func unmarshalUint64Slice(b []byte, f pointer, w int) ([]byte, error) { + if w == WireBytes { // packed + x, n := decodeVarint(b) + if n == 0 { + return nil, io.ErrUnexpectedEOF + } + b = b[n:] + if x > uint64(len(b)) { + return nil, io.ErrUnexpectedEOF + } + res := b[x:] + b = b[:x] + for len(b) > 0 { + x, n = decodeVarint(b) + if n == 0 { + return nil, io.ErrUnexpectedEOF + } + b = b[n:] + v := uint64(x) + s := f.toUint64Slice() + *s = append(*s, v) + } + return res, nil + } + if w != WireVarint { + return b, errInternalBadWireType + } + x, n := decodeVarint(b) + if n == 0 { + return nil, io.ErrUnexpectedEOF + } + b = b[n:] + v := uint64(x) + s := f.toUint64Slice() + *s = append(*s, v) + return b, nil +} + +func unmarshalInt32Value(b []byte, f pointer, w int) ([]byte, error) { + if w != WireVarint { + return b, errInternalBadWireType + } + x, n := decodeVarint(b) + if n == 0 { + return nil, io.ErrUnexpectedEOF + } + b = b[n:] + v := int32(x) + *f.toInt32() = v + return b, nil +} + +func unmarshalInt32Ptr(b []byte, f pointer, w int) ([]byte, error) { + if w != WireVarint { + return b, errInternalBadWireType + } + x, n := decodeVarint(b) + if n == 0 { + return nil, io.ErrUnexpectedEOF + } + b = b[n:] + v := int32(x) + f.setInt32Ptr(v) + return b, nil +} + +func unmarshalInt32Slice(b []byte, f pointer, w int) ([]byte, error) { + if w == WireBytes { // packed + x, n := decodeVarint(b) + if n == 0 { + return nil, io.ErrUnexpectedEOF + } + b = b[n:] + if x > uint64(len(b)) { + return nil, io.ErrUnexpectedEOF + } + res := b[x:] + b = b[:x] + for len(b) > 0 { + x, n = decodeVarint(b) + if n == 0 { + return nil, io.ErrUnexpectedEOF + } + b = b[n:] + v := int32(x) + f.appendInt32Slice(v) + } + return res, nil + } + if w != WireVarint { + return b, errInternalBadWireType + } + x, n := decodeVarint(b) + if n == 0 { + return nil, io.ErrUnexpectedEOF + } + b = b[n:] + v := int32(x) + f.appendInt32Slice(v) + return b, nil +} + +func unmarshalSint32Value(b []byte, f pointer, w int) ([]byte, error) { + if w != WireVarint { + return b, errInternalBadWireType + } + x, n := decodeVarint(b) + if n == 0 { + return nil, io.ErrUnexpectedEOF + } + b = b[n:] + v := int32(x>>1) ^ int32(x)<<31>>31 + *f.toInt32() = v + return b, nil +} + +func unmarshalSint32Ptr(b []byte, f pointer, w int) ([]byte, error) { + if w != WireVarint { + return b, errInternalBadWireType + } + x, n := decodeVarint(b) + if n == 0 { + return nil, io.ErrUnexpectedEOF + } + b = b[n:] + v := int32(x>>1) ^ int32(x)<<31>>31 + f.setInt32Ptr(v) + return b, nil +} + +func unmarshalSint32Slice(b []byte, f pointer, w int) ([]byte, error) { + if w == WireBytes { // packed + x, n := decodeVarint(b) + if n == 0 { + return nil, io.ErrUnexpectedEOF + } + b = b[n:] + if x > uint64(len(b)) { + return nil, io.ErrUnexpectedEOF + } + res := b[x:] + b = b[:x] + for len(b) > 0 { + x, n = decodeVarint(b) + if n == 0 { + return nil, io.ErrUnexpectedEOF + } + b = b[n:] + v := int32(x>>1) ^ int32(x)<<31>>31 + f.appendInt32Slice(v) + } + return res, nil + } + if w != WireVarint { + return b, errInternalBadWireType + } + x, n := decodeVarint(b) + if n == 0 { + return nil, io.ErrUnexpectedEOF + } + b = b[n:] + v := int32(x>>1) ^ int32(x)<<31>>31 + f.appendInt32Slice(v) + return b, nil +} + +func unmarshalUint32Value(b []byte, f pointer, w int) ([]byte, error) { + if w != WireVarint { + return b, errInternalBadWireType + } + x, n := decodeVarint(b) + if n == 0 { + return nil, io.ErrUnexpectedEOF + } + b = b[n:] + v := uint32(x) + *f.toUint32() = v + return b, nil +} + +func unmarshalUint32Ptr(b []byte, f pointer, w int) ([]byte, error) { + if w != WireVarint { + return b, errInternalBadWireType + } + x, n := decodeVarint(b) + if n == 0 { + return nil, io.ErrUnexpectedEOF + } + b = b[n:] + v := uint32(x) + *f.toUint32Ptr() = &v + return b, nil +} + +func unmarshalUint32Slice(b []byte, f pointer, w int) ([]byte, error) { + if w == WireBytes { // packed + x, n := decodeVarint(b) + if n == 0 { + return nil, io.ErrUnexpectedEOF + } + b = b[n:] + if x > uint64(len(b)) { + return nil, io.ErrUnexpectedEOF + } + res := b[x:] + b = b[:x] + for len(b) > 0 { + x, n = decodeVarint(b) + if n == 0 { + return nil, io.ErrUnexpectedEOF + } + b = b[n:] + v := uint32(x) + s := f.toUint32Slice() + *s = append(*s, v) + } + return res, nil + } + if w != WireVarint { + return b, errInternalBadWireType + } + x, n := decodeVarint(b) + if n == 0 { + return nil, io.ErrUnexpectedEOF + } + b = b[n:] + v := uint32(x) + s := f.toUint32Slice() + *s = append(*s, v) + return b, nil +} + +func unmarshalFixed64Value(b []byte, f pointer, w int) ([]byte, error) { + if w != WireFixed64 { + return b, errInternalBadWireType + } + if len(b) < 8 { + return nil, io.ErrUnexpectedEOF + } + v := uint64(b[0]) | uint64(b[1])<<8 | uint64(b[2])<<16 | uint64(b[3])<<24 | uint64(b[4])<<32 | uint64(b[5])<<40 | uint64(b[6])<<48 | uint64(b[7])<<56 + *f.toUint64() = v + return b[8:], nil +} + +func unmarshalFixed64Ptr(b []byte, f pointer, w int) ([]byte, error) { + if w != WireFixed64 { + return b, errInternalBadWireType + } + if len(b) < 8 { + return nil, io.ErrUnexpectedEOF + } + v := uint64(b[0]) | uint64(b[1])<<8 | uint64(b[2])<<16 | uint64(b[3])<<24 | uint64(b[4])<<32 | uint64(b[5])<<40 | uint64(b[6])<<48 | uint64(b[7])<<56 + *f.toUint64Ptr() = &v + return b[8:], nil +} + +func unmarshalFixed64Slice(b []byte, f pointer, w int) ([]byte, error) { + if w == WireBytes { // packed + x, n := decodeVarint(b) + if n == 0 { + return nil, io.ErrUnexpectedEOF + } + b = b[n:] + if x > uint64(len(b)) { + return nil, io.ErrUnexpectedEOF + } + res := b[x:] + b = b[:x] + for len(b) > 0 { + if len(b) < 8 { + return nil, io.ErrUnexpectedEOF + } + v := uint64(b[0]) | uint64(b[1])<<8 | uint64(b[2])<<16 | uint64(b[3])<<24 | uint64(b[4])<<32 | uint64(b[5])<<40 | uint64(b[6])<<48 | uint64(b[7])<<56 + s := f.toUint64Slice() + *s = append(*s, v) + b = b[8:] + } + return res, nil + } + if w != WireFixed64 { + return b, errInternalBadWireType + } + if len(b) < 8 { + return nil, io.ErrUnexpectedEOF + } + v := uint64(b[0]) | uint64(b[1])<<8 | uint64(b[2])<<16 | uint64(b[3])<<24 | uint64(b[4])<<32 | uint64(b[5])<<40 | uint64(b[6])<<48 | uint64(b[7])<<56 + s := f.toUint64Slice() + *s = append(*s, v) + return b[8:], nil +} + +func unmarshalFixedS64Value(b []byte, f pointer, w int) ([]byte, error) { + if w != WireFixed64 { + return b, errInternalBadWireType + } + if len(b) < 8 { + return nil, io.ErrUnexpectedEOF + } + v := int64(b[0]) | int64(b[1])<<8 | int64(b[2])<<16 | int64(b[3])<<24 | int64(b[4])<<32 | int64(b[5])<<40 | int64(b[6])<<48 | int64(b[7])<<56 + *f.toInt64() = v + return b[8:], nil +} + +func unmarshalFixedS64Ptr(b []byte, f pointer, w int) ([]byte, error) { + if w != WireFixed64 { + return b, errInternalBadWireType + } + if len(b) < 8 { + return nil, io.ErrUnexpectedEOF + } + v := int64(b[0]) | int64(b[1])<<8 | int64(b[2])<<16 | int64(b[3])<<24 | int64(b[4])<<32 | int64(b[5])<<40 | int64(b[6])<<48 | int64(b[7])<<56 + *f.toInt64Ptr() = &v + return b[8:], nil +} + +func unmarshalFixedS64Slice(b []byte, f pointer, w int) ([]byte, error) { + if w == WireBytes { // packed + x, n := decodeVarint(b) + if n == 0 { + return nil, io.ErrUnexpectedEOF + } + b = b[n:] + if x > uint64(len(b)) { + return nil, io.ErrUnexpectedEOF + } + res := b[x:] + b = b[:x] + for len(b) > 0 { + if len(b) < 8 { + return nil, io.ErrUnexpectedEOF + } + v := int64(b[0]) | int64(b[1])<<8 | int64(b[2])<<16 | int64(b[3])<<24 | int64(b[4])<<32 | int64(b[5])<<40 | int64(b[6])<<48 | int64(b[7])<<56 + s := f.toInt64Slice() + *s = append(*s, v) + b = b[8:] + } + return res, nil + } + if w != WireFixed64 { + return b, errInternalBadWireType + } + if len(b) < 8 { + return nil, io.ErrUnexpectedEOF + } + v := int64(b[0]) | int64(b[1])<<8 | int64(b[2])<<16 | int64(b[3])<<24 | int64(b[4])<<32 | int64(b[5])<<40 | int64(b[6])<<48 | int64(b[7])<<56 + s := f.toInt64Slice() + *s = append(*s, v) + return b[8:], nil +} + +func unmarshalFixed32Value(b []byte, f pointer, w int) ([]byte, error) { + if w != WireFixed32 { + return b, errInternalBadWireType + } + if len(b) < 4 { + return nil, io.ErrUnexpectedEOF + } + v := uint32(b[0]) | uint32(b[1])<<8 | uint32(b[2])<<16 | uint32(b[3])<<24 + *f.toUint32() = v + return b[4:], nil +} + +func unmarshalFixed32Ptr(b []byte, f pointer, w int) ([]byte, error) { + if w != WireFixed32 { + return b, errInternalBadWireType + } + if len(b) < 4 { + return nil, io.ErrUnexpectedEOF + } + v := uint32(b[0]) | uint32(b[1])<<8 | uint32(b[2])<<16 | uint32(b[3])<<24 + *f.toUint32Ptr() = &v + return b[4:], nil +} + +func unmarshalFixed32Slice(b []byte, f pointer, w int) ([]byte, error) { + if w == WireBytes { // packed + x, n := decodeVarint(b) + if n == 0 { + return nil, io.ErrUnexpectedEOF + } + b = b[n:] + if x > uint64(len(b)) { + return nil, io.ErrUnexpectedEOF + } + res := b[x:] + b = b[:x] + for len(b) > 0 { + if len(b) < 4 { + return nil, io.ErrUnexpectedEOF + } + v := uint32(b[0]) | uint32(b[1])<<8 | uint32(b[2])<<16 | uint32(b[3])<<24 + s := f.toUint32Slice() + *s = append(*s, v) + b = b[4:] + } + return res, nil + } + if w != WireFixed32 { + return b, errInternalBadWireType + } + if len(b) < 4 { + return nil, io.ErrUnexpectedEOF + } + v := uint32(b[0]) | uint32(b[1])<<8 | uint32(b[2])<<16 | uint32(b[3])<<24 + s := f.toUint32Slice() + *s = append(*s, v) + return b[4:], nil +} + +func unmarshalFixedS32Value(b []byte, f pointer, w int) ([]byte, error) { + if w != WireFixed32 { + return b, errInternalBadWireType + } + if len(b) < 4 { + return nil, io.ErrUnexpectedEOF + } + v := int32(b[0]) | int32(b[1])<<8 | int32(b[2])<<16 | int32(b[3])<<24 + *f.toInt32() = v + return b[4:], nil +} + +func unmarshalFixedS32Ptr(b []byte, f pointer, w int) ([]byte, error) { + if w != WireFixed32 { + return b, errInternalBadWireType + } + if len(b) < 4 { + return nil, io.ErrUnexpectedEOF + } + v := int32(b[0]) | int32(b[1])<<8 | int32(b[2])<<16 | int32(b[3])<<24 + f.setInt32Ptr(v) + return b[4:], nil +} + +func unmarshalFixedS32Slice(b []byte, f pointer, w int) ([]byte, error) { + if w == WireBytes { // packed + x, n := decodeVarint(b) + if n == 0 { + return nil, io.ErrUnexpectedEOF + } + b = b[n:] + if x > uint64(len(b)) { + return nil, io.ErrUnexpectedEOF + } + res := b[x:] + b = b[:x] + for len(b) > 0 { + if len(b) < 4 { + return nil, io.ErrUnexpectedEOF + } + v := int32(b[0]) | int32(b[1])<<8 | int32(b[2])<<16 | int32(b[3])<<24 + f.appendInt32Slice(v) + b = b[4:] + } + return res, nil + } + if w != WireFixed32 { + return b, errInternalBadWireType + } + if len(b) < 4 { + return nil, io.ErrUnexpectedEOF + } + v := int32(b[0]) | int32(b[1])<<8 | int32(b[2])<<16 | int32(b[3])<<24 + f.appendInt32Slice(v) + return b[4:], nil +} + +func unmarshalBoolValue(b []byte, f pointer, w int) ([]byte, error) { + if w != WireVarint { + return b, errInternalBadWireType + } + // Note: any length varint is allowed, even though any sane + // encoder will use one byte. + // See https://github.com/golang/protobuf/issues/76 + x, n := decodeVarint(b) + if n == 0 { + return nil, io.ErrUnexpectedEOF + } + // TODO: check if x>1? Tests seem to indicate no. + v := x != 0 + *f.toBool() = v + return b[n:], nil +} + +func unmarshalBoolPtr(b []byte, f pointer, w int) ([]byte, error) { + if w != WireVarint { + return b, errInternalBadWireType + } + x, n := decodeVarint(b) + if n == 0 { + return nil, io.ErrUnexpectedEOF + } + v := x != 0 + *f.toBoolPtr() = &v + return b[n:], nil +} + +func unmarshalBoolSlice(b []byte, f pointer, w int) ([]byte, error) { + if w == WireBytes { // packed + x, n := decodeVarint(b) + if n == 0 { + return nil, io.ErrUnexpectedEOF + } + b = b[n:] + if x > uint64(len(b)) { + return nil, io.ErrUnexpectedEOF + } + res := b[x:] + b = b[:x] + for len(b) > 0 { + x, n = decodeVarint(b) + if n == 0 { + return nil, io.ErrUnexpectedEOF + } + v := x != 0 + s := f.toBoolSlice() + *s = append(*s, v) + b = b[n:] + } + return res, nil + } + if w != WireVarint { + return b, errInternalBadWireType + } + x, n := decodeVarint(b) + if n == 0 { + return nil, io.ErrUnexpectedEOF + } + v := x != 0 + s := f.toBoolSlice() + *s = append(*s, v) + return b[n:], nil +} + +func unmarshalFloat64Value(b []byte, f pointer, w int) ([]byte, error) { + if w != WireFixed64 { + return b, errInternalBadWireType + } + if len(b) < 8 { + return nil, io.ErrUnexpectedEOF + } + v := math.Float64frombits(uint64(b[0]) | uint64(b[1])<<8 | uint64(b[2])<<16 | uint64(b[3])<<24 | uint64(b[4])<<32 | uint64(b[5])<<40 | uint64(b[6])<<48 | uint64(b[7])<<56) + *f.toFloat64() = v + return b[8:], nil +} + +func unmarshalFloat64Ptr(b []byte, f pointer, w int) ([]byte, error) { + if w != WireFixed64 { + return b, errInternalBadWireType + } + if len(b) < 8 { + return nil, io.ErrUnexpectedEOF + } + v := math.Float64frombits(uint64(b[0]) | uint64(b[1])<<8 | uint64(b[2])<<16 | uint64(b[3])<<24 | uint64(b[4])<<32 | uint64(b[5])<<40 | uint64(b[6])<<48 | uint64(b[7])<<56) + *f.toFloat64Ptr() = &v + return b[8:], nil +} + +func unmarshalFloat64Slice(b []byte, f pointer, w int) ([]byte, error) { + if w == WireBytes { // packed + x, n := decodeVarint(b) + if n == 0 { + return nil, io.ErrUnexpectedEOF + } + b = b[n:] + if x > uint64(len(b)) { + return nil, io.ErrUnexpectedEOF + } + res := b[x:] + b = b[:x] + for len(b) > 0 { + if len(b) < 8 { + return nil, io.ErrUnexpectedEOF + } + v := math.Float64frombits(uint64(b[0]) | uint64(b[1])<<8 | uint64(b[2])<<16 | uint64(b[3])<<24 | uint64(b[4])<<32 | uint64(b[5])<<40 | uint64(b[6])<<48 | uint64(b[7])<<56) + s := f.toFloat64Slice() + *s = append(*s, v) + b = b[8:] + } + return res, nil + } + if w != WireFixed64 { + return b, errInternalBadWireType + } + if len(b) < 8 { + return nil, io.ErrUnexpectedEOF + } + v := math.Float64frombits(uint64(b[0]) | uint64(b[1])<<8 | uint64(b[2])<<16 | uint64(b[3])<<24 | uint64(b[4])<<32 | uint64(b[5])<<40 | uint64(b[6])<<48 | uint64(b[7])<<56) + s := f.toFloat64Slice() + *s = append(*s, v) + return b[8:], nil +} + +func unmarshalFloat32Value(b []byte, f pointer, w int) ([]byte, error) { + if w != WireFixed32 { + return b, errInternalBadWireType + } + if len(b) < 4 { + return nil, io.ErrUnexpectedEOF + } + v := math.Float32frombits(uint32(b[0]) | uint32(b[1])<<8 | uint32(b[2])<<16 | uint32(b[3])<<24) + *f.toFloat32() = v + return b[4:], nil +} + +func unmarshalFloat32Ptr(b []byte, f pointer, w int) ([]byte, error) { + if w != WireFixed32 { + return b, errInternalBadWireType + } + if len(b) < 4 { + return nil, io.ErrUnexpectedEOF + } + v := math.Float32frombits(uint32(b[0]) | uint32(b[1])<<8 | uint32(b[2])<<16 | uint32(b[3])<<24) + *f.toFloat32Ptr() = &v + return b[4:], nil +} + +func unmarshalFloat32Slice(b []byte, f pointer, w int) ([]byte, error) { + if w == WireBytes { // packed + x, n := decodeVarint(b) + if n == 0 { + return nil, io.ErrUnexpectedEOF + } + b = b[n:] + if x > uint64(len(b)) { + return nil, io.ErrUnexpectedEOF + } + res := b[x:] + b = b[:x] + for len(b) > 0 { + if len(b) < 4 { + return nil, io.ErrUnexpectedEOF + } + v := math.Float32frombits(uint32(b[0]) | uint32(b[1])<<8 | uint32(b[2])<<16 | uint32(b[3])<<24) + s := f.toFloat32Slice() + *s = append(*s, v) + b = b[4:] + } + return res, nil + } + if w != WireFixed32 { + return b, errInternalBadWireType + } + if len(b) < 4 { + return nil, io.ErrUnexpectedEOF + } + v := math.Float32frombits(uint32(b[0]) | uint32(b[1])<<8 | uint32(b[2])<<16 | uint32(b[3])<<24) + s := f.toFloat32Slice() + *s = append(*s, v) + return b[4:], nil +} + +func unmarshalStringValue(b []byte, f pointer, w int) ([]byte, error) { + if w != WireBytes { + return b, errInternalBadWireType + } + x, n := decodeVarint(b) + if n == 0 { + return nil, io.ErrUnexpectedEOF + } + b = b[n:] + if x > uint64(len(b)) { + return nil, io.ErrUnexpectedEOF + } + v := string(b[:x]) + if !utf8.ValidString(v) { + return nil, errInvalidUTF8 + } + *f.toString() = v + return b[x:], nil +} + +func unmarshalStringPtr(b []byte, f pointer, w int) ([]byte, error) { + if w != WireBytes { + return b, errInternalBadWireType + } + x, n := decodeVarint(b) + if n == 0 { + return nil, io.ErrUnexpectedEOF + } + b = b[n:] + if x > uint64(len(b)) { + return nil, io.ErrUnexpectedEOF + } + v := string(b[:x]) + if !utf8.ValidString(v) { + return nil, errInvalidUTF8 + } + *f.toStringPtr() = &v + return b[x:], nil +} + +func unmarshalStringSlice(b []byte, f pointer, w int) ([]byte, error) { + if w != WireBytes { + return b, errInternalBadWireType + } + x, n := decodeVarint(b) + if n == 0 { + return nil, io.ErrUnexpectedEOF + } + b = b[n:] + if x > uint64(len(b)) { + return nil, io.ErrUnexpectedEOF + } + v := string(b[:x]) + if !utf8.ValidString(v) { + return nil, errInvalidUTF8 + } + s := f.toStringSlice() + *s = append(*s, v) + return b[x:], nil +} + +var emptyBuf [0]byte + +func unmarshalBytesValue(b []byte, f pointer, w int) ([]byte, error) { + if w != WireBytes { + return b, errInternalBadWireType + } + x, n := decodeVarint(b) + if n == 0 { + return nil, io.ErrUnexpectedEOF + } + b = b[n:] + if x > uint64(len(b)) { + return nil, io.ErrUnexpectedEOF + } + // The use of append here is a trick which avoids the zeroing + // that would be required if we used a make/copy pair. + // We append to emptyBuf instead of nil because we want + // a non-nil result even when the length is 0. + v := append(emptyBuf[:], b[:x]...) + *f.toBytes() = v + return b[x:], nil +} + +func unmarshalBytesSlice(b []byte, f pointer, w int) ([]byte, error) { + if w != WireBytes { + return b, errInternalBadWireType + } + x, n := decodeVarint(b) + if n == 0 { + return nil, io.ErrUnexpectedEOF + } + b = b[n:] + if x > uint64(len(b)) { + return nil, io.ErrUnexpectedEOF + } + v := append(emptyBuf[:], b[:x]...) + s := f.toBytesSlice() + *s = append(*s, v) + return b[x:], nil +} + +func makeUnmarshalMessagePtr(sub *unmarshalInfo, name string) unmarshaler { + return func(b []byte, f pointer, w int) ([]byte, error) { + if w != WireBytes { + return b, errInternalBadWireType + } + x, n := decodeVarint(b) + if n == 0 { + return nil, io.ErrUnexpectedEOF + } + b = b[n:] + if x > uint64(len(b)) { + return nil, io.ErrUnexpectedEOF + } + // First read the message field to see if something is there. + // The semantics of multiple submessages are weird. Instead of + // the last one winning (as it is for all other fields), multiple + // submessages are merged. + v := f.getPointer() + if v.isNil() { + v = valToPointer(reflect.New(sub.typ)) + f.setPointer(v) + } + err := sub.unmarshal(v, b[:x]) + if err != nil { + if r, ok := err.(*RequiredNotSetError); ok { + r.field = name + "." + r.field + } else { + return nil, err + } + } + return b[x:], err + } +} + +func makeUnmarshalMessageSlicePtr(sub *unmarshalInfo, name string) unmarshaler { + return func(b []byte, f pointer, w int) ([]byte, error) { + if w != WireBytes { + return b, errInternalBadWireType + } + x, n := decodeVarint(b) + if n == 0 { + return nil, io.ErrUnexpectedEOF + } + b = b[n:] + if x > uint64(len(b)) { + return nil, io.ErrUnexpectedEOF + } + v := valToPointer(reflect.New(sub.typ)) + err := sub.unmarshal(v, b[:x]) + if err != nil { + if r, ok := err.(*RequiredNotSetError); ok { + r.field = name + "." + r.field + } else { + return nil, err + } + } + f.appendPointer(v) + return b[x:], err + } +} + +func makeUnmarshalGroupPtr(sub *unmarshalInfo, name string) unmarshaler { + return func(b []byte, f pointer, w int) ([]byte, error) { + if w != WireStartGroup { + return b, errInternalBadWireType + } + x, y := findEndGroup(b) + if x < 0 { + return nil, io.ErrUnexpectedEOF + } + v := f.getPointer() + if v.isNil() { + v = valToPointer(reflect.New(sub.typ)) + f.setPointer(v) + } + err := sub.unmarshal(v, b[:x]) + if err != nil { + if r, ok := err.(*RequiredNotSetError); ok { + r.field = name + "." + r.field + } else { + return nil, err + } + } + return b[y:], err + } +} + +func makeUnmarshalGroupSlicePtr(sub *unmarshalInfo, name string) unmarshaler { + return func(b []byte, f pointer, w int) ([]byte, error) { + if w != WireStartGroup { + return b, errInternalBadWireType + } + x, y := findEndGroup(b) + if x < 0 { + return nil, io.ErrUnexpectedEOF + } + v := valToPointer(reflect.New(sub.typ)) + err := sub.unmarshal(v, b[:x]) + if err != nil { + if r, ok := err.(*RequiredNotSetError); ok { + r.field = name + "." + r.field + } else { + return nil, err + } + } + f.appendPointer(v) + return b[y:], err + } +} + +func makeUnmarshalMap(f *reflect.StructField) unmarshaler { + t := f.Type + kt := t.Key() + vt := t.Elem() + tagArray := strings.Split(f.Tag.Get("protobuf"), ",") + valTags := strings.Split(f.Tag.Get("protobuf_val"), ",") + for _, t := range tagArray { + if strings.HasPrefix(t, "customtype=") { + valTags = append(valTags, t) + } + if t == "stdtime" { + valTags = append(valTags, t) + } + if t == "stdduration" { + valTags = append(valTags, t) + } + } + unmarshalKey := typeUnmarshaler(kt, f.Tag.Get("protobuf_key")) + unmarshalVal := typeUnmarshaler(vt, strings.Join(valTags, ",")) + return func(b []byte, f pointer, w int) ([]byte, error) { + // The map entry is a submessage. Figure out how big it is. + if w != WireBytes { + return nil, fmt.Errorf("proto: bad wiretype for map field: got %d want %d", w, WireBytes) + } + x, n := decodeVarint(b) + if n == 0 { + return nil, io.ErrUnexpectedEOF + } + b = b[n:] + if x > uint64(len(b)) { + return nil, io.ErrUnexpectedEOF + } + r := b[x:] // unused data to return + b = b[:x] // data for map entry + + // Note: we could use #keys * #values ~= 200 functions + // to do map decoding without reflection. Probably not worth it. + // Maps will be somewhat slow. Oh well. + + // Read key and value from data. + k := reflect.New(kt) + v := reflect.New(vt) + for len(b) > 0 { + x, n := decodeVarint(b) + if n == 0 { + return nil, io.ErrUnexpectedEOF + } + wire := int(x) & 7 + b = b[n:] + + var err error + switch x >> 3 { + case 1: + b, err = unmarshalKey(b, valToPointer(k), wire) + case 2: + b, err = unmarshalVal(b, valToPointer(v), wire) + default: + err = errInternalBadWireType // skip unknown tag + } + + if err == nil { + continue + } + if err != errInternalBadWireType { + return nil, err + } + + // Skip past unknown fields. + b, err = skipField(b, wire) + if err != nil { + return nil, err + } + } + + // Get map, allocate if needed. + m := f.asPointerTo(t).Elem() // an addressable map[K]T + if m.IsNil() { + m.Set(reflect.MakeMap(t)) + } + + // Insert into map. + m.SetMapIndex(k.Elem(), v.Elem()) + + return r, nil + } +} + +// makeUnmarshalOneof makes an unmarshaler for oneof fields. +// for: +// message Msg { +// oneof F { +// int64 X = 1; +// float64 Y = 2; +// } +// } +// typ is the type of the concrete entry for a oneof case (e.g. Msg_X). +// ityp is the interface type of the oneof field (e.g. isMsg_F). +// unmarshal is the unmarshaler for the base type of the oneof case (e.g. int64). +// Note that this function will be called once for each case in the oneof. +func makeUnmarshalOneof(typ, ityp reflect.Type, unmarshal unmarshaler) unmarshaler { + sf := typ.Field(0) + field0 := toField(&sf) + return func(b []byte, f pointer, w int) ([]byte, error) { + // Allocate holder for value. + v := reflect.New(typ) + + // Unmarshal data into holder. + // We unmarshal into the first field of the holder object. + var err error + b, err = unmarshal(b, valToPointer(v).offset(field0), w) + if err != nil { + return nil, err + } + + // Write pointer to holder into target field. + f.asPointerTo(ityp).Elem().Set(v) + + return b, nil + } +} + +// Error used by decode internally. +var errInternalBadWireType = errors.New("proto: internal error: bad wiretype") + +// skipField skips past a field of type wire and returns the remaining bytes. +func skipField(b []byte, wire int) ([]byte, error) { + switch wire { + case WireVarint: + _, k := decodeVarint(b) + if k == 0 { + return b, io.ErrUnexpectedEOF + } + b = b[k:] + case WireFixed32: + if len(b) < 4 { + return b, io.ErrUnexpectedEOF + } + b = b[4:] + case WireFixed64: + if len(b) < 8 { + return b, io.ErrUnexpectedEOF + } + b = b[8:] + case WireBytes: + m, k := decodeVarint(b) + if k == 0 || uint64(len(b)-k) < m { + return b, io.ErrUnexpectedEOF + } + b = b[uint64(k)+m:] + case WireStartGroup: + _, i := findEndGroup(b) + if i == -1 { + return b, io.ErrUnexpectedEOF + } + b = b[i:] + default: + return b, fmt.Errorf("proto: can't skip unknown wire type %d", wire) + } + return b, nil +} + +// findEndGroup finds the index of the next EndGroup tag. +// Groups may be nested, so the "next" EndGroup tag is the first +// unpaired EndGroup. +// findEndGroup returns the indexes of the start and end of the EndGroup tag. +// Returns (-1,-1) if it can't find one. +func findEndGroup(b []byte) (int, int) { + depth := 1 + i := 0 + for { + x, n := decodeVarint(b[i:]) + if n == 0 { + return -1, -1 + } + j := i + i += n + switch x & 7 { + case WireVarint: + _, k := decodeVarint(b[i:]) + if k == 0 { + return -1, -1 + } + i += k + case WireFixed32: + if len(b)-4 < i { + return -1, -1 + } + i += 4 + case WireFixed64: + if len(b)-8 < i { + return -1, -1 + } + i += 8 + case WireBytes: + m, k := decodeVarint(b[i:]) + if k == 0 { + return -1, -1 + } + i += k + if uint64(len(b)-i) < m { + return -1, -1 + } + i += int(m) + case WireStartGroup: + depth++ + case WireEndGroup: + depth-- + if depth == 0 { + return j, i + } + default: + return -1, -1 + } + } +} + +// encodeVarint appends a varint-encoded integer to b and returns the result. +func encodeVarint(b []byte, x uint64) []byte { + for x >= 1<<7 { + b = append(b, byte(x&0x7f|0x80)) + x >>= 7 + } + return append(b, byte(x)) +} + +// decodeVarint reads a varint-encoded integer from b. +// Returns the decoded integer and the number of bytes read. +// If there is an error, it returns 0,0. +func decodeVarint(b []byte) (uint64, int) { + var x, y uint64 + if len(b) <= 0 { + goto bad + } + x = uint64(b[0]) + if x < 0x80 { + return x, 1 + } + x -= 0x80 + + if len(b) <= 1 { + goto bad + } + y = uint64(b[1]) + x += y << 7 + if y < 0x80 { + return x, 2 + } + x -= 0x80 << 7 + + if len(b) <= 2 { + goto bad + } + y = uint64(b[2]) + x += y << 14 + if y < 0x80 { + return x, 3 + } + x -= 0x80 << 14 + + if len(b) <= 3 { + goto bad + } + y = uint64(b[3]) + x += y << 21 + if y < 0x80 { + return x, 4 + } + x -= 0x80 << 21 + + if len(b) <= 4 { + goto bad + } + y = uint64(b[4]) + x += y << 28 + if y < 0x80 { + return x, 5 + } + x -= 0x80 << 28 + + if len(b) <= 5 { + goto bad + } + y = uint64(b[5]) + x += y << 35 + if y < 0x80 { + return x, 6 + } + x -= 0x80 << 35 + + if len(b) <= 6 { + goto bad + } + y = uint64(b[6]) + x += y << 42 + if y < 0x80 { + return x, 7 + } + x -= 0x80 << 42 + + if len(b) <= 7 { + goto bad + } + y = uint64(b[7]) + x += y << 49 + if y < 0x80 { + return x, 8 + } + x -= 0x80 << 49 + + if len(b) <= 8 { + goto bad + } + y = uint64(b[8]) + x += y << 56 + if y < 0x80 { + return x, 9 + } + x -= 0x80 << 56 + + if len(b) <= 9 { + goto bad + } + y = uint64(b[9]) + x += y << 63 + if y < 2 { + return x, 10 + } + +bad: + return 0, 0 +} diff --git a/vendor/github.com/gogo/protobuf/proto/table_unmarshal_gogo.go b/vendor/github.com/gogo/protobuf/proto/table_unmarshal_gogo.go new file mode 100644 index 000000000..00d6c7ad9 --- /dev/null +++ b/vendor/github.com/gogo/protobuf/proto/table_unmarshal_gogo.go @@ -0,0 +1,385 @@ +// Protocol Buffers for Go with Gadgets +// +// Copyright (c) 2018, The GoGo Authors. All rights reserved. +// http://github.com/gogo/protobuf +// +// Redistribution and use in source and binary forms, with or without +// modification, are permitted provided that the following conditions are +// met: +// +// * Redistributions of source code must retain the above copyright +// notice, this list of conditions and the following disclaimer. +// * Redistributions in binary form must reproduce the above +// copyright notice, this list of conditions and the following disclaimer +// in the documentation and/or other materials provided with the +// distribution. +// +// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS +// "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT +// LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR +// A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT +// OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, +// SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT +// LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, +// DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY +// THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT +// (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE +// OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. + +package proto + +import ( + "io" + "reflect" +) + +func makeUnmarshalMessage(sub *unmarshalInfo, name string) unmarshaler { + return func(b []byte, f pointer, w int) ([]byte, error) { + if w != WireBytes { + return nil, errInternalBadWireType + } + x, n := decodeVarint(b) + if n == 0 { + return nil, io.ErrUnexpectedEOF + } + b = b[n:] + if x > uint64(len(b)) { + return nil, io.ErrUnexpectedEOF + } + // First read the message field to see if something is there. + // The semantics of multiple submessages are weird. Instead of + // the last one winning (as it is for all other fields), multiple + // submessages are merged. + v := f // gogo: changed from v := f.getPointer() + if v.isNil() { + v = valToPointer(reflect.New(sub.typ)) + f.setPointer(v) + } + err := sub.unmarshal(v, b[:x]) + if err != nil { + if r, ok := err.(*RequiredNotSetError); ok { + r.field = name + "." + r.field + } else { + return nil, err + } + } + return b[x:], err + } +} + +func makeUnmarshalMessageSlice(sub *unmarshalInfo, name string) unmarshaler { + return func(b []byte, f pointer, w int) ([]byte, error) { + if w != WireBytes { + return nil, errInternalBadWireType + } + x, n := decodeVarint(b) + if n == 0 { + return nil, io.ErrUnexpectedEOF + } + b = b[n:] + if x > uint64(len(b)) { + return nil, io.ErrUnexpectedEOF + } + v := valToPointer(reflect.New(sub.typ)) + err := sub.unmarshal(v, b[:x]) + if err != nil { + if r, ok := err.(*RequiredNotSetError); ok { + r.field = name + "." + r.field + } else { + return nil, err + } + } + f.appendRef(v, sub.typ) // gogo: changed from f.appendPointer(v) + return b[x:], err + } +} + +func makeUnmarshalCustomPtr(sub *unmarshalInfo, name string) unmarshaler { + return func(b []byte, f pointer, w int) ([]byte, error) { + if w != WireBytes { + return nil, errInternalBadWireType + } + x, n := decodeVarint(b) + if n == 0 { + return nil, io.ErrUnexpectedEOF + } + b = b[n:] + if x > uint64(len(b)) { + return nil, io.ErrUnexpectedEOF + } + + s := f.asPointerTo(reflect.PtrTo(sub.typ)).Elem() + s.Set(reflect.New(sub.typ)) + m := s.Interface().(custom) + if err := m.Unmarshal(b[:x]); err != nil { + return nil, err + } + return b[x:], nil + } +} + +func makeUnmarshalCustomSlice(sub *unmarshalInfo, name string) unmarshaler { + return func(b []byte, f pointer, w int) ([]byte, error) { + if w != WireBytes { + return nil, errInternalBadWireType + } + x, n := decodeVarint(b) + if n == 0 { + return nil, io.ErrUnexpectedEOF + } + b = b[n:] + if x > uint64(len(b)) { + return nil, io.ErrUnexpectedEOF + } + m := reflect.New(sub.typ) + c := m.Interface().(custom) + if err := c.Unmarshal(b[:x]); err != nil { + return nil, err + } + v := valToPointer(m) + f.appendRef(v, sub.typ) + return b[x:], nil + } +} + +func makeUnmarshalCustom(sub *unmarshalInfo, name string) unmarshaler { + return func(b []byte, f pointer, w int) ([]byte, error) { + if w != WireBytes { + return nil, errInternalBadWireType + } + x, n := decodeVarint(b) + if n == 0 { + return nil, io.ErrUnexpectedEOF + } + b = b[n:] + if x > uint64(len(b)) { + return nil, io.ErrUnexpectedEOF + } + + m := f.asPointerTo(sub.typ).Interface().(custom) + if err := m.Unmarshal(b[:x]); err != nil { + return nil, err + } + return b[x:], nil + } +} + +func makeUnmarshalTime(sub *unmarshalInfo, name string) unmarshaler { + return func(b []byte, f pointer, w int) ([]byte, error) { + if w != WireBytes { + return nil, errInternalBadWireType + } + x, n := decodeVarint(b) + if n == 0 { + return nil, io.ErrUnexpectedEOF + } + b = b[n:] + if x > uint64(len(b)) { + return nil, io.ErrUnexpectedEOF + } + m := ×tamp{} + if err := Unmarshal(b[:x], m); err != nil { + return nil, err + } + t, err := timestampFromProto(m) + if err != nil { + return nil, err + } + s := f.asPointerTo(sub.typ).Elem() + s.Set(reflect.ValueOf(t)) + return b[x:], nil + } +} + +func makeUnmarshalTimePtr(sub *unmarshalInfo, name string) unmarshaler { + return func(b []byte, f pointer, w int) ([]byte, error) { + if w != WireBytes { + return nil, errInternalBadWireType + } + x, n := decodeVarint(b) + if n == 0 { + return nil, io.ErrUnexpectedEOF + } + b = b[n:] + if x > uint64(len(b)) { + return nil, io.ErrUnexpectedEOF + } + m := ×tamp{} + if err := Unmarshal(b[:x], m); err != nil { + return nil, err + } + t, err := timestampFromProto(m) + if err != nil { + return nil, err + } + s := f.asPointerTo(reflect.PtrTo(sub.typ)).Elem() + s.Set(reflect.ValueOf(&t)) + return b[x:], nil + } +} + +func makeUnmarshalTimePtrSlice(sub *unmarshalInfo, name string) unmarshaler { + return func(b []byte, f pointer, w int) ([]byte, error) { + if w != WireBytes { + return nil, errInternalBadWireType + } + x, n := decodeVarint(b) + if n == 0 { + return nil, io.ErrUnexpectedEOF + } + b = b[n:] + if x > uint64(len(b)) { + return nil, io.ErrUnexpectedEOF + } + m := ×tamp{} + if err := Unmarshal(b[:x], m); err != nil { + return nil, err + } + t, err := timestampFromProto(m) + if err != nil { + return nil, err + } + slice := f.getSlice(reflect.PtrTo(sub.typ)) + newSlice := reflect.Append(slice, reflect.ValueOf(&t)) + slice.Set(newSlice) + return b[x:], nil + } +} + +func makeUnmarshalTimeSlice(sub *unmarshalInfo, name string) unmarshaler { + return func(b []byte, f pointer, w int) ([]byte, error) { + if w != WireBytes { + return nil, errInternalBadWireType + } + x, n := decodeVarint(b) + if n == 0 { + return nil, io.ErrUnexpectedEOF + } + b = b[n:] + if x > uint64(len(b)) { + return nil, io.ErrUnexpectedEOF + } + m := ×tamp{} + if err := Unmarshal(b[:x], m); err != nil { + return nil, err + } + t, err := timestampFromProto(m) + if err != nil { + return nil, err + } + slice := f.getSlice(sub.typ) + newSlice := reflect.Append(slice, reflect.ValueOf(t)) + slice.Set(newSlice) + return b[x:], nil + } +} + +func makeUnmarshalDurationPtr(sub *unmarshalInfo, name string) unmarshaler { + return func(b []byte, f pointer, w int) ([]byte, error) { + if w != WireBytes { + return nil, errInternalBadWireType + } + x, n := decodeVarint(b) + if n == 0 { + return nil, io.ErrUnexpectedEOF + } + b = b[n:] + if x > uint64(len(b)) { + return nil, io.ErrUnexpectedEOF + } + m := &duration{} + if err := Unmarshal(b[:x], m); err != nil { + return nil, err + } + d, err := durationFromProto(m) + if err != nil { + return nil, err + } + s := f.asPointerTo(reflect.PtrTo(sub.typ)).Elem() + s.Set(reflect.ValueOf(&d)) + return b[x:], nil + } +} + +func makeUnmarshalDuration(sub *unmarshalInfo, name string) unmarshaler { + return func(b []byte, f pointer, w int) ([]byte, error) { + if w != WireBytes { + return nil, errInternalBadWireType + } + x, n := decodeVarint(b) + if n == 0 { + return nil, io.ErrUnexpectedEOF + } + b = b[n:] + if x > uint64(len(b)) { + return nil, io.ErrUnexpectedEOF + } + m := &duration{} + if err := Unmarshal(b[:x], m); err != nil { + return nil, err + } + d, err := durationFromProto(m) + if err != nil { + return nil, err + } + s := f.asPointerTo(sub.typ).Elem() + s.Set(reflect.ValueOf(d)) + return b[x:], nil + } +} + +func makeUnmarshalDurationPtrSlice(sub *unmarshalInfo, name string) unmarshaler { + return func(b []byte, f pointer, w int) ([]byte, error) { + if w != WireBytes { + return nil, errInternalBadWireType + } + x, n := decodeVarint(b) + if n == 0 { + return nil, io.ErrUnexpectedEOF + } + b = b[n:] + if x > uint64(len(b)) { + return nil, io.ErrUnexpectedEOF + } + m := &duration{} + if err := Unmarshal(b[:x], m); err != nil { + return nil, err + } + d, err := durationFromProto(m) + if err != nil { + return nil, err + } + slice := f.getSlice(reflect.PtrTo(sub.typ)) + newSlice := reflect.Append(slice, reflect.ValueOf(&d)) + slice.Set(newSlice) + return b[x:], nil + } +} + +func makeUnmarshalDurationSlice(sub *unmarshalInfo, name string) unmarshaler { + return func(b []byte, f pointer, w int) ([]byte, error) { + if w != WireBytes { + return nil, errInternalBadWireType + } + x, n := decodeVarint(b) + if n == 0 { + return nil, io.ErrUnexpectedEOF + } + b = b[n:] + if x > uint64(len(b)) { + return nil, io.ErrUnexpectedEOF + } + m := &duration{} + if err := Unmarshal(b[:x], m); err != nil { + return nil, err + } + d, err := durationFromProto(m) + if err != nil { + return nil, err + } + slice := f.getSlice(sub.typ) + newSlice := reflect.Append(slice, reflect.ValueOf(d)) + slice.Set(newSlice) + return b[x:], nil + } +} diff --git a/vendor/github.com/gogo/protobuf/proto/text.go b/vendor/github.com/gogo/protobuf/proto/text.go new file mode 100644 index 000000000..4f5706dc5 --- /dev/null +++ b/vendor/github.com/gogo/protobuf/proto/text.go @@ -0,0 +1,928 @@ +// Protocol Buffers for Go with Gadgets +// +// Copyright (c) 2013, The GoGo Authors. All rights reserved. +// http://github.com/gogo/protobuf +// +// Go support for Protocol Buffers - Google's data interchange format +// +// Copyright 2010 The Go Authors. All rights reserved. +// https://github.com/golang/protobuf +// +// Redistribution and use in source and binary forms, with or without +// modification, are permitted provided that the following conditions are +// met: +// +// * Redistributions of source code must retain the above copyright +// notice, this list of conditions and the following disclaimer. +// * Redistributions in binary form must reproduce the above +// copyright notice, this list of conditions and the following disclaimer +// in the documentation and/or other materials provided with the +// distribution. +// * Neither the name of Google Inc. nor the names of its +// contributors may be used to endorse or promote products derived from +// this software without specific prior written permission. +// +// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS +// "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT +// LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR +// A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT +// OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, +// SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT +// LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, +// DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY +// THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT +// (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE +// OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. + +package proto + +// Functions for writing the text protocol buffer format. + +import ( + "bufio" + "bytes" + "encoding" + "errors" + "fmt" + "io" + "log" + "math" + "reflect" + "sort" + "strings" + "sync" + "time" +) + +var ( + newline = []byte("\n") + spaces = []byte(" ") + endBraceNewline = []byte("}\n") + backslashN = []byte{'\\', 'n'} + backslashR = []byte{'\\', 'r'} + backslashT = []byte{'\\', 't'} + backslashDQ = []byte{'\\', '"'} + backslashBS = []byte{'\\', '\\'} + posInf = []byte("inf") + negInf = []byte("-inf") + nan = []byte("nan") +) + +type writer interface { + io.Writer + WriteByte(byte) error +} + +// textWriter is an io.Writer that tracks its indentation level. +type textWriter struct { + ind int + complete bool // if the current position is a complete line + compact bool // whether to write out as a one-liner + w writer +} + +func (w *textWriter) WriteString(s string) (n int, err error) { + if !strings.Contains(s, "\n") { + if !w.compact && w.complete { + w.writeIndent() + } + w.complete = false + return io.WriteString(w.w, s) + } + // WriteString is typically called without newlines, so this + // codepath and its copy are rare. We copy to avoid + // duplicating all of Write's logic here. + return w.Write([]byte(s)) +} + +func (w *textWriter) Write(p []byte) (n int, err error) { + newlines := bytes.Count(p, newline) + if newlines == 0 { + if !w.compact && w.complete { + w.writeIndent() + } + n, err = w.w.Write(p) + w.complete = false + return n, err + } + + frags := bytes.SplitN(p, newline, newlines+1) + if w.compact { + for i, frag := range frags { + if i > 0 { + if err := w.w.WriteByte(' '); err != nil { + return n, err + } + n++ + } + nn, err := w.w.Write(frag) + n += nn + if err != nil { + return n, err + } + } + return n, nil + } + + for i, frag := range frags { + if w.complete { + w.writeIndent() + } + nn, err := w.w.Write(frag) + n += nn + if err != nil { + return n, err + } + if i+1 < len(frags) { + if err := w.w.WriteByte('\n'); err != nil { + return n, err + } + n++ + } + } + w.complete = len(frags[len(frags)-1]) == 0 + return n, nil +} + +func (w *textWriter) WriteByte(c byte) error { + if w.compact && c == '\n' { + c = ' ' + } + if !w.compact && w.complete { + w.writeIndent() + } + err := w.w.WriteByte(c) + w.complete = c == '\n' + return err +} + +func (w *textWriter) indent() { w.ind++ } + +func (w *textWriter) unindent() { + if w.ind == 0 { + log.Print("proto: textWriter unindented too far") + return + } + w.ind-- +} + +func writeName(w *textWriter, props *Properties) error { + if _, err := w.WriteString(props.OrigName); err != nil { + return err + } + if props.Wire != "group" { + return w.WriteByte(':') + } + return nil +} + +func requiresQuotes(u string) bool { + // When type URL contains any characters except [0-9A-Za-z./\-]*, it must be quoted. + for _, ch := range u { + switch { + case ch == '.' || ch == '/' || ch == '_': + continue + case '0' <= ch && ch <= '9': + continue + case 'A' <= ch && ch <= 'Z': + continue + case 'a' <= ch && ch <= 'z': + continue + default: + return true + } + } + return false +} + +// isAny reports whether sv is a google.protobuf.Any message +func isAny(sv reflect.Value) bool { + type wkt interface { + XXX_WellKnownType() string + } + t, ok := sv.Addr().Interface().(wkt) + return ok && t.XXX_WellKnownType() == "Any" +} + +// writeProto3Any writes an expanded google.protobuf.Any message. +// +// It returns (false, nil) if sv value can't be unmarshaled (e.g. because +// required messages are not linked in). +// +// It returns (true, error) when sv was written in expanded format or an error +// was encountered. +func (tm *TextMarshaler) writeProto3Any(w *textWriter, sv reflect.Value) (bool, error) { + turl := sv.FieldByName("TypeUrl") + val := sv.FieldByName("Value") + if !turl.IsValid() || !val.IsValid() { + return true, errors.New("proto: invalid google.protobuf.Any message") + } + + b, ok := val.Interface().([]byte) + if !ok { + return true, errors.New("proto: invalid google.protobuf.Any message") + } + + parts := strings.Split(turl.String(), "/") + mt := MessageType(parts[len(parts)-1]) + if mt == nil { + return false, nil + } + m := reflect.New(mt.Elem()) + if err := Unmarshal(b, m.Interface().(Message)); err != nil { + return false, nil + } + w.Write([]byte("[")) + u := turl.String() + if requiresQuotes(u) { + writeString(w, u) + } else { + w.Write([]byte(u)) + } + if w.compact { + w.Write([]byte("]:<")) + } else { + w.Write([]byte("]: <\n")) + w.ind++ + } + if err := tm.writeStruct(w, m.Elem()); err != nil { + return true, err + } + if w.compact { + w.Write([]byte("> ")) + } else { + w.ind-- + w.Write([]byte(">\n")) + } + return true, nil +} + +func (tm *TextMarshaler) writeStruct(w *textWriter, sv reflect.Value) error { + if tm.ExpandAny && isAny(sv) { + if canExpand, err := tm.writeProto3Any(w, sv); canExpand { + return err + } + } + st := sv.Type() + sprops := GetProperties(st) + for i := 0; i < sv.NumField(); i++ { + fv := sv.Field(i) + props := sprops.Prop[i] + name := st.Field(i).Name + + if name == "XXX_NoUnkeyedLiteral" { + continue + } + + if strings.HasPrefix(name, "XXX_") { + // There are two XXX_ fields: + // XXX_unrecognized []byte + // XXX_extensions map[int32]proto.Extension + // The first is handled here; + // the second is handled at the bottom of this function. + if name == "XXX_unrecognized" && !fv.IsNil() { + if err := writeUnknownStruct(w, fv.Interface().([]byte)); err != nil { + return err + } + } + continue + } + if fv.Kind() == reflect.Ptr && fv.IsNil() { + // Field not filled in. This could be an optional field or + // a required field that wasn't filled in. Either way, there + // isn't anything we can show for it. + continue + } + if fv.Kind() == reflect.Slice && fv.IsNil() { + // Repeated field that is empty, or a bytes field that is unused. + continue + } + + if props.Repeated && fv.Kind() == reflect.Slice { + // Repeated field. + for j := 0; j < fv.Len(); j++ { + if err := writeName(w, props); err != nil { + return err + } + if !w.compact { + if err := w.WriteByte(' '); err != nil { + return err + } + } + v := fv.Index(j) + if v.Kind() == reflect.Ptr && v.IsNil() { + // A nil message in a repeated field is not valid, + // but we can handle that more gracefully than panicking. + if _, err := w.Write([]byte("\n")); err != nil { + return err + } + continue + } + if len(props.Enum) > 0 { + if err := tm.writeEnum(w, v, props); err != nil { + return err + } + } else if err := tm.writeAny(w, v, props); err != nil { + return err + } + if err := w.WriteByte('\n'); err != nil { + return err + } + } + continue + } + if fv.Kind() == reflect.Map { + // Map fields are rendered as a repeated struct with key/value fields. + keys := fv.MapKeys() + sort.Sort(mapKeys(keys)) + for _, key := range keys { + val := fv.MapIndex(key) + if err := writeName(w, props); err != nil { + return err + } + if !w.compact { + if err := w.WriteByte(' '); err != nil { + return err + } + } + // open struct + if err := w.WriteByte('<'); err != nil { + return err + } + if !w.compact { + if err := w.WriteByte('\n'); err != nil { + return err + } + } + w.indent() + // key + if _, err := w.WriteString("key:"); err != nil { + return err + } + if !w.compact { + if err := w.WriteByte(' '); err != nil { + return err + } + } + if err := tm.writeAny(w, key, props.mkeyprop); err != nil { + return err + } + if err := w.WriteByte('\n'); err != nil { + return err + } + // nil values aren't legal, but we can avoid panicking because of them. + if val.Kind() != reflect.Ptr || !val.IsNil() { + // value + if _, err := w.WriteString("value:"); err != nil { + return err + } + if !w.compact { + if err := w.WriteByte(' '); err != nil { + return err + } + } + if err := tm.writeAny(w, val, props.mvalprop); err != nil { + return err + } + if err := w.WriteByte('\n'); err != nil { + return err + } + } + // close struct + w.unindent() + if err := w.WriteByte('>'); err != nil { + return err + } + if err := w.WriteByte('\n'); err != nil { + return err + } + } + continue + } + if props.proto3 && fv.Kind() == reflect.Slice && fv.Len() == 0 { + // empty bytes field + continue + } + if props.proto3 && fv.Kind() != reflect.Ptr && fv.Kind() != reflect.Slice { + // proto3 non-repeated scalar field; skip if zero value + if isProto3Zero(fv) { + continue + } + } + + if fv.Kind() == reflect.Interface { + // Check if it is a oneof. + if st.Field(i).Tag.Get("protobuf_oneof") != "" { + // fv is nil, or holds a pointer to generated struct. + // That generated struct has exactly one field, + // which has a protobuf struct tag. + if fv.IsNil() { + continue + } + inner := fv.Elem().Elem() // interface -> *T -> T + tag := inner.Type().Field(0).Tag.Get("protobuf") + props = new(Properties) // Overwrite the outer props var, but not its pointee. + props.Parse(tag) + // Write the value in the oneof, not the oneof itself. + fv = inner.Field(0) + + // Special case to cope with malformed messages gracefully: + // If the value in the oneof is a nil pointer, don't panic + // in writeAny. + if fv.Kind() == reflect.Ptr && fv.IsNil() { + // Use errors.New so writeAny won't render quotes. + msg := errors.New("/* nil */") + fv = reflect.ValueOf(&msg).Elem() + } + } + } + + if err := writeName(w, props); err != nil { + return err + } + if !w.compact { + if err := w.WriteByte(' '); err != nil { + return err + } + } + + if len(props.Enum) > 0 { + if err := tm.writeEnum(w, fv, props); err != nil { + return err + } + } else if err := tm.writeAny(w, fv, props); err != nil { + return err + } + + if err := w.WriteByte('\n'); err != nil { + return err + } + } + + // Extensions (the XXX_extensions field). + pv := sv + if pv.CanAddr() { + pv = sv.Addr() + } else { + pv = reflect.New(sv.Type()) + pv.Elem().Set(sv) + } + if _, err := extendable(pv.Interface()); err == nil { + if err := tm.writeExtensions(w, pv); err != nil { + return err + } + } + + return nil +} + +// writeAny writes an arbitrary field. +func (tm *TextMarshaler) writeAny(w *textWriter, v reflect.Value, props *Properties) error { + v = reflect.Indirect(v) + + if props != nil { + if len(props.CustomType) > 0 { + custom, ok := v.Interface().(Marshaler) + if ok { + data, err := custom.Marshal() + if err != nil { + return err + } + if err := writeString(w, string(data)); err != nil { + return err + } + return nil + } + } else if len(props.CastType) > 0 { + if _, ok := v.Interface().(interface { + String() string + }); ok { + switch v.Kind() { + case reflect.Int, reflect.Int8, reflect.Int16, reflect.Int32, reflect.Int64, + reflect.Uint, reflect.Uint8, reflect.Uint16, reflect.Uint32, reflect.Uint64: + _, err := fmt.Fprintf(w, "%d", v.Interface()) + return err + } + } + } else if props.StdTime { + t, ok := v.Interface().(time.Time) + if !ok { + return fmt.Errorf("stdtime is not time.Time, but %T", v.Interface()) + } + tproto, err := timestampProto(t) + if err != nil { + return err + } + propsCopy := *props // Make a copy so that this is goroutine-safe + propsCopy.StdTime = false + err = tm.writeAny(w, reflect.ValueOf(tproto), &propsCopy) + return err + } else if props.StdDuration { + d, ok := v.Interface().(time.Duration) + if !ok { + return fmt.Errorf("stdtime is not time.Duration, but %T", v.Interface()) + } + dproto := durationProto(d) + propsCopy := *props // Make a copy so that this is goroutine-safe + propsCopy.StdDuration = false + err := tm.writeAny(w, reflect.ValueOf(dproto), &propsCopy) + return err + } + } + + // Floats have special cases. + if v.Kind() == reflect.Float32 || v.Kind() == reflect.Float64 { + x := v.Float() + var b []byte + switch { + case math.IsInf(x, 1): + b = posInf + case math.IsInf(x, -1): + b = negInf + case math.IsNaN(x): + b = nan + } + if b != nil { + _, err := w.Write(b) + return err + } + // Other values are handled below. + } + + // We don't attempt to serialise every possible value type; only those + // that can occur in protocol buffers. + switch v.Kind() { + case reflect.Slice: + // Should only be a []byte; repeated fields are handled in writeStruct. + if err := writeString(w, string(v.Bytes())); err != nil { + return err + } + case reflect.String: + if err := writeString(w, v.String()); err != nil { + return err + } + case reflect.Struct: + // Required/optional group/message. + var bra, ket byte = '<', '>' + if props != nil && props.Wire == "group" { + bra, ket = '{', '}' + } + if err := w.WriteByte(bra); err != nil { + return err + } + if !w.compact { + if err := w.WriteByte('\n'); err != nil { + return err + } + } + w.indent() + if v.CanAddr() { + // Calling v.Interface on a struct causes the reflect package to + // copy the entire struct. This is racy with the new Marshaler + // since we atomically update the XXX_sizecache. + // + // Thus, we retrieve a pointer to the struct if possible to avoid + // a race since v.Interface on the pointer doesn't copy the struct. + // + // If v is not addressable, then we are not worried about a race + // since it implies that the binary Marshaler cannot possibly be + // mutating this value. + v = v.Addr() + } + if etm, ok := v.Interface().(encoding.TextMarshaler); ok { + text, err := etm.MarshalText() + if err != nil { + return err + } + if _, err = w.Write(text); err != nil { + return err + } + } else { + if v.Kind() == reflect.Ptr { + v = v.Elem() + } + if err := tm.writeStruct(w, v); err != nil { + return err + } + } + w.unindent() + if err := w.WriteByte(ket); err != nil { + return err + } + default: + _, err := fmt.Fprint(w, v.Interface()) + return err + } + return nil +} + +// equivalent to C's isprint. +func isprint(c byte) bool { + return c >= 0x20 && c < 0x7f +} + +// writeString writes a string in the protocol buffer text format. +// It is similar to strconv.Quote except we don't use Go escape sequences, +// we treat the string as a byte sequence, and we use octal escapes. +// These differences are to maintain interoperability with the other +// languages' implementations of the text format. +func writeString(w *textWriter, s string) error { + // use WriteByte here to get any needed indent + if err := w.WriteByte('"'); err != nil { + return err + } + // Loop over the bytes, not the runes. + for i := 0; i < len(s); i++ { + var err error + // Divergence from C++: we don't escape apostrophes. + // There's no need to escape them, and the C++ parser + // copes with a naked apostrophe. + switch c := s[i]; c { + case '\n': + _, err = w.w.Write(backslashN) + case '\r': + _, err = w.w.Write(backslashR) + case '\t': + _, err = w.w.Write(backslashT) + case '"': + _, err = w.w.Write(backslashDQ) + case '\\': + _, err = w.w.Write(backslashBS) + default: + if isprint(c) { + err = w.w.WriteByte(c) + } else { + _, err = fmt.Fprintf(w.w, "\\%03o", c) + } + } + if err != nil { + return err + } + } + return w.WriteByte('"') +} + +func writeUnknownStruct(w *textWriter, data []byte) (err error) { + if !w.compact { + if _, err := fmt.Fprintf(w, "/* %d unknown bytes */\n", len(data)); err != nil { + return err + } + } + b := NewBuffer(data) + for b.index < len(b.buf) { + x, err := b.DecodeVarint() + if err != nil { + _, ferr := fmt.Fprintf(w, "/* %v */\n", err) + return ferr + } + wire, tag := x&7, x>>3 + if wire == WireEndGroup { + w.unindent() + if _, werr := w.Write(endBraceNewline); werr != nil { + return werr + } + continue + } + if _, ferr := fmt.Fprint(w, tag); ferr != nil { + return ferr + } + if wire != WireStartGroup { + if err = w.WriteByte(':'); err != nil { + return err + } + } + if !w.compact || wire == WireStartGroup { + if err = w.WriteByte(' '); err != nil { + return err + } + } + switch wire { + case WireBytes: + buf, e := b.DecodeRawBytes(false) + if e == nil { + _, err = fmt.Fprintf(w, "%q", buf) + } else { + _, err = fmt.Fprintf(w, "/* %v */", e) + } + case WireFixed32: + x, err = b.DecodeFixed32() + err = writeUnknownInt(w, x, err) + case WireFixed64: + x, err = b.DecodeFixed64() + err = writeUnknownInt(w, x, err) + case WireStartGroup: + err = w.WriteByte('{') + w.indent() + case WireVarint: + x, err = b.DecodeVarint() + err = writeUnknownInt(w, x, err) + default: + _, err = fmt.Fprintf(w, "/* unknown wire type %d */", wire) + } + if err != nil { + return err + } + if err := w.WriteByte('\n'); err != nil { + return err + } + } + return nil +} + +func writeUnknownInt(w *textWriter, x uint64, err error) error { + if err == nil { + _, err = fmt.Fprint(w, x) + } else { + _, err = fmt.Fprintf(w, "/* %v */", err) + } + return err +} + +type int32Slice []int32 + +func (s int32Slice) Len() int { return len(s) } +func (s int32Slice) Less(i, j int) bool { return s[i] < s[j] } +func (s int32Slice) Swap(i, j int) { s[i], s[j] = s[j], s[i] } + +// writeExtensions writes all the extensions in pv. +// pv is assumed to be a pointer to a protocol message struct that is extendable. +func (tm *TextMarshaler) writeExtensions(w *textWriter, pv reflect.Value) error { + emap := extensionMaps[pv.Type().Elem()] + e := pv.Interface().(Message) + + var m map[int32]Extension + var mu sync.Locker + if em, ok := e.(extensionsBytes); ok { + eb := em.GetExtensions() + var err error + m, err = BytesToExtensionsMap(*eb) + if err != nil { + return err + } + mu = notLocker{} + } else if _, ok := e.(extendableProto); ok { + ep, _ := extendable(e) + m, mu = ep.extensionsRead() + if m == nil { + return nil + } + } + + // Order the extensions by ID. + // This isn't strictly necessary, but it will give us + // canonical output, which will also make testing easier. + + mu.Lock() + ids := make([]int32, 0, len(m)) + for id := range m { + ids = append(ids, id) + } + sort.Sort(int32Slice(ids)) + mu.Unlock() + + for _, extNum := range ids { + ext := m[extNum] + var desc *ExtensionDesc + if emap != nil { + desc = emap[extNum] + } + if desc == nil { + // Unknown extension. + if err := writeUnknownStruct(w, ext.enc); err != nil { + return err + } + continue + } + + pb, err := GetExtension(e, desc) + if err != nil { + return fmt.Errorf("failed getting extension: %v", err) + } + + // Repeated extensions will appear as a slice. + if !desc.repeated() { + if err := tm.writeExtension(w, desc.Name, pb); err != nil { + return err + } + } else { + v := reflect.ValueOf(pb) + for i := 0; i < v.Len(); i++ { + if err := tm.writeExtension(w, desc.Name, v.Index(i).Interface()); err != nil { + return err + } + } + } + } + return nil +} + +func (tm *TextMarshaler) writeExtension(w *textWriter, name string, pb interface{}) error { + if _, err := fmt.Fprintf(w, "[%s]:", name); err != nil { + return err + } + if !w.compact { + if err := w.WriteByte(' '); err != nil { + return err + } + } + if err := tm.writeAny(w, reflect.ValueOf(pb), nil); err != nil { + return err + } + if err := w.WriteByte('\n'); err != nil { + return err + } + return nil +} + +func (w *textWriter) writeIndent() { + if !w.complete { + return + } + remain := w.ind * 2 + for remain > 0 { + n := remain + if n > len(spaces) { + n = len(spaces) + } + w.w.Write(spaces[:n]) + remain -= n + } + w.complete = false +} + +// TextMarshaler is a configurable text format marshaler. +type TextMarshaler struct { + Compact bool // use compact text format (one line). + ExpandAny bool // expand google.protobuf.Any messages of known types +} + +// Marshal writes a given protocol buffer in text format. +// The only errors returned are from w. +func (tm *TextMarshaler) Marshal(w io.Writer, pb Message) error { + val := reflect.ValueOf(pb) + if pb == nil || val.IsNil() { + w.Write([]byte("")) + return nil + } + var bw *bufio.Writer + ww, ok := w.(writer) + if !ok { + bw = bufio.NewWriter(w) + ww = bw + } + aw := &textWriter{ + w: ww, + complete: true, + compact: tm.Compact, + } + + if etm, ok := pb.(encoding.TextMarshaler); ok { + text, err := etm.MarshalText() + if err != nil { + return err + } + if _, err = aw.Write(text); err != nil { + return err + } + if bw != nil { + return bw.Flush() + } + return nil + } + // Dereference the received pointer so we don't have outer < and >. + v := reflect.Indirect(val) + if err := tm.writeStruct(aw, v); err != nil { + return err + } + if bw != nil { + return bw.Flush() + } + return nil +} + +// Text is the same as Marshal, but returns the string directly. +func (tm *TextMarshaler) Text(pb Message) string { + var buf bytes.Buffer + tm.Marshal(&buf, pb) + return buf.String() +} + +var ( + defaultTextMarshaler = TextMarshaler{} + compactTextMarshaler = TextMarshaler{Compact: true} +) + +// TODO: consider removing some of the Marshal functions below. + +// MarshalText writes a given protocol buffer in text format. +// The only errors returned are from w. +func MarshalText(w io.Writer, pb Message) error { return defaultTextMarshaler.Marshal(w, pb) } + +// MarshalTextString is the same as MarshalText, but returns the string directly. +func MarshalTextString(pb Message) string { return defaultTextMarshaler.Text(pb) } + +// CompactText writes a given protocol buffer in compact text format (one line). +func CompactText(w io.Writer, pb Message) error { return compactTextMarshaler.Marshal(w, pb) } + +// CompactTextString is the same as CompactText, but returns the string directly. +func CompactTextString(pb Message) string { return compactTextMarshaler.Text(pb) } diff --git a/vendor/github.com/gogo/protobuf/proto/text_gogo.go b/vendor/github.com/gogo/protobuf/proto/text_gogo.go new file mode 100644 index 000000000..1d6c6aa0e --- /dev/null +++ b/vendor/github.com/gogo/protobuf/proto/text_gogo.go @@ -0,0 +1,57 @@ +// Protocol Buffers for Go with Gadgets +// +// Copyright (c) 2013, The GoGo Authors. All rights reserved. +// http://github.com/gogo/protobuf +// +// Redistribution and use in source and binary forms, with or without +// modification, are permitted provided that the following conditions are +// met: +// +// * Redistributions of source code must retain the above copyright +// notice, this list of conditions and the following disclaimer. +// * Redistributions in binary form must reproduce the above +// copyright notice, this list of conditions and the following disclaimer +// in the documentation and/or other materials provided with the +// distribution. +// +// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS +// "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT +// LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR +// A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT +// OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, +// SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT +// LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, +// DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY +// THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT +// (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE +// OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. + +package proto + +import ( + "fmt" + "reflect" +) + +func (tm *TextMarshaler) writeEnum(w *textWriter, v reflect.Value, props *Properties) error { + m, ok := enumStringMaps[props.Enum] + if !ok { + if err := tm.writeAny(w, v, props); err != nil { + return err + } + } + key := int32(0) + if v.Kind() == reflect.Ptr { + key = int32(v.Elem().Int()) + } else { + key = int32(v.Int()) + } + s, ok := m[key] + if !ok { + if err := tm.writeAny(w, v, props); err != nil { + return err + } + } + _, err := fmt.Fprint(w, s) + return err +} diff --git a/vendor/github.com/gogo/protobuf/proto/text_parser.go b/vendor/github.com/gogo/protobuf/proto/text_parser.go new file mode 100644 index 000000000..fbb000d37 --- /dev/null +++ b/vendor/github.com/gogo/protobuf/proto/text_parser.go @@ -0,0 +1,998 @@ +// Protocol Buffers for Go with Gadgets +// +// Copyright (c) 2013, The GoGo Authors. All rights reserved. +// http://github.com/gogo/protobuf +// +// Go support for Protocol Buffers - Google's data interchange format +// +// Copyright 2010 The Go Authors. All rights reserved. +// https://github.com/golang/protobuf +// +// Redistribution and use in source and binary forms, with or without +// modification, are permitted provided that the following conditions are +// met: +// +// * Redistributions of source code must retain the above copyright +// notice, this list of conditions and the following disclaimer. +// * Redistributions in binary form must reproduce the above +// copyright notice, this list of conditions and the following disclaimer +// in the documentation and/or other materials provided with the +// distribution. +// * Neither the name of Google Inc. nor the names of its +// contributors may be used to endorse or promote products derived from +// this software without specific prior written permission. +// +// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS +// "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT +// LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR +// A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT +// OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, +// SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT +// LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, +// DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY +// THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT +// (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE +// OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. + +package proto + +// Functions for parsing the Text protocol buffer format. +// TODO: message sets. + +import ( + "encoding" + "errors" + "fmt" + "reflect" + "strconv" + "strings" + "time" + "unicode/utf8" +) + +// Error string emitted when deserializing Any and fields are already set +const anyRepeatedlyUnpacked = "Any message unpacked multiple times, or %q already set" + +type ParseError struct { + Message string + Line int // 1-based line number + Offset int // 0-based byte offset from start of input +} + +func (p *ParseError) Error() string { + if p.Line == 1 { + // show offset only for first line + return fmt.Sprintf("line 1.%d: %v", p.Offset, p.Message) + } + return fmt.Sprintf("line %d: %v", p.Line, p.Message) +} + +type token struct { + value string + err *ParseError + line int // line number + offset int // byte number from start of input, not start of line + unquoted string // the unquoted version of value, if it was a quoted string +} + +func (t *token) String() string { + if t.err == nil { + return fmt.Sprintf("%q (line=%d, offset=%d)", t.value, t.line, t.offset) + } + return fmt.Sprintf("parse error: %v", t.err) +} + +type textParser struct { + s string // remaining input + done bool // whether the parsing is finished (success or error) + backed bool // whether back() was called + offset, line int + cur token +} + +func newTextParser(s string) *textParser { + p := new(textParser) + p.s = s + p.line = 1 + p.cur.line = 1 + return p +} + +func (p *textParser) errorf(format string, a ...interface{}) *ParseError { + pe := &ParseError{fmt.Sprintf(format, a...), p.cur.line, p.cur.offset} + p.cur.err = pe + p.done = true + return pe +} + +// Numbers and identifiers are matched by [-+._A-Za-z0-9] +func isIdentOrNumberChar(c byte) bool { + switch { + case 'A' <= c && c <= 'Z', 'a' <= c && c <= 'z': + return true + case '0' <= c && c <= '9': + return true + } + switch c { + case '-', '+', '.', '_': + return true + } + return false +} + +func isWhitespace(c byte) bool { + switch c { + case ' ', '\t', '\n', '\r': + return true + } + return false +} + +func isQuote(c byte) bool { + switch c { + case '"', '\'': + return true + } + return false +} + +func (p *textParser) skipWhitespace() { + i := 0 + for i < len(p.s) && (isWhitespace(p.s[i]) || p.s[i] == '#') { + if p.s[i] == '#' { + // comment; skip to end of line or input + for i < len(p.s) && p.s[i] != '\n' { + i++ + } + if i == len(p.s) { + break + } + } + if p.s[i] == '\n' { + p.line++ + } + i++ + } + p.offset += i + p.s = p.s[i:len(p.s)] + if len(p.s) == 0 { + p.done = true + } +} + +func (p *textParser) advance() { + // Skip whitespace + p.skipWhitespace() + if p.done { + return + } + + // Start of non-whitespace + p.cur.err = nil + p.cur.offset, p.cur.line = p.offset, p.line + p.cur.unquoted = "" + switch p.s[0] { + case '<', '>', '{', '}', ':', '[', ']', ';', ',', '/': + // Single symbol + p.cur.value, p.s = p.s[0:1], p.s[1:len(p.s)] + case '"', '\'': + // Quoted string + i := 1 + for i < len(p.s) && p.s[i] != p.s[0] && p.s[i] != '\n' { + if p.s[i] == '\\' && i+1 < len(p.s) { + // skip escaped char + i++ + } + i++ + } + if i >= len(p.s) || p.s[i] != p.s[0] { + p.errorf("unmatched quote") + return + } + unq, err := unquoteC(p.s[1:i], rune(p.s[0])) + if err != nil { + p.errorf("invalid quoted string %s: %v", p.s[0:i+1], err) + return + } + p.cur.value, p.s = p.s[0:i+1], p.s[i+1:len(p.s)] + p.cur.unquoted = unq + default: + i := 0 + for i < len(p.s) && isIdentOrNumberChar(p.s[i]) { + i++ + } + if i == 0 { + p.errorf("unexpected byte %#x", p.s[0]) + return + } + p.cur.value, p.s = p.s[0:i], p.s[i:len(p.s)] + } + p.offset += len(p.cur.value) +} + +var ( + errBadUTF8 = errors.New("proto: bad UTF-8") +) + +func unquoteC(s string, quote rune) (string, error) { + // This is based on C++'s tokenizer.cc. + // Despite its name, this is *not* parsing C syntax. + // For instance, "\0" is an invalid quoted string. + + // Avoid allocation in trivial cases. + simple := true + for _, r := range s { + if r == '\\' || r == quote { + simple = false + break + } + } + if simple { + return s, nil + } + + buf := make([]byte, 0, 3*len(s)/2) + for len(s) > 0 { + r, n := utf8.DecodeRuneInString(s) + if r == utf8.RuneError && n == 1 { + return "", errBadUTF8 + } + s = s[n:] + if r != '\\' { + if r < utf8.RuneSelf { + buf = append(buf, byte(r)) + } else { + buf = append(buf, string(r)...) + } + continue + } + + ch, tail, err := unescape(s) + if err != nil { + return "", err + } + buf = append(buf, ch...) + s = tail + } + return string(buf), nil +} + +func unescape(s string) (ch string, tail string, err error) { + r, n := utf8.DecodeRuneInString(s) + if r == utf8.RuneError && n == 1 { + return "", "", errBadUTF8 + } + s = s[n:] + switch r { + case 'a': + return "\a", s, nil + case 'b': + return "\b", s, nil + case 'f': + return "\f", s, nil + case 'n': + return "\n", s, nil + case 'r': + return "\r", s, nil + case 't': + return "\t", s, nil + case 'v': + return "\v", s, nil + case '?': + return "?", s, nil // trigraph workaround + case '\'', '"', '\\': + return string(r), s, nil + case '0', '1', '2', '3', '4', '5', '6', '7': + if len(s) < 2 { + return "", "", fmt.Errorf(`\%c requires 2 following digits`, r) + } + ss := string(r) + s[:2] + s = s[2:] + i, err := strconv.ParseUint(ss, 8, 8) + if err != nil { + return "", "", fmt.Errorf(`\%s contains non-octal digits`, ss) + } + return string([]byte{byte(i)}), s, nil + case 'x', 'X', 'u', 'U': + var n int + switch r { + case 'x', 'X': + n = 2 + case 'u': + n = 4 + case 'U': + n = 8 + } + if len(s) < n { + return "", "", fmt.Errorf(`\%c requires %d following digits`, r, n) + } + ss := s[:n] + s = s[n:] + i, err := strconv.ParseUint(ss, 16, 64) + if err != nil { + return "", "", fmt.Errorf(`\%c%s contains non-hexadecimal digits`, r, ss) + } + if r == 'x' || r == 'X' { + return string([]byte{byte(i)}), s, nil + } + if i > utf8.MaxRune { + return "", "", fmt.Errorf(`\%c%s is not a valid Unicode code point`, r, ss) + } + return string(i), s, nil + } + return "", "", fmt.Errorf(`unknown escape \%c`, r) +} + +// Back off the parser by one token. Can only be done between calls to next(). +// It makes the next advance() a no-op. +func (p *textParser) back() { p.backed = true } + +// Advances the parser and returns the new current token. +func (p *textParser) next() *token { + if p.backed || p.done { + p.backed = false + return &p.cur + } + p.advance() + if p.done { + p.cur.value = "" + } else if len(p.cur.value) > 0 && isQuote(p.cur.value[0]) { + // Look for multiple quoted strings separated by whitespace, + // and concatenate them. + cat := p.cur + for { + p.skipWhitespace() + if p.done || !isQuote(p.s[0]) { + break + } + p.advance() + if p.cur.err != nil { + return &p.cur + } + cat.value += " " + p.cur.value + cat.unquoted += p.cur.unquoted + } + p.done = false // parser may have seen EOF, but we want to return cat + p.cur = cat + } + return &p.cur +} + +func (p *textParser) consumeToken(s string) error { + tok := p.next() + if tok.err != nil { + return tok.err + } + if tok.value != s { + p.back() + return p.errorf("expected %q, found %q", s, tok.value) + } + return nil +} + +// Return a RequiredNotSetError indicating which required field was not set. +func (p *textParser) missingRequiredFieldError(sv reflect.Value) *RequiredNotSetError { + st := sv.Type() + sprops := GetProperties(st) + for i := 0; i < st.NumField(); i++ { + if !isNil(sv.Field(i)) { + continue + } + + props := sprops.Prop[i] + if props.Required { + return &RequiredNotSetError{fmt.Sprintf("%v.%v", st, props.OrigName)} + } + } + return &RequiredNotSetError{fmt.Sprintf("%v.", st)} // should not happen +} + +// Returns the index in the struct for the named field, as well as the parsed tag properties. +func structFieldByName(sprops *StructProperties, name string) (int, *Properties, bool) { + i, ok := sprops.decoderOrigNames[name] + if ok { + return i, sprops.Prop[i], true + } + return -1, nil, false +} + +// Consume a ':' from the input stream (if the next token is a colon), +// returning an error if a colon is needed but not present. +func (p *textParser) checkForColon(props *Properties, typ reflect.Type) *ParseError { + tok := p.next() + if tok.err != nil { + return tok.err + } + if tok.value != ":" { + // Colon is optional when the field is a group or message. + needColon := true + switch props.Wire { + case "group": + needColon = false + case "bytes": + // A "bytes" field is either a message, a string, or a repeated field; + // those three become *T, *string and []T respectively, so we can check for + // this field being a pointer to a non-string. + if typ.Kind() == reflect.Ptr { + // *T or *string + if typ.Elem().Kind() == reflect.String { + break + } + } else if typ.Kind() == reflect.Slice { + // []T or []*T + if typ.Elem().Kind() != reflect.Ptr { + break + } + } else if typ.Kind() == reflect.String { + // The proto3 exception is for a string field, + // which requires a colon. + break + } + needColon = false + } + if needColon { + return p.errorf("expected ':', found %q", tok.value) + } + p.back() + } + return nil +} + +func (p *textParser) readStruct(sv reflect.Value, terminator string) error { + st := sv.Type() + sprops := GetProperties(st) + reqCount := sprops.reqCount + var reqFieldErr error + fieldSet := make(map[string]bool) + // A struct is a sequence of "name: value", terminated by one of + // '>' or '}', or the end of the input. A name may also be + // "[extension]" or "[type/url]". + // + // The whole struct can also be an expanded Any message, like: + // [type/url] < ... struct contents ... > + for { + tok := p.next() + if tok.err != nil { + return tok.err + } + if tok.value == terminator { + break + } + if tok.value == "[" { + // Looks like an extension or an Any. + // + // TODO: Check whether we need to handle + // namespace rooted names (e.g. ".something.Foo"). + extName, err := p.consumeExtName() + if err != nil { + return err + } + + if s := strings.LastIndex(extName, "/"); s >= 0 { + // If it contains a slash, it's an Any type URL. + messageName := extName[s+1:] + mt := MessageType(messageName) + if mt == nil { + return p.errorf("unrecognized message %q in google.protobuf.Any", messageName) + } + tok = p.next() + if tok.err != nil { + return tok.err + } + // consume an optional colon + if tok.value == ":" { + tok = p.next() + if tok.err != nil { + return tok.err + } + } + var terminator string + switch tok.value { + case "<": + terminator = ">" + case "{": + terminator = "}" + default: + return p.errorf("expected '{' or '<', found %q", tok.value) + } + v := reflect.New(mt.Elem()) + if pe := p.readStruct(v.Elem(), terminator); pe != nil { + return pe + } + b, err := Marshal(v.Interface().(Message)) + if err != nil { + return p.errorf("failed to marshal message of type %q: %v", messageName, err) + } + if fieldSet["type_url"] { + return p.errorf(anyRepeatedlyUnpacked, "type_url") + } + if fieldSet["value"] { + return p.errorf(anyRepeatedlyUnpacked, "value") + } + sv.FieldByName("TypeUrl").SetString(extName) + sv.FieldByName("Value").SetBytes(b) + fieldSet["type_url"] = true + fieldSet["value"] = true + continue + } + + var desc *ExtensionDesc + // This could be faster, but it's functional. + // TODO: Do something smarter than a linear scan. + for _, d := range RegisteredExtensions(reflect.New(st).Interface().(Message)) { + if d.Name == extName { + desc = d + break + } + } + if desc == nil { + return p.errorf("unrecognized extension %q", extName) + } + + props := &Properties{} + props.Parse(desc.Tag) + + typ := reflect.TypeOf(desc.ExtensionType) + if err := p.checkForColon(props, typ); err != nil { + return err + } + + rep := desc.repeated() + + // Read the extension structure, and set it in + // the value we're constructing. + var ext reflect.Value + if !rep { + ext = reflect.New(typ).Elem() + } else { + ext = reflect.New(typ.Elem()).Elem() + } + if err := p.readAny(ext, props); err != nil { + if _, ok := err.(*RequiredNotSetError); !ok { + return err + } + reqFieldErr = err + } + ep := sv.Addr().Interface().(Message) + if !rep { + SetExtension(ep, desc, ext.Interface()) + } else { + old, err := GetExtension(ep, desc) + var sl reflect.Value + if err == nil { + sl = reflect.ValueOf(old) // existing slice + } else { + sl = reflect.MakeSlice(typ, 0, 1) + } + sl = reflect.Append(sl, ext) + SetExtension(ep, desc, sl.Interface()) + } + if err := p.consumeOptionalSeparator(); err != nil { + return err + } + continue + } + + // This is a normal, non-extension field. + name := tok.value + var dst reflect.Value + fi, props, ok := structFieldByName(sprops, name) + if ok { + dst = sv.Field(fi) + } else if oop, ok := sprops.OneofTypes[name]; ok { + // It is a oneof. + props = oop.Prop + nv := reflect.New(oop.Type.Elem()) + dst = nv.Elem().Field(0) + field := sv.Field(oop.Field) + if !field.IsNil() { + return p.errorf("field '%s' would overwrite already parsed oneof '%s'", name, sv.Type().Field(oop.Field).Name) + } + field.Set(nv) + } + if !dst.IsValid() { + return p.errorf("unknown field name %q in %v", name, st) + } + + if dst.Kind() == reflect.Map { + // Consume any colon. + if err := p.checkForColon(props, dst.Type()); err != nil { + return err + } + + // Construct the map if it doesn't already exist. + if dst.IsNil() { + dst.Set(reflect.MakeMap(dst.Type())) + } + key := reflect.New(dst.Type().Key()).Elem() + val := reflect.New(dst.Type().Elem()).Elem() + + // The map entry should be this sequence of tokens: + // < key : KEY value : VALUE > + // However, implementations may omit key or value, and technically + // we should support them in any order. See b/28924776 for a time + // this went wrong. + + tok := p.next() + var terminator string + switch tok.value { + case "<": + terminator = ">" + case "{": + terminator = "}" + default: + return p.errorf("expected '{' or '<', found %q", tok.value) + } + for { + tok := p.next() + if tok.err != nil { + return tok.err + } + if tok.value == terminator { + break + } + switch tok.value { + case "key": + if err := p.consumeToken(":"); err != nil { + return err + } + if err := p.readAny(key, props.mkeyprop); err != nil { + return err + } + if err := p.consumeOptionalSeparator(); err != nil { + return err + } + case "value": + if err := p.checkForColon(props.mvalprop, dst.Type().Elem()); err != nil { + return err + } + if err := p.readAny(val, props.mvalprop); err != nil { + return err + } + if err := p.consumeOptionalSeparator(); err != nil { + return err + } + default: + p.back() + return p.errorf(`expected "key", "value", or %q, found %q`, terminator, tok.value) + } + } + + dst.SetMapIndex(key, val) + continue + } + + // Check that it's not already set if it's not a repeated field. + if !props.Repeated && fieldSet[name] { + return p.errorf("non-repeated field %q was repeated", name) + } + + if err := p.checkForColon(props, dst.Type()); err != nil { + return err + } + + // Parse into the field. + fieldSet[name] = true + if err := p.readAny(dst, props); err != nil { + if _, ok := err.(*RequiredNotSetError); !ok { + return err + } + reqFieldErr = err + } + if props.Required { + reqCount-- + } + + if err := p.consumeOptionalSeparator(); err != nil { + return err + } + + } + + if reqCount > 0 { + return p.missingRequiredFieldError(sv) + } + return reqFieldErr +} + +// consumeExtName consumes extension name or expanded Any type URL and the +// following ']'. It returns the name or URL consumed. +func (p *textParser) consumeExtName() (string, error) { + tok := p.next() + if tok.err != nil { + return "", tok.err + } + + // If extension name or type url is quoted, it's a single token. + if len(tok.value) > 2 && isQuote(tok.value[0]) && tok.value[len(tok.value)-1] == tok.value[0] { + name, err := unquoteC(tok.value[1:len(tok.value)-1], rune(tok.value[0])) + if err != nil { + return "", err + } + return name, p.consumeToken("]") + } + + // Consume everything up to "]" + var parts []string + for tok.value != "]" { + parts = append(parts, tok.value) + tok = p.next() + if tok.err != nil { + return "", p.errorf("unrecognized type_url or extension name: %s", tok.err) + } + if p.done && tok.value != "]" { + return "", p.errorf("unclosed type_url or extension name") + } + } + return strings.Join(parts, ""), nil +} + +// consumeOptionalSeparator consumes an optional semicolon or comma. +// It is used in readStruct to provide backward compatibility. +func (p *textParser) consumeOptionalSeparator() error { + tok := p.next() + if tok.err != nil { + return tok.err + } + if tok.value != ";" && tok.value != "," { + p.back() + } + return nil +} + +func (p *textParser) readAny(v reflect.Value, props *Properties) error { + tok := p.next() + if tok.err != nil { + return tok.err + } + if tok.value == "" { + return p.errorf("unexpected EOF") + } + if len(props.CustomType) > 0 { + if props.Repeated { + t := reflect.TypeOf(v.Interface()) + if t.Kind() == reflect.Slice { + tc := reflect.TypeOf(new(Marshaler)) + ok := t.Elem().Implements(tc.Elem()) + if ok { + fv := v + flen := fv.Len() + if flen == fv.Cap() { + nav := reflect.MakeSlice(v.Type(), flen, 2*flen+1) + reflect.Copy(nav, fv) + fv.Set(nav) + } + fv.SetLen(flen + 1) + + // Read one. + p.back() + return p.readAny(fv.Index(flen), props) + } + } + } + if reflect.TypeOf(v.Interface()).Kind() == reflect.Ptr { + custom := reflect.New(props.ctype.Elem()).Interface().(Unmarshaler) + err := custom.Unmarshal([]byte(tok.unquoted)) + if err != nil { + return p.errorf("%v %v: %v", err, v.Type(), tok.value) + } + v.Set(reflect.ValueOf(custom)) + } else { + custom := reflect.New(reflect.TypeOf(v.Interface())).Interface().(Unmarshaler) + err := custom.Unmarshal([]byte(tok.unquoted)) + if err != nil { + return p.errorf("%v %v: %v", err, v.Type(), tok.value) + } + v.Set(reflect.Indirect(reflect.ValueOf(custom))) + } + return nil + } + if props.StdTime { + fv := v + p.back() + props.StdTime = false + tproto := ×tamp{} + err := p.readAny(reflect.ValueOf(tproto).Elem(), props) + props.StdTime = true + if err != nil { + return err + } + tim, err := timestampFromProto(tproto) + if err != nil { + return err + } + if props.Repeated { + t := reflect.TypeOf(v.Interface()) + if t.Kind() == reflect.Slice { + if t.Elem().Kind() == reflect.Ptr { + ts := fv.Interface().([]*time.Time) + ts = append(ts, &tim) + fv.Set(reflect.ValueOf(ts)) + return nil + } else { + ts := fv.Interface().([]time.Time) + ts = append(ts, tim) + fv.Set(reflect.ValueOf(ts)) + return nil + } + } + } + if reflect.TypeOf(v.Interface()).Kind() == reflect.Ptr { + v.Set(reflect.ValueOf(&tim)) + } else { + v.Set(reflect.Indirect(reflect.ValueOf(&tim))) + } + return nil + } + if props.StdDuration { + fv := v + p.back() + props.StdDuration = false + dproto := &duration{} + err := p.readAny(reflect.ValueOf(dproto).Elem(), props) + props.StdDuration = true + if err != nil { + return err + } + dur, err := durationFromProto(dproto) + if err != nil { + return err + } + if props.Repeated { + t := reflect.TypeOf(v.Interface()) + if t.Kind() == reflect.Slice { + if t.Elem().Kind() == reflect.Ptr { + ds := fv.Interface().([]*time.Duration) + ds = append(ds, &dur) + fv.Set(reflect.ValueOf(ds)) + return nil + } else { + ds := fv.Interface().([]time.Duration) + ds = append(ds, dur) + fv.Set(reflect.ValueOf(ds)) + return nil + } + } + } + if reflect.TypeOf(v.Interface()).Kind() == reflect.Ptr { + v.Set(reflect.ValueOf(&dur)) + } else { + v.Set(reflect.Indirect(reflect.ValueOf(&dur))) + } + return nil + } + switch fv := v; fv.Kind() { + case reflect.Slice: + at := v.Type() + if at.Elem().Kind() == reflect.Uint8 { + // Special case for []byte + if tok.value[0] != '"' && tok.value[0] != '\'' { + // Deliberately written out here, as the error after + // this switch statement would write "invalid []byte: ...", + // which is not as user-friendly. + return p.errorf("invalid string: %v", tok.value) + } + bytes := []byte(tok.unquoted) + fv.Set(reflect.ValueOf(bytes)) + return nil + } + // Repeated field. + if tok.value == "[" { + // Repeated field with list notation, like [1,2,3]. + for { + fv.Set(reflect.Append(fv, reflect.New(at.Elem()).Elem())) + err := p.readAny(fv.Index(fv.Len()-1), props) + if err != nil { + return err + } + ntok := p.next() + if ntok.err != nil { + return ntok.err + } + if ntok.value == "]" { + break + } + if ntok.value != "," { + return p.errorf("Expected ']' or ',' found %q", ntok.value) + } + } + return nil + } + // One value of the repeated field. + p.back() + fv.Set(reflect.Append(fv, reflect.New(at.Elem()).Elem())) + return p.readAny(fv.Index(fv.Len()-1), props) + case reflect.Bool: + // true/1/t/True or false/f/0/False. + switch tok.value { + case "true", "1", "t", "True": + fv.SetBool(true) + return nil + case "false", "0", "f", "False": + fv.SetBool(false) + return nil + } + case reflect.Float32, reflect.Float64: + v := tok.value + // Ignore 'f' for compatibility with output generated by C++, but don't + // remove 'f' when the value is "-inf" or "inf". + if strings.HasSuffix(v, "f") && tok.value != "-inf" && tok.value != "inf" { + v = v[:len(v)-1] + } + if f, err := strconv.ParseFloat(v, fv.Type().Bits()); err == nil { + fv.SetFloat(f) + return nil + } + case reflect.Int32: + if x, err := strconv.ParseInt(tok.value, 0, 32); err == nil { + fv.SetInt(x) + return nil + } + + if len(props.Enum) == 0 { + break + } + m, ok := enumValueMaps[props.Enum] + if !ok { + break + } + x, ok := m[tok.value] + if !ok { + break + } + fv.SetInt(int64(x)) + return nil + case reflect.Int64: + if x, err := strconv.ParseInt(tok.value, 0, 64); err == nil { + fv.SetInt(x) + return nil + } + + case reflect.Ptr: + // A basic field (indirected through pointer), or a repeated message/group + p.back() + fv.Set(reflect.New(fv.Type().Elem())) + return p.readAny(fv.Elem(), props) + case reflect.String: + if tok.value[0] == '"' || tok.value[0] == '\'' { + fv.SetString(tok.unquoted) + return nil + } + case reflect.Struct: + var terminator string + switch tok.value { + case "{": + terminator = "}" + case "<": + terminator = ">" + default: + return p.errorf("expected '{' or '<', found %q", tok.value) + } + // TODO: Handle nested messages which implement encoding.TextUnmarshaler. + return p.readStruct(fv, terminator) + case reflect.Uint32: + if x, err := strconv.ParseUint(tok.value, 0, 32); err == nil { + fv.SetUint(uint64(x)) + return nil + } + case reflect.Uint64: + if x, err := strconv.ParseUint(tok.value, 0, 64); err == nil { + fv.SetUint(x) + return nil + } + } + return p.errorf("invalid %v: %v", v.Type(), tok.value) +} + +// UnmarshalText reads a protocol buffer in Text format. UnmarshalText resets pb +// before starting to unmarshal, so any existing data in pb is always removed. +// If a required field is not set and no other error occurs, +// UnmarshalText returns *RequiredNotSetError. +func UnmarshalText(s string, pb Message) error { + if um, ok := pb.(encoding.TextUnmarshaler); ok { + return um.UnmarshalText([]byte(s)) + } + pb.Reset() + v := reflect.ValueOf(pb) + return newTextParser(s).readStruct(v.Elem(), "") +} diff --git a/vendor/github.com/gogo/protobuf/proto/timestamp.go b/vendor/github.com/gogo/protobuf/proto/timestamp.go new file mode 100644 index 000000000..9324f6542 --- /dev/null +++ b/vendor/github.com/gogo/protobuf/proto/timestamp.go @@ -0,0 +1,113 @@ +// Go support for Protocol Buffers - Google's data interchange format +// +// Copyright 2016 The Go Authors. All rights reserved. +// https://github.com/golang/protobuf +// +// Redistribution and use in source and binary forms, with or without +// modification, are permitted provided that the following conditions are +// met: +// +// * Redistributions of source code must retain the above copyright +// notice, this list of conditions and the following disclaimer. +// * Redistributions in binary form must reproduce the above +// copyright notice, this list of conditions and the following disclaimer +// in the documentation and/or other materials provided with the +// distribution. +// * Neither the name of Google Inc. nor the names of its +// contributors may be used to endorse or promote products derived from +// this software without specific prior written permission. +// +// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS +// "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT +// LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR +// A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT +// OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, +// SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT +// LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, +// DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY +// THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT +// (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE +// OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. + +package proto + +// This file implements operations on google.protobuf.Timestamp. + +import ( + "errors" + "fmt" + "time" +) + +const ( + // Seconds field of the earliest valid Timestamp. + // This is time.Date(1, 1, 1, 0, 0, 0, 0, time.UTC).Unix(). + minValidSeconds = -62135596800 + // Seconds field just after the latest valid Timestamp. + // This is time.Date(10000, 1, 1, 0, 0, 0, 0, time.UTC).Unix(). + maxValidSeconds = 253402300800 +) + +// validateTimestamp determines whether a Timestamp is valid. +// A valid timestamp represents a time in the range +// [0001-01-01, 10000-01-01) and has a Nanos field +// in the range [0, 1e9). +// +// If the Timestamp is valid, validateTimestamp returns nil. +// Otherwise, it returns an error that describes +// the problem. +// +// Every valid Timestamp can be represented by a time.Time, but the converse is not true. +func validateTimestamp(ts *timestamp) error { + if ts == nil { + return errors.New("timestamp: nil Timestamp") + } + if ts.Seconds < minValidSeconds { + return fmt.Errorf("timestamp: %#v before 0001-01-01", ts) + } + if ts.Seconds >= maxValidSeconds { + return fmt.Errorf("timestamp: %#v after 10000-01-01", ts) + } + if ts.Nanos < 0 || ts.Nanos >= 1e9 { + return fmt.Errorf("timestamp: %#v: nanos not in range [0, 1e9)", ts) + } + return nil +} + +// TimestampFromProto converts a google.protobuf.Timestamp proto to a time.Time. +// It returns an error if the argument is invalid. +// +// Unlike most Go functions, if Timestamp returns an error, the first return value +// is not the zero time.Time. Instead, it is the value obtained from the +// time.Unix function when passed the contents of the Timestamp, in the UTC +// locale. This may or may not be a meaningful time; many invalid Timestamps +// do map to valid time.Times. +// +// A nil Timestamp returns an error. The first return value in that case is +// undefined. +func timestampFromProto(ts *timestamp) (time.Time, error) { + // Don't return the zero value on error, because corresponds to a valid + // timestamp. Instead return whatever time.Unix gives us. + var t time.Time + if ts == nil { + t = time.Unix(0, 0).UTC() // treat nil like the empty Timestamp + } else { + t = time.Unix(ts.Seconds, int64(ts.Nanos)).UTC() + } + return t, validateTimestamp(ts) +} + +// TimestampProto converts the time.Time to a google.protobuf.Timestamp proto. +// It returns an error if the resulting Timestamp is invalid. +func timestampProto(t time.Time) (*timestamp, error) { + seconds := t.Unix() + nanos := int32(t.Sub(time.Unix(seconds, 0))) + ts := ×tamp{ + Seconds: seconds, + Nanos: nanos, + } + if err := validateTimestamp(ts); err != nil { + return nil, err + } + return ts, nil +} diff --git a/vendor/github.com/gogo/protobuf/proto/timestamp_gogo.go b/vendor/github.com/gogo/protobuf/proto/timestamp_gogo.go new file mode 100644 index 000000000..38439fa99 --- /dev/null +++ b/vendor/github.com/gogo/protobuf/proto/timestamp_gogo.go @@ -0,0 +1,49 @@ +// Protocol Buffers for Go with Gadgets +// +// Copyright (c) 2016, The GoGo Authors. All rights reserved. +// http://github.com/gogo/protobuf +// +// Redistribution and use in source and binary forms, with or without +// modification, are permitted provided that the following conditions are +// met: +// +// * Redistributions of source code must retain the above copyright +// notice, this list of conditions and the following disclaimer. +// * Redistributions in binary form must reproduce the above +// copyright notice, this list of conditions and the following disclaimer +// in the documentation and/or other materials provided with the +// distribution. +// +// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS +// "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT +// LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR +// A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT +// OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, +// SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT +// LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, +// DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY +// THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT +// (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE +// OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. + +package proto + +import ( + "reflect" + "time" +) + +var timeType = reflect.TypeOf((*time.Time)(nil)).Elem() + +type timestamp struct { + Seconds int64 `protobuf:"varint,1,opt,name=seconds,proto3" json:"seconds,omitempty"` + Nanos int32 `protobuf:"varint,2,opt,name=nanos,proto3" json:"nanos,omitempty"` +} + +func (m *timestamp) Reset() { *m = timestamp{} } +func (*timestamp) ProtoMessage() {} +func (*timestamp) String() string { return "timestamp" } + +func init() { + RegisterType((*timestamp)(nil), "gogo.protobuf.proto.timestamp") +} diff --git a/vendor/github.com/gogo/protobuf/protoc-gen-gogo/descriptor/Makefile b/vendor/github.com/gogo/protobuf/protoc-gen-gogo/descriptor/Makefile new file mode 100644 index 000000000..3496dc99d --- /dev/null +++ b/vendor/github.com/gogo/protobuf/protoc-gen-gogo/descriptor/Makefile @@ -0,0 +1,36 @@ +# Go support for Protocol Buffers - Google's data interchange format +# +# Copyright 2010 The Go Authors. All rights reserved. +# https://github.com/golang/protobuf +# +# Redistribution and use in source and binary forms, with or without +# modification, are permitted provided that the following conditions are +# met: +# +# * Redistributions of source code must retain the above copyright +# notice, this list of conditions and the following disclaimer. +# * Redistributions in binary form must reproduce the above +# copyright notice, this list of conditions and the following disclaimer +# in the documentation and/or other materials provided with the +# distribution. +# * Neither the name of Google Inc. nor the names of its +# contributors may be used to endorse or promote products derived from +# this software without specific prior written permission. +# +# THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS +# "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT +# LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR +# A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT +# OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, +# SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT +# LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, +# DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY +# THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT +# (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE +# OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. + +regenerate: + go install github.com/gogo/protobuf/protoc-gen-gogo + go install github.com/gogo/protobuf/protoc-gen-gostring + protoc --gogo_out=. -I=../../protobuf/google/protobuf ../../protobuf/google/protobuf/descriptor.proto + protoc --gostring_out=. -I=../../protobuf/google/protobuf ../../protobuf/google/protobuf/descriptor.proto diff --git a/vendor/github.com/gogo/protobuf/protoc-gen-gogo/descriptor/descriptor.go b/vendor/github.com/gogo/protobuf/protoc-gen-gogo/descriptor/descriptor.go new file mode 100644 index 000000000..a85bf1984 --- /dev/null +++ b/vendor/github.com/gogo/protobuf/protoc-gen-gogo/descriptor/descriptor.go @@ -0,0 +1,118 @@ +// Go support for Protocol Buffers - Google's data interchange format +// +// Copyright 2016 The Go Authors. All rights reserved. +// https://github.com/golang/protobuf +// +// Redistribution and use in source and binary forms, with or without +// modification, are permitted provided that the following conditions are +// met: +// +// * Redistributions of source code must retain the above copyright +// notice, this list of conditions and the following disclaimer. +// * Redistributions in binary form must reproduce the above +// copyright notice, this list of conditions and the following disclaimer +// in the documentation and/or other materials provided with the +// distribution. +// * Neither the name of Google Inc. nor the names of its +// contributors may be used to endorse or promote products derived from +// this software without specific prior written permission. +// +// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS +// "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT +// LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR +// A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT +// OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, +// SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT +// LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, +// DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY +// THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT +// (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE +// OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. + +// Package descriptor provides functions for obtaining protocol buffer +// descriptors for generated Go types. +// +// These functions cannot go in package proto because they depend on the +// generated protobuf descriptor messages, which themselves depend on proto. +package descriptor + +import ( + "bytes" + "compress/gzip" + "fmt" + "io/ioutil" + + "github.com/gogo/protobuf/proto" +) + +// extractFile extracts a FileDescriptorProto from a gzip'd buffer. +func extractFile(gz []byte) (*FileDescriptorProto, error) { + r, err := gzip.NewReader(bytes.NewReader(gz)) + if err != nil { + return nil, fmt.Errorf("failed to open gzip reader: %v", err) + } + defer r.Close() + + b, err := ioutil.ReadAll(r) + if err != nil { + return nil, fmt.Errorf("failed to uncompress descriptor: %v", err) + } + + fd := new(FileDescriptorProto) + if err := proto.Unmarshal(b, fd); err != nil { + return nil, fmt.Errorf("malformed FileDescriptorProto: %v", err) + } + + return fd, nil +} + +// Message is a proto.Message with a method to return its descriptor. +// +// Message types generated by the protocol compiler always satisfy +// the Message interface. +type Message interface { + proto.Message + Descriptor() ([]byte, []int) +} + +// ForMessage returns a FileDescriptorProto and a DescriptorProto from within it +// describing the given message. +func ForMessage(msg Message) (fd *FileDescriptorProto, md *DescriptorProto) { + gz, path := msg.Descriptor() + fd, err := extractFile(gz) + if err != nil { + panic(fmt.Sprintf("invalid FileDescriptorProto for %T: %v", msg, err)) + } + + md = fd.MessageType[path[0]] + for _, i := range path[1:] { + md = md.NestedType[i] + } + return fd, md +} + +// Is this field a scalar numeric type? +func (field *FieldDescriptorProto) IsScalar() bool { + if field.Type == nil { + return false + } + switch *field.Type { + case FieldDescriptorProto_TYPE_DOUBLE, + FieldDescriptorProto_TYPE_FLOAT, + FieldDescriptorProto_TYPE_INT64, + FieldDescriptorProto_TYPE_UINT64, + FieldDescriptorProto_TYPE_INT32, + FieldDescriptorProto_TYPE_FIXED64, + FieldDescriptorProto_TYPE_FIXED32, + FieldDescriptorProto_TYPE_BOOL, + FieldDescriptorProto_TYPE_UINT32, + FieldDescriptorProto_TYPE_ENUM, + FieldDescriptorProto_TYPE_SFIXED32, + FieldDescriptorProto_TYPE_SFIXED64, + FieldDescriptorProto_TYPE_SINT32, + FieldDescriptorProto_TYPE_SINT64: + return true + default: + return false + } +} diff --git a/vendor/github.com/gogo/protobuf/protoc-gen-gogo/descriptor/descriptor.pb.go b/vendor/github.com/gogo/protobuf/protoc-gen-gogo/descriptor/descriptor.pb.go new file mode 100644 index 000000000..44f893b77 --- /dev/null +++ b/vendor/github.com/gogo/protobuf/protoc-gen-gogo/descriptor/descriptor.pb.go @@ -0,0 +1,2806 @@ +// Code generated by protoc-gen-gogo. DO NOT EDIT. +// source: descriptor.proto + +package descriptor + +import proto "github.com/gogo/protobuf/proto" +import fmt "fmt" +import math "math" + +// Reference imports to suppress errors if they are not otherwise used. +var _ = proto.Marshal +var _ = fmt.Errorf +var _ = math.Inf + +// This is a compile-time assertion to ensure that this generated file +// is compatible with the proto package it is being compiled against. +// A compilation error at this line likely means your copy of the +// proto package needs to be updated. +const _ = proto.GoGoProtoPackageIsVersion2 // please upgrade the proto package + +type FieldDescriptorProto_Type int32 + +const ( + // 0 is reserved for errors. + // Order is weird for historical reasons. + FieldDescriptorProto_TYPE_DOUBLE FieldDescriptorProto_Type = 1 + FieldDescriptorProto_TYPE_FLOAT FieldDescriptorProto_Type = 2 + // Not ZigZag encoded. Negative numbers take 10 bytes. Use TYPE_SINT64 if + // negative values are likely. + FieldDescriptorProto_TYPE_INT64 FieldDescriptorProto_Type = 3 + FieldDescriptorProto_TYPE_UINT64 FieldDescriptorProto_Type = 4 + // Not ZigZag encoded. Negative numbers take 10 bytes. Use TYPE_SINT32 if + // negative values are likely. + FieldDescriptorProto_TYPE_INT32 FieldDescriptorProto_Type = 5 + FieldDescriptorProto_TYPE_FIXED64 FieldDescriptorProto_Type = 6 + FieldDescriptorProto_TYPE_FIXED32 FieldDescriptorProto_Type = 7 + FieldDescriptorProto_TYPE_BOOL FieldDescriptorProto_Type = 8 + FieldDescriptorProto_TYPE_STRING FieldDescriptorProto_Type = 9 + // Tag-delimited aggregate. + // Group type is deprecated and not supported in proto3. However, Proto3 + // implementations should still be able to parse the group wire format and + // treat group fields as unknown fields. + FieldDescriptorProto_TYPE_GROUP FieldDescriptorProto_Type = 10 + FieldDescriptorProto_TYPE_MESSAGE FieldDescriptorProto_Type = 11 + // New in version 2. + FieldDescriptorProto_TYPE_BYTES FieldDescriptorProto_Type = 12 + FieldDescriptorProto_TYPE_UINT32 FieldDescriptorProto_Type = 13 + FieldDescriptorProto_TYPE_ENUM FieldDescriptorProto_Type = 14 + FieldDescriptorProto_TYPE_SFIXED32 FieldDescriptorProto_Type = 15 + FieldDescriptorProto_TYPE_SFIXED64 FieldDescriptorProto_Type = 16 + FieldDescriptorProto_TYPE_SINT32 FieldDescriptorProto_Type = 17 + FieldDescriptorProto_TYPE_SINT64 FieldDescriptorProto_Type = 18 +) + +var FieldDescriptorProto_Type_name = map[int32]string{ + 1: "TYPE_DOUBLE", + 2: "TYPE_FLOAT", + 3: "TYPE_INT64", + 4: "TYPE_UINT64", + 5: "TYPE_INT32", + 6: "TYPE_FIXED64", + 7: "TYPE_FIXED32", + 8: "TYPE_BOOL", + 9: "TYPE_STRING", + 10: "TYPE_GROUP", + 11: "TYPE_MESSAGE", + 12: "TYPE_BYTES", + 13: "TYPE_UINT32", + 14: "TYPE_ENUM", + 15: "TYPE_SFIXED32", + 16: "TYPE_SFIXED64", + 17: "TYPE_SINT32", + 18: "TYPE_SINT64", +} +var FieldDescriptorProto_Type_value = map[string]int32{ + "TYPE_DOUBLE": 1, + "TYPE_FLOAT": 2, + "TYPE_INT64": 3, + "TYPE_UINT64": 4, + "TYPE_INT32": 5, + "TYPE_FIXED64": 6, + "TYPE_FIXED32": 7, + "TYPE_BOOL": 8, + "TYPE_STRING": 9, + "TYPE_GROUP": 10, + "TYPE_MESSAGE": 11, + "TYPE_BYTES": 12, + "TYPE_UINT32": 13, + "TYPE_ENUM": 14, + "TYPE_SFIXED32": 15, + "TYPE_SFIXED64": 16, + "TYPE_SINT32": 17, + "TYPE_SINT64": 18, +} + +func (x FieldDescriptorProto_Type) Enum() *FieldDescriptorProto_Type { + p := new(FieldDescriptorProto_Type) + *p = x + return p +} +func (x FieldDescriptorProto_Type) String() string { + return proto.EnumName(FieldDescriptorProto_Type_name, int32(x)) +} +func (x *FieldDescriptorProto_Type) UnmarshalJSON(data []byte) error { + value, err := proto.UnmarshalJSONEnum(FieldDescriptorProto_Type_value, data, "FieldDescriptorProto_Type") + if err != nil { + return err + } + *x = FieldDescriptorProto_Type(value) + return nil +} +func (FieldDescriptorProto_Type) EnumDescriptor() ([]byte, []int) { + return fileDescriptor_descriptor_9588782fb9cbecd6, []int{4, 0} +} + +type FieldDescriptorProto_Label int32 + +const ( + // 0 is reserved for errors + FieldDescriptorProto_LABEL_OPTIONAL FieldDescriptorProto_Label = 1 + FieldDescriptorProto_LABEL_REQUIRED FieldDescriptorProto_Label = 2 + FieldDescriptorProto_LABEL_REPEATED FieldDescriptorProto_Label = 3 +) + +var FieldDescriptorProto_Label_name = map[int32]string{ + 1: "LABEL_OPTIONAL", + 2: "LABEL_REQUIRED", + 3: "LABEL_REPEATED", +} +var FieldDescriptorProto_Label_value = map[string]int32{ + "LABEL_OPTIONAL": 1, + "LABEL_REQUIRED": 2, + "LABEL_REPEATED": 3, +} + +func (x FieldDescriptorProto_Label) Enum() *FieldDescriptorProto_Label { + p := new(FieldDescriptorProto_Label) + *p = x + return p +} +func (x FieldDescriptorProto_Label) String() string { + return proto.EnumName(FieldDescriptorProto_Label_name, int32(x)) +} +func (x *FieldDescriptorProto_Label) UnmarshalJSON(data []byte) error { + value, err := proto.UnmarshalJSONEnum(FieldDescriptorProto_Label_value, data, "FieldDescriptorProto_Label") + if err != nil { + return err + } + *x = FieldDescriptorProto_Label(value) + return nil +} +func (FieldDescriptorProto_Label) EnumDescriptor() ([]byte, []int) { + return fileDescriptor_descriptor_9588782fb9cbecd6, []int{4, 1} +} + +// Generated classes can be optimized for speed or code size. +type FileOptions_OptimizeMode int32 + +const ( + FileOptions_SPEED FileOptions_OptimizeMode = 1 + // etc. + FileOptions_CODE_SIZE FileOptions_OptimizeMode = 2 + FileOptions_LITE_RUNTIME FileOptions_OptimizeMode = 3 +) + +var FileOptions_OptimizeMode_name = map[int32]string{ + 1: "SPEED", + 2: "CODE_SIZE", + 3: "LITE_RUNTIME", +} +var FileOptions_OptimizeMode_value = map[string]int32{ + "SPEED": 1, + "CODE_SIZE": 2, + "LITE_RUNTIME": 3, +} + +func (x FileOptions_OptimizeMode) Enum() *FileOptions_OptimizeMode { + p := new(FileOptions_OptimizeMode) + *p = x + return p +} +func (x FileOptions_OptimizeMode) String() string { + return proto.EnumName(FileOptions_OptimizeMode_name, int32(x)) +} +func (x *FileOptions_OptimizeMode) UnmarshalJSON(data []byte) error { + value, err := proto.UnmarshalJSONEnum(FileOptions_OptimizeMode_value, data, "FileOptions_OptimizeMode") + if err != nil { + return err + } + *x = FileOptions_OptimizeMode(value) + return nil +} +func (FileOptions_OptimizeMode) EnumDescriptor() ([]byte, []int) { + return fileDescriptor_descriptor_9588782fb9cbecd6, []int{10, 0} +} + +type FieldOptions_CType int32 + +const ( + // Default mode. + FieldOptions_STRING FieldOptions_CType = 0 + FieldOptions_CORD FieldOptions_CType = 1 + FieldOptions_STRING_PIECE FieldOptions_CType = 2 +) + +var FieldOptions_CType_name = map[int32]string{ + 0: "STRING", + 1: "CORD", + 2: "STRING_PIECE", +} +var FieldOptions_CType_value = map[string]int32{ + "STRING": 0, + "CORD": 1, + "STRING_PIECE": 2, +} + +func (x FieldOptions_CType) Enum() *FieldOptions_CType { + p := new(FieldOptions_CType) + *p = x + return p +} +func (x FieldOptions_CType) String() string { + return proto.EnumName(FieldOptions_CType_name, int32(x)) +} +func (x *FieldOptions_CType) UnmarshalJSON(data []byte) error { + value, err := proto.UnmarshalJSONEnum(FieldOptions_CType_value, data, "FieldOptions_CType") + if err != nil { + return err + } + *x = FieldOptions_CType(value) + return nil +} +func (FieldOptions_CType) EnumDescriptor() ([]byte, []int) { + return fileDescriptor_descriptor_9588782fb9cbecd6, []int{12, 0} +} + +type FieldOptions_JSType int32 + +const ( + // Use the default type. + FieldOptions_JS_NORMAL FieldOptions_JSType = 0 + // Use JavaScript strings. + FieldOptions_JS_STRING FieldOptions_JSType = 1 + // Use JavaScript numbers. + FieldOptions_JS_NUMBER FieldOptions_JSType = 2 +) + +var FieldOptions_JSType_name = map[int32]string{ + 0: "JS_NORMAL", + 1: "JS_STRING", + 2: "JS_NUMBER", +} +var FieldOptions_JSType_value = map[string]int32{ + "JS_NORMAL": 0, + "JS_STRING": 1, + "JS_NUMBER": 2, +} + +func (x FieldOptions_JSType) Enum() *FieldOptions_JSType { + p := new(FieldOptions_JSType) + *p = x + return p +} +func (x FieldOptions_JSType) String() string { + return proto.EnumName(FieldOptions_JSType_name, int32(x)) +} +func (x *FieldOptions_JSType) UnmarshalJSON(data []byte) error { + value, err := proto.UnmarshalJSONEnum(FieldOptions_JSType_value, data, "FieldOptions_JSType") + if err != nil { + return err + } + *x = FieldOptions_JSType(value) + return nil +} +func (FieldOptions_JSType) EnumDescriptor() ([]byte, []int) { + return fileDescriptor_descriptor_9588782fb9cbecd6, []int{12, 1} +} + +// Is this method side-effect-free (or safe in HTTP parlance), or idempotent, +// or neither? HTTP based RPC implementation may choose GET verb for safe +// methods, and PUT verb for idempotent methods instead of the default POST. +type MethodOptions_IdempotencyLevel int32 + +const ( + MethodOptions_IDEMPOTENCY_UNKNOWN MethodOptions_IdempotencyLevel = 0 + MethodOptions_NO_SIDE_EFFECTS MethodOptions_IdempotencyLevel = 1 + MethodOptions_IDEMPOTENT MethodOptions_IdempotencyLevel = 2 +) + +var MethodOptions_IdempotencyLevel_name = map[int32]string{ + 0: "IDEMPOTENCY_UNKNOWN", + 1: "NO_SIDE_EFFECTS", + 2: "IDEMPOTENT", +} +var MethodOptions_IdempotencyLevel_value = map[string]int32{ + "IDEMPOTENCY_UNKNOWN": 0, + "NO_SIDE_EFFECTS": 1, + "IDEMPOTENT": 2, +} + +func (x MethodOptions_IdempotencyLevel) Enum() *MethodOptions_IdempotencyLevel { + p := new(MethodOptions_IdempotencyLevel) + *p = x + return p +} +func (x MethodOptions_IdempotencyLevel) String() string { + return proto.EnumName(MethodOptions_IdempotencyLevel_name, int32(x)) +} +func (x *MethodOptions_IdempotencyLevel) UnmarshalJSON(data []byte) error { + value, err := proto.UnmarshalJSONEnum(MethodOptions_IdempotencyLevel_value, data, "MethodOptions_IdempotencyLevel") + if err != nil { + return err + } + *x = MethodOptions_IdempotencyLevel(value) + return nil +} +func (MethodOptions_IdempotencyLevel) EnumDescriptor() ([]byte, []int) { + return fileDescriptor_descriptor_9588782fb9cbecd6, []int{17, 0} +} + +// The protocol compiler can output a FileDescriptorSet containing the .proto +// files it parses. +type FileDescriptorSet struct { + File []*FileDescriptorProto `protobuf:"bytes,1,rep,name=file" json:"file,omitempty"` + XXX_NoUnkeyedLiteral struct{} `json:"-"` + XXX_unrecognized []byte `json:"-"` + XXX_sizecache int32 `json:"-"` +} + +func (m *FileDescriptorSet) Reset() { *m = FileDescriptorSet{} } +func (m *FileDescriptorSet) String() string { return proto.CompactTextString(m) } +func (*FileDescriptorSet) ProtoMessage() {} +func (*FileDescriptorSet) Descriptor() ([]byte, []int) { + return fileDescriptor_descriptor_9588782fb9cbecd6, []int{0} +} +func (m *FileDescriptorSet) XXX_Unmarshal(b []byte) error { + return xxx_messageInfo_FileDescriptorSet.Unmarshal(m, b) +} +func (m *FileDescriptorSet) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { + return xxx_messageInfo_FileDescriptorSet.Marshal(b, m, deterministic) +} +func (dst *FileDescriptorSet) XXX_Merge(src proto.Message) { + xxx_messageInfo_FileDescriptorSet.Merge(dst, src) +} +func (m *FileDescriptorSet) XXX_Size() int { + return xxx_messageInfo_FileDescriptorSet.Size(m) +} +func (m *FileDescriptorSet) XXX_DiscardUnknown() { + xxx_messageInfo_FileDescriptorSet.DiscardUnknown(m) +} + +var xxx_messageInfo_FileDescriptorSet proto.InternalMessageInfo + +func (m *FileDescriptorSet) GetFile() []*FileDescriptorProto { + if m != nil { + return m.File + } + return nil +} + +// Describes a complete .proto file. +type FileDescriptorProto struct { + Name *string `protobuf:"bytes,1,opt,name=name" json:"name,omitempty"` + Package *string `protobuf:"bytes,2,opt,name=package" json:"package,omitempty"` + // Names of files imported by this file. + Dependency []string `protobuf:"bytes,3,rep,name=dependency" json:"dependency,omitempty"` + // Indexes of the public imported files in the dependency list above. + PublicDependency []int32 `protobuf:"varint,10,rep,name=public_dependency,json=publicDependency" json:"public_dependency,omitempty"` + // Indexes of the weak imported files in the dependency list. + // For Google-internal migration only. Do not use. + WeakDependency []int32 `protobuf:"varint,11,rep,name=weak_dependency,json=weakDependency" json:"weak_dependency,omitempty"` + // All top-level definitions in this file. + MessageType []*DescriptorProto `protobuf:"bytes,4,rep,name=message_type,json=messageType" json:"message_type,omitempty"` + EnumType []*EnumDescriptorProto `protobuf:"bytes,5,rep,name=enum_type,json=enumType" json:"enum_type,omitempty"` + Service []*ServiceDescriptorProto `protobuf:"bytes,6,rep,name=service" json:"service,omitempty"` + Extension []*FieldDescriptorProto `protobuf:"bytes,7,rep,name=extension" json:"extension,omitempty"` + Options *FileOptions `protobuf:"bytes,8,opt,name=options" json:"options,omitempty"` + // This field contains optional information about the original source code. + // You may safely remove this entire field without harming runtime + // functionality of the descriptors -- the information is needed only by + // development tools. + SourceCodeInfo *SourceCodeInfo `protobuf:"bytes,9,opt,name=source_code_info,json=sourceCodeInfo" json:"source_code_info,omitempty"` + // The syntax of the proto file. + // The supported values are "proto2" and "proto3". + Syntax *string `protobuf:"bytes,12,opt,name=syntax" json:"syntax,omitempty"` + XXX_NoUnkeyedLiteral struct{} `json:"-"` + XXX_unrecognized []byte `json:"-"` + XXX_sizecache int32 `json:"-"` +} + +func (m *FileDescriptorProto) Reset() { *m = FileDescriptorProto{} } +func (m *FileDescriptorProto) String() string { return proto.CompactTextString(m) } +func (*FileDescriptorProto) ProtoMessage() {} +func (*FileDescriptorProto) Descriptor() ([]byte, []int) { + return fileDescriptor_descriptor_9588782fb9cbecd6, []int{1} +} +func (m *FileDescriptorProto) XXX_Unmarshal(b []byte) error { + return xxx_messageInfo_FileDescriptorProto.Unmarshal(m, b) +} +func (m *FileDescriptorProto) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { + return xxx_messageInfo_FileDescriptorProto.Marshal(b, m, deterministic) +} +func (dst *FileDescriptorProto) XXX_Merge(src proto.Message) { + xxx_messageInfo_FileDescriptorProto.Merge(dst, src) +} +func (m *FileDescriptorProto) XXX_Size() int { + return xxx_messageInfo_FileDescriptorProto.Size(m) +} +func (m *FileDescriptorProto) XXX_DiscardUnknown() { + xxx_messageInfo_FileDescriptorProto.DiscardUnknown(m) +} + +var xxx_messageInfo_FileDescriptorProto proto.InternalMessageInfo + +func (m *FileDescriptorProto) GetName() string { + if m != nil && m.Name != nil { + return *m.Name + } + return "" +} + +func (m *FileDescriptorProto) GetPackage() string { + if m != nil && m.Package != nil { + return *m.Package + } + return "" +} + +func (m *FileDescriptorProto) GetDependency() []string { + if m != nil { + return m.Dependency + } + return nil +} + +func (m *FileDescriptorProto) GetPublicDependency() []int32 { + if m != nil { + return m.PublicDependency + } + return nil +} + +func (m *FileDescriptorProto) GetWeakDependency() []int32 { + if m != nil { + return m.WeakDependency + } + return nil +} + +func (m *FileDescriptorProto) GetMessageType() []*DescriptorProto { + if m != nil { + return m.MessageType + } + return nil +} + +func (m *FileDescriptorProto) GetEnumType() []*EnumDescriptorProto { + if m != nil { + return m.EnumType + } + return nil +} + +func (m *FileDescriptorProto) GetService() []*ServiceDescriptorProto { + if m != nil { + return m.Service + } + return nil +} + +func (m *FileDescriptorProto) GetExtension() []*FieldDescriptorProto { + if m != nil { + return m.Extension + } + return nil +} + +func (m *FileDescriptorProto) GetOptions() *FileOptions { + if m != nil { + return m.Options + } + return nil +} + +func (m *FileDescriptorProto) GetSourceCodeInfo() *SourceCodeInfo { + if m != nil { + return m.SourceCodeInfo + } + return nil +} + +func (m *FileDescriptorProto) GetSyntax() string { + if m != nil && m.Syntax != nil { + return *m.Syntax + } + return "" +} + +// Describes a message type. +type DescriptorProto struct { + Name *string `protobuf:"bytes,1,opt,name=name" json:"name,omitempty"` + Field []*FieldDescriptorProto `protobuf:"bytes,2,rep,name=field" json:"field,omitempty"` + Extension []*FieldDescriptorProto `protobuf:"bytes,6,rep,name=extension" json:"extension,omitempty"` + NestedType []*DescriptorProto `protobuf:"bytes,3,rep,name=nested_type,json=nestedType" json:"nested_type,omitempty"` + EnumType []*EnumDescriptorProto `protobuf:"bytes,4,rep,name=enum_type,json=enumType" json:"enum_type,omitempty"` + ExtensionRange []*DescriptorProto_ExtensionRange `protobuf:"bytes,5,rep,name=extension_range,json=extensionRange" json:"extension_range,omitempty"` + OneofDecl []*OneofDescriptorProto `protobuf:"bytes,8,rep,name=oneof_decl,json=oneofDecl" json:"oneof_decl,omitempty"` + Options *MessageOptions `protobuf:"bytes,7,opt,name=options" json:"options,omitempty"` + ReservedRange []*DescriptorProto_ReservedRange `protobuf:"bytes,9,rep,name=reserved_range,json=reservedRange" json:"reserved_range,omitempty"` + // Reserved field names, which may not be used by fields in the same message. + // A given name may only be reserved once. + ReservedName []string `protobuf:"bytes,10,rep,name=reserved_name,json=reservedName" json:"reserved_name,omitempty"` + XXX_NoUnkeyedLiteral struct{} `json:"-"` + XXX_unrecognized []byte `json:"-"` + XXX_sizecache int32 `json:"-"` +} + +func (m *DescriptorProto) Reset() { *m = DescriptorProto{} } +func (m *DescriptorProto) String() string { return proto.CompactTextString(m) } +func (*DescriptorProto) ProtoMessage() {} +func (*DescriptorProto) Descriptor() ([]byte, []int) { + return fileDescriptor_descriptor_9588782fb9cbecd6, []int{2} +} +func (m *DescriptorProto) XXX_Unmarshal(b []byte) error { + return xxx_messageInfo_DescriptorProto.Unmarshal(m, b) +} +func (m *DescriptorProto) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { + return xxx_messageInfo_DescriptorProto.Marshal(b, m, deterministic) +} +func (dst *DescriptorProto) XXX_Merge(src proto.Message) { + xxx_messageInfo_DescriptorProto.Merge(dst, src) +} +func (m *DescriptorProto) XXX_Size() int { + return xxx_messageInfo_DescriptorProto.Size(m) +} +func (m *DescriptorProto) XXX_DiscardUnknown() { + xxx_messageInfo_DescriptorProto.DiscardUnknown(m) +} + +var xxx_messageInfo_DescriptorProto proto.InternalMessageInfo + +func (m *DescriptorProto) GetName() string { + if m != nil && m.Name != nil { + return *m.Name + } + return "" +} + +func (m *DescriptorProto) GetField() []*FieldDescriptorProto { + if m != nil { + return m.Field + } + return nil +} + +func (m *DescriptorProto) GetExtension() []*FieldDescriptorProto { + if m != nil { + return m.Extension + } + return nil +} + +func (m *DescriptorProto) GetNestedType() []*DescriptorProto { + if m != nil { + return m.NestedType + } + return nil +} + +func (m *DescriptorProto) GetEnumType() []*EnumDescriptorProto { + if m != nil { + return m.EnumType + } + return nil +} + +func (m *DescriptorProto) GetExtensionRange() []*DescriptorProto_ExtensionRange { + if m != nil { + return m.ExtensionRange + } + return nil +} + +func (m *DescriptorProto) GetOneofDecl() []*OneofDescriptorProto { + if m != nil { + return m.OneofDecl + } + return nil +} + +func (m *DescriptorProto) GetOptions() *MessageOptions { + if m != nil { + return m.Options + } + return nil +} + +func (m *DescriptorProto) GetReservedRange() []*DescriptorProto_ReservedRange { + if m != nil { + return m.ReservedRange + } + return nil +} + +func (m *DescriptorProto) GetReservedName() []string { + if m != nil { + return m.ReservedName + } + return nil +} + +type DescriptorProto_ExtensionRange struct { + Start *int32 `protobuf:"varint,1,opt,name=start" json:"start,omitempty"` + End *int32 `protobuf:"varint,2,opt,name=end" json:"end,omitempty"` + Options *ExtensionRangeOptions `protobuf:"bytes,3,opt,name=options" json:"options,omitempty"` + XXX_NoUnkeyedLiteral struct{} `json:"-"` + XXX_unrecognized []byte `json:"-"` + XXX_sizecache int32 `json:"-"` +} + +func (m *DescriptorProto_ExtensionRange) Reset() { *m = DescriptorProto_ExtensionRange{} } +func (m *DescriptorProto_ExtensionRange) String() string { return proto.CompactTextString(m) } +func (*DescriptorProto_ExtensionRange) ProtoMessage() {} +func (*DescriptorProto_ExtensionRange) Descriptor() ([]byte, []int) { + return fileDescriptor_descriptor_9588782fb9cbecd6, []int{2, 0} +} +func (m *DescriptorProto_ExtensionRange) XXX_Unmarshal(b []byte) error { + return xxx_messageInfo_DescriptorProto_ExtensionRange.Unmarshal(m, b) +} +func (m *DescriptorProto_ExtensionRange) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { + return xxx_messageInfo_DescriptorProto_ExtensionRange.Marshal(b, m, deterministic) +} +func (dst *DescriptorProto_ExtensionRange) XXX_Merge(src proto.Message) { + xxx_messageInfo_DescriptorProto_ExtensionRange.Merge(dst, src) +} +func (m *DescriptorProto_ExtensionRange) XXX_Size() int { + return xxx_messageInfo_DescriptorProto_ExtensionRange.Size(m) +} +func (m *DescriptorProto_ExtensionRange) XXX_DiscardUnknown() { + xxx_messageInfo_DescriptorProto_ExtensionRange.DiscardUnknown(m) +} + +var xxx_messageInfo_DescriptorProto_ExtensionRange proto.InternalMessageInfo + +func (m *DescriptorProto_ExtensionRange) GetStart() int32 { + if m != nil && m.Start != nil { + return *m.Start + } + return 0 +} + +func (m *DescriptorProto_ExtensionRange) GetEnd() int32 { + if m != nil && m.End != nil { + return *m.End + } + return 0 +} + +func (m *DescriptorProto_ExtensionRange) GetOptions() *ExtensionRangeOptions { + if m != nil { + return m.Options + } + return nil +} + +// Range of reserved tag numbers. Reserved tag numbers may not be used by +// fields or extension ranges in the same message. Reserved ranges may +// not overlap. +type DescriptorProto_ReservedRange struct { + Start *int32 `protobuf:"varint,1,opt,name=start" json:"start,omitempty"` + End *int32 `protobuf:"varint,2,opt,name=end" json:"end,omitempty"` + XXX_NoUnkeyedLiteral struct{} `json:"-"` + XXX_unrecognized []byte `json:"-"` + XXX_sizecache int32 `json:"-"` +} + +func (m *DescriptorProto_ReservedRange) Reset() { *m = DescriptorProto_ReservedRange{} } +func (m *DescriptorProto_ReservedRange) String() string { return proto.CompactTextString(m) } +func (*DescriptorProto_ReservedRange) ProtoMessage() {} +func (*DescriptorProto_ReservedRange) Descriptor() ([]byte, []int) { + return fileDescriptor_descriptor_9588782fb9cbecd6, []int{2, 1} +} +func (m *DescriptorProto_ReservedRange) XXX_Unmarshal(b []byte) error { + return xxx_messageInfo_DescriptorProto_ReservedRange.Unmarshal(m, b) +} +func (m *DescriptorProto_ReservedRange) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { + return xxx_messageInfo_DescriptorProto_ReservedRange.Marshal(b, m, deterministic) +} +func (dst *DescriptorProto_ReservedRange) XXX_Merge(src proto.Message) { + xxx_messageInfo_DescriptorProto_ReservedRange.Merge(dst, src) +} +func (m *DescriptorProto_ReservedRange) XXX_Size() int { + return xxx_messageInfo_DescriptorProto_ReservedRange.Size(m) +} +func (m *DescriptorProto_ReservedRange) XXX_DiscardUnknown() { + xxx_messageInfo_DescriptorProto_ReservedRange.DiscardUnknown(m) +} + +var xxx_messageInfo_DescriptorProto_ReservedRange proto.InternalMessageInfo + +func (m *DescriptorProto_ReservedRange) GetStart() int32 { + if m != nil && m.Start != nil { + return *m.Start + } + return 0 +} + +func (m *DescriptorProto_ReservedRange) GetEnd() int32 { + if m != nil && m.End != nil { + return *m.End + } + return 0 +} + +type ExtensionRangeOptions struct { + // The parser stores options it doesn't recognize here. See above. + UninterpretedOption []*UninterpretedOption `protobuf:"bytes,999,rep,name=uninterpreted_option,json=uninterpretedOption" json:"uninterpreted_option,omitempty"` + XXX_NoUnkeyedLiteral struct{} `json:"-"` + proto.XXX_InternalExtensions `json:"-"` + XXX_unrecognized []byte `json:"-"` + XXX_sizecache int32 `json:"-"` +} + +func (m *ExtensionRangeOptions) Reset() { *m = ExtensionRangeOptions{} } +func (m *ExtensionRangeOptions) String() string { return proto.CompactTextString(m) } +func (*ExtensionRangeOptions) ProtoMessage() {} +func (*ExtensionRangeOptions) Descriptor() ([]byte, []int) { + return fileDescriptor_descriptor_9588782fb9cbecd6, []int{3} +} + +var extRange_ExtensionRangeOptions = []proto.ExtensionRange{ + {Start: 1000, End: 536870911}, +} + +func (*ExtensionRangeOptions) ExtensionRangeArray() []proto.ExtensionRange { + return extRange_ExtensionRangeOptions +} +func (m *ExtensionRangeOptions) XXX_Unmarshal(b []byte) error { + return xxx_messageInfo_ExtensionRangeOptions.Unmarshal(m, b) +} +func (m *ExtensionRangeOptions) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { + return xxx_messageInfo_ExtensionRangeOptions.Marshal(b, m, deterministic) +} +func (dst *ExtensionRangeOptions) XXX_Merge(src proto.Message) { + xxx_messageInfo_ExtensionRangeOptions.Merge(dst, src) +} +func (m *ExtensionRangeOptions) XXX_Size() int { + return xxx_messageInfo_ExtensionRangeOptions.Size(m) +} +func (m *ExtensionRangeOptions) XXX_DiscardUnknown() { + xxx_messageInfo_ExtensionRangeOptions.DiscardUnknown(m) +} + +var xxx_messageInfo_ExtensionRangeOptions proto.InternalMessageInfo + +func (m *ExtensionRangeOptions) GetUninterpretedOption() []*UninterpretedOption { + if m != nil { + return m.UninterpretedOption + } + return nil +} + +// Describes a field within a message. +type FieldDescriptorProto struct { + Name *string `protobuf:"bytes,1,opt,name=name" json:"name,omitempty"` + Number *int32 `protobuf:"varint,3,opt,name=number" json:"number,omitempty"` + Label *FieldDescriptorProto_Label `protobuf:"varint,4,opt,name=label,enum=google.protobuf.FieldDescriptorProto_Label" json:"label,omitempty"` + // If type_name is set, this need not be set. If both this and type_name + // are set, this must be one of TYPE_ENUM, TYPE_MESSAGE or TYPE_GROUP. + Type *FieldDescriptorProto_Type `protobuf:"varint,5,opt,name=type,enum=google.protobuf.FieldDescriptorProto_Type" json:"type,omitempty"` + // For message and enum types, this is the name of the type. If the name + // starts with a '.', it is fully-qualified. Otherwise, C++-like scoping + // rules are used to find the type (i.e. first the nested types within this + // message are searched, then within the parent, on up to the root + // namespace). + TypeName *string `protobuf:"bytes,6,opt,name=type_name,json=typeName" json:"type_name,omitempty"` + // For extensions, this is the name of the type being extended. It is + // resolved in the same manner as type_name. + Extendee *string `protobuf:"bytes,2,opt,name=extendee" json:"extendee,omitempty"` + // For numeric types, contains the original text representation of the value. + // For booleans, "true" or "false". + // For strings, contains the default text contents (not escaped in any way). + // For bytes, contains the C escaped value. All bytes >= 128 are escaped. + // TODO(kenton): Base-64 encode? + DefaultValue *string `protobuf:"bytes,7,opt,name=default_value,json=defaultValue" json:"default_value,omitempty"` + // If set, gives the index of a oneof in the containing type's oneof_decl + // list. This field is a member of that oneof. + OneofIndex *int32 `protobuf:"varint,9,opt,name=oneof_index,json=oneofIndex" json:"oneof_index,omitempty"` + // JSON name of this field. The value is set by protocol compiler. If the + // user has set a "json_name" option on this field, that option's value + // will be used. Otherwise, it's deduced from the field's name by converting + // it to camelCase. + JsonName *string `protobuf:"bytes,10,opt,name=json_name,json=jsonName" json:"json_name,omitempty"` + Options *FieldOptions `protobuf:"bytes,8,opt,name=options" json:"options,omitempty"` + XXX_NoUnkeyedLiteral struct{} `json:"-"` + XXX_unrecognized []byte `json:"-"` + XXX_sizecache int32 `json:"-"` +} + +func (m *FieldDescriptorProto) Reset() { *m = FieldDescriptorProto{} } +func (m *FieldDescriptorProto) String() string { return proto.CompactTextString(m) } +func (*FieldDescriptorProto) ProtoMessage() {} +func (*FieldDescriptorProto) Descriptor() ([]byte, []int) { + return fileDescriptor_descriptor_9588782fb9cbecd6, []int{4} +} +func (m *FieldDescriptorProto) XXX_Unmarshal(b []byte) error { + return xxx_messageInfo_FieldDescriptorProto.Unmarshal(m, b) +} +func (m *FieldDescriptorProto) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { + return xxx_messageInfo_FieldDescriptorProto.Marshal(b, m, deterministic) +} +func (dst *FieldDescriptorProto) XXX_Merge(src proto.Message) { + xxx_messageInfo_FieldDescriptorProto.Merge(dst, src) +} +func (m *FieldDescriptorProto) XXX_Size() int { + return xxx_messageInfo_FieldDescriptorProto.Size(m) +} +func (m *FieldDescriptorProto) XXX_DiscardUnknown() { + xxx_messageInfo_FieldDescriptorProto.DiscardUnknown(m) +} + +var xxx_messageInfo_FieldDescriptorProto proto.InternalMessageInfo + +func (m *FieldDescriptorProto) GetName() string { + if m != nil && m.Name != nil { + return *m.Name + } + return "" +} + +func (m *FieldDescriptorProto) GetNumber() int32 { + if m != nil && m.Number != nil { + return *m.Number + } + return 0 +} + +func (m *FieldDescriptorProto) GetLabel() FieldDescriptorProto_Label { + if m != nil && m.Label != nil { + return *m.Label + } + return FieldDescriptorProto_LABEL_OPTIONAL +} + +func (m *FieldDescriptorProto) GetType() FieldDescriptorProto_Type { + if m != nil && m.Type != nil { + return *m.Type + } + return FieldDescriptorProto_TYPE_DOUBLE +} + +func (m *FieldDescriptorProto) GetTypeName() string { + if m != nil && m.TypeName != nil { + return *m.TypeName + } + return "" +} + +func (m *FieldDescriptorProto) GetExtendee() string { + if m != nil && m.Extendee != nil { + return *m.Extendee + } + return "" +} + +func (m *FieldDescriptorProto) GetDefaultValue() string { + if m != nil && m.DefaultValue != nil { + return *m.DefaultValue + } + return "" +} + +func (m *FieldDescriptorProto) GetOneofIndex() int32 { + if m != nil && m.OneofIndex != nil { + return *m.OneofIndex + } + return 0 +} + +func (m *FieldDescriptorProto) GetJsonName() string { + if m != nil && m.JsonName != nil { + return *m.JsonName + } + return "" +} + +func (m *FieldDescriptorProto) GetOptions() *FieldOptions { + if m != nil { + return m.Options + } + return nil +} + +// Describes a oneof. +type OneofDescriptorProto struct { + Name *string `protobuf:"bytes,1,opt,name=name" json:"name,omitempty"` + Options *OneofOptions `protobuf:"bytes,2,opt,name=options" json:"options,omitempty"` + XXX_NoUnkeyedLiteral struct{} `json:"-"` + XXX_unrecognized []byte `json:"-"` + XXX_sizecache int32 `json:"-"` +} + +func (m *OneofDescriptorProto) Reset() { *m = OneofDescriptorProto{} } +func (m *OneofDescriptorProto) String() string { return proto.CompactTextString(m) } +func (*OneofDescriptorProto) ProtoMessage() {} +func (*OneofDescriptorProto) Descriptor() ([]byte, []int) { + return fileDescriptor_descriptor_9588782fb9cbecd6, []int{5} +} +func (m *OneofDescriptorProto) XXX_Unmarshal(b []byte) error { + return xxx_messageInfo_OneofDescriptorProto.Unmarshal(m, b) +} +func (m *OneofDescriptorProto) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { + return xxx_messageInfo_OneofDescriptorProto.Marshal(b, m, deterministic) +} +func (dst *OneofDescriptorProto) XXX_Merge(src proto.Message) { + xxx_messageInfo_OneofDescriptorProto.Merge(dst, src) +} +func (m *OneofDescriptorProto) XXX_Size() int { + return xxx_messageInfo_OneofDescriptorProto.Size(m) +} +func (m *OneofDescriptorProto) XXX_DiscardUnknown() { + xxx_messageInfo_OneofDescriptorProto.DiscardUnknown(m) +} + +var xxx_messageInfo_OneofDescriptorProto proto.InternalMessageInfo + +func (m *OneofDescriptorProto) GetName() string { + if m != nil && m.Name != nil { + return *m.Name + } + return "" +} + +func (m *OneofDescriptorProto) GetOptions() *OneofOptions { + if m != nil { + return m.Options + } + return nil +} + +// Describes an enum type. +type EnumDescriptorProto struct { + Name *string `protobuf:"bytes,1,opt,name=name" json:"name,omitempty"` + Value []*EnumValueDescriptorProto `protobuf:"bytes,2,rep,name=value" json:"value,omitempty"` + Options *EnumOptions `protobuf:"bytes,3,opt,name=options" json:"options,omitempty"` + // Range of reserved numeric values. Reserved numeric values may not be used + // by enum values in the same enum declaration. Reserved ranges may not + // overlap. + ReservedRange []*EnumDescriptorProto_EnumReservedRange `protobuf:"bytes,4,rep,name=reserved_range,json=reservedRange" json:"reserved_range,omitempty"` + // Reserved enum value names, which may not be reused. A given name may only + // be reserved once. + ReservedName []string `protobuf:"bytes,5,rep,name=reserved_name,json=reservedName" json:"reserved_name,omitempty"` + XXX_NoUnkeyedLiteral struct{} `json:"-"` + XXX_unrecognized []byte `json:"-"` + XXX_sizecache int32 `json:"-"` +} + +func (m *EnumDescriptorProto) Reset() { *m = EnumDescriptorProto{} } +func (m *EnumDescriptorProto) String() string { return proto.CompactTextString(m) } +func (*EnumDescriptorProto) ProtoMessage() {} +func (*EnumDescriptorProto) Descriptor() ([]byte, []int) { + return fileDescriptor_descriptor_9588782fb9cbecd6, []int{6} +} +func (m *EnumDescriptorProto) XXX_Unmarshal(b []byte) error { + return xxx_messageInfo_EnumDescriptorProto.Unmarshal(m, b) +} +func (m *EnumDescriptorProto) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { + return xxx_messageInfo_EnumDescriptorProto.Marshal(b, m, deterministic) +} +func (dst *EnumDescriptorProto) XXX_Merge(src proto.Message) { + xxx_messageInfo_EnumDescriptorProto.Merge(dst, src) +} +func (m *EnumDescriptorProto) XXX_Size() int { + return xxx_messageInfo_EnumDescriptorProto.Size(m) +} +func (m *EnumDescriptorProto) XXX_DiscardUnknown() { + xxx_messageInfo_EnumDescriptorProto.DiscardUnknown(m) +} + +var xxx_messageInfo_EnumDescriptorProto proto.InternalMessageInfo + +func (m *EnumDescriptorProto) GetName() string { + if m != nil && m.Name != nil { + return *m.Name + } + return "" +} + +func (m *EnumDescriptorProto) GetValue() []*EnumValueDescriptorProto { + if m != nil { + return m.Value + } + return nil +} + +func (m *EnumDescriptorProto) GetOptions() *EnumOptions { + if m != nil { + return m.Options + } + return nil +} + +func (m *EnumDescriptorProto) GetReservedRange() []*EnumDescriptorProto_EnumReservedRange { + if m != nil { + return m.ReservedRange + } + return nil +} + +func (m *EnumDescriptorProto) GetReservedName() []string { + if m != nil { + return m.ReservedName + } + return nil +} + +// Range of reserved numeric values. Reserved values may not be used by +// entries in the same enum. Reserved ranges may not overlap. +// +// Note that this is distinct from DescriptorProto.ReservedRange in that it +// is inclusive such that it can appropriately represent the entire int32 +// domain. +type EnumDescriptorProto_EnumReservedRange struct { + Start *int32 `protobuf:"varint,1,opt,name=start" json:"start,omitempty"` + End *int32 `protobuf:"varint,2,opt,name=end" json:"end,omitempty"` + XXX_NoUnkeyedLiteral struct{} `json:"-"` + XXX_unrecognized []byte `json:"-"` + XXX_sizecache int32 `json:"-"` +} + +func (m *EnumDescriptorProto_EnumReservedRange) Reset() { *m = EnumDescriptorProto_EnumReservedRange{} } +func (m *EnumDescriptorProto_EnumReservedRange) String() string { return proto.CompactTextString(m) } +func (*EnumDescriptorProto_EnumReservedRange) ProtoMessage() {} +func (*EnumDescriptorProto_EnumReservedRange) Descriptor() ([]byte, []int) { + return fileDescriptor_descriptor_9588782fb9cbecd6, []int{6, 0} +} +func (m *EnumDescriptorProto_EnumReservedRange) XXX_Unmarshal(b []byte) error { + return xxx_messageInfo_EnumDescriptorProto_EnumReservedRange.Unmarshal(m, b) +} +func (m *EnumDescriptorProto_EnumReservedRange) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { + return xxx_messageInfo_EnumDescriptorProto_EnumReservedRange.Marshal(b, m, deterministic) +} +func (dst *EnumDescriptorProto_EnumReservedRange) XXX_Merge(src proto.Message) { + xxx_messageInfo_EnumDescriptorProto_EnumReservedRange.Merge(dst, src) +} +func (m *EnumDescriptorProto_EnumReservedRange) XXX_Size() int { + return xxx_messageInfo_EnumDescriptorProto_EnumReservedRange.Size(m) +} +func (m *EnumDescriptorProto_EnumReservedRange) XXX_DiscardUnknown() { + xxx_messageInfo_EnumDescriptorProto_EnumReservedRange.DiscardUnknown(m) +} + +var xxx_messageInfo_EnumDescriptorProto_EnumReservedRange proto.InternalMessageInfo + +func (m *EnumDescriptorProto_EnumReservedRange) GetStart() int32 { + if m != nil && m.Start != nil { + return *m.Start + } + return 0 +} + +func (m *EnumDescriptorProto_EnumReservedRange) GetEnd() int32 { + if m != nil && m.End != nil { + return *m.End + } + return 0 +} + +// Describes a value within an enum. +type EnumValueDescriptorProto struct { + Name *string `protobuf:"bytes,1,opt,name=name" json:"name,omitempty"` + Number *int32 `protobuf:"varint,2,opt,name=number" json:"number,omitempty"` + Options *EnumValueOptions `protobuf:"bytes,3,opt,name=options" json:"options,omitempty"` + XXX_NoUnkeyedLiteral struct{} `json:"-"` + XXX_unrecognized []byte `json:"-"` + XXX_sizecache int32 `json:"-"` +} + +func (m *EnumValueDescriptorProto) Reset() { *m = EnumValueDescriptorProto{} } +func (m *EnumValueDescriptorProto) String() string { return proto.CompactTextString(m) } +func (*EnumValueDescriptorProto) ProtoMessage() {} +func (*EnumValueDescriptorProto) Descriptor() ([]byte, []int) { + return fileDescriptor_descriptor_9588782fb9cbecd6, []int{7} +} +func (m *EnumValueDescriptorProto) XXX_Unmarshal(b []byte) error { + return xxx_messageInfo_EnumValueDescriptorProto.Unmarshal(m, b) +} +func (m *EnumValueDescriptorProto) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { + return xxx_messageInfo_EnumValueDescriptorProto.Marshal(b, m, deterministic) +} +func (dst *EnumValueDescriptorProto) XXX_Merge(src proto.Message) { + xxx_messageInfo_EnumValueDescriptorProto.Merge(dst, src) +} +func (m *EnumValueDescriptorProto) XXX_Size() int { + return xxx_messageInfo_EnumValueDescriptorProto.Size(m) +} +func (m *EnumValueDescriptorProto) XXX_DiscardUnknown() { + xxx_messageInfo_EnumValueDescriptorProto.DiscardUnknown(m) +} + +var xxx_messageInfo_EnumValueDescriptorProto proto.InternalMessageInfo + +func (m *EnumValueDescriptorProto) GetName() string { + if m != nil && m.Name != nil { + return *m.Name + } + return "" +} + +func (m *EnumValueDescriptorProto) GetNumber() int32 { + if m != nil && m.Number != nil { + return *m.Number + } + return 0 +} + +func (m *EnumValueDescriptorProto) GetOptions() *EnumValueOptions { + if m != nil { + return m.Options + } + return nil +} + +// Describes a service. +type ServiceDescriptorProto struct { + Name *string `protobuf:"bytes,1,opt,name=name" json:"name,omitempty"` + Method []*MethodDescriptorProto `protobuf:"bytes,2,rep,name=method" json:"method,omitempty"` + Options *ServiceOptions `protobuf:"bytes,3,opt,name=options" json:"options,omitempty"` + XXX_NoUnkeyedLiteral struct{} `json:"-"` + XXX_unrecognized []byte `json:"-"` + XXX_sizecache int32 `json:"-"` +} + +func (m *ServiceDescriptorProto) Reset() { *m = ServiceDescriptorProto{} } +func (m *ServiceDescriptorProto) String() string { return proto.CompactTextString(m) } +func (*ServiceDescriptorProto) ProtoMessage() {} +func (*ServiceDescriptorProto) Descriptor() ([]byte, []int) { + return fileDescriptor_descriptor_9588782fb9cbecd6, []int{8} +} +func (m *ServiceDescriptorProto) XXX_Unmarshal(b []byte) error { + return xxx_messageInfo_ServiceDescriptorProto.Unmarshal(m, b) +} +func (m *ServiceDescriptorProto) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { + return xxx_messageInfo_ServiceDescriptorProto.Marshal(b, m, deterministic) +} +func (dst *ServiceDescriptorProto) XXX_Merge(src proto.Message) { + xxx_messageInfo_ServiceDescriptorProto.Merge(dst, src) +} +func (m *ServiceDescriptorProto) XXX_Size() int { + return xxx_messageInfo_ServiceDescriptorProto.Size(m) +} +func (m *ServiceDescriptorProto) XXX_DiscardUnknown() { + xxx_messageInfo_ServiceDescriptorProto.DiscardUnknown(m) +} + +var xxx_messageInfo_ServiceDescriptorProto proto.InternalMessageInfo + +func (m *ServiceDescriptorProto) GetName() string { + if m != nil && m.Name != nil { + return *m.Name + } + return "" +} + +func (m *ServiceDescriptorProto) GetMethod() []*MethodDescriptorProto { + if m != nil { + return m.Method + } + return nil +} + +func (m *ServiceDescriptorProto) GetOptions() *ServiceOptions { + if m != nil { + return m.Options + } + return nil +} + +// Describes a method of a service. +type MethodDescriptorProto struct { + Name *string `protobuf:"bytes,1,opt,name=name" json:"name,omitempty"` + // Input and output type names. These are resolved in the same way as + // FieldDescriptorProto.type_name, but must refer to a message type. + InputType *string `protobuf:"bytes,2,opt,name=input_type,json=inputType" json:"input_type,omitempty"` + OutputType *string `protobuf:"bytes,3,opt,name=output_type,json=outputType" json:"output_type,omitempty"` + Options *MethodOptions `protobuf:"bytes,4,opt,name=options" json:"options,omitempty"` + // Identifies if client streams multiple client messages + ClientStreaming *bool `protobuf:"varint,5,opt,name=client_streaming,json=clientStreaming,def=0" json:"client_streaming,omitempty"` + // Identifies if server streams multiple server messages + ServerStreaming *bool `protobuf:"varint,6,opt,name=server_streaming,json=serverStreaming,def=0" json:"server_streaming,omitempty"` + XXX_NoUnkeyedLiteral struct{} `json:"-"` + XXX_unrecognized []byte `json:"-"` + XXX_sizecache int32 `json:"-"` +} + +func (m *MethodDescriptorProto) Reset() { *m = MethodDescriptorProto{} } +func (m *MethodDescriptorProto) String() string { return proto.CompactTextString(m) } +func (*MethodDescriptorProto) ProtoMessage() {} +func (*MethodDescriptorProto) Descriptor() ([]byte, []int) { + return fileDescriptor_descriptor_9588782fb9cbecd6, []int{9} +} +func (m *MethodDescriptorProto) XXX_Unmarshal(b []byte) error { + return xxx_messageInfo_MethodDescriptorProto.Unmarshal(m, b) +} +func (m *MethodDescriptorProto) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { + return xxx_messageInfo_MethodDescriptorProto.Marshal(b, m, deterministic) +} +func (dst *MethodDescriptorProto) XXX_Merge(src proto.Message) { + xxx_messageInfo_MethodDescriptorProto.Merge(dst, src) +} +func (m *MethodDescriptorProto) XXX_Size() int { + return xxx_messageInfo_MethodDescriptorProto.Size(m) +} +func (m *MethodDescriptorProto) XXX_DiscardUnknown() { + xxx_messageInfo_MethodDescriptorProto.DiscardUnknown(m) +} + +var xxx_messageInfo_MethodDescriptorProto proto.InternalMessageInfo + +const Default_MethodDescriptorProto_ClientStreaming bool = false +const Default_MethodDescriptorProto_ServerStreaming bool = false + +func (m *MethodDescriptorProto) GetName() string { + if m != nil && m.Name != nil { + return *m.Name + } + return "" +} + +func (m *MethodDescriptorProto) GetInputType() string { + if m != nil && m.InputType != nil { + return *m.InputType + } + return "" +} + +func (m *MethodDescriptorProto) GetOutputType() string { + if m != nil && m.OutputType != nil { + return *m.OutputType + } + return "" +} + +func (m *MethodDescriptorProto) GetOptions() *MethodOptions { + if m != nil { + return m.Options + } + return nil +} + +func (m *MethodDescriptorProto) GetClientStreaming() bool { + if m != nil && m.ClientStreaming != nil { + return *m.ClientStreaming + } + return Default_MethodDescriptorProto_ClientStreaming +} + +func (m *MethodDescriptorProto) GetServerStreaming() bool { + if m != nil && m.ServerStreaming != nil { + return *m.ServerStreaming + } + return Default_MethodDescriptorProto_ServerStreaming +} + +type FileOptions struct { + // Sets the Java package where classes generated from this .proto will be + // placed. By default, the proto package is used, but this is often + // inappropriate because proto packages do not normally start with backwards + // domain names. + JavaPackage *string `protobuf:"bytes,1,opt,name=java_package,json=javaPackage" json:"java_package,omitempty"` + // If set, all the classes from the .proto file are wrapped in a single + // outer class with the given name. This applies to both Proto1 + // (equivalent to the old "--one_java_file" option) and Proto2 (where + // a .proto always translates to a single class, but you may want to + // explicitly choose the class name). + JavaOuterClassname *string `protobuf:"bytes,8,opt,name=java_outer_classname,json=javaOuterClassname" json:"java_outer_classname,omitempty"` + // If set true, then the Java code generator will generate a separate .java + // file for each top-level message, enum, and service defined in the .proto + // file. Thus, these types will *not* be nested inside the outer class + // named by java_outer_classname. However, the outer class will still be + // generated to contain the file's getDescriptor() method as well as any + // top-level extensions defined in the file. + JavaMultipleFiles *bool `protobuf:"varint,10,opt,name=java_multiple_files,json=javaMultipleFiles,def=0" json:"java_multiple_files,omitempty"` + // This option does nothing. + JavaGenerateEqualsAndHash *bool `protobuf:"varint,20,opt,name=java_generate_equals_and_hash,json=javaGenerateEqualsAndHash" json:"java_generate_equals_and_hash,omitempty"` // Deprecated: Do not use. + // If set true, then the Java2 code generator will generate code that + // throws an exception whenever an attempt is made to assign a non-UTF-8 + // byte sequence to a string field. + // Message reflection will do the same. + // However, an extension field still accepts non-UTF-8 byte sequences. + // This option has no effect on when used with the lite runtime. + JavaStringCheckUtf8 *bool `protobuf:"varint,27,opt,name=java_string_check_utf8,json=javaStringCheckUtf8,def=0" json:"java_string_check_utf8,omitempty"` + OptimizeFor *FileOptions_OptimizeMode `protobuf:"varint,9,opt,name=optimize_for,json=optimizeFor,enum=google.protobuf.FileOptions_OptimizeMode,def=1" json:"optimize_for,omitempty"` + // Sets the Go package where structs generated from this .proto will be + // placed. If omitted, the Go package will be derived from the following: + // - The basename of the package import path, if provided. + // - Otherwise, the package statement in the .proto file, if present. + // - Otherwise, the basename of the .proto file, without extension. + GoPackage *string `protobuf:"bytes,11,opt,name=go_package,json=goPackage" json:"go_package,omitempty"` + // Should generic services be generated in each language? "Generic" services + // are not specific to any particular RPC system. They are generated by the + // main code generators in each language (without additional plugins). + // Generic services were the only kind of service generation supported by + // early versions of google.protobuf. + // + // Generic services are now considered deprecated in favor of using plugins + // that generate code specific to your particular RPC system. Therefore, + // these default to false. Old code which depends on generic services should + // explicitly set them to true. + CcGenericServices *bool `protobuf:"varint,16,opt,name=cc_generic_services,json=ccGenericServices,def=0" json:"cc_generic_services,omitempty"` + JavaGenericServices *bool `protobuf:"varint,17,opt,name=java_generic_services,json=javaGenericServices,def=0" json:"java_generic_services,omitempty"` + PyGenericServices *bool `protobuf:"varint,18,opt,name=py_generic_services,json=pyGenericServices,def=0" json:"py_generic_services,omitempty"` + PhpGenericServices *bool `protobuf:"varint,42,opt,name=php_generic_services,json=phpGenericServices,def=0" json:"php_generic_services,omitempty"` + // Is this file deprecated? + // Depending on the target platform, this can emit Deprecated annotations + // for everything in the file, or it will be completely ignored; in the very + // least, this is a formalization for deprecating files. + Deprecated *bool `protobuf:"varint,23,opt,name=deprecated,def=0" json:"deprecated,omitempty"` + // Enables the use of arenas for the proto messages in this file. This applies + // only to generated classes for C++. + CcEnableArenas *bool `protobuf:"varint,31,opt,name=cc_enable_arenas,json=ccEnableArenas,def=0" json:"cc_enable_arenas,omitempty"` + // Sets the objective c class prefix which is prepended to all objective c + // generated classes from this .proto. There is no default. + ObjcClassPrefix *string `protobuf:"bytes,36,opt,name=objc_class_prefix,json=objcClassPrefix" json:"objc_class_prefix,omitempty"` + // Namespace for generated classes; defaults to the package. + CsharpNamespace *string `protobuf:"bytes,37,opt,name=csharp_namespace,json=csharpNamespace" json:"csharp_namespace,omitempty"` + // By default Swift generators will take the proto package and CamelCase it + // replacing '.' with underscore and use that to prefix the types/symbols + // defined. When this options is provided, they will use this value instead + // to prefix the types/symbols defined. + SwiftPrefix *string `protobuf:"bytes,39,opt,name=swift_prefix,json=swiftPrefix" json:"swift_prefix,omitempty"` + // Sets the php class prefix which is prepended to all php generated classes + // from this .proto. Default is empty. + PhpClassPrefix *string `protobuf:"bytes,40,opt,name=php_class_prefix,json=phpClassPrefix" json:"php_class_prefix,omitempty"` + // Use this option to change the namespace of php generated classes. Default + // is empty. When this option is empty, the package name will be used for + // determining the namespace. + PhpNamespace *string `protobuf:"bytes,41,opt,name=php_namespace,json=phpNamespace" json:"php_namespace,omitempty"` + // The parser stores options it doesn't recognize here. + // See the documentation for the "Options" section above. + UninterpretedOption []*UninterpretedOption `protobuf:"bytes,999,rep,name=uninterpreted_option,json=uninterpretedOption" json:"uninterpreted_option,omitempty"` + XXX_NoUnkeyedLiteral struct{} `json:"-"` + proto.XXX_InternalExtensions `json:"-"` + XXX_unrecognized []byte `json:"-"` + XXX_sizecache int32 `json:"-"` +} + +func (m *FileOptions) Reset() { *m = FileOptions{} } +func (m *FileOptions) String() string { return proto.CompactTextString(m) } +func (*FileOptions) ProtoMessage() {} +func (*FileOptions) Descriptor() ([]byte, []int) { + return fileDescriptor_descriptor_9588782fb9cbecd6, []int{10} +} + +var extRange_FileOptions = []proto.ExtensionRange{ + {Start: 1000, End: 536870911}, +} + +func (*FileOptions) ExtensionRangeArray() []proto.ExtensionRange { + return extRange_FileOptions +} +func (m *FileOptions) XXX_Unmarshal(b []byte) error { + return xxx_messageInfo_FileOptions.Unmarshal(m, b) +} +func (m *FileOptions) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { + return xxx_messageInfo_FileOptions.Marshal(b, m, deterministic) +} +func (dst *FileOptions) XXX_Merge(src proto.Message) { + xxx_messageInfo_FileOptions.Merge(dst, src) +} +func (m *FileOptions) XXX_Size() int { + return xxx_messageInfo_FileOptions.Size(m) +} +func (m *FileOptions) XXX_DiscardUnknown() { + xxx_messageInfo_FileOptions.DiscardUnknown(m) +} + +var xxx_messageInfo_FileOptions proto.InternalMessageInfo + +const Default_FileOptions_JavaMultipleFiles bool = false +const Default_FileOptions_JavaStringCheckUtf8 bool = false +const Default_FileOptions_OptimizeFor FileOptions_OptimizeMode = FileOptions_SPEED +const Default_FileOptions_CcGenericServices bool = false +const Default_FileOptions_JavaGenericServices bool = false +const Default_FileOptions_PyGenericServices bool = false +const Default_FileOptions_PhpGenericServices bool = false +const Default_FileOptions_Deprecated bool = false +const Default_FileOptions_CcEnableArenas bool = false + +func (m *FileOptions) GetJavaPackage() string { + if m != nil && m.JavaPackage != nil { + return *m.JavaPackage + } + return "" +} + +func (m *FileOptions) GetJavaOuterClassname() string { + if m != nil && m.JavaOuterClassname != nil { + return *m.JavaOuterClassname + } + return "" +} + +func (m *FileOptions) GetJavaMultipleFiles() bool { + if m != nil && m.JavaMultipleFiles != nil { + return *m.JavaMultipleFiles + } + return Default_FileOptions_JavaMultipleFiles +} + +// Deprecated: Do not use. +func (m *FileOptions) GetJavaGenerateEqualsAndHash() bool { + if m != nil && m.JavaGenerateEqualsAndHash != nil { + return *m.JavaGenerateEqualsAndHash + } + return false +} + +func (m *FileOptions) GetJavaStringCheckUtf8() bool { + if m != nil && m.JavaStringCheckUtf8 != nil { + return *m.JavaStringCheckUtf8 + } + return Default_FileOptions_JavaStringCheckUtf8 +} + +func (m *FileOptions) GetOptimizeFor() FileOptions_OptimizeMode { + if m != nil && m.OptimizeFor != nil { + return *m.OptimizeFor + } + return Default_FileOptions_OptimizeFor +} + +func (m *FileOptions) GetGoPackage() string { + if m != nil && m.GoPackage != nil { + return *m.GoPackage + } + return "" +} + +func (m *FileOptions) GetCcGenericServices() bool { + if m != nil && m.CcGenericServices != nil { + return *m.CcGenericServices + } + return Default_FileOptions_CcGenericServices +} + +func (m *FileOptions) GetJavaGenericServices() bool { + if m != nil && m.JavaGenericServices != nil { + return *m.JavaGenericServices + } + return Default_FileOptions_JavaGenericServices +} + +func (m *FileOptions) GetPyGenericServices() bool { + if m != nil && m.PyGenericServices != nil { + return *m.PyGenericServices + } + return Default_FileOptions_PyGenericServices +} + +func (m *FileOptions) GetPhpGenericServices() bool { + if m != nil && m.PhpGenericServices != nil { + return *m.PhpGenericServices + } + return Default_FileOptions_PhpGenericServices +} + +func (m *FileOptions) GetDeprecated() bool { + if m != nil && m.Deprecated != nil { + return *m.Deprecated + } + return Default_FileOptions_Deprecated +} + +func (m *FileOptions) GetCcEnableArenas() bool { + if m != nil && m.CcEnableArenas != nil { + return *m.CcEnableArenas + } + return Default_FileOptions_CcEnableArenas +} + +func (m *FileOptions) GetObjcClassPrefix() string { + if m != nil && m.ObjcClassPrefix != nil { + return *m.ObjcClassPrefix + } + return "" +} + +func (m *FileOptions) GetCsharpNamespace() string { + if m != nil && m.CsharpNamespace != nil { + return *m.CsharpNamespace + } + return "" +} + +func (m *FileOptions) GetSwiftPrefix() string { + if m != nil && m.SwiftPrefix != nil { + return *m.SwiftPrefix + } + return "" +} + +func (m *FileOptions) GetPhpClassPrefix() string { + if m != nil && m.PhpClassPrefix != nil { + return *m.PhpClassPrefix + } + return "" +} + +func (m *FileOptions) GetPhpNamespace() string { + if m != nil && m.PhpNamespace != nil { + return *m.PhpNamespace + } + return "" +} + +func (m *FileOptions) GetUninterpretedOption() []*UninterpretedOption { + if m != nil { + return m.UninterpretedOption + } + return nil +} + +type MessageOptions struct { + // Set true to use the old proto1 MessageSet wire format for extensions. + // This is provided for backwards-compatibility with the MessageSet wire + // format. You should not use this for any other reason: It's less + // efficient, has fewer features, and is more complicated. + // + // The message must be defined exactly as follows: + // message Foo { + // option message_set_wire_format = true; + // extensions 4 to max; + // } + // Note that the message cannot have any defined fields; MessageSets only + // have extensions. + // + // All extensions of your type must be singular messages; e.g. they cannot + // be int32s, enums, or repeated messages. + // + // Because this is an option, the above two restrictions are not enforced by + // the protocol compiler. + MessageSetWireFormat *bool `protobuf:"varint,1,opt,name=message_set_wire_format,json=messageSetWireFormat,def=0" json:"message_set_wire_format,omitempty"` + // Disables the generation of the standard "descriptor()" accessor, which can + // conflict with a field of the same name. This is meant to make migration + // from proto1 easier; new code should avoid fields named "descriptor". + NoStandardDescriptorAccessor *bool `protobuf:"varint,2,opt,name=no_standard_descriptor_accessor,json=noStandardDescriptorAccessor,def=0" json:"no_standard_descriptor_accessor,omitempty"` + // Is this message deprecated? + // Depending on the target platform, this can emit Deprecated annotations + // for the message, or it will be completely ignored; in the very least, + // this is a formalization for deprecating messages. + Deprecated *bool `protobuf:"varint,3,opt,name=deprecated,def=0" json:"deprecated,omitempty"` + // Whether the message is an automatically generated map entry type for the + // maps field. + // + // For maps fields: + // map map_field = 1; + // The parsed descriptor looks like: + // message MapFieldEntry { + // option map_entry = true; + // optional KeyType key = 1; + // optional ValueType value = 2; + // } + // repeated MapFieldEntry map_field = 1; + // + // Implementations may choose not to generate the map_entry=true message, but + // use a native map in the target language to hold the keys and values. + // The reflection APIs in such implementions still need to work as + // if the field is a repeated message field. + // + // NOTE: Do not set the option in .proto files. Always use the maps syntax + // instead. The option should only be implicitly set by the proto compiler + // parser. + MapEntry *bool `protobuf:"varint,7,opt,name=map_entry,json=mapEntry" json:"map_entry,omitempty"` + // The parser stores options it doesn't recognize here. See above. + UninterpretedOption []*UninterpretedOption `protobuf:"bytes,999,rep,name=uninterpreted_option,json=uninterpretedOption" json:"uninterpreted_option,omitempty"` + XXX_NoUnkeyedLiteral struct{} `json:"-"` + proto.XXX_InternalExtensions `json:"-"` + XXX_unrecognized []byte `json:"-"` + XXX_sizecache int32 `json:"-"` +} + +func (m *MessageOptions) Reset() { *m = MessageOptions{} } +func (m *MessageOptions) String() string { return proto.CompactTextString(m) } +func (*MessageOptions) ProtoMessage() {} +func (*MessageOptions) Descriptor() ([]byte, []int) { + return fileDescriptor_descriptor_9588782fb9cbecd6, []int{11} +} + +var extRange_MessageOptions = []proto.ExtensionRange{ + {Start: 1000, End: 536870911}, +} + +func (*MessageOptions) ExtensionRangeArray() []proto.ExtensionRange { + return extRange_MessageOptions +} +func (m *MessageOptions) XXX_Unmarshal(b []byte) error { + return xxx_messageInfo_MessageOptions.Unmarshal(m, b) +} +func (m *MessageOptions) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { + return xxx_messageInfo_MessageOptions.Marshal(b, m, deterministic) +} +func (dst *MessageOptions) XXX_Merge(src proto.Message) { + xxx_messageInfo_MessageOptions.Merge(dst, src) +} +func (m *MessageOptions) XXX_Size() int { + return xxx_messageInfo_MessageOptions.Size(m) +} +func (m *MessageOptions) XXX_DiscardUnknown() { + xxx_messageInfo_MessageOptions.DiscardUnknown(m) +} + +var xxx_messageInfo_MessageOptions proto.InternalMessageInfo + +const Default_MessageOptions_MessageSetWireFormat bool = false +const Default_MessageOptions_NoStandardDescriptorAccessor bool = false +const Default_MessageOptions_Deprecated bool = false + +func (m *MessageOptions) GetMessageSetWireFormat() bool { + if m != nil && m.MessageSetWireFormat != nil { + return *m.MessageSetWireFormat + } + return Default_MessageOptions_MessageSetWireFormat +} + +func (m *MessageOptions) GetNoStandardDescriptorAccessor() bool { + if m != nil && m.NoStandardDescriptorAccessor != nil { + return *m.NoStandardDescriptorAccessor + } + return Default_MessageOptions_NoStandardDescriptorAccessor +} + +func (m *MessageOptions) GetDeprecated() bool { + if m != nil && m.Deprecated != nil { + return *m.Deprecated + } + return Default_MessageOptions_Deprecated +} + +func (m *MessageOptions) GetMapEntry() bool { + if m != nil && m.MapEntry != nil { + return *m.MapEntry + } + return false +} + +func (m *MessageOptions) GetUninterpretedOption() []*UninterpretedOption { + if m != nil { + return m.UninterpretedOption + } + return nil +} + +type FieldOptions struct { + // The ctype option instructs the C++ code generator to use a different + // representation of the field than it normally would. See the specific + // options below. This option is not yet implemented in the open source + // release -- sorry, we'll try to include it in a future version! + Ctype *FieldOptions_CType `protobuf:"varint,1,opt,name=ctype,enum=google.protobuf.FieldOptions_CType,def=0" json:"ctype,omitempty"` + // The packed option can be enabled for repeated primitive fields to enable + // a more efficient representation on the wire. Rather than repeatedly + // writing the tag and type for each element, the entire array is encoded as + // a single length-delimited blob. In proto3, only explicit setting it to + // false will avoid using packed encoding. + Packed *bool `protobuf:"varint,2,opt,name=packed" json:"packed,omitempty"` + // The jstype option determines the JavaScript type used for values of the + // field. The option is permitted only for 64 bit integral and fixed types + // (int64, uint64, sint64, fixed64, sfixed64). A field with jstype JS_STRING + // is represented as JavaScript string, which avoids loss of precision that + // can happen when a large value is converted to a floating point JavaScript. + // Specifying JS_NUMBER for the jstype causes the generated JavaScript code to + // use the JavaScript "number" type. The behavior of the default option + // JS_NORMAL is implementation dependent. + // + // This option is an enum to permit additional types to be added, e.g. + // goog.math.Integer. + Jstype *FieldOptions_JSType `protobuf:"varint,6,opt,name=jstype,enum=google.protobuf.FieldOptions_JSType,def=0" json:"jstype,omitempty"` + // Should this field be parsed lazily? Lazy applies only to message-type + // fields. It means that when the outer message is initially parsed, the + // inner message's contents will not be parsed but instead stored in encoded + // form. The inner message will actually be parsed when it is first accessed. + // + // This is only a hint. Implementations are free to choose whether to use + // eager or lazy parsing regardless of the value of this option. However, + // setting this option true suggests that the protocol author believes that + // using lazy parsing on this field is worth the additional bookkeeping + // overhead typically needed to implement it. + // + // This option does not affect the public interface of any generated code; + // all method signatures remain the same. Furthermore, thread-safety of the + // interface is not affected by this option; const methods remain safe to + // call from multiple threads concurrently, while non-const methods continue + // to require exclusive access. + // + // + // Note that implementations may choose not to check required fields within + // a lazy sub-message. That is, calling IsInitialized() on the outer message + // may return true even if the inner message has missing required fields. + // This is necessary because otherwise the inner message would have to be + // parsed in order to perform the check, defeating the purpose of lazy + // parsing. An implementation which chooses not to check required fields + // must be consistent about it. That is, for any particular sub-message, the + // implementation must either *always* check its required fields, or *never* + // check its required fields, regardless of whether or not the message has + // been parsed. + Lazy *bool `protobuf:"varint,5,opt,name=lazy,def=0" json:"lazy,omitempty"` + // Is this field deprecated? + // Depending on the target platform, this can emit Deprecated annotations + // for accessors, or it will be completely ignored; in the very least, this + // is a formalization for deprecating fields. + Deprecated *bool `protobuf:"varint,3,opt,name=deprecated,def=0" json:"deprecated,omitempty"` + // For Google-internal migration only. Do not use. + Weak *bool `protobuf:"varint,10,opt,name=weak,def=0" json:"weak,omitempty"` + // The parser stores options it doesn't recognize here. See above. + UninterpretedOption []*UninterpretedOption `protobuf:"bytes,999,rep,name=uninterpreted_option,json=uninterpretedOption" json:"uninterpreted_option,omitempty"` + XXX_NoUnkeyedLiteral struct{} `json:"-"` + proto.XXX_InternalExtensions `json:"-"` + XXX_unrecognized []byte `json:"-"` + XXX_sizecache int32 `json:"-"` +} + +func (m *FieldOptions) Reset() { *m = FieldOptions{} } +func (m *FieldOptions) String() string { return proto.CompactTextString(m) } +func (*FieldOptions) ProtoMessage() {} +func (*FieldOptions) Descriptor() ([]byte, []int) { + return fileDescriptor_descriptor_9588782fb9cbecd6, []int{12} +} + +var extRange_FieldOptions = []proto.ExtensionRange{ + {Start: 1000, End: 536870911}, +} + +func (*FieldOptions) ExtensionRangeArray() []proto.ExtensionRange { + return extRange_FieldOptions +} +func (m *FieldOptions) XXX_Unmarshal(b []byte) error { + return xxx_messageInfo_FieldOptions.Unmarshal(m, b) +} +func (m *FieldOptions) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { + return xxx_messageInfo_FieldOptions.Marshal(b, m, deterministic) +} +func (dst *FieldOptions) XXX_Merge(src proto.Message) { + xxx_messageInfo_FieldOptions.Merge(dst, src) +} +func (m *FieldOptions) XXX_Size() int { + return xxx_messageInfo_FieldOptions.Size(m) +} +func (m *FieldOptions) XXX_DiscardUnknown() { + xxx_messageInfo_FieldOptions.DiscardUnknown(m) +} + +var xxx_messageInfo_FieldOptions proto.InternalMessageInfo + +const Default_FieldOptions_Ctype FieldOptions_CType = FieldOptions_STRING +const Default_FieldOptions_Jstype FieldOptions_JSType = FieldOptions_JS_NORMAL +const Default_FieldOptions_Lazy bool = false +const Default_FieldOptions_Deprecated bool = false +const Default_FieldOptions_Weak bool = false + +func (m *FieldOptions) GetCtype() FieldOptions_CType { + if m != nil && m.Ctype != nil { + return *m.Ctype + } + return Default_FieldOptions_Ctype +} + +func (m *FieldOptions) GetPacked() bool { + if m != nil && m.Packed != nil { + return *m.Packed + } + return false +} + +func (m *FieldOptions) GetJstype() FieldOptions_JSType { + if m != nil && m.Jstype != nil { + return *m.Jstype + } + return Default_FieldOptions_Jstype +} + +func (m *FieldOptions) GetLazy() bool { + if m != nil && m.Lazy != nil { + return *m.Lazy + } + return Default_FieldOptions_Lazy +} + +func (m *FieldOptions) GetDeprecated() bool { + if m != nil && m.Deprecated != nil { + return *m.Deprecated + } + return Default_FieldOptions_Deprecated +} + +func (m *FieldOptions) GetWeak() bool { + if m != nil && m.Weak != nil { + return *m.Weak + } + return Default_FieldOptions_Weak +} + +func (m *FieldOptions) GetUninterpretedOption() []*UninterpretedOption { + if m != nil { + return m.UninterpretedOption + } + return nil +} + +type OneofOptions struct { + // The parser stores options it doesn't recognize here. See above. + UninterpretedOption []*UninterpretedOption `protobuf:"bytes,999,rep,name=uninterpreted_option,json=uninterpretedOption" json:"uninterpreted_option,omitempty"` + XXX_NoUnkeyedLiteral struct{} `json:"-"` + proto.XXX_InternalExtensions `json:"-"` + XXX_unrecognized []byte `json:"-"` + XXX_sizecache int32 `json:"-"` +} + +func (m *OneofOptions) Reset() { *m = OneofOptions{} } +func (m *OneofOptions) String() string { return proto.CompactTextString(m) } +func (*OneofOptions) ProtoMessage() {} +func (*OneofOptions) Descriptor() ([]byte, []int) { + return fileDescriptor_descriptor_9588782fb9cbecd6, []int{13} +} + +var extRange_OneofOptions = []proto.ExtensionRange{ + {Start: 1000, End: 536870911}, +} + +func (*OneofOptions) ExtensionRangeArray() []proto.ExtensionRange { + return extRange_OneofOptions +} +func (m *OneofOptions) XXX_Unmarshal(b []byte) error { + return xxx_messageInfo_OneofOptions.Unmarshal(m, b) +} +func (m *OneofOptions) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { + return xxx_messageInfo_OneofOptions.Marshal(b, m, deterministic) +} +func (dst *OneofOptions) XXX_Merge(src proto.Message) { + xxx_messageInfo_OneofOptions.Merge(dst, src) +} +func (m *OneofOptions) XXX_Size() int { + return xxx_messageInfo_OneofOptions.Size(m) +} +func (m *OneofOptions) XXX_DiscardUnknown() { + xxx_messageInfo_OneofOptions.DiscardUnknown(m) +} + +var xxx_messageInfo_OneofOptions proto.InternalMessageInfo + +func (m *OneofOptions) GetUninterpretedOption() []*UninterpretedOption { + if m != nil { + return m.UninterpretedOption + } + return nil +} + +type EnumOptions struct { + // Set this option to true to allow mapping different tag names to the same + // value. + AllowAlias *bool `protobuf:"varint,2,opt,name=allow_alias,json=allowAlias" json:"allow_alias,omitempty"` + // Is this enum deprecated? + // Depending on the target platform, this can emit Deprecated annotations + // for the enum, or it will be completely ignored; in the very least, this + // is a formalization for deprecating enums. + Deprecated *bool `protobuf:"varint,3,opt,name=deprecated,def=0" json:"deprecated,omitempty"` + // The parser stores options it doesn't recognize here. See above. + UninterpretedOption []*UninterpretedOption `protobuf:"bytes,999,rep,name=uninterpreted_option,json=uninterpretedOption" json:"uninterpreted_option,omitempty"` + XXX_NoUnkeyedLiteral struct{} `json:"-"` + proto.XXX_InternalExtensions `json:"-"` + XXX_unrecognized []byte `json:"-"` + XXX_sizecache int32 `json:"-"` +} + +func (m *EnumOptions) Reset() { *m = EnumOptions{} } +func (m *EnumOptions) String() string { return proto.CompactTextString(m) } +func (*EnumOptions) ProtoMessage() {} +func (*EnumOptions) Descriptor() ([]byte, []int) { + return fileDescriptor_descriptor_9588782fb9cbecd6, []int{14} +} + +var extRange_EnumOptions = []proto.ExtensionRange{ + {Start: 1000, End: 536870911}, +} + +func (*EnumOptions) ExtensionRangeArray() []proto.ExtensionRange { + return extRange_EnumOptions +} +func (m *EnumOptions) XXX_Unmarshal(b []byte) error { + return xxx_messageInfo_EnumOptions.Unmarshal(m, b) +} +func (m *EnumOptions) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { + return xxx_messageInfo_EnumOptions.Marshal(b, m, deterministic) +} +func (dst *EnumOptions) XXX_Merge(src proto.Message) { + xxx_messageInfo_EnumOptions.Merge(dst, src) +} +func (m *EnumOptions) XXX_Size() int { + return xxx_messageInfo_EnumOptions.Size(m) +} +func (m *EnumOptions) XXX_DiscardUnknown() { + xxx_messageInfo_EnumOptions.DiscardUnknown(m) +} + +var xxx_messageInfo_EnumOptions proto.InternalMessageInfo + +const Default_EnumOptions_Deprecated bool = false + +func (m *EnumOptions) GetAllowAlias() bool { + if m != nil && m.AllowAlias != nil { + return *m.AllowAlias + } + return false +} + +func (m *EnumOptions) GetDeprecated() bool { + if m != nil && m.Deprecated != nil { + return *m.Deprecated + } + return Default_EnumOptions_Deprecated +} + +func (m *EnumOptions) GetUninterpretedOption() []*UninterpretedOption { + if m != nil { + return m.UninterpretedOption + } + return nil +} + +type EnumValueOptions struct { + // Is this enum value deprecated? + // Depending on the target platform, this can emit Deprecated annotations + // for the enum value, or it will be completely ignored; in the very least, + // this is a formalization for deprecating enum values. + Deprecated *bool `protobuf:"varint,1,opt,name=deprecated,def=0" json:"deprecated,omitempty"` + // The parser stores options it doesn't recognize here. See above. + UninterpretedOption []*UninterpretedOption `protobuf:"bytes,999,rep,name=uninterpreted_option,json=uninterpretedOption" json:"uninterpreted_option,omitempty"` + XXX_NoUnkeyedLiteral struct{} `json:"-"` + proto.XXX_InternalExtensions `json:"-"` + XXX_unrecognized []byte `json:"-"` + XXX_sizecache int32 `json:"-"` +} + +func (m *EnumValueOptions) Reset() { *m = EnumValueOptions{} } +func (m *EnumValueOptions) String() string { return proto.CompactTextString(m) } +func (*EnumValueOptions) ProtoMessage() {} +func (*EnumValueOptions) Descriptor() ([]byte, []int) { + return fileDescriptor_descriptor_9588782fb9cbecd6, []int{15} +} + +var extRange_EnumValueOptions = []proto.ExtensionRange{ + {Start: 1000, End: 536870911}, +} + +func (*EnumValueOptions) ExtensionRangeArray() []proto.ExtensionRange { + return extRange_EnumValueOptions +} +func (m *EnumValueOptions) XXX_Unmarshal(b []byte) error { + return xxx_messageInfo_EnumValueOptions.Unmarshal(m, b) +} +func (m *EnumValueOptions) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { + return xxx_messageInfo_EnumValueOptions.Marshal(b, m, deterministic) +} +func (dst *EnumValueOptions) XXX_Merge(src proto.Message) { + xxx_messageInfo_EnumValueOptions.Merge(dst, src) +} +func (m *EnumValueOptions) XXX_Size() int { + return xxx_messageInfo_EnumValueOptions.Size(m) +} +func (m *EnumValueOptions) XXX_DiscardUnknown() { + xxx_messageInfo_EnumValueOptions.DiscardUnknown(m) +} + +var xxx_messageInfo_EnumValueOptions proto.InternalMessageInfo + +const Default_EnumValueOptions_Deprecated bool = false + +func (m *EnumValueOptions) GetDeprecated() bool { + if m != nil && m.Deprecated != nil { + return *m.Deprecated + } + return Default_EnumValueOptions_Deprecated +} + +func (m *EnumValueOptions) GetUninterpretedOption() []*UninterpretedOption { + if m != nil { + return m.UninterpretedOption + } + return nil +} + +type ServiceOptions struct { + // Is this service deprecated? + // Depending on the target platform, this can emit Deprecated annotations + // for the service, or it will be completely ignored; in the very least, + // this is a formalization for deprecating services. + Deprecated *bool `protobuf:"varint,33,opt,name=deprecated,def=0" json:"deprecated,omitempty"` + // The parser stores options it doesn't recognize here. See above. + UninterpretedOption []*UninterpretedOption `protobuf:"bytes,999,rep,name=uninterpreted_option,json=uninterpretedOption" json:"uninterpreted_option,omitempty"` + XXX_NoUnkeyedLiteral struct{} `json:"-"` + proto.XXX_InternalExtensions `json:"-"` + XXX_unrecognized []byte `json:"-"` + XXX_sizecache int32 `json:"-"` +} + +func (m *ServiceOptions) Reset() { *m = ServiceOptions{} } +func (m *ServiceOptions) String() string { return proto.CompactTextString(m) } +func (*ServiceOptions) ProtoMessage() {} +func (*ServiceOptions) Descriptor() ([]byte, []int) { + return fileDescriptor_descriptor_9588782fb9cbecd6, []int{16} +} + +var extRange_ServiceOptions = []proto.ExtensionRange{ + {Start: 1000, End: 536870911}, +} + +func (*ServiceOptions) ExtensionRangeArray() []proto.ExtensionRange { + return extRange_ServiceOptions +} +func (m *ServiceOptions) XXX_Unmarshal(b []byte) error { + return xxx_messageInfo_ServiceOptions.Unmarshal(m, b) +} +func (m *ServiceOptions) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { + return xxx_messageInfo_ServiceOptions.Marshal(b, m, deterministic) +} +func (dst *ServiceOptions) XXX_Merge(src proto.Message) { + xxx_messageInfo_ServiceOptions.Merge(dst, src) +} +func (m *ServiceOptions) XXX_Size() int { + return xxx_messageInfo_ServiceOptions.Size(m) +} +func (m *ServiceOptions) XXX_DiscardUnknown() { + xxx_messageInfo_ServiceOptions.DiscardUnknown(m) +} + +var xxx_messageInfo_ServiceOptions proto.InternalMessageInfo + +const Default_ServiceOptions_Deprecated bool = false + +func (m *ServiceOptions) GetDeprecated() bool { + if m != nil && m.Deprecated != nil { + return *m.Deprecated + } + return Default_ServiceOptions_Deprecated +} + +func (m *ServiceOptions) GetUninterpretedOption() []*UninterpretedOption { + if m != nil { + return m.UninterpretedOption + } + return nil +} + +type MethodOptions struct { + // Is this method deprecated? + // Depending on the target platform, this can emit Deprecated annotations + // for the method, or it will be completely ignored; in the very least, + // this is a formalization for deprecating methods. + Deprecated *bool `protobuf:"varint,33,opt,name=deprecated,def=0" json:"deprecated,omitempty"` + IdempotencyLevel *MethodOptions_IdempotencyLevel `protobuf:"varint,34,opt,name=idempotency_level,json=idempotencyLevel,enum=google.protobuf.MethodOptions_IdempotencyLevel,def=0" json:"idempotency_level,omitempty"` + // The parser stores options it doesn't recognize here. See above. + UninterpretedOption []*UninterpretedOption `protobuf:"bytes,999,rep,name=uninterpreted_option,json=uninterpretedOption" json:"uninterpreted_option,omitempty"` + XXX_NoUnkeyedLiteral struct{} `json:"-"` + proto.XXX_InternalExtensions `json:"-"` + XXX_unrecognized []byte `json:"-"` + XXX_sizecache int32 `json:"-"` +} + +func (m *MethodOptions) Reset() { *m = MethodOptions{} } +func (m *MethodOptions) String() string { return proto.CompactTextString(m) } +func (*MethodOptions) ProtoMessage() {} +func (*MethodOptions) Descriptor() ([]byte, []int) { + return fileDescriptor_descriptor_9588782fb9cbecd6, []int{17} +} + +var extRange_MethodOptions = []proto.ExtensionRange{ + {Start: 1000, End: 536870911}, +} + +func (*MethodOptions) ExtensionRangeArray() []proto.ExtensionRange { + return extRange_MethodOptions +} +func (m *MethodOptions) XXX_Unmarshal(b []byte) error { + return xxx_messageInfo_MethodOptions.Unmarshal(m, b) +} +func (m *MethodOptions) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { + return xxx_messageInfo_MethodOptions.Marshal(b, m, deterministic) +} +func (dst *MethodOptions) XXX_Merge(src proto.Message) { + xxx_messageInfo_MethodOptions.Merge(dst, src) +} +func (m *MethodOptions) XXX_Size() int { + return xxx_messageInfo_MethodOptions.Size(m) +} +func (m *MethodOptions) XXX_DiscardUnknown() { + xxx_messageInfo_MethodOptions.DiscardUnknown(m) +} + +var xxx_messageInfo_MethodOptions proto.InternalMessageInfo + +const Default_MethodOptions_Deprecated bool = false +const Default_MethodOptions_IdempotencyLevel MethodOptions_IdempotencyLevel = MethodOptions_IDEMPOTENCY_UNKNOWN + +func (m *MethodOptions) GetDeprecated() bool { + if m != nil && m.Deprecated != nil { + return *m.Deprecated + } + return Default_MethodOptions_Deprecated +} + +func (m *MethodOptions) GetIdempotencyLevel() MethodOptions_IdempotencyLevel { + if m != nil && m.IdempotencyLevel != nil { + return *m.IdempotencyLevel + } + return Default_MethodOptions_IdempotencyLevel +} + +func (m *MethodOptions) GetUninterpretedOption() []*UninterpretedOption { + if m != nil { + return m.UninterpretedOption + } + return nil +} + +// A message representing a option the parser does not recognize. This only +// appears in options protos created by the compiler::Parser class. +// DescriptorPool resolves these when building Descriptor objects. Therefore, +// options protos in descriptor objects (e.g. returned by Descriptor::options(), +// or produced by Descriptor::CopyTo()) will never have UninterpretedOptions +// in them. +type UninterpretedOption struct { + Name []*UninterpretedOption_NamePart `protobuf:"bytes,2,rep,name=name" json:"name,omitempty"` + // The value of the uninterpreted option, in whatever type the tokenizer + // identified it as during parsing. Exactly one of these should be set. + IdentifierValue *string `protobuf:"bytes,3,opt,name=identifier_value,json=identifierValue" json:"identifier_value,omitempty"` + PositiveIntValue *uint64 `protobuf:"varint,4,opt,name=positive_int_value,json=positiveIntValue" json:"positive_int_value,omitempty"` + NegativeIntValue *int64 `protobuf:"varint,5,opt,name=negative_int_value,json=negativeIntValue" json:"negative_int_value,omitempty"` + DoubleValue *float64 `protobuf:"fixed64,6,opt,name=double_value,json=doubleValue" json:"double_value,omitempty"` + StringValue []byte `protobuf:"bytes,7,opt,name=string_value,json=stringValue" json:"string_value,omitempty"` + AggregateValue *string `protobuf:"bytes,8,opt,name=aggregate_value,json=aggregateValue" json:"aggregate_value,omitempty"` + XXX_NoUnkeyedLiteral struct{} `json:"-"` + XXX_unrecognized []byte `json:"-"` + XXX_sizecache int32 `json:"-"` +} + +func (m *UninterpretedOption) Reset() { *m = UninterpretedOption{} } +func (m *UninterpretedOption) String() string { return proto.CompactTextString(m) } +func (*UninterpretedOption) ProtoMessage() {} +func (*UninterpretedOption) Descriptor() ([]byte, []int) { + return fileDescriptor_descriptor_9588782fb9cbecd6, []int{18} +} +func (m *UninterpretedOption) XXX_Unmarshal(b []byte) error { + return xxx_messageInfo_UninterpretedOption.Unmarshal(m, b) +} +func (m *UninterpretedOption) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { + return xxx_messageInfo_UninterpretedOption.Marshal(b, m, deterministic) +} +func (dst *UninterpretedOption) XXX_Merge(src proto.Message) { + xxx_messageInfo_UninterpretedOption.Merge(dst, src) +} +func (m *UninterpretedOption) XXX_Size() int { + return xxx_messageInfo_UninterpretedOption.Size(m) +} +func (m *UninterpretedOption) XXX_DiscardUnknown() { + xxx_messageInfo_UninterpretedOption.DiscardUnknown(m) +} + +var xxx_messageInfo_UninterpretedOption proto.InternalMessageInfo + +func (m *UninterpretedOption) GetName() []*UninterpretedOption_NamePart { + if m != nil { + return m.Name + } + return nil +} + +func (m *UninterpretedOption) GetIdentifierValue() string { + if m != nil && m.IdentifierValue != nil { + return *m.IdentifierValue + } + return "" +} + +func (m *UninterpretedOption) GetPositiveIntValue() uint64 { + if m != nil && m.PositiveIntValue != nil { + return *m.PositiveIntValue + } + return 0 +} + +func (m *UninterpretedOption) GetNegativeIntValue() int64 { + if m != nil && m.NegativeIntValue != nil { + return *m.NegativeIntValue + } + return 0 +} + +func (m *UninterpretedOption) GetDoubleValue() float64 { + if m != nil && m.DoubleValue != nil { + return *m.DoubleValue + } + return 0 +} + +func (m *UninterpretedOption) GetStringValue() []byte { + if m != nil { + return m.StringValue + } + return nil +} + +func (m *UninterpretedOption) GetAggregateValue() string { + if m != nil && m.AggregateValue != nil { + return *m.AggregateValue + } + return "" +} + +// The name of the uninterpreted option. Each string represents a segment in +// a dot-separated name. is_extension is true iff a segment represents an +// extension (denoted with parentheses in options specs in .proto files). +// E.g.,{ ["foo", false], ["bar.baz", true], ["qux", false] } represents +// "foo.(bar.baz).qux". +type UninterpretedOption_NamePart struct { + NamePart *string `protobuf:"bytes,1,req,name=name_part,json=namePart" json:"name_part,omitempty"` + IsExtension *bool `protobuf:"varint,2,req,name=is_extension,json=isExtension" json:"is_extension,omitempty"` + XXX_NoUnkeyedLiteral struct{} `json:"-"` + XXX_unrecognized []byte `json:"-"` + XXX_sizecache int32 `json:"-"` +} + +func (m *UninterpretedOption_NamePart) Reset() { *m = UninterpretedOption_NamePart{} } +func (m *UninterpretedOption_NamePart) String() string { return proto.CompactTextString(m) } +func (*UninterpretedOption_NamePart) ProtoMessage() {} +func (*UninterpretedOption_NamePart) Descriptor() ([]byte, []int) { + return fileDescriptor_descriptor_9588782fb9cbecd6, []int{18, 0} +} +func (m *UninterpretedOption_NamePart) XXX_Unmarshal(b []byte) error { + return xxx_messageInfo_UninterpretedOption_NamePart.Unmarshal(m, b) +} +func (m *UninterpretedOption_NamePart) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { + return xxx_messageInfo_UninterpretedOption_NamePart.Marshal(b, m, deterministic) +} +func (dst *UninterpretedOption_NamePart) XXX_Merge(src proto.Message) { + xxx_messageInfo_UninterpretedOption_NamePart.Merge(dst, src) +} +func (m *UninterpretedOption_NamePart) XXX_Size() int { + return xxx_messageInfo_UninterpretedOption_NamePart.Size(m) +} +func (m *UninterpretedOption_NamePart) XXX_DiscardUnknown() { + xxx_messageInfo_UninterpretedOption_NamePart.DiscardUnknown(m) +} + +var xxx_messageInfo_UninterpretedOption_NamePart proto.InternalMessageInfo + +func (m *UninterpretedOption_NamePart) GetNamePart() string { + if m != nil && m.NamePart != nil { + return *m.NamePart + } + return "" +} + +func (m *UninterpretedOption_NamePart) GetIsExtension() bool { + if m != nil && m.IsExtension != nil { + return *m.IsExtension + } + return false +} + +// Encapsulates information about the original source file from which a +// FileDescriptorProto was generated. +type SourceCodeInfo struct { + // A Location identifies a piece of source code in a .proto file which + // corresponds to a particular definition. This information is intended + // to be useful to IDEs, code indexers, documentation generators, and similar + // tools. + // + // For example, say we have a file like: + // message Foo { + // optional string foo = 1; + // } + // Let's look at just the field definition: + // optional string foo = 1; + // ^ ^^ ^^ ^ ^^^ + // a bc de f ghi + // We have the following locations: + // span path represents + // [a,i) [ 4, 0, 2, 0 ] The whole field definition. + // [a,b) [ 4, 0, 2, 0, 4 ] The label (optional). + // [c,d) [ 4, 0, 2, 0, 5 ] The type (string). + // [e,f) [ 4, 0, 2, 0, 1 ] The name (foo). + // [g,h) [ 4, 0, 2, 0, 3 ] The number (1). + // + // Notes: + // - A location may refer to a repeated field itself (i.e. not to any + // particular index within it). This is used whenever a set of elements are + // logically enclosed in a single code segment. For example, an entire + // extend block (possibly containing multiple extension definitions) will + // have an outer location whose path refers to the "extensions" repeated + // field without an index. + // - Multiple locations may have the same path. This happens when a single + // logical declaration is spread out across multiple places. The most + // obvious example is the "extend" block again -- there may be multiple + // extend blocks in the same scope, each of which will have the same path. + // - A location's span is not always a subset of its parent's span. For + // example, the "extendee" of an extension declaration appears at the + // beginning of the "extend" block and is shared by all extensions within + // the block. + // - Just because a location's span is a subset of some other location's span + // does not mean that it is a descendent. For example, a "group" defines + // both a type and a field in a single declaration. Thus, the locations + // corresponding to the type and field and their components will overlap. + // - Code which tries to interpret locations should probably be designed to + // ignore those that it doesn't understand, as more types of locations could + // be recorded in the future. + Location []*SourceCodeInfo_Location `protobuf:"bytes,1,rep,name=location" json:"location,omitempty"` + XXX_NoUnkeyedLiteral struct{} `json:"-"` + XXX_unrecognized []byte `json:"-"` + XXX_sizecache int32 `json:"-"` +} + +func (m *SourceCodeInfo) Reset() { *m = SourceCodeInfo{} } +func (m *SourceCodeInfo) String() string { return proto.CompactTextString(m) } +func (*SourceCodeInfo) ProtoMessage() {} +func (*SourceCodeInfo) Descriptor() ([]byte, []int) { + return fileDescriptor_descriptor_9588782fb9cbecd6, []int{19} +} +func (m *SourceCodeInfo) XXX_Unmarshal(b []byte) error { + return xxx_messageInfo_SourceCodeInfo.Unmarshal(m, b) +} +func (m *SourceCodeInfo) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { + return xxx_messageInfo_SourceCodeInfo.Marshal(b, m, deterministic) +} +func (dst *SourceCodeInfo) XXX_Merge(src proto.Message) { + xxx_messageInfo_SourceCodeInfo.Merge(dst, src) +} +func (m *SourceCodeInfo) XXX_Size() int { + return xxx_messageInfo_SourceCodeInfo.Size(m) +} +func (m *SourceCodeInfo) XXX_DiscardUnknown() { + xxx_messageInfo_SourceCodeInfo.DiscardUnknown(m) +} + +var xxx_messageInfo_SourceCodeInfo proto.InternalMessageInfo + +func (m *SourceCodeInfo) GetLocation() []*SourceCodeInfo_Location { + if m != nil { + return m.Location + } + return nil +} + +type SourceCodeInfo_Location struct { + // Identifies which part of the FileDescriptorProto was defined at this + // location. + // + // Each element is a field number or an index. They form a path from + // the root FileDescriptorProto to the place where the definition. For + // example, this path: + // [ 4, 3, 2, 7, 1 ] + // refers to: + // file.message_type(3) // 4, 3 + // .field(7) // 2, 7 + // .name() // 1 + // This is because FileDescriptorProto.message_type has field number 4: + // repeated DescriptorProto message_type = 4; + // and DescriptorProto.field has field number 2: + // repeated FieldDescriptorProto field = 2; + // and FieldDescriptorProto.name has field number 1: + // optional string name = 1; + // + // Thus, the above path gives the location of a field name. If we removed + // the last element: + // [ 4, 3, 2, 7 ] + // this path refers to the whole field declaration (from the beginning + // of the label to the terminating semicolon). + Path []int32 `protobuf:"varint,1,rep,packed,name=path" json:"path,omitempty"` + // Always has exactly three or four elements: start line, start column, + // end line (optional, otherwise assumed same as start line), end column. + // These are packed into a single field for efficiency. Note that line + // and column numbers are zero-based -- typically you will want to add + // 1 to each before displaying to a user. + Span []int32 `protobuf:"varint,2,rep,packed,name=span" json:"span,omitempty"` + // If this SourceCodeInfo represents a complete declaration, these are any + // comments appearing before and after the declaration which appear to be + // attached to the declaration. + // + // A series of line comments appearing on consecutive lines, with no other + // tokens appearing on those lines, will be treated as a single comment. + // + // leading_detached_comments will keep paragraphs of comments that appear + // before (but not connected to) the current element. Each paragraph, + // separated by empty lines, will be one comment element in the repeated + // field. + // + // Only the comment content is provided; comment markers (e.g. //) are + // stripped out. For block comments, leading whitespace and an asterisk + // will be stripped from the beginning of each line other than the first. + // Newlines are included in the output. + // + // Examples: + // + // optional int32 foo = 1; // Comment attached to foo. + // // Comment attached to bar. + // optional int32 bar = 2; + // + // optional string baz = 3; + // // Comment attached to baz. + // // Another line attached to baz. + // + // // Comment attached to qux. + // // + // // Another line attached to qux. + // optional double qux = 4; + // + // // Detached comment for corge. This is not leading or trailing comments + // // to qux or corge because there are blank lines separating it from + // // both. + // + // // Detached comment for corge paragraph 2. + // + // optional string corge = 5; + // /* Block comment attached + // * to corge. Leading asterisks + // * will be removed. */ + // /* Block comment attached to + // * grault. */ + // optional int32 grault = 6; + // + // // ignored detached comments. + LeadingComments *string `protobuf:"bytes,3,opt,name=leading_comments,json=leadingComments" json:"leading_comments,omitempty"` + TrailingComments *string `protobuf:"bytes,4,opt,name=trailing_comments,json=trailingComments" json:"trailing_comments,omitempty"` + LeadingDetachedComments []string `protobuf:"bytes,6,rep,name=leading_detached_comments,json=leadingDetachedComments" json:"leading_detached_comments,omitempty"` + XXX_NoUnkeyedLiteral struct{} `json:"-"` + XXX_unrecognized []byte `json:"-"` + XXX_sizecache int32 `json:"-"` +} + +func (m *SourceCodeInfo_Location) Reset() { *m = SourceCodeInfo_Location{} } +func (m *SourceCodeInfo_Location) String() string { return proto.CompactTextString(m) } +func (*SourceCodeInfo_Location) ProtoMessage() {} +func (*SourceCodeInfo_Location) Descriptor() ([]byte, []int) { + return fileDescriptor_descriptor_9588782fb9cbecd6, []int{19, 0} +} +func (m *SourceCodeInfo_Location) XXX_Unmarshal(b []byte) error { + return xxx_messageInfo_SourceCodeInfo_Location.Unmarshal(m, b) +} +func (m *SourceCodeInfo_Location) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { + return xxx_messageInfo_SourceCodeInfo_Location.Marshal(b, m, deterministic) +} +func (dst *SourceCodeInfo_Location) XXX_Merge(src proto.Message) { + xxx_messageInfo_SourceCodeInfo_Location.Merge(dst, src) +} +func (m *SourceCodeInfo_Location) XXX_Size() int { + return xxx_messageInfo_SourceCodeInfo_Location.Size(m) +} +func (m *SourceCodeInfo_Location) XXX_DiscardUnknown() { + xxx_messageInfo_SourceCodeInfo_Location.DiscardUnknown(m) +} + +var xxx_messageInfo_SourceCodeInfo_Location proto.InternalMessageInfo + +func (m *SourceCodeInfo_Location) GetPath() []int32 { + if m != nil { + return m.Path + } + return nil +} + +func (m *SourceCodeInfo_Location) GetSpan() []int32 { + if m != nil { + return m.Span + } + return nil +} + +func (m *SourceCodeInfo_Location) GetLeadingComments() string { + if m != nil && m.LeadingComments != nil { + return *m.LeadingComments + } + return "" +} + +func (m *SourceCodeInfo_Location) GetTrailingComments() string { + if m != nil && m.TrailingComments != nil { + return *m.TrailingComments + } + return "" +} + +func (m *SourceCodeInfo_Location) GetLeadingDetachedComments() []string { + if m != nil { + return m.LeadingDetachedComments + } + return nil +} + +// Describes the relationship between generated code and its original source +// file. A GeneratedCodeInfo message is associated with only one generated +// source file, but may contain references to different source .proto files. +type GeneratedCodeInfo struct { + // An Annotation connects some span of text in generated code to an element + // of its generating .proto file. + Annotation []*GeneratedCodeInfo_Annotation `protobuf:"bytes,1,rep,name=annotation" json:"annotation,omitempty"` + XXX_NoUnkeyedLiteral struct{} `json:"-"` + XXX_unrecognized []byte `json:"-"` + XXX_sizecache int32 `json:"-"` +} + +func (m *GeneratedCodeInfo) Reset() { *m = GeneratedCodeInfo{} } +func (m *GeneratedCodeInfo) String() string { return proto.CompactTextString(m) } +func (*GeneratedCodeInfo) ProtoMessage() {} +func (*GeneratedCodeInfo) Descriptor() ([]byte, []int) { + return fileDescriptor_descriptor_9588782fb9cbecd6, []int{20} +} +func (m *GeneratedCodeInfo) XXX_Unmarshal(b []byte) error { + return xxx_messageInfo_GeneratedCodeInfo.Unmarshal(m, b) +} +func (m *GeneratedCodeInfo) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { + return xxx_messageInfo_GeneratedCodeInfo.Marshal(b, m, deterministic) +} +func (dst *GeneratedCodeInfo) XXX_Merge(src proto.Message) { + xxx_messageInfo_GeneratedCodeInfo.Merge(dst, src) +} +func (m *GeneratedCodeInfo) XXX_Size() int { + return xxx_messageInfo_GeneratedCodeInfo.Size(m) +} +func (m *GeneratedCodeInfo) XXX_DiscardUnknown() { + xxx_messageInfo_GeneratedCodeInfo.DiscardUnknown(m) +} + +var xxx_messageInfo_GeneratedCodeInfo proto.InternalMessageInfo + +func (m *GeneratedCodeInfo) GetAnnotation() []*GeneratedCodeInfo_Annotation { + if m != nil { + return m.Annotation + } + return nil +} + +type GeneratedCodeInfo_Annotation struct { + // Identifies the element in the original source .proto file. This field + // is formatted the same as SourceCodeInfo.Location.path. + Path []int32 `protobuf:"varint,1,rep,packed,name=path" json:"path,omitempty"` + // Identifies the filesystem path to the original source .proto. + SourceFile *string `protobuf:"bytes,2,opt,name=source_file,json=sourceFile" json:"source_file,omitempty"` + // Identifies the starting offset in bytes in the generated code + // that relates to the identified object. + Begin *int32 `protobuf:"varint,3,opt,name=begin" json:"begin,omitempty"` + // Identifies the ending offset in bytes in the generated code that + // relates to the identified offset. The end offset should be one past + // the last relevant byte (so the length of the text = end - begin). + End *int32 `protobuf:"varint,4,opt,name=end" json:"end,omitempty"` + XXX_NoUnkeyedLiteral struct{} `json:"-"` + XXX_unrecognized []byte `json:"-"` + XXX_sizecache int32 `json:"-"` +} + +func (m *GeneratedCodeInfo_Annotation) Reset() { *m = GeneratedCodeInfo_Annotation{} } +func (m *GeneratedCodeInfo_Annotation) String() string { return proto.CompactTextString(m) } +func (*GeneratedCodeInfo_Annotation) ProtoMessage() {} +func (*GeneratedCodeInfo_Annotation) Descriptor() ([]byte, []int) { + return fileDescriptor_descriptor_9588782fb9cbecd6, []int{20, 0} +} +func (m *GeneratedCodeInfo_Annotation) XXX_Unmarshal(b []byte) error { + return xxx_messageInfo_GeneratedCodeInfo_Annotation.Unmarshal(m, b) +} +func (m *GeneratedCodeInfo_Annotation) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { + return xxx_messageInfo_GeneratedCodeInfo_Annotation.Marshal(b, m, deterministic) +} +func (dst *GeneratedCodeInfo_Annotation) XXX_Merge(src proto.Message) { + xxx_messageInfo_GeneratedCodeInfo_Annotation.Merge(dst, src) +} +func (m *GeneratedCodeInfo_Annotation) XXX_Size() int { + return xxx_messageInfo_GeneratedCodeInfo_Annotation.Size(m) +} +func (m *GeneratedCodeInfo_Annotation) XXX_DiscardUnknown() { + xxx_messageInfo_GeneratedCodeInfo_Annotation.DiscardUnknown(m) +} + +var xxx_messageInfo_GeneratedCodeInfo_Annotation proto.InternalMessageInfo + +func (m *GeneratedCodeInfo_Annotation) GetPath() []int32 { + if m != nil { + return m.Path + } + return nil +} + +func (m *GeneratedCodeInfo_Annotation) GetSourceFile() string { + if m != nil && m.SourceFile != nil { + return *m.SourceFile + } + return "" +} + +func (m *GeneratedCodeInfo_Annotation) GetBegin() int32 { + if m != nil && m.Begin != nil { + return *m.Begin + } + return 0 +} + +func (m *GeneratedCodeInfo_Annotation) GetEnd() int32 { + if m != nil && m.End != nil { + return *m.End + } + return 0 +} + +func init() { + proto.RegisterType((*FileDescriptorSet)(nil), "google.protobuf.FileDescriptorSet") + proto.RegisterType((*FileDescriptorProto)(nil), "google.protobuf.FileDescriptorProto") + proto.RegisterType((*DescriptorProto)(nil), "google.protobuf.DescriptorProto") + proto.RegisterType((*DescriptorProto_ExtensionRange)(nil), "google.protobuf.DescriptorProto.ExtensionRange") + proto.RegisterType((*DescriptorProto_ReservedRange)(nil), "google.protobuf.DescriptorProto.ReservedRange") + proto.RegisterType((*ExtensionRangeOptions)(nil), "google.protobuf.ExtensionRangeOptions") + proto.RegisterType((*FieldDescriptorProto)(nil), "google.protobuf.FieldDescriptorProto") + proto.RegisterType((*OneofDescriptorProto)(nil), "google.protobuf.OneofDescriptorProto") + proto.RegisterType((*EnumDescriptorProto)(nil), "google.protobuf.EnumDescriptorProto") + proto.RegisterType((*EnumDescriptorProto_EnumReservedRange)(nil), "google.protobuf.EnumDescriptorProto.EnumReservedRange") + proto.RegisterType((*EnumValueDescriptorProto)(nil), "google.protobuf.EnumValueDescriptorProto") + proto.RegisterType((*ServiceDescriptorProto)(nil), "google.protobuf.ServiceDescriptorProto") + proto.RegisterType((*MethodDescriptorProto)(nil), "google.protobuf.MethodDescriptorProto") + proto.RegisterType((*FileOptions)(nil), "google.protobuf.FileOptions") + proto.RegisterType((*MessageOptions)(nil), "google.protobuf.MessageOptions") + proto.RegisterType((*FieldOptions)(nil), "google.protobuf.FieldOptions") + proto.RegisterType((*OneofOptions)(nil), "google.protobuf.OneofOptions") + proto.RegisterType((*EnumOptions)(nil), "google.protobuf.EnumOptions") + proto.RegisterType((*EnumValueOptions)(nil), "google.protobuf.EnumValueOptions") + proto.RegisterType((*ServiceOptions)(nil), "google.protobuf.ServiceOptions") + proto.RegisterType((*MethodOptions)(nil), "google.protobuf.MethodOptions") + proto.RegisterType((*UninterpretedOption)(nil), "google.protobuf.UninterpretedOption") + proto.RegisterType((*UninterpretedOption_NamePart)(nil), "google.protobuf.UninterpretedOption.NamePart") + proto.RegisterType((*SourceCodeInfo)(nil), "google.protobuf.SourceCodeInfo") + proto.RegisterType((*SourceCodeInfo_Location)(nil), "google.protobuf.SourceCodeInfo.Location") + proto.RegisterType((*GeneratedCodeInfo)(nil), "google.protobuf.GeneratedCodeInfo") + proto.RegisterType((*GeneratedCodeInfo_Annotation)(nil), "google.protobuf.GeneratedCodeInfo.Annotation") + proto.RegisterEnum("google.protobuf.FieldDescriptorProto_Type", FieldDescriptorProto_Type_name, FieldDescriptorProto_Type_value) + proto.RegisterEnum("google.protobuf.FieldDescriptorProto_Label", FieldDescriptorProto_Label_name, FieldDescriptorProto_Label_value) + proto.RegisterEnum("google.protobuf.FileOptions_OptimizeMode", FileOptions_OptimizeMode_name, FileOptions_OptimizeMode_value) + proto.RegisterEnum("google.protobuf.FieldOptions_CType", FieldOptions_CType_name, FieldOptions_CType_value) + proto.RegisterEnum("google.protobuf.FieldOptions_JSType", FieldOptions_JSType_name, FieldOptions_JSType_value) + proto.RegisterEnum("google.protobuf.MethodOptions_IdempotencyLevel", MethodOptions_IdempotencyLevel_name, MethodOptions_IdempotencyLevel_value) +} + +func init() { proto.RegisterFile("descriptor.proto", fileDescriptor_descriptor_9588782fb9cbecd6) } + +var fileDescriptor_descriptor_9588782fb9cbecd6 = []byte{ + // 2487 bytes of a gzipped FileDescriptorProto + 0x1f, 0x8b, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0xff, 0xc4, 0x59, 0xcd, 0x6f, 0xdb, 0xc8, + 0x15, 0x5f, 0x7d, 0x5a, 0x7a, 0x92, 0xe5, 0xf1, 0xd8, 0x9b, 0x30, 0xde, 0x8f, 0x38, 0xda, 0x8f, + 0x38, 0x49, 0xab, 0x2c, 0x9c, 0xc4, 0xc9, 0x3a, 0xc5, 0xb6, 0xb2, 0xc4, 0x78, 0x95, 0xca, 0x92, + 0x4a, 0xc9, 0xdd, 0x64, 0x8b, 0x82, 0x18, 0x93, 0x23, 0x89, 0x09, 0x45, 0x72, 0x49, 0x2a, 0x89, + 0x83, 0x1e, 0x02, 0xf4, 0xd4, 0xff, 0xa0, 0x28, 0x8a, 0x1e, 0x7a, 0x59, 0xa0, 0xd7, 0x02, 0x05, + 0xda, 0x7b, 0xaf, 0x05, 0x7a, 0xef, 0xa1, 0x40, 0x0b, 0xb4, 0x7f, 0x42, 0x8f, 0xc5, 0xcc, 0x90, + 0x14, 0xf5, 0x95, 0x78, 0x17, 0x48, 0xf6, 0x64, 0xcf, 0xef, 0xfd, 0xde, 0xe3, 0x9b, 0x37, 0x6f, + 0xde, 0xbc, 0x19, 0x01, 0xd2, 0xa9, 0xa7, 0xb9, 0x86, 0xe3, 0xdb, 0x6e, 0xc5, 0x71, 0x6d, 0xdf, + 0xc6, 0x6b, 0x03, 0xdb, 0x1e, 0x98, 0x54, 0x8c, 0x4e, 0xc6, 0xfd, 0xf2, 0x11, 0xac, 0xdf, 0x33, + 0x4c, 0x5a, 0x8f, 0x88, 0x5d, 0xea, 0xe3, 0x3b, 0x90, 0xee, 0x1b, 0x26, 0x95, 0x12, 0xdb, 0xa9, + 0x9d, 0xc2, 0xee, 0x87, 0x95, 0x19, 0xa5, 0xca, 0xb4, 0x46, 0x87, 0xc1, 0x0a, 0xd7, 0x28, 0xff, + 0x3b, 0x0d, 0x1b, 0x0b, 0xa4, 0x18, 0x43, 0xda, 0x22, 0x23, 0x66, 0x31, 0xb1, 0x93, 0x57, 0xf8, + 0xff, 0x58, 0x82, 0x15, 0x87, 0x68, 0x8f, 0xc9, 0x80, 0x4a, 0x49, 0x0e, 0x87, 0x43, 0xfc, 0x3e, + 0x80, 0x4e, 0x1d, 0x6a, 0xe9, 0xd4, 0xd2, 0x4e, 0xa5, 0xd4, 0x76, 0x6a, 0x27, 0xaf, 0xc4, 0x10, + 0x7c, 0x0d, 0xd6, 0x9d, 0xf1, 0x89, 0x69, 0x68, 0x6a, 0x8c, 0x06, 0xdb, 0xa9, 0x9d, 0x8c, 0x82, + 0x84, 0xa0, 0x3e, 0x21, 0x5f, 0x86, 0xb5, 0xa7, 0x94, 0x3c, 0x8e, 0x53, 0x0b, 0x9c, 0x5a, 0x62, + 0x70, 0x8c, 0x58, 0x83, 0xe2, 0x88, 0x7a, 0x1e, 0x19, 0x50, 0xd5, 0x3f, 0x75, 0xa8, 0x94, 0xe6, + 0xb3, 0xdf, 0x9e, 0x9b, 0xfd, 0xec, 0xcc, 0x0b, 0x81, 0x56, 0xef, 0xd4, 0xa1, 0xb8, 0x0a, 0x79, + 0x6a, 0x8d, 0x47, 0xc2, 0x42, 0x66, 0x49, 0xfc, 0x64, 0x6b, 0x3c, 0x9a, 0xb5, 0x92, 0x63, 0x6a, + 0x81, 0x89, 0x15, 0x8f, 0xba, 0x4f, 0x0c, 0x8d, 0x4a, 0x59, 0x6e, 0xe0, 0xf2, 0x9c, 0x81, 0xae, + 0x90, 0xcf, 0xda, 0x08, 0xf5, 0x70, 0x0d, 0xf2, 0xf4, 0x99, 0x4f, 0x2d, 0xcf, 0xb0, 0x2d, 0x69, + 0x85, 0x1b, 0xf9, 0x68, 0xc1, 0x2a, 0x52, 0x53, 0x9f, 0x35, 0x31, 0xd1, 0xc3, 0x7b, 0xb0, 0x62, + 0x3b, 0xbe, 0x61, 0x5b, 0x9e, 0x94, 0xdb, 0x4e, 0xec, 0x14, 0x76, 0xdf, 0x5d, 0x98, 0x08, 0x6d, + 0xc1, 0x51, 0x42, 0x32, 0x6e, 0x00, 0xf2, 0xec, 0xb1, 0xab, 0x51, 0x55, 0xb3, 0x75, 0xaa, 0x1a, + 0x56, 0xdf, 0x96, 0xf2, 0xdc, 0xc0, 0xc5, 0xf9, 0x89, 0x70, 0x62, 0xcd, 0xd6, 0x69, 0xc3, 0xea, + 0xdb, 0x4a, 0xc9, 0x9b, 0x1a, 0xe3, 0x73, 0x90, 0xf5, 0x4e, 0x2d, 0x9f, 0x3c, 0x93, 0x8a, 0x3c, + 0x43, 0x82, 0x51, 0xf9, 0xcf, 0x59, 0x58, 0x3b, 0x4b, 0x8a, 0xdd, 0x85, 0x4c, 0x9f, 0xcd, 0x52, + 0x4a, 0x7e, 0x93, 0x18, 0x08, 0x9d, 0xe9, 0x20, 0x66, 0xbf, 0x65, 0x10, 0xab, 0x50, 0xb0, 0xa8, + 0xe7, 0x53, 0x5d, 0x64, 0x44, 0xea, 0x8c, 0x39, 0x05, 0x42, 0x69, 0x3e, 0xa5, 0xd2, 0xdf, 0x2a, + 0xa5, 0x1e, 0xc0, 0x5a, 0xe4, 0x92, 0xea, 0x12, 0x6b, 0x10, 0xe6, 0xe6, 0xf5, 0x57, 0x79, 0x52, + 0x91, 0x43, 0x3d, 0x85, 0xa9, 0x29, 0x25, 0x3a, 0x35, 0xc6, 0x75, 0x00, 0xdb, 0xa2, 0x76, 0x5f, + 0xd5, 0xa9, 0x66, 0x4a, 0xb9, 0x25, 0x51, 0x6a, 0x33, 0xca, 0x5c, 0x94, 0x6c, 0x81, 0x6a, 0x26, + 0xfe, 0x74, 0x92, 0x6a, 0x2b, 0x4b, 0x32, 0xe5, 0x48, 0x6c, 0xb2, 0xb9, 0x6c, 0x3b, 0x86, 0x92, + 0x4b, 0x59, 0xde, 0x53, 0x3d, 0x98, 0x59, 0x9e, 0x3b, 0x51, 0x79, 0xe5, 0xcc, 0x94, 0x40, 0x4d, + 0x4c, 0x6c, 0xd5, 0x8d, 0x0f, 0xf1, 0x07, 0x10, 0x01, 0x2a, 0x4f, 0x2b, 0xe0, 0x55, 0xa8, 0x18, + 0x82, 0x2d, 0x32, 0xa2, 0x5b, 0xcf, 0xa1, 0x34, 0x1d, 0x1e, 0xbc, 0x09, 0x19, 0xcf, 0x27, 0xae, + 0xcf, 0xb3, 0x30, 0xa3, 0x88, 0x01, 0x46, 0x90, 0xa2, 0x96, 0xce, 0xab, 0x5c, 0x46, 0x61, 0xff, + 0xe2, 0x1f, 0x4d, 0x26, 0x9c, 0xe2, 0x13, 0xfe, 0x78, 0x7e, 0x45, 0xa7, 0x2c, 0xcf, 0xce, 0x7b, + 0xeb, 0x36, 0xac, 0x4e, 0x4d, 0xe0, 0xac, 0x9f, 0x2e, 0xff, 0x02, 0xde, 0x5e, 0x68, 0x1a, 0x3f, + 0x80, 0xcd, 0xb1, 0x65, 0x58, 0x3e, 0x75, 0x1d, 0x97, 0xb2, 0x8c, 0x15, 0x9f, 0x92, 0xfe, 0xb3, + 0xb2, 0x24, 0xe7, 0x8e, 0xe3, 0x6c, 0x61, 0x45, 0xd9, 0x18, 0xcf, 0x83, 0x57, 0xf3, 0xb9, 0xff, + 0xae, 0xa0, 0x17, 0x2f, 0x5e, 0xbc, 0x48, 0x96, 0x7f, 0x9d, 0x85, 0xcd, 0x45, 0x7b, 0x66, 0xe1, + 0xf6, 0x3d, 0x07, 0x59, 0x6b, 0x3c, 0x3a, 0xa1, 0x2e, 0x0f, 0x52, 0x46, 0x09, 0x46, 0xb8, 0x0a, + 0x19, 0x93, 0x9c, 0x50, 0x53, 0x4a, 0x6f, 0x27, 0x76, 0x4a, 0xbb, 0xd7, 0xce, 0xb4, 0x2b, 0x2b, + 0x4d, 0xa6, 0xa2, 0x08, 0x4d, 0xfc, 0x19, 0xa4, 0x83, 0x12, 0xcd, 0x2c, 0x5c, 0x3d, 0x9b, 0x05, + 0xb6, 0x97, 0x14, 0xae, 0x87, 0xdf, 0x81, 0x3c, 0xfb, 0x2b, 0x72, 0x23, 0xcb, 0x7d, 0xce, 0x31, + 0x80, 0xe5, 0x05, 0xde, 0x82, 0x1c, 0xdf, 0x26, 0x3a, 0x0d, 0x8f, 0xb6, 0x68, 0xcc, 0x12, 0x4b, + 0xa7, 0x7d, 0x32, 0x36, 0x7d, 0xf5, 0x09, 0x31, 0xc7, 0x94, 0x27, 0x7c, 0x5e, 0x29, 0x06, 0xe0, + 0x4f, 0x19, 0x86, 0x2f, 0x42, 0x41, 0xec, 0x2a, 0xc3, 0xd2, 0xe9, 0x33, 0x5e, 0x3d, 0x33, 0x8a, + 0xd8, 0x68, 0x0d, 0x86, 0xb0, 0xcf, 0x3f, 0xf2, 0x6c, 0x2b, 0x4c, 0x4d, 0xfe, 0x09, 0x06, 0xf0, + 0xcf, 0xdf, 0x9e, 0x2d, 0xdc, 0xef, 0x2d, 0x9e, 0xde, 0x6c, 0x4e, 0x95, 0xff, 0x94, 0x84, 0x34, + 0xaf, 0x17, 0x6b, 0x50, 0xe8, 0x3d, 0xec, 0xc8, 0x6a, 0xbd, 0x7d, 0x7c, 0xd0, 0x94, 0x51, 0x02, + 0x97, 0x00, 0x38, 0x70, 0xaf, 0xd9, 0xae, 0xf6, 0x50, 0x32, 0x1a, 0x37, 0x5a, 0xbd, 0xbd, 0x9b, + 0x28, 0x15, 0x29, 0x1c, 0x0b, 0x20, 0x1d, 0x27, 0xdc, 0xd8, 0x45, 0x19, 0x8c, 0xa0, 0x28, 0x0c, + 0x34, 0x1e, 0xc8, 0xf5, 0xbd, 0x9b, 0x28, 0x3b, 0x8d, 0xdc, 0xd8, 0x45, 0x2b, 0x78, 0x15, 0xf2, + 0x1c, 0x39, 0x68, 0xb7, 0x9b, 0x28, 0x17, 0xd9, 0xec, 0xf6, 0x94, 0x46, 0xeb, 0x10, 0xe5, 0x23, + 0x9b, 0x87, 0x4a, 0xfb, 0xb8, 0x83, 0x20, 0xb2, 0x70, 0x24, 0x77, 0xbb, 0xd5, 0x43, 0x19, 0x15, + 0x22, 0xc6, 0xc1, 0xc3, 0x9e, 0xdc, 0x45, 0xc5, 0x29, 0xb7, 0x6e, 0xec, 0xa2, 0xd5, 0xe8, 0x13, + 0x72, 0xeb, 0xf8, 0x08, 0x95, 0xf0, 0x3a, 0xac, 0x8a, 0x4f, 0x84, 0x4e, 0xac, 0xcd, 0x40, 0x7b, + 0x37, 0x11, 0x9a, 0x38, 0x22, 0xac, 0xac, 0x4f, 0x01, 0x7b, 0x37, 0x11, 0x2e, 0xd7, 0x20, 0xc3, + 0xb3, 0x0b, 0x63, 0x28, 0x35, 0xab, 0x07, 0x72, 0x53, 0x6d, 0x77, 0x7a, 0x8d, 0x76, 0xab, 0xda, + 0x44, 0x89, 0x09, 0xa6, 0xc8, 0x3f, 0x39, 0x6e, 0x28, 0x72, 0x1d, 0x25, 0xe3, 0x58, 0x47, 0xae, + 0xf6, 0xe4, 0x3a, 0x4a, 0x95, 0x35, 0xd8, 0x5c, 0x54, 0x27, 0x17, 0xee, 0x8c, 0xd8, 0x12, 0x27, + 0x97, 0x2c, 0x31, 0xb7, 0x35, 0xb7, 0xc4, 0xff, 0x4a, 0xc2, 0xc6, 0x82, 0xb3, 0x62, 0xe1, 0x47, + 0x7e, 0x08, 0x19, 0x91, 0xa2, 0xe2, 0xf4, 0xbc, 0xb2, 0xf0, 0xd0, 0xe1, 0x09, 0x3b, 0x77, 0x82, + 0x72, 0xbd, 0x78, 0x07, 0x91, 0x5a, 0xd2, 0x41, 0x30, 0x13, 0x73, 0x35, 0xfd, 0xe7, 0x73, 0x35, + 0x5d, 0x1c, 0x7b, 0x7b, 0x67, 0x39, 0xf6, 0x38, 0xf6, 0xcd, 0x6a, 0x7b, 0x66, 0x41, 0x6d, 0xbf, + 0x0b, 0xeb, 0x73, 0x86, 0xce, 0x5c, 0x63, 0x7f, 0x99, 0x00, 0x69, 0x59, 0x70, 0x5e, 0x51, 0xe9, + 0x92, 0x53, 0x95, 0xee, 0xee, 0x6c, 0x04, 0x2f, 0x2d, 0x5f, 0x84, 0xb9, 0xb5, 0xfe, 0x3a, 0x01, + 0xe7, 0x16, 0x77, 0x8a, 0x0b, 0x7d, 0xf8, 0x0c, 0xb2, 0x23, 0xea, 0x0f, 0xed, 0xb0, 0x5b, 0xfa, + 0x78, 0xc1, 0x19, 0xcc, 0xc4, 0xb3, 0x8b, 0x1d, 0x68, 0xc5, 0x0f, 0xf1, 0xd4, 0xb2, 0x76, 0x4f, + 0x78, 0x33, 0xe7, 0xe9, 0xaf, 0x92, 0xf0, 0xf6, 0x42, 0xe3, 0x0b, 0x1d, 0x7d, 0x0f, 0xc0, 0xb0, + 0x9c, 0xb1, 0x2f, 0x3a, 0x22, 0x51, 0x60, 0xf3, 0x1c, 0xe1, 0xc5, 0x8b, 0x15, 0xcf, 0xb1, 0x1f, + 0xc9, 0x53, 0x5c, 0x0e, 0x02, 0xe2, 0x84, 0x3b, 0x13, 0x47, 0xd3, 0xdc, 0xd1, 0xf7, 0x97, 0xcc, + 0x74, 0x2e, 0x31, 0x3f, 0x01, 0xa4, 0x99, 0x06, 0xb5, 0x7c, 0xd5, 0xf3, 0x5d, 0x4a, 0x46, 0x86, + 0x35, 0xe0, 0x27, 0x48, 0x6e, 0x3f, 0xd3, 0x27, 0xa6, 0x47, 0x95, 0x35, 0x21, 0xee, 0x86, 0x52, + 0xa6, 0xc1, 0x13, 0xc8, 0x8d, 0x69, 0x64, 0xa7, 0x34, 0x84, 0x38, 0xd2, 0x28, 0xff, 0x31, 0x07, + 0x85, 0x58, 0x5f, 0x8d, 0x2f, 0x41, 0xf1, 0x11, 0x79, 0x42, 0xd4, 0xf0, 0xae, 0x24, 0x22, 0x51, + 0x60, 0x58, 0x27, 0xb8, 0x2f, 0x7d, 0x02, 0x9b, 0x9c, 0x62, 0x8f, 0x7d, 0xea, 0xaa, 0x9a, 0x49, + 0x3c, 0x8f, 0x07, 0x2d, 0xc7, 0xa9, 0x98, 0xc9, 0xda, 0x4c, 0x54, 0x0b, 0x25, 0xf8, 0x16, 0x6c, + 0x70, 0x8d, 0xd1, 0xd8, 0xf4, 0x0d, 0xc7, 0xa4, 0x2a, 0xbb, 0xbd, 0x79, 0xfc, 0x24, 0x89, 0x3c, + 0x5b, 0x67, 0x8c, 0xa3, 0x80, 0xc0, 0x3c, 0xf2, 0x70, 0x1d, 0xde, 0xe3, 0x6a, 0x03, 0x6a, 0x51, + 0x97, 0xf8, 0x54, 0xa5, 0x5f, 0x8d, 0x89, 0xe9, 0xa9, 0xc4, 0xd2, 0xd5, 0x21, 0xf1, 0x86, 0xd2, + 0x26, 0x33, 0x70, 0x90, 0x94, 0x12, 0xca, 0x05, 0x46, 0x3c, 0x0c, 0x78, 0x32, 0xa7, 0x55, 0x2d, + 0xfd, 0x73, 0xe2, 0x0d, 0xf1, 0x3e, 0x9c, 0xe3, 0x56, 0x3c, 0xdf, 0x35, 0xac, 0x81, 0xaa, 0x0d, + 0xa9, 0xf6, 0x58, 0x1d, 0xfb, 0xfd, 0x3b, 0xd2, 0x3b, 0xf1, 0xef, 0x73, 0x0f, 0xbb, 0x9c, 0x53, + 0x63, 0x94, 0x63, 0xbf, 0x7f, 0x07, 0x77, 0xa1, 0xc8, 0x16, 0x63, 0x64, 0x3c, 0xa7, 0x6a, 0xdf, + 0x76, 0xf9, 0xd1, 0x58, 0x5a, 0x50, 0x9a, 0x62, 0x11, 0xac, 0xb4, 0x03, 0x85, 0x23, 0x5b, 0xa7, + 0xfb, 0x99, 0x6e, 0x47, 0x96, 0xeb, 0x4a, 0x21, 0xb4, 0x72, 0xcf, 0x76, 0x59, 0x42, 0x0d, 0xec, + 0x28, 0xc0, 0x05, 0x91, 0x50, 0x03, 0x3b, 0x0c, 0xef, 0x2d, 0xd8, 0xd0, 0x34, 0x31, 0x67, 0x43, + 0x53, 0x83, 0x3b, 0x96, 0x27, 0xa1, 0xa9, 0x60, 0x69, 0xda, 0xa1, 0x20, 0x04, 0x39, 0xee, 0xe1, + 0x4f, 0xe1, 0xed, 0x49, 0xb0, 0xe2, 0x8a, 0xeb, 0x73, 0xb3, 0x9c, 0x55, 0xbd, 0x05, 0x1b, 0xce, + 0xe9, 0xbc, 0x22, 0x9e, 0xfa, 0xa2, 0x73, 0x3a, 0xab, 0x76, 0x1b, 0x36, 0x9d, 0xa1, 0x33, 0xaf, + 0x77, 0x35, 0xae, 0x87, 0x9d, 0xa1, 0x33, 0xab, 0xf8, 0x11, 0xbf, 0x70, 0xbb, 0x54, 0x23, 0x3e, + 0xd5, 0xa5, 0xf3, 0x71, 0x7a, 0x4c, 0x80, 0xaf, 0x03, 0xd2, 0x34, 0x95, 0x5a, 0xe4, 0xc4, 0xa4, + 0x2a, 0x71, 0xa9, 0x45, 0x3c, 0xe9, 0x62, 0x9c, 0x5c, 0xd2, 0x34, 0x99, 0x4b, 0xab, 0x5c, 0x88, + 0xaf, 0xc2, 0xba, 0x7d, 0xf2, 0x48, 0x13, 0x29, 0xa9, 0x3a, 0x2e, 0xed, 0x1b, 0xcf, 0xa4, 0x0f, + 0x79, 0x7c, 0xd7, 0x98, 0x80, 0x27, 0x64, 0x87, 0xc3, 0xf8, 0x0a, 0x20, 0xcd, 0x1b, 0x12, 0xd7, + 0xe1, 0x35, 0xd9, 0x73, 0x88, 0x46, 0xa5, 0x8f, 0x04, 0x55, 0xe0, 0xad, 0x10, 0x66, 0x5b, 0xc2, + 0x7b, 0x6a, 0xf4, 0xfd, 0xd0, 0xe2, 0x65, 0xb1, 0x25, 0x38, 0x16, 0x58, 0xdb, 0x01, 0xc4, 0x42, + 0x31, 0xf5, 0xe1, 0x1d, 0x4e, 0x2b, 0x39, 0x43, 0x27, 0xfe, 0xdd, 0x0f, 0x60, 0x95, 0x31, 0x27, + 0x1f, 0xbd, 0x22, 0x1a, 0x32, 0x67, 0x18, 0xfb, 0xe2, 0x6b, 0xeb, 0x8d, 0xcb, 0xfb, 0x50, 0x8c, + 0xe7, 0x27, 0xce, 0x83, 0xc8, 0x50, 0x94, 0x60, 0xcd, 0x4a, 0xad, 0x5d, 0x67, 0x6d, 0xc6, 0x97, + 0x32, 0x4a, 0xb2, 0x76, 0xa7, 0xd9, 0xe8, 0xc9, 0xaa, 0x72, 0xdc, 0xea, 0x35, 0x8e, 0x64, 0x94, + 0x8a, 0xf7, 0xd5, 0x7f, 0x4d, 0x42, 0x69, 0xfa, 0x8a, 0x84, 0x7f, 0x00, 0xe7, 0xc3, 0xf7, 0x0c, + 0x8f, 0xfa, 0xea, 0x53, 0xc3, 0xe5, 0x5b, 0x66, 0x44, 0xc4, 0xf1, 0x15, 0x2d, 0xda, 0x66, 0xc0, + 0xea, 0x52, 0xff, 0x0b, 0xc3, 0x65, 0x1b, 0x62, 0x44, 0x7c, 0xdc, 0x84, 0x8b, 0x96, 0xad, 0x7a, + 0x3e, 0xb1, 0x74, 0xe2, 0xea, 0xea, 0xe4, 0x25, 0x49, 0x25, 0x9a, 0x46, 0x3d, 0xcf, 0x16, 0x47, + 0x55, 0x64, 0xe5, 0x5d, 0xcb, 0xee, 0x06, 0xe4, 0x49, 0x0d, 0xaf, 0x06, 0xd4, 0x99, 0x04, 0x4b, + 0x2d, 0x4b, 0xb0, 0x77, 0x20, 0x3f, 0x22, 0x8e, 0x4a, 0x2d, 0xdf, 0x3d, 0xe5, 0x8d, 0x71, 0x4e, + 0xc9, 0x8d, 0x88, 0x23, 0xb3, 0xf1, 0x9b, 0xb9, 0x9f, 0xfc, 0x23, 0x05, 0xc5, 0x78, 0x73, 0xcc, + 0xee, 0x1a, 0x1a, 0x3f, 0x47, 0x12, 0xbc, 0xd2, 0x7c, 0xf0, 0xd2, 0x56, 0xba, 0x52, 0x63, 0x07, + 0xcc, 0x7e, 0x56, 0xb4, 0xac, 0x8a, 0xd0, 0x64, 0x87, 0x3b, 0xab, 0x2d, 0x54, 0xb4, 0x08, 0x39, + 0x25, 0x18, 0xe1, 0x43, 0xc8, 0x3e, 0xf2, 0xb8, 0xed, 0x2c, 0xb7, 0xfd, 0xe1, 0xcb, 0x6d, 0xdf, + 0xef, 0x72, 0xe3, 0xf9, 0xfb, 0x5d, 0xb5, 0xd5, 0x56, 0x8e, 0xaa, 0x4d, 0x25, 0x50, 0xc7, 0x17, + 0x20, 0x6d, 0x92, 0xe7, 0xa7, 0xd3, 0x47, 0x11, 0x87, 0xce, 0x1a, 0xf8, 0x0b, 0x90, 0x7e, 0x4a, + 0xc9, 0xe3, 0xe9, 0x03, 0x80, 0x43, 0xaf, 0x31, 0xf5, 0xaf, 0x43, 0x86, 0xc7, 0x0b, 0x03, 0x04, + 0x11, 0x43, 0x6f, 0xe1, 0x1c, 0xa4, 0x6b, 0x6d, 0x85, 0xa5, 0x3f, 0x82, 0xa2, 0x40, 0xd5, 0x4e, + 0x43, 0xae, 0xc9, 0x28, 0x59, 0xbe, 0x05, 0x59, 0x11, 0x04, 0xb6, 0x35, 0xa2, 0x30, 0xa0, 0xb7, + 0x82, 0x61, 0x60, 0x23, 0x11, 0x4a, 0x8f, 0x8f, 0x0e, 0x64, 0x05, 0x25, 0xe3, 0xcb, 0xeb, 0x41, + 0x31, 0xde, 0x17, 0xbf, 0x99, 0x9c, 0xfa, 0x4b, 0x02, 0x0a, 0xb1, 0x3e, 0x97, 0x35, 0x28, 0xc4, + 0x34, 0xed, 0xa7, 0x2a, 0x31, 0x0d, 0xe2, 0x05, 0x49, 0x01, 0x1c, 0xaa, 0x32, 0xe4, 0xac, 0x8b, + 0xf6, 0x46, 0x9c, 0xff, 0x5d, 0x02, 0xd0, 0x6c, 0x8b, 0x39, 0xe3, 0x60, 0xe2, 0x3b, 0x75, 0xf0, + 0xb7, 0x09, 0x28, 0x4d, 0xf7, 0x95, 0x33, 0xee, 0x5d, 0xfa, 0x4e, 0xdd, 0xfb, 0x67, 0x12, 0x56, + 0xa7, 0xba, 0xc9, 0xb3, 0x7a, 0xf7, 0x15, 0xac, 0x1b, 0x3a, 0x1d, 0x39, 0xb6, 0x4f, 0x2d, 0xed, + 0x54, 0x35, 0xe9, 0x13, 0x6a, 0x4a, 0x65, 0x5e, 0x28, 0xae, 0xbf, 0xbc, 0x5f, 0xad, 0x34, 0x26, + 0x7a, 0x4d, 0xa6, 0xb6, 0xbf, 0xd1, 0xa8, 0xcb, 0x47, 0x9d, 0x76, 0x4f, 0x6e, 0xd5, 0x1e, 0xaa, + 0xc7, 0xad, 0x1f, 0xb7, 0xda, 0x5f, 0xb4, 0x14, 0x64, 0xcc, 0xd0, 0x5e, 0xe3, 0x56, 0xef, 0x00, + 0x9a, 0x75, 0x0a, 0x9f, 0x87, 0x45, 0x6e, 0xa1, 0xb7, 0xf0, 0x06, 0xac, 0xb5, 0xda, 0x6a, 0xb7, + 0x51, 0x97, 0x55, 0xf9, 0xde, 0x3d, 0xb9, 0xd6, 0xeb, 0x8a, 0x17, 0x88, 0x88, 0xdd, 0x9b, 0xde, + 0xd4, 0xbf, 0x49, 0xc1, 0xc6, 0x02, 0x4f, 0x70, 0x35, 0xb8, 0x3b, 0x88, 0xeb, 0xcc, 0xf7, 0xcf, + 0xe2, 0x7d, 0x85, 0x1d, 0xf9, 0x1d, 0xe2, 0xfa, 0xc1, 0x55, 0xe3, 0x0a, 0xb0, 0x28, 0x59, 0xbe, + 0xd1, 0x37, 0xa8, 0x1b, 0x3c, 0xd8, 0x88, 0x0b, 0xc5, 0xda, 0x04, 0x17, 0x6f, 0x36, 0xdf, 0x03, + 0xec, 0xd8, 0x9e, 0xe1, 0x1b, 0x4f, 0xa8, 0x6a, 0x58, 0xe1, 0xeb, 0x0e, 0xbb, 0x60, 0xa4, 0x15, + 0x14, 0x4a, 0x1a, 0x96, 0x1f, 0xb1, 0x2d, 0x3a, 0x20, 0x33, 0x6c, 0x56, 0xc0, 0x53, 0x0a, 0x0a, + 0x25, 0x11, 0xfb, 0x12, 0x14, 0x75, 0x7b, 0xcc, 0xba, 0x2e, 0xc1, 0x63, 0xe7, 0x45, 0x42, 0x29, + 0x08, 0x2c, 0xa2, 0x04, 0xfd, 0xf4, 0xe4, 0x59, 0xa9, 0xa8, 0x14, 0x04, 0x26, 0x28, 0x97, 0x61, + 0x8d, 0x0c, 0x06, 0x2e, 0x33, 0x1e, 0x1a, 0x12, 0x37, 0x84, 0x52, 0x04, 0x73, 0xe2, 0xd6, 0x7d, + 0xc8, 0x85, 0x71, 0x60, 0x47, 0x32, 0x8b, 0x84, 0xea, 0x88, 0x6b, 0x6f, 0x72, 0x27, 0xaf, 0xe4, + 0xac, 0x50, 0x78, 0x09, 0x8a, 0x86, 0xa7, 0x4e, 0x5e, 0xc9, 0x93, 0xdb, 0xc9, 0x9d, 0x9c, 0x52, + 0x30, 0xbc, 0xe8, 0x85, 0xb1, 0xfc, 0x75, 0x12, 0x4a, 0xd3, 0xaf, 0xfc, 0xb8, 0x0e, 0x39, 0xd3, + 0xd6, 0x08, 0x4f, 0x2d, 0xf1, 0x13, 0xd3, 0xce, 0x2b, 0x7e, 0x18, 0xa8, 0x34, 0x03, 0xbe, 0x12, + 0x69, 0x6e, 0xfd, 0x2d, 0x01, 0xb9, 0x10, 0xc6, 0xe7, 0x20, 0xed, 0x10, 0x7f, 0xc8, 0xcd, 0x65, + 0x0e, 0x92, 0x28, 0xa1, 0xf0, 0x31, 0xc3, 0x3d, 0x87, 0x58, 0x3c, 0x05, 0x02, 0x9c, 0x8d, 0xd9, + 0xba, 0x9a, 0x94, 0xe8, 0xfc, 0xfa, 0x61, 0x8f, 0x46, 0xd4, 0xf2, 0xbd, 0x70, 0x5d, 0x03, 0xbc, + 0x16, 0xc0, 0xf8, 0x1a, 0xac, 0xfb, 0x2e, 0x31, 0xcc, 0x29, 0x6e, 0x9a, 0x73, 0x51, 0x28, 0x88, + 0xc8, 0xfb, 0x70, 0x21, 0xb4, 0xab, 0x53, 0x9f, 0x68, 0x43, 0xaa, 0x4f, 0x94, 0xb2, 0xfc, 0x99, + 0xe1, 0x7c, 0x40, 0xa8, 0x07, 0xf2, 0x50, 0xb7, 0xfc, 0xf7, 0x04, 0xac, 0x87, 0x17, 0x26, 0x3d, + 0x0a, 0xd6, 0x11, 0x00, 0xb1, 0x2c, 0xdb, 0x8f, 0x87, 0x6b, 0x3e, 0x95, 0xe7, 0xf4, 0x2a, 0xd5, + 0x48, 0x49, 0x89, 0x19, 0xd8, 0x1a, 0x01, 0x4c, 0x24, 0x4b, 0xc3, 0x76, 0x11, 0x0a, 0xc1, 0x4f, + 0x38, 0xfc, 0x77, 0x40, 0x71, 0xc5, 0x06, 0x01, 0xb1, 0x9b, 0x15, 0xde, 0x84, 0xcc, 0x09, 0x1d, + 0x18, 0x56, 0xf0, 0x30, 0x2b, 0x06, 0xe1, 0x43, 0x48, 0x3a, 0x7a, 0x08, 0x39, 0xf8, 0x19, 0x6c, + 0x68, 0xf6, 0x68, 0xd6, 0xdd, 0x03, 0x34, 0x73, 0xcd, 0xf7, 0x3e, 0x4f, 0x7c, 0x09, 0x93, 0x16, + 0xf3, 0x7f, 0x89, 0xc4, 0xef, 0x93, 0xa9, 0xc3, 0xce, 0xc1, 0x1f, 0x92, 0x5b, 0x87, 0x42, 0xb5, + 0x13, 0xce, 0x54, 0xa1, 0x7d, 0x93, 0x6a, 0xcc, 0xfb, 0xff, 0x07, 0x00, 0x00, 0xff, 0xff, 0xa3, + 0x58, 0x22, 0x30, 0xdf, 0x1c, 0x00, 0x00, +} diff --git a/vendor/github.com/gogo/protobuf/protoc-gen-gogo/descriptor/descriptor_gostring.gen.go b/vendor/github.com/gogo/protobuf/protoc-gen-gogo/descriptor/descriptor_gostring.gen.go new file mode 100644 index 000000000..ec6eb168d --- /dev/null +++ b/vendor/github.com/gogo/protobuf/protoc-gen-gogo/descriptor/descriptor_gostring.gen.go @@ -0,0 +1,744 @@ +// Code generated by protoc-gen-gogo. DO NOT EDIT. +// source: descriptor.proto + +package descriptor + +import fmt "fmt" +import strings "strings" +import github_com_gogo_protobuf_proto "github.com/gogo/protobuf/proto" +import sort "sort" +import strconv "strconv" +import reflect "reflect" +import proto "github.com/gogo/protobuf/proto" +import math "math" + +// Reference imports to suppress errors if they are not otherwise used. +var _ = proto.Marshal +var _ = fmt.Errorf +var _ = math.Inf + +func (this *FileDescriptorSet) GoString() string { + if this == nil { + return "nil" + } + s := make([]string, 0, 5) + s = append(s, "&descriptor.FileDescriptorSet{") + if this.File != nil { + s = append(s, "File: "+fmt.Sprintf("%#v", this.File)+",\n") + } + if this.XXX_unrecognized != nil { + s = append(s, "XXX_unrecognized:"+fmt.Sprintf("%#v", this.XXX_unrecognized)+",\n") + } + s = append(s, "}") + return strings.Join(s, "") +} +func (this *FileDescriptorProto) GoString() string { + if this == nil { + return "nil" + } + s := make([]string, 0, 16) + s = append(s, "&descriptor.FileDescriptorProto{") + if this.Name != nil { + s = append(s, "Name: "+valueToGoStringDescriptor(this.Name, "string")+",\n") + } + if this.Package != nil { + s = append(s, "Package: "+valueToGoStringDescriptor(this.Package, "string")+",\n") + } + if this.Dependency != nil { + s = append(s, "Dependency: "+fmt.Sprintf("%#v", this.Dependency)+",\n") + } + if this.PublicDependency != nil { + s = append(s, "PublicDependency: "+fmt.Sprintf("%#v", this.PublicDependency)+",\n") + } + if this.WeakDependency != nil { + s = append(s, "WeakDependency: "+fmt.Sprintf("%#v", this.WeakDependency)+",\n") + } + if this.MessageType != nil { + s = append(s, "MessageType: "+fmt.Sprintf("%#v", this.MessageType)+",\n") + } + if this.EnumType != nil { + s = append(s, "EnumType: "+fmt.Sprintf("%#v", this.EnumType)+",\n") + } + if this.Service != nil { + s = append(s, "Service: "+fmt.Sprintf("%#v", this.Service)+",\n") + } + if this.Extension != nil { + s = append(s, "Extension: "+fmt.Sprintf("%#v", this.Extension)+",\n") + } + if this.Options != nil { + s = append(s, "Options: "+fmt.Sprintf("%#v", this.Options)+",\n") + } + if this.SourceCodeInfo != nil { + s = append(s, "SourceCodeInfo: "+fmt.Sprintf("%#v", this.SourceCodeInfo)+",\n") + } + if this.Syntax != nil { + s = append(s, "Syntax: "+valueToGoStringDescriptor(this.Syntax, "string")+",\n") + } + if this.XXX_unrecognized != nil { + s = append(s, "XXX_unrecognized:"+fmt.Sprintf("%#v", this.XXX_unrecognized)+",\n") + } + s = append(s, "}") + return strings.Join(s, "") +} +func (this *DescriptorProto) GoString() string { + if this == nil { + return "nil" + } + s := make([]string, 0, 14) + s = append(s, "&descriptor.DescriptorProto{") + if this.Name != nil { + s = append(s, "Name: "+valueToGoStringDescriptor(this.Name, "string")+",\n") + } + if this.Field != nil { + s = append(s, "Field: "+fmt.Sprintf("%#v", this.Field)+",\n") + } + if this.Extension != nil { + s = append(s, "Extension: "+fmt.Sprintf("%#v", this.Extension)+",\n") + } + if this.NestedType != nil { + s = append(s, "NestedType: "+fmt.Sprintf("%#v", this.NestedType)+",\n") + } + if this.EnumType != nil { + s = append(s, "EnumType: "+fmt.Sprintf("%#v", this.EnumType)+",\n") + } + if this.ExtensionRange != nil { + s = append(s, "ExtensionRange: "+fmt.Sprintf("%#v", this.ExtensionRange)+",\n") + } + if this.OneofDecl != nil { + s = append(s, "OneofDecl: "+fmt.Sprintf("%#v", this.OneofDecl)+",\n") + } + if this.Options != nil { + s = append(s, "Options: "+fmt.Sprintf("%#v", this.Options)+",\n") + } + if this.ReservedRange != nil { + s = append(s, "ReservedRange: "+fmt.Sprintf("%#v", this.ReservedRange)+",\n") + } + if this.ReservedName != nil { + s = append(s, "ReservedName: "+fmt.Sprintf("%#v", this.ReservedName)+",\n") + } + if this.XXX_unrecognized != nil { + s = append(s, "XXX_unrecognized:"+fmt.Sprintf("%#v", this.XXX_unrecognized)+",\n") + } + s = append(s, "}") + return strings.Join(s, "") +} +func (this *DescriptorProto_ExtensionRange) GoString() string { + if this == nil { + return "nil" + } + s := make([]string, 0, 7) + s = append(s, "&descriptor.DescriptorProto_ExtensionRange{") + if this.Start != nil { + s = append(s, "Start: "+valueToGoStringDescriptor(this.Start, "int32")+",\n") + } + if this.End != nil { + s = append(s, "End: "+valueToGoStringDescriptor(this.End, "int32")+",\n") + } + if this.Options != nil { + s = append(s, "Options: "+fmt.Sprintf("%#v", this.Options)+",\n") + } + if this.XXX_unrecognized != nil { + s = append(s, "XXX_unrecognized:"+fmt.Sprintf("%#v", this.XXX_unrecognized)+",\n") + } + s = append(s, "}") + return strings.Join(s, "") +} +func (this *DescriptorProto_ReservedRange) GoString() string { + if this == nil { + return "nil" + } + s := make([]string, 0, 6) + s = append(s, "&descriptor.DescriptorProto_ReservedRange{") + if this.Start != nil { + s = append(s, "Start: "+valueToGoStringDescriptor(this.Start, "int32")+",\n") + } + if this.End != nil { + s = append(s, "End: "+valueToGoStringDescriptor(this.End, "int32")+",\n") + } + if this.XXX_unrecognized != nil { + s = append(s, "XXX_unrecognized:"+fmt.Sprintf("%#v", this.XXX_unrecognized)+",\n") + } + s = append(s, "}") + return strings.Join(s, "") +} +func (this *ExtensionRangeOptions) GoString() string { + if this == nil { + return "nil" + } + s := make([]string, 0, 5) + s = append(s, "&descriptor.ExtensionRangeOptions{") + if this.UninterpretedOption != nil { + s = append(s, "UninterpretedOption: "+fmt.Sprintf("%#v", this.UninterpretedOption)+",\n") + } + s = append(s, "XXX_InternalExtensions: "+extensionToGoStringDescriptor(this)+",\n") + if this.XXX_unrecognized != nil { + s = append(s, "XXX_unrecognized:"+fmt.Sprintf("%#v", this.XXX_unrecognized)+",\n") + } + s = append(s, "}") + return strings.Join(s, "") +} +func (this *FieldDescriptorProto) GoString() string { + if this == nil { + return "nil" + } + s := make([]string, 0, 14) + s = append(s, "&descriptor.FieldDescriptorProto{") + if this.Name != nil { + s = append(s, "Name: "+valueToGoStringDescriptor(this.Name, "string")+",\n") + } + if this.Number != nil { + s = append(s, "Number: "+valueToGoStringDescriptor(this.Number, "int32")+",\n") + } + if this.Label != nil { + s = append(s, "Label: "+valueToGoStringDescriptor(this.Label, "FieldDescriptorProto_Label")+",\n") + } + if this.Type != nil { + s = append(s, "Type: "+valueToGoStringDescriptor(this.Type, "FieldDescriptorProto_Type")+",\n") + } + if this.TypeName != nil { + s = append(s, "TypeName: "+valueToGoStringDescriptor(this.TypeName, "string")+",\n") + } + if this.Extendee != nil { + s = append(s, "Extendee: "+valueToGoStringDescriptor(this.Extendee, "string")+",\n") + } + if this.DefaultValue != nil { + s = append(s, "DefaultValue: "+valueToGoStringDescriptor(this.DefaultValue, "string")+",\n") + } + if this.OneofIndex != nil { + s = append(s, "OneofIndex: "+valueToGoStringDescriptor(this.OneofIndex, "int32")+",\n") + } + if this.JsonName != nil { + s = append(s, "JsonName: "+valueToGoStringDescriptor(this.JsonName, "string")+",\n") + } + if this.Options != nil { + s = append(s, "Options: "+fmt.Sprintf("%#v", this.Options)+",\n") + } + if this.XXX_unrecognized != nil { + s = append(s, "XXX_unrecognized:"+fmt.Sprintf("%#v", this.XXX_unrecognized)+",\n") + } + s = append(s, "}") + return strings.Join(s, "") +} +func (this *OneofDescriptorProto) GoString() string { + if this == nil { + return "nil" + } + s := make([]string, 0, 6) + s = append(s, "&descriptor.OneofDescriptorProto{") + if this.Name != nil { + s = append(s, "Name: "+valueToGoStringDescriptor(this.Name, "string")+",\n") + } + if this.Options != nil { + s = append(s, "Options: "+fmt.Sprintf("%#v", this.Options)+",\n") + } + if this.XXX_unrecognized != nil { + s = append(s, "XXX_unrecognized:"+fmt.Sprintf("%#v", this.XXX_unrecognized)+",\n") + } + s = append(s, "}") + return strings.Join(s, "") +} +func (this *EnumDescriptorProto) GoString() string { + if this == nil { + return "nil" + } + s := make([]string, 0, 9) + s = append(s, "&descriptor.EnumDescriptorProto{") + if this.Name != nil { + s = append(s, "Name: "+valueToGoStringDescriptor(this.Name, "string")+",\n") + } + if this.Value != nil { + s = append(s, "Value: "+fmt.Sprintf("%#v", this.Value)+",\n") + } + if this.Options != nil { + s = append(s, "Options: "+fmt.Sprintf("%#v", this.Options)+",\n") + } + if this.ReservedRange != nil { + s = append(s, "ReservedRange: "+fmt.Sprintf("%#v", this.ReservedRange)+",\n") + } + if this.ReservedName != nil { + s = append(s, "ReservedName: "+fmt.Sprintf("%#v", this.ReservedName)+",\n") + } + if this.XXX_unrecognized != nil { + s = append(s, "XXX_unrecognized:"+fmt.Sprintf("%#v", this.XXX_unrecognized)+",\n") + } + s = append(s, "}") + return strings.Join(s, "") +} +func (this *EnumDescriptorProto_EnumReservedRange) GoString() string { + if this == nil { + return "nil" + } + s := make([]string, 0, 6) + s = append(s, "&descriptor.EnumDescriptorProto_EnumReservedRange{") + if this.Start != nil { + s = append(s, "Start: "+valueToGoStringDescriptor(this.Start, "int32")+",\n") + } + if this.End != nil { + s = append(s, "End: "+valueToGoStringDescriptor(this.End, "int32")+",\n") + } + if this.XXX_unrecognized != nil { + s = append(s, "XXX_unrecognized:"+fmt.Sprintf("%#v", this.XXX_unrecognized)+",\n") + } + s = append(s, "}") + return strings.Join(s, "") +} +func (this *EnumValueDescriptorProto) GoString() string { + if this == nil { + return "nil" + } + s := make([]string, 0, 7) + s = append(s, "&descriptor.EnumValueDescriptorProto{") + if this.Name != nil { + s = append(s, "Name: "+valueToGoStringDescriptor(this.Name, "string")+",\n") + } + if this.Number != nil { + s = append(s, "Number: "+valueToGoStringDescriptor(this.Number, "int32")+",\n") + } + if this.Options != nil { + s = append(s, "Options: "+fmt.Sprintf("%#v", this.Options)+",\n") + } + if this.XXX_unrecognized != nil { + s = append(s, "XXX_unrecognized:"+fmt.Sprintf("%#v", this.XXX_unrecognized)+",\n") + } + s = append(s, "}") + return strings.Join(s, "") +} +func (this *ServiceDescriptorProto) GoString() string { + if this == nil { + return "nil" + } + s := make([]string, 0, 7) + s = append(s, "&descriptor.ServiceDescriptorProto{") + if this.Name != nil { + s = append(s, "Name: "+valueToGoStringDescriptor(this.Name, "string")+",\n") + } + if this.Method != nil { + s = append(s, "Method: "+fmt.Sprintf("%#v", this.Method)+",\n") + } + if this.Options != nil { + s = append(s, "Options: "+fmt.Sprintf("%#v", this.Options)+",\n") + } + if this.XXX_unrecognized != nil { + s = append(s, "XXX_unrecognized:"+fmt.Sprintf("%#v", this.XXX_unrecognized)+",\n") + } + s = append(s, "}") + return strings.Join(s, "") +} +func (this *MethodDescriptorProto) GoString() string { + if this == nil { + return "nil" + } + s := make([]string, 0, 10) + s = append(s, "&descriptor.MethodDescriptorProto{") + if this.Name != nil { + s = append(s, "Name: "+valueToGoStringDescriptor(this.Name, "string")+",\n") + } + if this.InputType != nil { + s = append(s, "InputType: "+valueToGoStringDescriptor(this.InputType, "string")+",\n") + } + if this.OutputType != nil { + s = append(s, "OutputType: "+valueToGoStringDescriptor(this.OutputType, "string")+",\n") + } + if this.Options != nil { + s = append(s, "Options: "+fmt.Sprintf("%#v", this.Options)+",\n") + } + if this.ClientStreaming != nil { + s = append(s, "ClientStreaming: "+valueToGoStringDescriptor(this.ClientStreaming, "bool")+",\n") + } + if this.ServerStreaming != nil { + s = append(s, "ServerStreaming: "+valueToGoStringDescriptor(this.ServerStreaming, "bool")+",\n") + } + if this.XXX_unrecognized != nil { + s = append(s, "XXX_unrecognized:"+fmt.Sprintf("%#v", this.XXX_unrecognized)+",\n") + } + s = append(s, "}") + return strings.Join(s, "") +} +func (this *FileOptions) GoString() string { + if this == nil { + return "nil" + } + s := make([]string, 0, 23) + s = append(s, "&descriptor.FileOptions{") + if this.JavaPackage != nil { + s = append(s, "JavaPackage: "+valueToGoStringDescriptor(this.JavaPackage, "string")+",\n") + } + if this.JavaOuterClassname != nil { + s = append(s, "JavaOuterClassname: "+valueToGoStringDescriptor(this.JavaOuterClassname, "string")+",\n") + } + if this.JavaMultipleFiles != nil { + s = append(s, "JavaMultipleFiles: "+valueToGoStringDescriptor(this.JavaMultipleFiles, "bool")+",\n") + } + if this.JavaGenerateEqualsAndHash != nil { + s = append(s, "JavaGenerateEqualsAndHash: "+valueToGoStringDescriptor(this.JavaGenerateEqualsAndHash, "bool")+",\n") + } + if this.JavaStringCheckUtf8 != nil { + s = append(s, "JavaStringCheckUtf8: "+valueToGoStringDescriptor(this.JavaStringCheckUtf8, "bool")+",\n") + } + if this.OptimizeFor != nil { + s = append(s, "OptimizeFor: "+valueToGoStringDescriptor(this.OptimizeFor, "FileOptions_OptimizeMode")+",\n") + } + if this.GoPackage != nil { + s = append(s, "GoPackage: "+valueToGoStringDescriptor(this.GoPackage, "string")+",\n") + } + if this.CcGenericServices != nil { + s = append(s, "CcGenericServices: "+valueToGoStringDescriptor(this.CcGenericServices, "bool")+",\n") + } + if this.JavaGenericServices != nil { + s = append(s, "JavaGenericServices: "+valueToGoStringDescriptor(this.JavaGenericServices, "bool")+",\n") + } + if this.PyGenericServices != nil { + s = append(s, "PyGenericServices: "+valueToGoStringDescriptor(this.PyGenericServices, "bool")+",\n") + } + if this.PhpGenericServices != nil { + s = append(s, "PhpGenericServices: "+valueToGoStringDescriptor(this.PhpGenericServices, "bool")+",\n") + } + if this.Deprecated != nil { + s = append(s, "Deprecated: "+valueToGoStringDescriptor(this.Deprecated, "bool")+",\n") + } + if this.CcEnableArenas != nil { + s = append(s, "CcEnableArenas: "+valueToGoStringDescriptor(this.CcEnableArenas, "bool")+",\n") + } + if this.ObjcClassPrefix != nil { + s = append(s, "ObjcClassPrefix: "+valueToGoStringDescriptor(this.ObjcClassPrefix, "string")+",\n") + } + if this.CsharpNamespace != nil { + s = append(s, "CsharpNamespace: "+valueToGoStringDescriptor(this.CsharpNamespace, "string")+",\n") + } + if this.SwiftPrefix != nil { + s = append(s, "SwiftPrefix: "+valueToGoStringDescriptor(this.SwiftPrefix, "string")+",\n") + } + if this.PhpClassPrefix != nil { + s = append(s, "PhpClassPrefix: "+valueToGoStringDescriptor(this.PhpClassPrefix, "string")+",\n") + } + if this.PhpNamespace != nil { + s = append(s, "PhpNamespace: "+valueToGoStringDescriptor(this.PhpNamespace, "string")+",\n") + } + if this.UninterpretedOption != nil { + s = append(s, "UninterpretedOption: "+fmt.Sprintf("%#v", this.UninterpretedOption)+",\n") + } + s = append(s, "XXX_InternalExtensions: "+extensionToGoStringDescriptor(this)+",\n") + if this.XXX_unrecognized != nil { + s = append(s, "XXX_unrecognized:"+fmt.Sprintf("%#v", this.XXX_unrecognized)+",\n") + } + s = append(s, "}") + return strings.Join(s, "") +} +func (this *MessageOptions) GoString() string { + if this == nil { + return "nil" + } + s := make([]string, 0, 9) + s = append(s, "&descriptor.MessageOptions{") + if this.MessageSetWireFormat != nil { + s = append(s, "MessageSetWireFormat: "+valueToGoStringDescriptor(this.MessageSetWireFormat, "bool")+",\n") + } + if this.NoStandardDescriptorAccessor != nil { + s = append(s, "NoStandardDescriptorAccessor: "+valueToGoStringDescriptor(this.NoStandardDescriptorAccessor, "bool")+",\n") + } + if this.Deprecated != nil { + s = append(s, "Deprecated: "+valueToGoStringDescriptor(this.Deprecated, "bool")+",\n") + } + if this.MapEntry != nil { + s = append(s, "MapEntry: "+valueToGoStringDescriptor(this.MapEntry, "bool")+",\n") + } + if this.UninterpretedOption != nil { + s = append(s, "UninterpretedOption: "+fmt.Sprintf("%#v", this.UninterpretedOption)+",\n") + } + s = append(s, "XXX_InternalExtensions: "+extensionToGoStringDescriptor(this)+",\n") + if this.XXX_unrecognized != nil { + s = append(s, "XXX_unrecognized:"+fmt.Sprintf("%#v", this.XXX_unrecognized)+",\n") + } + s = append(s, "}") + return strings.Join(s, "") +} +func (this *FieldOptions) GoString() string { + if this == nil { + return "nil" + } + s := make([]string, 0, 11) + s = append(s, "&descriptor.FieldOptions{") + if this.Ctype != nil { + s = append(s, "Ctype: "+valueToGoStringDescriptor(this.Ctype, "FieldOptions_CType")+",\n") + } + if this.Packed != nil { + s = append(s, "Packed: "+valueToGoStringDescriptor(this.Packed, "bool")+",\n") + } + if this.Jstype != nil { + s = append(s, "Jstype: "+valueToGoStringDescriptor(this.Jstype, "FieldOptions_JSType")+",\n") + } + if this.Lazy != nil { + s = append(s, "Lazy: "+valueToGoStringDescriptor(this.Lazy, "bool")+",\n") + } + if this.Deprecated != nil { + s = append(s, "Deprecated: "+valueToGoStringDescriptor(this.Deprecated, "bool")+",\n") + } + if this.Weak != nil { + s = append(s, "Weak: "+valueToGoStringDescriptor(this.Weak, "bool")+",\n") + } + if this.UninterpretedOption != nil { + s = append(s, "UninterpretedOption: "+fmt.Sprintf("%#v", this.UninterpretedOption)+",\n") + } + s = append(s, "XXX_InternalExtensions: "+extensionToGoStringDescriptor(this)+",\n") + if this.XXX_unrecognized != nil { + s = append(s, "XXX_unrecognized:"+fmt.Sprintf("%#v", this.XXX_unrecognized)+",\n") + } + s = append(s, "}") + return strings.Join(s, "") +} +func (this *OneofOptions) GoString() string { + if this == nil { + return "nil" + } + s := make([]string, 0, 5) + s = append(s, "&descriptor.OneofOptions{") + if this.UninterpretedOption != nil { + s = append(s, "UninterpretedOption: "+fmt.Sprintf("%#v", this.UninterpretedOption)+",\n") + } + s = append(s, "XXX_InternalExtensions: "+extensionToGoStringDescriptor(this)+",\n") + if this.XXX_unrecognized != nil { + s = append(s, "XXX_unrecognized:"+fmt.Sprintf("%#v", this.XXX_unrecognized)+",\n") + } + s = append(s, "}") + return strings.Join(s, "") +} +func (this *EnumOptions) GoString() string { + if this == nil { + return "nil" + } + s := make([]string, 0, 7) + s = append(s, "&descriptor.EnumOptions{") + if this.AllowAlias != nil { + s = append(s, "AllowAlias: "+valueToGoStringDescriptor(this.AllowAlias, "bool")+",\n") + } + if this.Deprecated != nil { + s = append(s, "Deprecated: "+valueToGoStringDescriptor(this.Deprecated, "bool")+",\n") + } + if this.UninterpretedOption != nil { + s = append(s, "UninterpretedOption: "+fmt.Sprintf("%#v", this.UninterpretedOption)+",\n") + } + s = append(s, "XXX_InternalExtensions: "+extensionToGoStringDescriptor(this)+",\n") + if this.XXX_unrecognized != nil { + s = append(s, "XXX_unrecognized:"+fmt.Sprintf("%#v", this.XXX_unrecognized)+",\n") + } + s = append(s, "}") + return strings.Join(s, "") +} +func (this *EnumValueOptions) GoString() string { + if this == nil { + return "nil" + } + s := make([]string, 0, 6) + s = append(s, "&descriptor.EnumValueOptions{") + if this.Deprecated != nil { + s = append(s, "Deprecated: "+valueToGoStringDescriptor(this.Deprecated, "bool")+",\n") + } + if this.UninterpretedOption != nil { + s = append(s, "UninterpretedOption: "+fmt.Sprintf("%#v", this.UninterpretedOption)+",\n") + } + s = append(s, "XXX_InternalExtensions: "+extensionToGoStringDescriptor(this)+",\n") + if this.XXX_unrecognized != nil { + s = append(s, "XXX_unrecognized:"+fmt.Sprintf("%#v", this.XXX_unrecognized)+",\n") + } + s = append(s, "}") + return strings.Join(s, "") +} +func (this *ServiceOptions) GoString() string { + if this == nil { + return "nil" + } + s := make([]string, 0, 6) + s = append(s, "&descriptor.ServiceOptions{") + if this.Deprecated != nil { + s = append(s, "Deprecated: "+valueToGoStringDescriptor(this.Deprecated, "bool")+",\n") + } + if this.UninterpretedOption != nil { + s = append(s, "UninterpretedOption: "+fmt.Sprintf("%#v", this.UninterpretedOption)+",\n") + } + s = append(s, "XXX_InternalExtensions: "+extensionToGoStringDescriptor(this)+",\n") + if this.XXX_unrecognized != nil { + s = append(s, "XXX_unrecognized:"+fmt.Sprintf("%#v", this.XXX_unrecognized)+",\n") + } + s = append(s, "}") + return strings.Join(s, "") +} +func (this *MethodOptions) GoString() string { + if this == nil { + return "nil" + } + s := make([]string, 0, 7) + s = append(s, "&descriptor.MethodOptions{") + if this.Deprecated != nil { + s = append(s, "Deprecated: "+valueToGoStringDescriptor(this.Deprecated, "bool")+",\n") + } + if this.IdempotencyLevel != nil { + s = append(s, "IdempotencyLevel: "+valueToGoStringDescriptor(this.IdempotencyLevel, "MethodOptions_IdempotencyLevel")+",\n") + } + if this.UninterpretedOption != nil { + s = append(s, "UninterpretedOption: "+fmt.Sprintf("%#v", this.UninterpretedOption)+",\n") + } + s = append(s, "XXX_InternalExtensions: "+extensionToGoStringDescriptor(this)+",\n") + if this.XXX_unrecognized != nil { + s = append(s, "XXX_unrecognized:"+fmt.Sprintf("%#v", this.XXX_unrecognized)+",\n") + } + s = append(s, "}") + return strings.Join(s, "") +} +func (this *UninterpretedOption) GoString() string { + if this == nil { + return "nil" + } + s := make([]string, 0, 11) + s = append(s, "&descriptor.UninterpretedOption{") + if this.Name != nil { + s = append(s, "Name: "+fmt.Sprintf("%#v", this.Name)+",\n") + } + if this.IdentifierValue != nil { + s = append(s, "IdentifierValue: "+valueToGoStringDescriptor(this.IdentifierValue, "string")+",\n") + } + if this.PositiveIntValue != nil { + s = append(s, "PositiveIntValue: "+valueToGoStringDescriptor(this.PositiveIntValue, "uint64")+",\n") + } + if this.NegativeIntValue != nil { + s = append(s, "NegativeIntValue: "+valueToGoStringDescriptor(this.NegativeIntValue, "int64")+",\n") + } + if this.DoubleValue != nil { + s = append(s, "DoubleValue: "+valueToGoStringDescriptor(this.DoubleValue, "float64")+",\n") + } + if this.StringValue != nil { + s = append(s, "StringValue: "+valueToGoStringDescriptor(this.StringValue, "byte")+",\n") + } + if this.AggregateValue != nil { + s = append(s, "AggregateValue: "+valueToGoStringDescriptor(this.AggregateValue, "string")+",\n") + } + if this.XXX_unrecognized != nil { + s = append(s, "XXX_unrecognized:"+fmt.Sprintf("%#v", this.XXX_unrecognized)+",\n") + } + s = append(s, "}") + return strings.Join(s, "") +} +func (this *UninterpretedOption_NamePart) GoString() string { + if this == nil { + return "nil" + } + s := make([]string, 0, 6) + s = append(s, "&descriptor.UninterpretedOption_NamePart{") + if this.NamePart != nil { + s = append(s, "NamePart: "+valueToGoStringDescriptor(this.NamePart, "string")+",\n") + } + if this.IsExtension != nil { + s = append(s, "IsExtension: "+valueToGoStringDescriptor(this.IsExtension, "bool")+",\n") + } + if this.XXX_unrecognized != nil { + s = append(s, "XXX_unrecognized:"+fmt.Sprintf("%#v", this.XXX_unrecognized)+",\n") + } + s = append(s, "}") + return strings.Join(s, "") +} +func (this *SourceCodeInfo) GoString() string { + if this == nil { + return "nil" + } + s := make([]string, 0, 5) + s = append(s, "&descriptor.SourceCodeInfo{") + if this.Location != nil { + s = append(s, "Location: "+fmt.Sprintf("%#v", this.Location)+",\n") + } + if this.XXX_unrecognized != nil { + s = append(s, "XXX_unrecognized:"+fmt.Sprintf("%#v", this.XXX_unrecognized)+",\n") + } + s = append(s, "}") + return strings.Join(s, "") +} +func (this *SourceCodeInfo_Location) GoString() string { + if this == nil { + return "nil" + } + s := make([]string, 0, 9) + s = append(s, "&descriptor.SourceCodeInfo_Location{") + if this.Path != nil { + s = append(s, "Path: "+fmt.Sprintf("%#v", this.Path)+",\n") + } + if this.Span != nil { + s = append(s, "Span: "+fmt.Sprintf("%#v", this.Span)+",\n") + } + if this.LeadingComments != nil { + s = append(s, "LeadingComments: "+valueToGoStringDescriptor(this.LeadingComments, "string")+",\n") + } + if this.TrailingComments != nil { + s = append(s, "TrailingComments: "+valueToGoStringDescriptor(this.TrailingComments, "string")+",\n") + } + if this.LeadingDetachedComments != nil { + s = append(s, "LeadingDetachedComments: "+fmt.Sprintf("%#v", this.LeadingDetachedComments)+",\n") + } + if this.XXX_unrecognized != nil { + s = append(s, "XXX_unrecognized:"+fmt.Sprintf("%#v", this.XXX_unrecognized)+",\n") + } + s = append(s, "}") + return strings.Join(s, "") +} +func (this *GeneratedCodeInfo) GoString() string { + if this == nil { + return "nil" + } + s := make([]string, 0, 5) + s = append(s, "&descriptor.GeneratedCodeInfo{") + if this.Annotation != nil { + s = append(s, "Annotation: "+fmt.Sprintf("%#v", this.Annotation)+",\n") + } + if this.XXX_unrecognized != nil { + s = append(s, "XXX_unrecognized:"+fmt.Sprintf("%#v", this.XXX_unrecognized)+",\n") + } + s = append(s, "}") + return strings.Join(s, "") +} +func (this *GeneratedCodeInfo_Annotation) GoString() string { + if this == nil { + return "nil" + } + s := make([]string, 0, 8) + s = append(s, "&descriptor.GeneratedCodeInfo_Annotation{") + if this.Path != nil { + s = append(s, "Path: "+fmt.Sprintf("%#v", this.Path)+",\n") + } + if this.SourceFile != nil { + s = append(s, "SourceFile: "+valueToGoStringDescriptor(this.SourceFile, "string")+",\n") + } + if this.Begin != nil { + s = append(s, "Begin: "+valueToGoStringDescriptor(this.Begin, "int32")+",\n") + } + if this.End != nil { + s = append(s, "End: "+valueToGoStringDescriptor(this.End, "int32")+",\n") + } + if this.XXX_unrecognized != nil { + s = append(s, "XXX_unrecognized:"+fmt.Sprintf("%#v", this.XXX_unrecognized)+",\n") + } + s = append(s, "}") + return strings.Join(s, "") +} +func valueToGoStringDescriptor(v interface{}, typ string) string { + rv := reflect.ValueOf(v) + if rv.IsNil() { + return "nil" + } + pv := reflect.Indirect(rv).Interface() + return fmt.Sprintf("func(v %v) *%v { return &v } ( %#v )", typ, typ, pv) +} +func extensionToGoStringDescriptor(m github_com_gogo_protobuf_proto.Message) string { + e := github_com_gogo_protobuf_proto.GetUnsafeExtensionsMap(m) + if e == nil { + return "nil" + } + s := "proto.NewUnsafeXXX_InternalExtensions(map[int32]proto.Extension{" + keys := make([]int, 0, len(e)) + for k := range e { + keys = append(keys, int(k)) + } + sort.Ints(keys) + ss := []string{} + for _, k := range keys { + ss = append(ss, strconv.Itoa(k)+": "+e[int32(k)].GoString()) + } + s += strings.Join(ss, ",") + "})" + return s +} diff --git a/vendor/github.com/gogo/protobuf/protoc-gen-gogo/descriptor/helper.go b/vendor/github.com/gogo/protobuf/protoc-gen-gogo/descriptor/helper.go new file mode 100644 index 000000000..e0846a357 --- /dev/null +++ b/vendor/github.com/gogo/protobuf/protoc-gen-gogo/descriptor/helper.go @@ -0,0 +1,390 @@ +// Protocol Buffers for Go with Gadgets +// +// Copyright (c) 2013, The GoGo Authors. All rights reserved. +// http://github.com/gogo/protobuf +// +// Redistribution and use in source and binary forms, with or without +// modification, are permitted provided that the following conditions are +// met: +// +// * Redistributions of source code must retain the above copyright +// notice, this list of conditions and the following disclaimer. +// * Redistributions in binary form must reproduce the above +// copyright notice, this list of conditions and the following disclaimer +// in the documentation and/or other materials provided with the +// distribution. +// +// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS +// "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT +// LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR +// A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT +// OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, +// SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT +// LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, +// DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY +// THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT +// (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE +// OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. + +package descriptor + +import ( + "strings" +) + +func (msg *DescriptorProto) GetMapFields() (*FieldDescriptorProto, *FieldDescriptorProto) { + if !msg.GetOptions().GetMapEntry() { + return nil, nil + } + return msg.GetField()[0], msg.GetField()[1] +} + +func dotToUnderscore(r rune) rune { + if r == '.' { + return '_' + } + return r +} + +func (field *FieldDescriptorProto) WireType() (wire int) { + switch *field.Type { + case FieldDescriptorProto_TYPE_DOUBLE: + return 1 + case FieldDescriptorProto_TYPE_FLOAT: + return 5 + case FieldDescriptorProto_TYPE_INT64: + return 0 + case FieldDescriptorProto_TYPE_UINT64: + return 0 + case FieldDescriptorProto_TYPE_INT32: + return 0 + case FieldDescriptorProto_TYPE_UINT32: + return 0 + case FieldDescriptorProto_TYPE_FIXED64: + return 1 + case FieldDescriptorProto_TYPE_FIXED32: + return 5 + case FieldDescriptorProto_TYPE_BOOL: + return 0 + case FieldDescriptorProto_TYPE_STRING: + return 2 + case FieldDescriptorProto_TYPE_GROUP: + return 2 + case FieldDescriptorProto_TYPE_MESSAGE: + return 2 + case FieldDescriptorProto_TYPE_BYTES: + return 2 + case FieldDescriptorProto_TYPE_ENUM: + return 0 + case FieldDescriptorProto_TYPE_SFIXED32: + return 5 + case FieldDescriptorProto_TYPE_SFIXED64: + return 1 + case FieldDescriptorProto_TYPE_SINT32: + return 0 + case FieldDescriptorProto_TYPE_SINT64: + return 0 + } + panic("unreachable") +} + +func (field *FieldDescriptorProto) GetKeyUint64() (x uint64) { + packed := field.IsPacked() + wireType := field.WireType() + fieldNumber := field.GetNumber() + if packed { + wireType = 2 + } + x = uint64(uint32(fieldNumber)<<3 | uint32(wireType)) + return x +} + +func (field *FieldDescriptorProto) GetKey3Uint64() (x uint64) { + packed := field.IsPacked3() + wireType := field.WireType() + fieldNumber := field.GetNumber() + if packed { + wireType = 2 + } + x = uint64(uint32(fieldNumber)<<3 | uint32(wireType)) + return x +} + +func (field *FieldDescriptorProto) GetKey() []byte { + x := field.GetKeyUint64() + i := 0 + keybuf := make([]byte, 0) + for i = 0; x > 127; i++ { + keybuf = append(keybuf, 0x80|uint8(x&0x7F)) + x >>= 7 + } + keybuf = append(keybuf, uint8(x)) + return keybuf +} + +func (field *FieldDescriptorProto) GetKey3() []byte { + x := field.GetKey3Uint64() + i := 0 + keybuf := make([]byte, 0) + for i = 0; x > 127; i++ { + keybuf = append(keybuf, 0x80|uint8(x&0x7F)) + x >>= 7 + } + keybuf = append(keybuf, uint8(x)) + return keybuf +} + +func (desc *FileDescriptorSet) GetField(packageName, messageName, fieldName string) *FieldDescriptorProto { + msg := desc.GetMessage(packageName, messageName) + if msg == nil { + return nil + } + for _, field := range msg.GetField() { + if field.GetName() == fieldName { + return field + } + } + return nil +} + +func (file *FileDescriptorProto) GetMessage(typeName string) *DescriptorProto { + for _, msg := range file.GetMessageType() { + if msg.GetName() == typeName { + return msg + } + nes := file.GetNestedMessage(msg, strings.TrimPrefix(typeName, msg.GetName()+".")) + if nes != nil { + return nes + } + } + return nil +} + +func (file *FileDescriptorProto) GetNestedMessage(msg *DescriptorProto, typeName string) *DescriptorProto { + for _, nes := range msg.GetNestedType() { + if nes.GetName() == typeName { + return nes + } + res := file.GetNestedMessage(nes, strings.TrimPrefix(typeName, nes.GetName()+".")) + if res != nil { + return res + } + } + return nil +} + +func (desc *FileDescriptorSet) GetMessage(packageName string, typeName string) *DescriptorProto { + for _, file := range desc.GetFile() { + if strings.Map(dotToUnderscore, file.GetPackage()) != strings.Map(dotToUnderscore, packageName) { + continue + } + for _, msg := range file.GetMessageType() { + if msg.GetName() == typeName { + return msg + } + } + for _, msg := range file.GetMessageType() { + for _, nes := range msg.GetNestedType() { + if nes.GetName() == typeName { + return nes + } + if msg.GetName()+"."+nes.GetName() == typeName { + return nes + } + } + } + } + return nil +} + +func (desc *FileDescriptorSet) IsProto3(packageName string, typeName string) bool { + for _, file := range desc.GetFile() { + if strings.Map(dotToUnderscore, file.GetPackage()) != strings.Map(dotToUnderscore, packageName) { + continue + } + for _, msg := range file.GetMessageType() { + if msg.GetName() == typeName { + return file.GetSyntax() == "proto3" + } + } + for _, msg := range file.GetMessageType() { + for _, nes := range msg.GetNestedType() { + if nes.GetName() == typeName { + return file.GetSyntax() == "proto3" + } + if msg.GetName()+"."+nes.GetName() == typeName { + return file.GetSyntax() == "proto3" + } + } + } + } + return false +} + +func (msg *DescriptorProto) IsExtendable() bool { + return len(msg.GetExtensionRange()) > 0 +} + +func (desc *FileDescriptorSet) FindExtension(packageName string, typeName string, fieldName string) (extPackageName string, field *FieldDescriptorProto) { + parent := desc.GetMessage(packageName, typeName) + if parent == nil { + return "", nil + } + if !parent.IsExtendable() { + return "", nil + } + extendee := "." + packageName + "." + typeName + for _, file := range desc.GetFile() { + for _, ext := range file.GetExtension() { + if strings.Map(dotToUnderscore, file.GetPackage()) == strings.Map(dotToUnderscore, packageName) { + if !(ext.GetExtendee() == typeName || ext.GetExtendee() == extendee) { + continue + } + } else { + if ext.GetExtendee() != extendee { + continue + } + } + if ext.GetName() == fieldName { + return file.GetPackage(), ext + } + } + } + return "", nil +} + +func (desc *FileDescriptorSet) FindExtensionByFieldNumber(packageName string, typeName string, fieldNum int32) (extPackageName string, field *FieldDescriptorProto) { + parent := desc.GetMessage(packageName, typeName) + if parent == nil { + return "", nil + } + if !parent.IsExtendable() { + return "", nil + } + extendee := "." + packageName + "." + typeName + for _, file := range desc.GetFile() { + for _, ext := range file.GetExtension() { + if strings.Map(dotToUnderscore, file.GetPackage()) == strings.Map(dotToUnderscore, packageName) { + if !(ext.GetExtendee() == typeName || ext.GetExtendee() == extendee) { + continue + } + } else { + if ext.GetExtendee() != extendee { + continue + } + } + if ext.GetNumber() == fieldNum { + return file.GetPackage(), ext + } + } + } + return "", nil +} + +func (desc *FileDescriptorSet) FindMessage(packageName string, typeName string, fieldName string) (msgPackageName string, msgName string) { + parent := desc.GetMessage(packageName, typeName) + if parent == nil { + return "", "" + } + field := parent.GetFieldDescriptor(fieldName) + if field == nil { + var extPackageName string + extPackageName, field = desc.FindExtension(packageName, typeName, fieldName) + if field == nil { + return "", "" + } + packageName = extPackageName + } + typeNames := strings.Split(field.GetTypeName(), ".") + if len(typeNames) == 1 { + msg := desc.GetMessage(packageName, typeName) + if msg == nil { + return "", "" + } + return packageName, msg.GetName() + } + if len(typeNames) > 2 { + for i := 1; i < len(typeNames)-1; i++ { + packageName = strings.Join(typeNames[1:len(typeNames)-i], ".") + typeName = strings.Join(typeNames[len(typeNames)-i:], ".") + msg := desc.GetMessage(packageName, typeName) + if msg != nil { + typeNames := strings.Split(msg.GetName(), ".") + if len(typeNames) == 1 { + return packageName, msg.GetName() + } + return strings.Join(typeNames[1:len(typeNames)-1], "."), typeNames[len(typeNames)-1] + } + } + } + return "", "" +} + +func (msg *DescriptorProto) GetFieldDescriptor(fieldName string) *FieldDescriptorProto { + for _, field := range msg.GetField() { + if field.GetName() == fieldName { + return field + } + } + return nil +} + +func (desc *FileDescriptorSet) GetEnum(packageName string, typeName string) *EnumDescriptorProto { + for _, file := range desc.GetFile() { + if strings.Map(dotToUnderscore, file.GetPackage()) != strings.Map(dotToUnderscore, packageName) { + continue + } + for _, enum := range file.GetEnumType() { + if enum.GetName() == typeName { + return enum + } + } + } + return nil +} + +func (f *FieldDescriptorProto) IsEnum() bool { + return *f.Type == FieldDescriptorProto_TYPE_ENUM +} + +func (f *FieldDescriptorProto) IsMessage() bool { + return *f.Type == FieldDescriptorProto_TYPE_MESSAGE +} + +func (f *FieldDescriptorProto) IsBytes() bool { + return *f.Type == FieldDescriptorProto_TYPE_BYTES +} + +func (f *FieldDescriptorProto) IsRepeated() bool { + return f.Label != nil && *f.Label == FieldDescriptorProto_LABEL_REPEATED +} + +func (f *FieldDescriptorProto) IsString() bool { + return *f.Type == FieldDescriptorProto_TYPE_STRING +} + +func (f *FieldDescriptorProto) IsBool() bool { + return *f.Type == FieldDescriptorProto_TYPE_BOOL +} + +func (f *FieldDescriptorProto) IsRequired() bool { + return f.Label != nil && *f.Label == FieldDescriptorProto_LABEL_REQUIRED +} + +func (f *FieldDescriptorProto) IsPacked() bool { + return f.Options != nil && f.GetOptions().GetPacked() +} + +func (f *FieldDescriptorProto) IsPacked3() bool { + if f.IsRepeated() && f.IsScalar() { + if f.Options == nil || f.GetOptions().Packed == nil { + return true + } + return f.Options != nil && f.GetOptions().GetPacked() + } + return false +} + +func (m *DescriptorProto) HasExtension() bool { + return len(m.ExtensionRange) > 0 +} diff --git a/vendor/modules.txt b/vendor/modules.txt index 7c9e34cb6..441d6cc10 100644 --- a/vendor/modules.txt +++ b/vendor/modules.txt @@ -54,7 +54,7 @@ github.com/apparentlymart/go-textseg/textseg github.com/armon/circbuf # github.com/armon/go-radix v0.0.0-20160115234725-4239b77079c7 github.com/armon/go-radix -# github.com/aws/aws-sdk-go v1.14.31 +# github.com/aws/aws-sdk-go v1.15.48 github.com/aws/aws-sdk-go/aws github.com/aws/aws-sdk-go/aws/awserr github.com/aws/aws-sdk-go/service/dynamodb @@ -69,6 +69,7 @@ github.com/aws/aws-sdk-go/aws/request github.com/aws/aws-sdk-go/aws/signer/v4 github.com/aws/aws-sdk-go/private/protocol github.com/aws/aws-sdk-go/private/protocol/jsonrpc +github.com/aws/aws-sdk-go/internal/s3err github.com/aws/aws-sdk-go/private/protocol/eventstream github.com/aws/aws-sdk-go/private/protocol/eventstream/eventstreamapi github.com/aws/aws-sdk-go/private/protocol/rest @@ -182,7 +183,7 @@ github.com/bgentry/speakeasy github.com/blang/semver # github.com/chzyer/readline v0.0.0-20161106042343-c914be64f07d github.com/chzyer/readline -# github.com/coreos/etcd v3.2.7+incompatible +# github.com/coreos/etcd v3.3.10+incompatible github.com/coreos/etcd/client github.com/coreos/etcd/clientv3 github.com/coreos/etcd/clientv3/concurrency @@ -210,15 +211,19 @@ github.com/dylanmei/winrmtest github.com/go-ini/ini # github.com/go-test/deep v1.0.1 github.com/go-test/deep +# github.com/gogo/protobuf v0.0.0-20180821102207-98f6aa8b3bcf +github.com/gogo/protobuf/gogoproto +github.com/gogo/protobuf/proto +github.com/gogo/protobuf/protoc-gen-gogo/descriptor # github.com/golang/mock v0.0.0-20180503014854-22bbf0ddf081 github.com/golang/mock/gomock # github.com/golang/protobuf v1.2.0 github.com/golang/protobuf/proto github.com/golang/protobuf/ptypes -github.com/golang/protobuf/protoc-gen-go/descriptor github.com/golang/protobuf/ptypes/any github.com/golang/protobuf/ptypes/duration github.com/golang/protobuf/ptypes/timestamp +github.com/golang/protobuf/protoc-gen-go/descriptor # github.com/google/go-cmp v0.2.0 github.com/google/go-cmp/cmp github.com/google/go-cmp/cmp/cmpopts @@ -554,8 +559,8 @@ google.golang.org/appengine/internal/log google.golang.org/appengine/internal/remote_api # google.golang.org/genproto v0.0.0-20180831171423-11092d34479b google.golang.org/genproto/googleapis/iam/v1 -google.golang.org/genproto/googleapis/api/annotations google.golang.org/genproto/googleapis/rpc/status +google.golang.org/genproto/googleapis/api/annotations # google.golang.org/grpc v1.14.0 google.golang.org/grpc google.golang.org/grpc/test/bufconn @@ -565,6 +570,8 @@ google.golang.org/grpc/health google.golang.org/grpc/health/grpc_health_v1 google.golang.org/grpc/codes google.golang.org/grpc/grpclog +google.golang.org/grpc/keepalive +google.golang.org/grpc/status google.golang.org/grpc/balancer google.golang.org/grpc/balancer/roundrobin google.golang.org/grpc/connectivity @@ -576,14 +583,12 @@ google.golang.org/grpc/internal/channelz google.golang.org/grpc/internal/envconfig google.golang.org/grpc/internal/grpcrand google.golang.org/grpc/internal/transport -google.golang.org/grpc/keepalive google.golang.org/grpc/naming google.golang.org/grpc/peer google.golang.org/grpc/resolver google.golang.org/grpc/resolver/dns google.golang.org/grpc/resolver/passthrough google.golang.org/grpc/stats -google.golang.org/grpc/status google.golang.org/grpc/tap google.golang.org/grpc/balancer/base # gopkg.in/yaml.v2 v2.2.1